#include <CompressibleNonlinearElasticitySolver.hpp>
Inherits AbstractNonlinearElasticitySolver< DIM >.
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) |
virtual void | AssembleOnBoundaryElement (BoundaryElement< DIM-1, DIM > &rBoundaryElement, c_matrix< double, BOUNDARY_STENCIL_SIZE, BOUNDARY_STENCIL_SIZE > &rAelem, c_vector< double, BOUNDARY_STENCIL_SIZE > &rBelem, bool assembleResidual, bool assembleJacobian, unsigned boundaryConditionIndex) |
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 |
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 56 of file CompressibleNonlinearElasticitySolver.hpp.
CompressibleNonlinearElasticitySolver< DIM >::CompressibleNonlinearElasticitySolver | ( | QuadraticMesh< DIM > & | rQuadMesh, | |
SolidMechanicsProblemDefinition< DIM > & | rProblemDefinition, | |||
std::string | outputDirectory | |||
) | [inline] |
Constructor
rQuadMesh | The quadratic mesh to solve on | |
rProblemDefinition | an object defining in particular the body force and boundary conditions | |
outputDirectory | The output directory |
Definition at line 526 of file CompressibleNonlinearElasticitySolver.cpp.
References EXCEPTION, SolidMechanicsProblemDefinition< DIM >::GetCompressibilityType(), and AbstractNonlinearElasticitySolver< DIM >::Initialise().
CompressibleNonlinearElasticitySolver< DIM >::~CompressibleNonlinearElasticitySolver | ( | ) | [inline] |
Destructor.
Definition at line 544 of file CompressibleNonlinearElasticitySolver.cpp.
void CompressibleNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElement | ( | BoundaryElement< DIM-1, DIM > & | rBoundaryElement, | |
c_matrix< double, BOUNDARY_STENCIL_SIZE, BOUNDARY_STENCIL_SIZE > & | rAelem, | |||
c_vector< double, BOUNDARY_STENCIL_SIZE > & | rBelem, | |||
bool | assembleResidual, | |||
bool | assembleJacobian, | |||
unsigned | boundaryConditionIndex | |||
) | [inline, protected, virtual] |
Compute the term from the surface integral of s*phi, where s is a specified non-zero surface traction (ie Neumann boundary condition) to be added to the Rhs vector.
rBoundaryElement | the boundary element to be integrated on | |
rAelem | The 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. | |
rBelem | The 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. | |
assembleResidual | A bool stating whether to assemble the residual vector. | |
assembleJacobian | A bool stating whether to assemble the Jacobian matrix. | |
boundaryConditionIndex | index of this boundary (in the vectors in the problem definition object, in which the boundary conditions are stored |
Definition at line 424 of file CompressibleNonlinearElasticitySolver.cpp.
References DeformedBoundaryElement< ELEM_DIM, SPACE_DIM >::ApplyUndeformedElementAndDisplacement(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateNormal(), AbstractTetrahedralElement< ELEMENT_DIM, SPACE_DIM >::CalculateWeightedDirection(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), GaussianQuadratureRule< ELEMENT_DIM >::GetNumQuadPoints(), GaussianQuadratureRule< ELEMENT_DIM >::GetWeight(), AbstractNonlinearElasticitySolver< DIM >::mCurrentSolution, AbstractNonlinearElasticitySolver< DIM >::mCurrentTime, AbstractNonlinearElasticitySolver< DIM >::mDeformedBoundaryElement, AbstractNonlinearElasticitySolver< DIM >::mpBoundaryQuadratureRule, AbstractNonlinearElasticitySolver< DIM >::mrProblemDefinition, AbstractNonlinearElasticitySolver< DIM >::mrQuadMesh, NEVER_REACHED, CompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_BOUNDARY_ELEMENT, and GaussianQuadratureRule< ELEMENT_DIM >::rGetQuadPoint().
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().
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 | |||
) | [inline, 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].
rElement | The element to assemble on. | |
rAElem | The 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. | |
rAElemPrecond | The element's contribution to the matrix passed to PetSC in creating a preconditioner | |
rBElem | The 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. | |
assembleResidual | A bool stating whether to assemble the residual vector. | |
assembleJacobian | A bool stating whether to assemble the Jacobian matrix. |
Definition at line 158 of file CompressibleNonlinearElasticitySolver.cpp.
References AbstractNonlinearElasticitySolver< DIM >::ComputeStressAndStressDerivative(), AbstractNonlinearElasticitySolver< DIM >::dTdE, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), GaussianQuadratureRule< ELEMENT_DIM >::GetNumQuadPoints(), GaussianQuadratureRule< ELEMENT_DIM >::GetWeight(), Inverse(), AbstractNonlinearElasticitySolver< DIM >::mCurrentSolution, AbstractNonlinearElasticitySolver< DIM >::mCurrentTime, AbstractNonlinearElasticitySolver< DIM >::mpQuadratureRule, AbstractNonlinearElasticitySolver< DIM >::mrProblemDefinition, AbstractNonlinearElasticitySolver< DIM >::mrQuadMesh, NEVER_REACHED, CompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_ELEMENT, CompressibleNonlinearElasticitySolver< DIM >::NUM_VERTICES_PER_ELEMENT, and GaussianQuadratureRule< ELEMENT_DIM >::rGetQuadPoint().
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().
void CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem | ( | bool | assembleResidual, | |
bool | assembleJacobian | |||
) | [inline, 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).
assembleResidual | A bool stating whether to assemble the residual vector. | |
assembleJacobian | A bool stating whether to assemble the Jacobian matrix. |
Implements AbstractNonlinearElasticitySolver< DIM >.
Definition at line 47 of file CompressibleNonlinearElasticitySolver.cpp.
References CompressibleNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElement(), CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), CompressibleNonlinearElasticitySolver< DIM >::BOUNDARY_STENCIL_SIZE, AbstractNonlinearElasticitySolver< DIM >::FinishAssembleSystem(), PetscTools::GetMyRank(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetOwnership(), AbstractNonlinearElasticitySolver< DIM >::mCurrentSolution, AbstractNonlinearElasticitySolver< DIM >::mJacobianMatrix, AbstractNonlinearElasticitySolver< DIM >::mNumDofs, AbstractNonlinearElasticitySolver< DIM >::mPreconditionMatrix, AbstractNonlinearElasticitySolver< DIM >::mResidualVector, AbstractNonlinearElasticitySolver< DIM >::mrProblemDefinition, AbstractNonlinearElasticitySolver< DIM >::mrQuadMesh, CompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_BOUNDARY_ELEMENT, CompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_ELEMENT, CompressibleNonlinearElasticitySolver< DIM >::STENCIL_SIZE, PetscMatTools::Zero(), and PetscVecTools::Zero().
const size_t CompressibleNonlinearElasticitySolver< DIM >::BOUNDARY_STENCIL_SIZE = DIM*NUM_NODES_PER_BOUNDARY_ELEMENT [static, protected] |
Boundary stencil size.
Definition at line 77 of file CompressibleNonlinearElasticitySolver.hpp.
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().
const size_t CompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_BOUNDARY_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_NODES_PER_BOUNDARY_ELEMENT [static, protected] |
Number of nodes per boundary element.
Reimplemented from AbstractNonlinearElasticitySolver< DIM >.
Definition at line 68 of file CompressibleNonlinearElasticitySolver.hpp.
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElement(), and CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().
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 62 of file CompressibleNonlinearElasticitySolver.hpp.
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), and CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().
const size_t CompressibleNonlinearElasticitySolver< DIM >::NUM_VERTICES_PER_ELEMENT = AbstractNonlinearElasticitySolver<DIM>::NUM_VERTICES_PER_ELEMENT [static, protected] |
Number of vertices per element.
Reimplemented from AbstractNonlinearElasticitySolver< DIM >.
Definition at line 65 of file CompressibleNonlinearElasticitySolver.hpp.
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement().
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 74 of file CompressibleNonlinearElasticitySolver.hpp.
Referenced by CompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().