Chaste Commit::1fd4e48e3990e67db148bc1bc4cf6991a0049d0c
ContinuumMechanicsNeumannBcsAssembler< DIM > Class Template Reference

#include <ContinuumMechanicsNeumannBcsAssembler.hpp>

+ Inheritance diagram for ContinuumMechanicsNeumannBcsAssembler< DIM >:
+ Collaboration diagram for ContinuumMechanicsNeumannBcsAssembler< DIM >:

Public Member Functions

 ContinuumMechanicsNeumannBcsAssembler (AbstractTetrahedralMesh< DIM, DIM > *pMesh, ContinuumMechanicsProblemDefinition< DIM > *pProblemDefinition)
 
virtual ~ContinuumMechanicsNeumannBcsAssembler ()
 
- Public Member Functions inherited from AbstractFeAssemblerInterface< true, false >
 AbstractFeAssemblerInterface ()
 
void SetMatrixToAssemble (Mat &rMatToAssemble, bool zeroMatrixBeforeAssembly=true)
 
void SetVectorToAssemble (Vec &rVecToAssemble, bool zeroVectorBeforeAssembly)
 
void Assemble ()
 
void AssembleMatrix ()
 
void AssembleVector ()
 
virtual ~AbstractFeAssemblerInterface ()
 

Protected Member Functions

void DoAssemble ()
 
void AssembleOnBoundaryElement (BoundaryElement< DIM-1, DIM > &rElement, c_vector< double, STENCIL_SIZE > &rBElem, unsigned boundaryConditionIndex)
 

Protected Attributes

AbstractTetrahedralMesh< DIM, DIM > * mpMesh
 
ContinuumMechanicsProblemDefinition< DIM > * mpProblemDefinition
 
GaussianQuadratureRule< DIM-1 > * mpQuadRule
 
- Protected Attributes inherited from AbstractFeAssemblerInterface< true, false >
Vec mVectorToAssemble
 
Mat mMatrixToAssemble
 
bool mAssembleMatrix
 
bool mAssembleVector
 
bool mZeroMatrixBeforeAssembly
 
bool mZeroVectorBeforeAssembly
 
PetscInt mOwnershipRangeLo
 
PetscInt mOwnershipRangeHi
 

Static Private Attributes

static const unsigned NUM_VERTICES_PER_ELEMENT = DIM
 
static const unsigned NUM_NODES_PER_ELEMENT = DIM*(DIM+1)/2
 
static const unsigned SPATIAL_BLOCK_SIZE_ELEMENTAL = DIM*NUM_NODES_PER_ELEMENT
 
static const unsigned PRESSURE_BLOCK_SIZE_ELEMENTAL = NUM_VERTICES_PER_ELEMENT
 
static const unsigned STENCIL_SIZE = DIM*NUM_NODES_PER_ELEMENT + NUM_VERTICES_PER_ELEMENT
 

Detailed Description

template<unsigned DIM>
class ContinuumMechanicsNeumannBcsAssembler< DIM >

Abstract class for assembling surface-integral parts of vectors in continuum mechanics problems.

For such problems, the matrix has the form [A B1] [B2^T C ] (where often B1=B2 and C=0) and the vector has the form [b1] [b2]

This class adds surface integral components, arising from natural Neumann boundary conditions, to the spatial part of the RHS vector, ie to b1.

Definition at line 70 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

Constructor & Destructor Documentation

◆ ContinuumMechanicsNeumannBcsAssembler()

Constructor

Parameters
pMeshPointer to the mesh
pProblemDefinitionPointer to the problem definition object

Definition at line 122 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

References EXCEPTION, and ContinuumMechanicsNeumannBcsAssembler< DIM >::mpQuadRule.

◆ ~ContinuumMechanicsNeumannBcsAssembler()

Member Function Documentation

◆ AssembleOnBoundaryElement()

template<unsigned DIM>
void ContinuumMechanicsNeumannBcsAssembler< DIM >::AssembleOnBoundaryElement ( BoundaryElement< DIM-1, DIM > &  rElement,
c_vector< double, STENCIL_SIZE > &  rBElem,
unsigned  boundaryConditionIndex 
)
protected

Calculate the contribution of a single element to the linear system.

Parameters
rElementThe element to assemble on.
rBElemThe element's contribution to the RHS vector is returned in this vector of length n, the no. of nodes in this element. There is no need to zero this vector before calling.
boundaryConditionIndexinto the traction BCs structures in the problem definition

Definition at line 204 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

References QuadraticBasisFunction< ELEMENT_DIM >::ComputeBasisFunctions(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), and NEVER_REACHED.

◆ DoAssemble()

template<unsigned DIM>
void ContinuumMechanicsNeumannBcsAssembler< DIM >::DoAssemble ( )
protectedvirtual

The main assembly method. Protected, should only be called through Assemble(), or AssembleVector() in the parent class.

Implements AbstractFeAssemblerInterface< true, false >.

Definition at line 155 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

References EXCEPTION, PetscVecTools::GetSize(), and PetscVecTools::Zero().

Member Data Documentation

◆ mpMesh

template<unsigned DIM>
AbstractTetrahedralMesh<DIM,DIM>* ContinuumMechanicsNeumannBcsAssembler< DIM >::mpMesh
protected

The quadratic mesh

Definition at line 88 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

◆ mpProblemDefinition

template<unsigned DIM>
ContinuumMechanicsProblemDefinition<DIM>* ContinuumMechanicsNeumannBcsAssembler< DIM >::mpProblemDefinition
protected

Problem definition, containing the boundary conditions

Definition at line 91 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

◆ mpQuadRule

◆ NUM_NODES_PER_ELEMENT

template<unsigned DIM>
const unsigned ContinuumMechanicsNeumannBcsAssembler< DIM >::NUM_NODES_PER_ELEMENT = DIM*(DIM+1)/2
staticprivate

Number of nodes per (boundary) element.

Definition at line 76 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

◆ NUM_VERTICES_PER_ELEMENT

template<unsigned DIM>
const unsigned ContinuumMechanicsNeumannBcsAssembler< DIM >::NUM_VERTICES_PER_ELEMENT = DIM
staticprivate

Number of vertices per (boundary) element.

Definition at line 73 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

◆ PRESSURE_BLOCK_SIZE_ELEMENTAL

template<unsigned DIM>
const unsigned ContinuumMechanicsNeumannBcsAssembler< DIM >::PRESSURE_BLOCK_SIZE_ELEMENTAL = NUM_VERTICES_PER_ELEMENT
staticprivate

Size of the pressure-block (the number of rows or columns in the submatrix C), restricted to one element

Definition at line 81 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

◆ SPATIAL_BLOCK_SIZE_ELEMENTAL

template<unsigned DIM>
const unsigned ContinuumMechanicsNeumannBcsAssembler< DIM >::SPATIAL_BLOCK_SIZE_ELEMENTAL = DIM*NUM_NODES_PER_ELEMENT
staticprivate

Size of the spatial-block (the number or rows or columns in the submatrix A), restricted to one element

Definition at line 79 of file ContinuumMechanicsNeumannBcsAssembler.hpp.

◆ STENCIL_SIZE

template<unsigned DIM>
const unsigned ContinuumMechanicsNeumannBcsAssembler< DIM >::STENCIL_SIZE = DIM*NUM_NODES_PER_ELEMENT + NUM_VERTICES_PER_ELEMENT
staticprivate

Stencil size.

Definition at line 84 of file ContinuumMechanicsNeumannBcsAssembler.hpp.


The documentation for this class was generated from the following file: