My Project
|
The main driver class. More...
#include <elasticity_upscale.hpp>
Public Types | |
typedef GridType::LeafGridView::ctype | ctype |
A basic number. | |
typedef Dune::FieldVector< double, dim > | NodeValue |
A vectorial node value. | |
typedef GridType::LeafGridView::template Codim< 1 >::Geometry::GlobalCoordinate | GlobalCoordinate |
A global coordinate. | |
typedef GridType::LeafGridView::IndexSet | LeafIndexSet |
A set of indices. | |
typedef GridType::LeafGridView::template Codim< 0 >::Iterator | LeafIterator |
An iterator over grid cells. | |
typedef PC::type | PCType |
Our preconditioner type. | |
typedef std::shared_ptr< typename PC::type > | PCPtr |
A pointer to our preconditioner. | |
Public Member Functions | |
ElasticityUpscale (const GridType &gv_, ctype tol_, ctype Escale_, const std::string &file, const std::string &rocklist, bool verbose_) | |
Main constructor. More... | |
void | findBoundaries (double *min, double *max) |
Find boundary coordinates. More... | |
void | addMPC (Direction dir, int slavenode, const BoundaryGrid::Vertex &m) |
Add a MPC equation. More... | |
void | periodicBCs (const double *min, const double *max) |
Establish periodic boundaries using the MPC approach. More... | |
void | periodicBCsMortar (const double *min, const double *max, int n1, int n2, int p1, int p2) |
Establish periodic boundaries using the mortar approach. More... | |
void | fixCorners (const double *min, const double *max) |
Fix corner nodes. More... | |
void | assemble (int loadcase, bool matrix) |
Assemble (optionally) stiffness matrix A and load vector. More... | |
template<int comp> | |
void | averageStress (Dune::FieldVector< ctype, comp > &sigma, const Vector &u, int loadcase) |
Calculate the average stress vector for the given loadcase. More... | |
void | solve (int loadcase) |
Solve Au = b for u. More... | |
void | setupSolvers (const LinSolParams ¶ms) |
Public Attributes | |
ASMHandler< GridType > | A |
The linear operator. | |
Vector | u [6] |
The solution vectors. | |
Vector | b [6] |
The load vectors. | |
std::vector< double > | volumeFractions |
Vector holding the volume fractions for materials (grouped by SATNUM) | |
bool | bySat |
Are volume fractions grouped by SATNUM? | |
double | upscaledRho |
Upscaled density. | |
Static Public Attributes | |
static const int | dim = GridType::dimension |
Dimension of our grid. | |
The main driver class.
|
inline |
Main constructor.
[in] | gv_ | The grid to operate on |
[in] | tol_ | The tolerance to use when deciding whether or not a coordinate falls on a plane/line/point. |
[in] | Escale_ | A scale value for E-moduluses to avoid numerical issues |
[in] | file | The eclipse grid file |
[in] | rocklist | If not blank, file is a rocklist |
[in] | verbose | If true, give verbose output |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::addMPC | ( | Direction | dir, |
int | slavenode, | ||
const BoundaryGrid::Vertex & | m | ||
) |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::assemble | ( | int | loadcase, |
bool | matrix | ||
) |
Assemble (optionally) stiffness matrix A and load vector.
[in] | loadcase | The strain load case. Set to -1 to skip |
[in] | matrix | Whether or not to assemble the matrix |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::averageStress | ( | Dune::FieldVector< ctype, comp > & | sigma, |
const Vector & | u, | ||
int | loadcase | ||
) |
Calculate the average stress vector for the given loadcase.
[out] | sigma | The stress vector |
[in] | u | The displacement vector |
[in] | loadcase | The strain load case considered |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::findBoundaries | ( | double * | min, |
double * | max | ||
) |
Find boundary coordinates.
[out] | min | The miminum coordinates of the grid |
[out] | max | The maximum coordinates of the grid |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::fixCorners | ( | const double * | min, |
const double * | max | ||
) |
Fix corner nodes.
[in] | min | The minimum coordinates on the grid |
[in] | max | The maximum coordinates on the grid |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::periodicBCs | ( | const double * | min, |
const double * | max | ||
) |
Establish periodic boundaries using the MPC approach.
[in] | min | The minimum coordinates of the grid |
[in] | max | The maximum coordinates of the grid |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::periodicBCsMortar | ( | const double * | min, |
const double * | max, | ||
int | n1, | ||
int | n2, | ||
int | p1, | ||
int | p2 | ||
) |
Establish periodic boundaries using the mortar approach.
[in] | min | The minimum coordinates of the grid |
[in] | max | The maximum coordinates of the grid |
[in] | n1 | The number of elements on the lambda grid in the X direction |
[in] | n2 | The number of elements on the lambda grid in the Y direction |
[in] | p1 | The order of multipliers in the X direction |
[in] | p2 | The order of multipliers in the Y direction |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::setupSolvers | ( | const LinSolParams & | params | ) |
[in] | params | The linear solver parameters |
void Opm::Elasticity::ElasticityUpscale< GridType, PC >::solve | ( | int | loadcase | ) |
Solve Au = b for u.
[in] | loadcase | The load case to solve |