mortar_utils.hpp
Go to the documentation of this file.
1//==============================================================================
11//==============================================================================
12#ifndef MORTAR_UTILS_HPP_
13#define MORTAR_UTILS_HPP_
14
16
17namespace Opm {
18 namespace Elasticity {
19
21 public:
27 static void extractBlock(Vector& x, const Vector& y, int len, int start = 0)
28 {
29 x.resize(len);
30 std::copy(y.begin() + start, y.begin() + len + start, x.begin());
31 }
32
38 static void injectBlock(Vector& x, const Vector& y, int len, int start = 0)
39 {
40 std::copy(y.begin(), y.begin() + len, x.begin() + start);
41 }
42};
43
44}
45}
46
47#endif
Definition: mortar_utils.hpp:20
static void extractBlock(Vector &x, const Vector &y, int len, int start=0)
Extract a range of indices from a vector.
Definition: mortar_utils.hpp:27
static void injectBlock(Vector &x, const Vector &y, int len, int start=0)
Inject a range of indices into a vector.
Definition: mortar_utils.hpp:38
Helper class with some matrix operations.
Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector
A vector holding our RHS.
Definition: matrixops.hpp:33
LeafVertexIterator start
Definition: elasticity_upscale_impl.hpp:150
Definition: ImplicitAssembly.hpp:43