My Project
Loading...
Searching...
No Matches
mortar_utils.hpp
Go to the documentation of this file.
1//==============================================================================
11//==============================================================================
12#ifndef MORTAR_UTILS_HPP_
13#define MORTAR_UTILS_HPP_
14
15namespace Opm {
16 namespace Elasticity {
17
19 public:
25 static void extractBlock(Vector& x, const Vector& y, int len, int start=0)
26 {
27 x.resize(len);
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
Definition mortar_utils.hpp:18
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
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
Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector
A vector holding our RHS.
Definition matrixops.hpp:33
Inverting small matrices.
Definition ImplicitAssembly.hpp:43