mortar_utils.hpp
Go to the documentation of this file.
1 //==============================================================================
11 //==============================================================================
12 #ifndef MORTAR_UTILS_HPP_
13 #define MORTAR_UTILS_HPP_
14 
15 namespace Opm {
16  namespace Elasticity {
17 
18 class MortarUtils {
19  public:
25  static void extractBlock(Vector& x, const Vector& y, int len, int start=0)
26  {
27  x.resize(len,false);
28  std::copy(y.begin()+start,y.begin()+len+start,x.begin());
29  }
30 
36  static void injectBlock(Vector& x, const Vector& y, int len, int start=0)
37  {
38  std::copy(y.begin(),y.begin()+len,x.begin()+start);
39  }
40 };
41 
42 }
43 }
44 
45 #endif
LeafVertexIterator start
Definition: elasticity_upscale_impl.hpp:148
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:36
Definition: applier.hpp:18
Definition: mortar_utils.hpp:18
Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector
A vector holding our RHS.
Definition: matrixops.hpp:29
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:25