IncompressibleNonlinearElasticitySolver< DIM > Class Template Reference

#include <IncompressibleNonlinearElasticitySolver.hpp>

Inherits AbstractNonlinearElasticitySolver< DIM >.

Collaboration diagram for IncompressibleNonlinearElasticitySolver< DIM >:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 IncompressibleNonlinearElasticitySolver (AbstractTetrahedralMesh< DIM, DIM > &rQuadMesh, SolidMechanicsProblemDefinition< DIM > &rProblemDefinition, std::string outputDirectory)
virtual ~IncompressibleNonlinearElasticitySolver ()

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 FormInitialGuess ()
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 + NUM_VERTICES_PER_ELEMENT
static const size_t BOUNDARY_STENCIL_SIZE = DIM*NUM_NODES_PER_BOUNDARY_ELEMENT

Friends

class TestIncompressibleNonlinearElasticitySolver
class TestCompressibleNonlinearElasticitySolver
class TestNonlinearElasticityAdjointSolver
class AdaptiveNonlinearElasticityProblem

Detailed Description

template<size_t DIM>
class IncompressibleNonlinearElasticitySolver< DIM >

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

Uses quadratic-linear bases (for displacement and pressure), and is therefore outside other assembler or solver hierarchy.

Definition at line 60 of file IncompressibleNonlinearElasticitySolver.hpp.


Constructor & Destructor Documentation

template<size_t DIM>
IncompressibleNonlinearElasticitySolver< DIM >::IncompressibleNonlinearElasticitySolver ( AbstractTetrahedralMesh< DIM, DIM > &  rQuadMesh,
SolidMechanicsProblemDefinition< DIM > &  rProblemDefinition,
std::string  outputDirectory 
) [inline]

Constructor.

Parameters:
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 621 of file IncompressibleNonlinearElasticitySolver.cpp.

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

template<size_t DIM>
virtual IncompressibleNonlinearElasticitySolver< DIM >::~IncompressibleNonlinearElasticitySolver (  )  [inline, virtual]

Destructor.

Definition at line 155 of file IncompressibleNonlinearElasticitySolver.hpp.


Member Function Documentation

template<size_t DIM>
void IncompressibleNonlinearElasticitySolver< 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 p0 p1 p2]. (This ordering in used at the element level, but not in the global matrix/vector).

Parameters:
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 210 of file IncompressibleNonlinearElasticitySolver.cpp.

References AbstractNonlinearElasticitySolver< DIM >::AddActiveStressAndStressDerivative(), AbstractNonlinearElasticitySolver< DIM >::AddStressToAverageStressPerElement(), AbstractMaterialLaw< DIM >::ComputeStressAndStressDerivative(), Determinant(), AbstractNonlinearElasticitySolver< DIM >::dTdE, AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetInverseJacobianForElement(), AbstractMesh< ELEMENT_DIM, SPACE_DIM >::GetNode(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), GaussianQuadratureRule< ELEMENT_DIM >::GetNumQuadPoints(), GaussianQuadratureRule< ELEMENT_DIM >::GetWeight(), Inverse(), AbstractNonlinearElasticitySolver< DIM >::mAverageStressesPerElement, AbstractNonlinearElasticitySolver< DIM >::mChangeOfBasisMatrix, AbstractContinuumMechanicsSolver< DIM >::mCurrentSolution, AbstractNonlinearElasticitySolver< DIM >::mCurrentTime, AbstractNonlinearElasticitySolver< DIM >::mIncludeActiveTension, AbstractNonlinearElasticitySolver< DIM >::mPetscDirectSolve, AbstractContinuumMechanicsSolver< DIM >::mpQuadratureRule, AbstractNonlinearElasticitySolver< DIM >::mrProblemDefinition, AbstractContinuumMechanicsSolver< DIM >::mrQuadMesh, AbstractNonlinearElasticitySolver< DIM >::mSetComputeAverageStressPerElement, NEVER_REACHED, IncompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_ELEMENT, IncompressibleNonlinearElasticitySolver< DIM >::NUM_VERTICES_PER_ELEMENT, GaussianQuadratureRule< ELEMENT_DIM >::rGetQuadPoint(), AbstractMaterialLaw< DIM >::SetChangeOfBasisMatrix(), AbstractNonlinearElasticitySolver< DIM >::SetupChangeOfBasisMatrix(), and IncompressibleNonlinearElasticitySolver< DIM >::STENCIL_SIZE.

Referenced by IncompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().

template<size_t DIM>
void IncompressibleNonlinearElasticitySolver< 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).

Parameters:
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 52 of file IncompressibleNonlinearElasticitySolver.cpp.

References AbstractContinuumMechanicsSolver< DIM >::AddIdentityBlockForDummyPressureVariables(), AbstractNonlinearElasticitySolver< DIM >::AssembleOnBoundaryElement(), IncompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), IncompressibleNonlinearElasticitySolver< DIM >::BOUNDARY_STENCIL_SIZE, PetscVecTools::Finalise(), AbstractNonlinearElasticitySolver< DIM >::FinishAssembleSystem(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), PetscTools::GetMyRank(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetNodeGlobalIndex(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetNumElements(), AbstractElement< ELEMENT_DIM, SPACE_DIM >::GetOwnership(), CommandLineArguments::Instance(), AbstractContinuumMechanicsSolver< DIM >::mCurrentSolution, AbstractContinuumMechanicsSolver< DIM >::mNumDofs, AbstractContinuumMechanicsSolver< DIM >::mPreconditionMatrix, AbstractContinuumMechanicsSolver< DIM >::mResidualVector, AbstractNonlinearElasticitySolver< DIM >::mrJacobianMatrix, AbstractNonlinearElasticitySolver< DIM >::mrProblemDefinition, AbstractContinuumMechanicsSolver< DIM >::mrQuadMesh, IncompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_BOUNDARY_ELEMENT, IncompressibleNonlinearElasticitySolver< DIM >::NUM_NODES_PER_ELEMENT, IncompressibleNonlinearElasticitySolver< DIM >::NUM_VERTICES_PER_ELEMENT, CommandLineArguments::OptionExists(), IncompressibleNonlinearElasticitySolver< DIM >::STENCIL_SIZE, PetscMatTools::SwitchWriteMode(), PetscMatTools::Zero(), and PetscVecTools::Zero().

template<size_t DIM>
void IncompressibleNonlinearElasticitySolver< DIM >::FormInitialGuess (  )  [inline, protected]

Set up the current guess to be the solution given no displacement.

The initial guess is zero for spatial variables, 0 for dummy pressure variables, and the appropriate choice of pressure such that the initial stress is zero (depends on material law)

In a homogeneous problem, all (the non-dummy) pressures are the same. In a heterogeneous problem, p for a given vertex is the zero-strain-pressure for ONE of the elements containing that vertex (which element containing the vertex is reached LAST). In this case the initial guess will be close but not exactly the solution given zero body force.

Todo:
#2223 This is unlikely to work using DistributedQuadraticMesh with Non-homogeneous material laws

Definition at line 592 of file IncompressibleNonlinearElasticitySolver.cpp.

References AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorBegin(), AbstractTetrahedralMesh< ELEMENT_DIM, SPACE_DIM >::GetElementIteratorEnd(), AbstractContinuumMechanicsSolver< DIM >::mCurrentSolution, AbstractContinuumMechanicsSolver< DIM >::mNumDofs, AbstractNonlinearElasticitySolver< DIM >::mrProblemDefinition, AbstractContinuumMechanicsSolver< DIM >::mrQuadMesh, and IncompressibleNonlinearElasticitySolver< DIM >::NUM_VERTICES_PER_ELEMENT.

Referenced by IncompressibleNonlinearElasticitySolver< DIM >::IncompressibleNonlinearElasticitySolver().


Member Data Documentation

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

Number of nodes per boundary element.

Reimplemented from AbstractNonlinearElasticitySolver< DIM >.

Definition at line 76 of file IncompressibleNonlinearElasticitySolver.hpp.

Referenced by IncompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().

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

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

Definition at line 82 of file IncompressibleNonlinearElasticitySolver.hpp.

Referenced by IncompressibleNonlinearElasticitySolver< DIM >::AssembleOnElement(), and IncompressibleNonlinearElasticitySolver< DIM >::AssembleSystem().


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

Generated by  doxygen 1.6.2