Chaste Release::3.1
CompressibleNonlinearElasticitySolver< DIM > Class Template Reference

#include <CompressibleNonlinearElasticitySolver.hpp>

Inheritance diagram for CompressibleNonlinearElasticitySolver< DIM >:
Collaboration diagram for CompressibleNonlinearElasticitySolver< DIM >:

List of all members.

Public Member Functions

 CompressibleNonlinearElasticitySolver (QuadraticMesh< DIM > &rQuadMesh, SolidMechanicsProblemDefinition< DIM > &rProblemDefinition, std::string outputDirectory)
 ~CompressibleNonlinearElasticitySolver ()

Protected Member Functions

virtual void AssembleOnElement (Element< DIM, DIM > &rElement, c_matrix< double, STENCIL_SIZE, STENCIL_SIZE > &rAElem, c_matrix< double, STENCIL_SIZE, STENCIL_SIZE > &rAElemPrecond, c_vector< double, STENCIL_SIZE > &rBElem, bool assembleResidual, bool assembleJacobian)
void AssembleSystem (bool assembleResidual, bool assembleJacobian)

Static Protected Attributes

static const size_t NUM_NODES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_ELEMENT
static const size_t NUM_VERTICES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_VERTICES_PER_ELEMENT
static const size_t NUM_NODES_PER_BOUNDARY_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_BOUNDARY_ELEMENT
static const size_t STENCIL_SIZE = DIM*NUM_NODES_PER_ELEMENT
static const size_t BOUNDARY_STENCIL_SIZE = DIM*NUM_NODES_PER_BOUNDARY_ELEMENT

Friends

class TestCompressibleNonlinearElasticitySolver

Detailed Description

template<size_t DIM>
class CompressibleNonlinearElasticitySolver< DIM >

Finite elasticity solver. Solves static *compressible* nonlinear elasticity problems with arbitrary (compressible) material laws and a body force.

Uses quadratic basis functions for displacement, and is therefore outside the other assembler or solver hierarchy.

Definition at line 63 of file CompressibleNonlinearElasticitySolver.hpp.


Constructor & Destructor Documentation

template<size_t DIM>
CompressibleNonlinearElasticitySolver< DIM >::CompressibleNonlinearElasticitySolver ( QuadraticMesh< DIM > &  rQuadMesh,
SolidMechanicsProblemDefinition< DIM > &  rProblemDefinition,
std::string  outputDirectory 
)

Constructor

Parameters:
rQuadMeshThe quadratic mesh to solve on
rProblemDefinitionan object defining in particular the body force and boundary conditions
outputDirectoryThe output directory

Definition at line 460 of file CompressibleNonlinearElasticitySolver.cpp.

References EXCEPTION, and SolidMechanicsProblemDefinition< DIM >::GetCompressibilityType().

Destructor.

Definition at line 476 of file CompressibleNonlinearElasticitySolver.cpp.


Member Function Documentation

template<size_t DIM>
void CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement ( Element< DIM, DIM > &  rElement,
c_matrix< double, STENCIL_SIZE, STENCIL_SIZE > &  rAElem,
c_matrix< double, STENCIL_SIZE, STENCIL_SIZE > &  rAElemPrecond,
c_vector< double, STENCIL_SIZE > &  rBElem,
bool  assembleResidual,
bool  assembleJacobian 
) [protected, virtual]

Assemble residual or Jacobian on an element, using the current solution stored in mCurrrentSolution. The ordering assumed is (in 2d) rBElem = [u0 v0 u1 v1 .. u5 v5].

Parameters:
rElementThe element to assemble on.
rAElemThe element's contribution to the LHS matrix is returned in this n by n matrix, where n is the no. of nodes in this element. There is no need to zero this matrix before calling.
rAElemPrecondThe element's contribution to the matrix passed to PetSC in creating a preconditioner
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.
assembleResidualA bool stating whether to assemble the residual vector.
assembleJacobianA bool stating whether to assemble the Jacobian matrix.

Definition at line 175 of file CompressibleNonlinearElasticitySolver.cpp.

References QuadraticBasisFunction< ELEMENT_DIM >::ComputeBasisFunctions(), LinearBasisFunction< ELEMENT_DIM >::ComputeBasisFunctions(), AbstractMaterialLaw< DIM >::ComputeStressAndStressDerivative(), QuadraticBasisFunction< ELEMENT_DIM >::ComputeTransformedBasisFunctionDerivatives(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), Inverse(), NEVER_REACHED, and AbstractMaterialLaw< DIM >::SetChangeOfBasisMatrix().

template<size_t DIM>
void CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem ( bool  assembleResidual,
bool  assembleJacobian 
) [protected, virtual]

Assemble the residual vector (using the current solution stored in mCurrentSolution, output going to mpLinearSystem->rGetRhsVector), or Jacobian matrix (using the current solution stored in mCurrentSolution, output going to mpLinearSystem->rGetLhsMatrix).

Parameters:
assembleResidualA bool stating whether to assemble the residual vector.
assembleJacobianA bool stating whether to assemble the Jacobian matrix.

Implements AbstractNonlinearElasticitySolver< DIM >.

Definition at line 54 of file CompressibleNonlinearElasticitySolver.cpp.

References PetscVecTools::Finalise(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), PetscTools::GetMyRank(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetOwnership(), CommandLineArguments::Instance(), CommandLineArguments::OptionExists(), PetscMatTools::Zero(), and PetscVecTools::Zero().


Member Data Documentation

template<size_t DIM>
const size_t CompressibleNonlinearElasticitySolver< DIM >::BOUNDARY_STENCIL_SIZE = DIM*NUM_NODES_PER_BOUNDARY_ELEMENT [static, protected]

Boundary stencil size.

Reimplemented from AbstractNonlinearElasticitySolver< DIM >.

Definition at line 84 of file CompressibleNonlinearElasticitySolver.hpp.

Number of nodes per boundary element.

Reimplemented from AbstractNonlinearElasticitySolver< DIM >.

Definition at line 75 of file CompressibleNonlinearElasticitySolver.hpp.

template<size_t DIM>
const size_t CompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_ELEMENT [static, protected]

Number of nodes per element.

Reimplemented from AbstractNonlinearElasticitySolver< DIM >.

Definition at line 69 of file CompressibleNonlinearElasticitySolver.hpp.

Number of vertices per element.

Reimplemented from AbstractNonlinearElasticitySolver< DIM >.

Definition at line 72 of file CompressibleNonlinearElasticitySolver.hpp.

template<size_t DIM>
const size_t CompressibleNonlinearElasticitySolver< DIM >::STENCIL_SIZE = DIM*NUM_NODES_PER_ELEMENT [static, protected]

Stencil size - number of unknowns per element (DIM*NUM_NODES_PER_ELEMENT displacement unknowns, no pressure unknowns.

Definition at line 81 of file CompressibleNonlinearElasticitySolver.hpp.


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