Loading...
Searching...
No Matches
mortar_utils.hpp
Go to the documentation of this file.
//==============================================================================
//==============================================================================
#ifndef MORTAR_UTILS_HPP_
#define MORTAR_UTILS_HPP_
#include <opm/elasticity/matrixops.hpp>
namespace Opm {
namespace Elasticity {
class MortarUtils {
public:
static void extractBlock(Vector& x, const Vector& y, int len, int start = 0)
{
x.resize(len);
std::copy(y.begin() + start, y.begin() + len + start, x.begin());
}
static void injectBlock(Vector& x, const Vector& y, int len, int start = 0)
{
std::copy(y.begin(), y.begin() + len, x.begin() + start);
}
};
}
}
#endif
Opm::Elasticity::MortarUtils
Definition mortar_utils.hpp:20
Opm::Elasticity::MortarUtils::extractBlock
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
Opm::Elasticity::MortarUtils::injectBlock
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
matrixops.hpp
Helper class with some matrix operations.
Opm::Elasticity::Vector
Dune::BlockVector< Dune::FieldVector< double, 1 > > Vector
A vector holding our RHS.
Definition matrixops.hpp:33
Opm
Inverting small matrices.
Definition ImplicitAssembly.hpp:43