![]() |
Chaste Commit::333233612e3dcc941d260418acd7b5ccdc30390e
|
#include <StokesFlowAssembler.hpp>
Public Member Functions | |
StokesFlowAssembler (AbstractTetrahedralMesh< DIM, DIM > *pMesh, StokesFlowProblemDefinition< DIM > *pProblemDefinition) | |
![]() | |
AbstractContinuumMechanicsAssembler (AbstractTetrahedralMesh< DIM, DIM > *pMesh) | |
virtual | ~AbstractContinuumMechanicsAssembler () |
![]() | |
AbstractFeAssemblerInterface () | |
void | SetMatrixToAssemble (Mat &rMatToAssemble, bool zeroMatrixBeforeAssembly=true) |
void | SetVectorToAssemble (Vec &rVecToAssemble, bool zeroVectorBeforeAssembly) |
void | Assemble () |
void | AssembleMatrix () |
void | AssembleVector () |
virtual | ~AbstractFeAssemblerInterface () |
Private Member Functions | |
c_matrix< double, SPATIAL_BLOCK_SIZE_ELEMENTAL, SPATIAL_BLOCK_SIZE_ELEMENTAL > | ComputeSpatialSpatialMatrixTerm (c_vector< double, NUM_NODES_PER_ELEMENT > &rQuadPhi, c_matrix< double, DIM, NUM_NODES_PER_ELEMENT > &rGradQuadPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement) |
c_matrix< double, SPATIAL_BLOCK_SIZE_ELEMENTAL, PRESSURE_BLOCK_SIZE_ELEMENTAL > | ComputeSpatialPressureMatrixTerm (c_vector< double, NUM_NODES_PER_ELEMENT > &rQuadPhi, c_matrix< double, DIM, NUM_NODES_PER_ELEMENT > &rGradQuadPhi, c_vector< double, NUM_VERTICES_PER_ELEMENT > &rLinearPhi, c_matrix< double, DIM, NUM_VERTICES_PER_ELEMENT > &rGradLinearPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement) |
c_vector< double, SPATIAL_BLOCK_SIZE_ELEMENTAL > | ComputeSpatialVectorTerm (c_vector< double, NUM_NODES_PER_ELEMENT > &rQuadPhi, c_matrix< double, DIM, NUM_NODES_PER_ELEMENT > &rGradQuadPhi, c_vector< double, DIM > &rX, Element< DIM, DIM > *pElement) |
Private Attributes | |
StokesFlowProblemDefinition< DIM > * | mpProblemDefinition |
double | mScaleFactor |
Static Private Attributes | |
static const unsigned | NUM_VERTICES_PER_ELEMENT = DIM+1 |
static const unsigned | NUM_NODES_PER_ELEMENT = (DIM+1)*(DIM+2)/2 |
static const unsigned | SPATIAL_BLOCK_SIZE_ELEMENTAL = DIM*NUM_NODES_PER_ELEMENT |
static const unsigned | PRESSURE_BLOCK_SIZE_ELEMENTAL = NUM_VERTICES_PER_ELEMENT |
Friends | |
class | TestStokesFlowAssembler |
Assembler for setting up (volume-integral parts of) the matrix and vector used in the FEM discretisation of Stokes' Flow.
The matrix has the block-form (except see comment below) [A B] [B^T 0] and the vector has the block form (except see comment below) [b] [0]
NOTE: The elemental matrix and vector is as above. The full matrix and vector uses a completely different ordering: for parallelisation reasons the pressure variables are interleaved with the spatial variables and dummy pressure variables are used for internal nodes. For example, in 2d, the ordering is [U1 V1 P1 , .. , Un Vn, Pn] where n is the total number of nodes.
Definition at line 62 of file StokesFlowAssembler.hpp.
|
inline |
Constructor
pMesh | |
pProblemDefinition |
Definition at line 251 of file StokesFlowAssembler.hpp.
|
inlineprivatevirtual |
The matrix has the form (except see comments about ordering above) [A B ] [B^T 0 ] The function is related to the spatial-pressure block, ie matrix B.
For the (volume-integral) contribution to B from a given element, this method returns the INTEGRAND in the definition of B.
rQuadPhi | All the quadratic basis functions on this element, evaluated at the current quad point |
rGradQuadPhi | Gradients of all the quadratic basis functions on this element, evaluated at the current quad point |
rLinearPhi | All the linear basis functions on this element, evaluated at the current quad point |
rGradLinearPhi | Gradients of all the linear basis functions on this element, evaluated at the current quad point |
rX | Current location (physical position corresponding to quad point) |
pElement | Current element |
Reimplemented from AbstractContinuumMechanicsAssembler< DIM, true, true >.
Definition at line 168 of file StokesFlowAssembler.hpp.
References StokesFlowAssembler< DIM >::NUM_NODES_PER_ELEMENT, StokesFlowAssembler< DIM >::NUM_VERTICES_PER_ELEMENT, StokesFlowAssembler< DIM >::PRESSURE_BLOCK_SIZE_ELEMENTAL, and StokesFlowAssembler< DIM >::SPATIAL_BLOCK_SIZE_ELEMENTAL.
|
inlineprivatevirtual |
The matrix has the form (except see comments about ordering above) [A B ] [B^T 0 ] The function is related to the spatial-spatial block, ie matrix A.
For the (volume-integral) contribution to A from a given element, this method returns the INTEGRAND in the definition of A.
rQuadPhi | All the quadratic basis functions on this element, evaluated at the current quad point |
rGradQuadPhi | Gradients of all the quadratic basis functions on this element, evaluated at the current quad point |
rX | Current location (physical position corresponding to quad point) |
pElement | Current element |
Reimplemented from AbstractContinuumMechanicsAssembler< DIM, true, true >.
Definition at line 113 of file StokesFlowAssembler.hpp.
References StokesFlowAssembler< DIM >::mpProblemDefinition, StokesFlowAssembler< DIM >::mScaleFactor, StokesFlowAssembler< DIM >::NUM_NODES_PER_ELEMENT, and StokesFlowAssembler< DIM >::SPATIAL_BLOCK_SIZE_ELEMENTAL.
|
inlineprivatevirtual |
The matrix has the form (except see comments about ordering above) [A B ] [B^T 0 ] and the vector has the form [b1] [b2] The function is related to the spatial-block in the vector, ie b1.
For the contribution to b1 from a given element, this method should return the INTEGRAND in the definition of b1.
rQuadPhi | All the quadratic basis functions on this element, evaluated at the current quad point |
rGradQuadPhi | Gradients of all the quadratic basis functions on this element, evaluated at the current quad point |
rX | Current location (physical position) |
pElement | Current element |
Implements AbstractContinuumMechanicsAssembler< DIM, true, true >.
Definition at line 217 of file StokesFlowAssembler.hpp.
References StokesFlowAssembler< DIM >::mpProblemDefinition, StokesFlowAssembler< DIM >::NUM_NODES_PER_ELEMENT, and StokesFlowAssembler< DIM >::SPATIAL_BLOCK_SIZE_ELEMENTAL.
|
friend |
Definition at line 64 of file StokesFlowAssembler.hpp.
|
private |
Stokes' flow problem definition
Definition at line 86 of file StokesFlowAssembler.hpp.
Referenced by StokesFlowAssembler< DIM >::ComputeSpatialSpatialMatrixTerm(), and StokesFlowAssembler< DIM >::ComputeSpatialVectorTerm().
|
private |
This variable is initialised to 1.0 and almost never changed, and is used in the spatial-spatial matrix term. One test (see TestStokesFlowAssembler) sets it to 0.0 before assembling the matrix. Basically, a different weak form USED to be implemented here (corresponding to one kind of Neumann boundary condition), and the matrix for that weak form was compared against exact solutions in this test. mScaleFactor = 0.0 corresponds to old weak form, mScaleFactor = 1 corresponds to new weak form as documented in fem implementations pdf.
Definition at line 95 of file StokesFlowAssembler.hpp.
Referenced by StokesFlowAssembler< DIM >::ComputeSpatialSpatialMatrixTerm().
|
staticprivate |
Number of nodes per element.
Definition at line 71 of file StokesFlowAssembler.hpp.
Referenced by StokesFlowAssembler< DIM >::ComputeSpatialPressureMatrixTerm(), StokesFlowAssembler< DIM >::ComputeSpatialSpatialMatrixTerm(), and StokesFlowAssembler< DIM >::ComputeSpatialVectorTerm().
|
staticprivate |
Number of vertices per element
Definition at line 68 of file StokesFlowAssembler.hpp.
Referenced by StokesFlowAssembler< DIM >::ComputeSpatialPressureMatrixTerm().
|
staticprivate |
Size of the pressure block, per element, equal num_vertices times 1 (as p solved for at each vertex.
Definition at line 83 of file StokesFlowAssembler.hpp.
Referenced by StokesFlowAssembler< DIM >::ComputeSpatialPressureMatrixTerm().
|
staticprivate |
Size of the spatial block, per element, equal num_nodes times DIM (as say in 2d (u,v) solved for at each node
Definition at line 77 of file StokesFlowAssembler.hpp.
Referenced by StokesFlowAssembler< DIM >::ComputeSpatialPressureMatrixTerm(), StokesFlowAssembler< DIM >::ComputeSpatialSpatialMatrixTerm(), and StokesFlowAssembler< DIM >::ComputeSpatialVectorTerm().