Class handling finite element assembly.
More...
#include <asmhandler.hpp>
|
typedef
GridType::LeafGridView::IndexSet | LeafIndexSet |
| A set of indices.
|
|
typedef
GridType::LeafGridView::template
Codim< 0 >::Iterator | LeafIterator |
| An iterator over grid cells.
|
|
typedef Dune::FieldVector
< double, dim > | NodeValue |
| A vectorial node value.
|
|
|
| ASMHandler (const GridType &gv_) |
| The default constructor. More...
|
|
| ~ASMHandler () |
| Destructor.
|
|
size_t | getEqns () const |
| Get the number of equations in the system. More...
|
|
int | getEquationForDof (int node, int dof) |
| Get the equation number for a given dof on a given node. More...
|
|
Matrix & | getOperator () |
| Obtain a reference to the linear operator. More...
|
|
Vector & | getLoadVector () |
| Obtain a reference to the load vector. More...
|
|
void | initForAssembly () |
| This function needs to be called before starting the element assembly. More...
|
|
template<int esize> |
void | addElement (const Dune::FieldMatrix< double, esize, esize > *K, const Dune::FieldVector< double, esize > *S, const LeafIterator &cell, Vector *b=NULL) |
| Add an element matrix/vector to the system. More...
|
|
template<int comp> |
void | extractValues (Dune::FieldVector< double, comp > &v, const Vector &u, const LeafIterator &it) |
| Extract values corresponding to cell. More...
|
|
void | expandSolution (Vector &result, const Vector &u) |
| Expand a system vector to a solution vector.
|
|
void | addMPC (MPC *mpc) |
| Add a MPC. More...
|
|
MPC * | getMPC (int node, int dof) |
| Look for and return a MPC for a specified node+dof. More...
|
|
void | updateFixedNode (int node, const std::pair< Direction, NodeValue > &entry) |
| Update/add a fixed node. More...
|
|
bool | isFixed (int node) |
| Check if a node is marked as fixed (in any direction) More...
|
|
void | printOperator () const |
| Print the current operator.
|
|
void | printLoadVector () const |
| Print the current load vector.
|
|
AdjacencyPattern & | getAdjacencyPattern () |
| Access current adjacency pattern. More...
|
|
|
static const int | dim = GridType::dimension |
| The dimension of the grid.
|
|
|
typedef std::pair< Direction,
NodeValue > | fixEntry |
| Fixed nodes.
|
|
typedef std::map< int, fixEntry > | fixMap |
| A mapping from dof to fix value info.
|
|
typedef fixMap::iterator | fixIt |
| Iterator over a fixmap.
|
|
|
void | resolveMPCChains () |
| Resolve chained MPCs.
|
|
void | resolveMPCChain (MPC *mpc) |
| Internal function. More...
|
|
void | preprocess () |
| Internal function. Generate meqn for registered MPC/fixed nodes.
|
|
void | nodeAdjacency (const LeafIterator &it, int vertexsize, int row) |
| Internal function. More...
|
|
void | determineAdjacencyPattern () |
| Internal function. Calculate adjacency pattern.
|
|
template<int esize> |
void | addDOF (int row, int erow, const Dune::FieldMatrix< double, esize, esize > *K, const Dune::FieldVector< double, esize > *S, const LeafIndexSet &set, const LeafIterator &cell, Vector *b, double scale=1.f) |
| Internal function. More...
|
|
|
MPCMap | mpcs |
| The set of MPC.
|
|
std::vector< int > | meqn |
| Vector of (interleaved) dof<->eqn mapping.
|
|
fixMap | fixedNodes |
| The map holding information about our fixed nodes.
|
|
AdjacencyPattern | adjacencyPattern |
| Holds the adjacency pattern of the sparse matrix.
|
|
Matrix | A |
| The linear operator.
|
|
Vector | b |
| The load vector.
|
|
const GridType & | gv |
| A reference to the grid in use.
|
|
size_t | maxeqn |
| The number of equations in the system.
|
|
template<class GridType>
class Opm::Elasticity::ASMHandler< GridType >
Class handling finite element assembly.
The default constructor.
- Parameters
-
[in] | gv_ | The grid the operator is assembled over |
template<class GridType >
template<int esize>
void Opm::Elasticity::ASMHandler< GridType >::addDOF |
( |
int |
row, |
|
|
int |
erow, |
|
|
const Dune::FieldMatrix< double, esize, esize > * |
K, |
|
|
const Dune::FieldVector< double, esize > * |
S, |
|
|
const LeafIndexSet & |
set, |
|
|
const LeafIterator & |
cell, |
|
|
Vector * |
b, |
|
|
double |
scale = 1.f |
|
) |
| |
|
protected |
Internal function.
Assemble entries for a single DOF
- Parameters
-
[in] | row | The row in the global matrix |
[in] | erow | The row in the element matrix |
[in] | K | Pointer to the element matrix. Can be NULL |
[in] | S | Pointer to the element load vector. Can be NULL |
[in] | set | The index set |
[in] | cell | An iterator pointing to the cell we're assembling for |
[in] | b | Vector to add contributions to |
[in] | scale | Scale for elements. Used with MPC couplings |
template<class GridType >
template<int esize>
void Opm::Elasticity::ASMHandler< GridType >::addElement |
( |
const Dune::FieldMatrix< double, esize, esize > * |
K, |
|
|
const Dune::FieldVector< double, esize > * |
S, |
|
|
const LeafIterator & |
cell, |
|
|
Vector * |
b = NULL |
|
) |
| |
Add an element matrix/vector to the system.
- Parameters
-
[in] | K | Pointer to the element matrix. Can be NULL |
[in] | S | Pointer to the element load vector. Can be NULL |
[in] | cell | An iterator pointing to the cell we're assembling for |
[in] | b | Vector to add contributions to. If not given, we use the internal vector |
template<class GridType >
Add a MPC.
- Parameters
-
[in] | mpc | Pointer to the MPC to add. |
- Note
- This class handles destruction
template<class GridType >
template<int comp>
Extract values corresponding to cell.
- Parameters
-
[in] | u | The global load vector |
[in] | it | An iterator to the cell we want to extract values for |
[out] | v | Vector holding the values requested |
Access current adjacency pattern.
Can be used to add extra entries, such as other blocks
Get the number of equations in the system.
- Returns
- The number of equations in the system
Get the equation number for a given dof on a given node.
- Parameters
-
[in] | node | The node number |
[in] | dof | The DOF |
- Returns
- The equation number if active, -1 otherwise
Obtain a reference to the load vector.
- Returns
- Reference to load vector
template<class GridType >
Look for and return a MPC for a specified node+dof.
- Parameters
-
[in] | node | The requested node |
[in] | dof | The requested DOF at given node |
- Returns
- The MPC for the node/dof if found, else NULL
Obtain a reference to the linear operator.
- Returns
- Reference to linear operator
template<class GridType >
This function needs to be called before starting the element assembly.
Check if a node is marked as fixed (in any direction)
- Parameters
-
[in] | node | The node to query for |
template<class GridType >
Internal function.
Generate adjacency pattern for a given node
- Parameters
-
[in] | it | Iterator pointing to the cell in of the node |
[in] | vertexsize | Number of vertices in the cell |
[in] | row | The equation number/row in matrix |
template<class GridType >
Internal function.
Handles a single MPC
- Parameters
-
[in] | mpc | Pointer to the MPC to resolve |
template<class GridType >
Update/add a fixed node.
- Parameters
-
[in] | node | The node number |
[in] | entry | The fixed values |
The documentation for this class was generated from the following files: