opm-upscaling
mortar_utils.hpp
Go to the documentation of this file.
1 //==============================================================================
11 //==============================================================================
12 #ifndef MORTAR_UTILS_HPP_
13 #define MORTAR_UTILS_HPP_
14 
16 
17 namespace Opm {
18  namespace Elasticity {
19 
20 class MortarUtils {
21  public:
27  static void extractBlock(Vector& x, const Vector& y, int len, int start = 0)
28  {
29  x.resize(len);
30  std::copy_n(y.begin() + start, len, x.begin());
31  }
32 
38  static void injectBlock(Vector& x, const Vector& y, int len, int start = 0)
39  {
40  std::copy_n(y.begin(), len, x.begin() + start);
41  }
42 };
43 
44 }
45 }
46 
47 #endif
Helper class with some matrix operations.
Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector
A vector holding our RHS.
Definition: matrixops.hpp:33
Inverting small matrices.
Definition: ImplicitAssembly.hpp:43
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
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
Definition: mortar_utils.hpp:20