Loading...
Searching...
No Matches
elasticity.hpp
Go to the documentation of this file.
//==============================================================================
//==============================================================================
#ifndef ELASTICITY_HPP_
#define ELASTICITY_HPP_
#include <dune/common/fmatrix.hh>
namespace Opm {
namespace Elasticity {
template<class GridType>
class Elasticity {
public:
static const int dim = GridType::dimension;
typedef typename GridType::LeafGridView::ctype ctype;
explicit Elasticity(const GridType& gv_) : gv(gv_) {}
template<int funcdim>
void getBVector(Dune::FieldVector<ctype,funcdim>& BVector,
const Dune::FieldVector<ctype,dim>& point);
template<int components, int funcdim>
void getBmatrix(Dune::FieldMatrix<ctype,components,funcdim>& B,
const Dune::FieldVector<ctype,dim>& point,
const Dune::FieldMatrix<ctype,dim,dim>& Jinv);
template<int comp, int funcdim>
void getStiffnessMatrix(Dune::FieldMatrix<ctype,funcdim,funcdim>& A,
const Dune::FieldMatrix<ctype,comp,funcdim>& B,
const Dune::FieldMatrix<ctype,comp,comp>& C,
ctype detJW);
template<int comp, int funcdim>
void getStressVector(Dune::FieldVector<ctype,comp>& sigma,
const Dune::FieldVector<ctype,funcdim>& v,
const Dune::FieldVector<ctype,comp>& eps0,
const Dune::FieldMatrix<ctype,comp,funcdim>& B,
const Dune::FieldMatrix<ctype,comp,comp>& C);
protected:
const GridType& gv;
};
Dune::FieldVector<double,3> waveSpeeds(const Dune::FieldMatrix<double,6,6>& C, double phi,
double theta, double density);
}
}
#include "elasticity_impl.hpp"
#endif
Opm::Elasticity::Elasticity::Elasticity
Elasticity(const GridType &gv_)
Default constructor.
Definition elasticity.hpp:32
Opm::Elasticity::Elasticity::getStressVector
void getStressVector(Dune::FieldVector< ctype, comp > &sigma, const Dune::FieldVector< ctype, funcdim > &v, const Dune::FieldVector< ctype, comp > &eps0, const Dune::FieldMatrix< ctype, comp, funcdim > &B, const Dune::FieldMatrix< ctype, comp, comp > &C)
Return the stress vector in a quadrature point.
Definition elasticity_impl.hpp:107
Opm::Elasticity::Elasticity::getStiffnessMatrix
void getStiffnessMatrix(Dune::FieldMatrix< ctype, funcdim, funcdim > &A, const Dune::FieldMatrix< ctype, comp, funcdim > &B, const Dune::FieldMatrix< ctype, comp, comp > &C, ctype detJW)
Return the stiffness matrix contributions in a quadrature point.
Definition elasticity_impl.hpp:91
Opm::Elasticity::Elasticity::getBVector
void getBVector(Dune::FieldVector< ctype, funcdim > &BVector, const Dune::FieldVector< ctype, dim > &point)
Returns the vector of basis function values in a quadrature point.
Opm::Elasticity::Elasticity::ctype
GridType::LeafGridView::ctype ctype
A basic number.
Definition elasticity.hpp:28
Opm::Elasticity::Elasticity::gv
const GridType & gv
Const reference to our grid.
Definition elasticity.hpp:75
Opm::Elasticity::Elasticity::dim
static const int dim
The dimension of our grid.
Definition elasticity.hpp:25
Opm::Elasticity::Elasticity::getBmatrix
void getBmatrix(Dune::FieldMatrix< ctype, components, funcdim > &B, const Dune::FieldVector< ctype, dim > &point, const Dune::FieldMatrix< ctype, dim, dim > &Jinv)
Returns the B matrix in a quadrature point.
Definition elasticity_impl.hpp:22
Opm::GridType
Opm::Elasticity::waveSpeeds
Dune::FieldVector< double, 3 > waveSpeeds(const Dune::FieldMatrix< double, 6, 6 > &C, double phi, double theta, double density)
Compute the elastic wave velocities.
Definition elasticity_impl.hpp:116
elasticity_impl.hpp
Elasticity helper class - template implementations.
Opm
Inverting small matrices.
Definition ImplicitAssembly.hpp:43