#include <ContinuumMechanicsProblemDefinition.hpp>
Inherited by SolidMechanicsProblemDefinition< DIM >, and StokesFlowProblemDefinition< DIM >.
Public Member Functions | |
ContinuumMechanicsProblemDefinition (QuadraticMesh< DIM > &rMesh) | |
virtual | ~ContinuumMechanicsProblemDefinition () |
void | SetDensity (double density) |
double | GetDensity () |
void | SetZeroDirichletNodes (std::vector< unsigned > &rZeroDirichletNodes) |
std::vector< unsigned > & | rGetDirichletNodes () |
std::vector< c_vector< double, DIM > > & | rGetDirichletNodeValues () |
void | SetBodyForce (c_vector< double, DIM > bodyForce) |
void | SetBodyForce (c_vector< double, DIM >(*pFunction)(c_vector< double, DIM > &rX, double t)) |
c_vector< double, DIM > | GetBodyForce (c_vector< double, DIM > &rX, double t=0.0) |
BodyForceType | GetBodyForceType () |
c_vector< double, DIM > | GetConstantBodyForce () |
c_vector< double, DIM > | EvaluateBodyForceFunction (c_vector< double, DIM > &rX, double t) |
TractionBoundaryConditionType | GetTractionBoundaryConditionType () |
void | SetTractionBoundaryConditions (std::vector< BoundaryElement< DIM-1, DIM > * > &rTractionBoundaryElements, std::vector< c_vector< double, DIM > > &rElementwiseTractions) |
void | SetTractionBoundaryConditions (std::vector< BoundaryElement< DIM-1, DIM > * > rTractionBoundaryElements, c_vector< double, DIM >(*pFunction)(c_vector< double, DIM > &rX, double t)) |
void | SetApplyNormalPressureOnDeformedSurface (std::vector< BoundaryElement< DIM-1, DIM > * > rTractionBoundaryElements, double normalPressure) |
std::vector< BoundaryElement < DIM-1, DIM > * > & | rGetTractionBoundaryElements () |
std::vector< c_vector< double, DIM > > & | rGetElementwiseTractions () |
double | GetNormalPressure () |
c_vector< double, DIM > | EvaluateTractionFunction (c_vector< double, DIM > &rX, double t) |
virtual void | Validate () |
Static Public Attributes | |
static const double | FREE = DBL_MAX |
Protected Attributes | |
QuadraticMesh< DIM > & | mrMesh |
double | mDensity |
BodyForceType | mBodyForceType |
c_vector< double, DIM > | mConstantBodyForce |
c_vector< double, DIM >(* | mpBodyForceFunction )(c_vector< double, DIM > &rX, double t) |
TractionBoundaryConditionType | mTractionBoundaryConditionType |
std::vector< BoundaryElement < DIM-1, DIM > * > | mTractionBoundaryElements |
std::vector< c_vector< double, DIM > > | mElementwiseTractions |
double | mNormalPressure |
c_vector< double, DIM >(* | mpTractionBoundaryConditionFunction )(c_vector< double, DIM > &rX, double t) |
std::vector< unsigned > | mDirichletNodes |
std::vector< c_vector< double, DIM > > | mDirichletNodeValues |
A class for specifying various parts of a continuum mechanics problem, Dirichlet node information (which nodes are in space in a solid problem, which nodes have fixed flow in a fluids problem), the body force (per unit mass) (usually acceleration due to gravity or zero), the traction boundary conditions, and the density.
Definition at line 66 of file ContinuumMechanicsProblemDefinition.hpp.
ContinuumMechanicsProblemDefinition< DIM >::ContinuumMechanicsProblemDefinition | ( | QuadraticMesh< DIM > & | rMesh | ) | [inline] |
Constructor initialises the body force to zero and density to 1.0
rMesh | is the mesh being solved on |
Definition at line 39 of file ContinuumMechanicsProblemDefinition.cpp.
virtual ContinuumMechanicsProblemDefinition< DIM >::~ContinuumMechanicsProblemDefinition | ( | ) | [inline, virtual] |
Destructor
Definition at line 134 of file ContinuumMechanicsProblemDefinition.hpp.
c_vector< double, DIM > ContinuumMechanicsProblemDefinition< DIM >::EvaluateBodyForceFunction | ( | c_vector< double, DIM > & | rX, | |
double | t | |||
) | [inline] |
Evaluate the body force function (error if GetBodyForceType()!=FUNCTIONAL_BODY_FORCE)
rX | spatial location | |
t | current time |
Definition at line 90 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType, and ContinuumMechanicsProblemDefinition< DIM >::mpBodyForceFunction.
c_vector< double, DIM > ContinuumMechanicsProblemDefinition< DIM >::EvaluateTractionFunction | ( | c_vector< double, DIM > & | rX, | |
double | t | |||
) | [inline] |
Evaluate the traction boundary condition function (error if GetTractionBoundaryConditionType()!=FUNCTIONAL_TRACTION)
rX | spatial location | |
t | current time |
Definition at line 206 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mpTractionBoundaryConditionFunction, and ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType.
c_vector< double, DIM > ContinuumMechanicsProblemDefinition< DIM >::GetBodyForce | ( | c_vector< double, DIM > & | rX, | |
double | t = 0.0 | |||
) | [inline] |
Get the body force at a particular point and time. Note: The user can either call this, or check what type of body force has been set using GetBodyForceType() and then call GetConstantBodyForce() or EvaluateBodyForceFunction(X,t).
rX | spatial location | |
t | current time |
Definition at line 97 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType, ContinuumMechanicsProblemDefinition< DIM >::mConstantBodyForce, ContinuumMechanicsProblemDefinition< DIM >::mpBodyForceFunction, and NEVER_REACHED.
BodyForceType ContinuumMechanicsProblemDefinition< DIM >::GetBodyForceType | ( | ) | [inline] |
Get the body force type
Definition at line 77 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType.
c_vector< double, DIM > ContinuumMechanicsProblemDefinition< DIM >::GetConstantBodyForce | ( | ) | [inline] |
Get the constant body force (error if GetBodyForceType()!=CONSTANT_BODY_FORCE)
Definition at line 83 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType, and ContinuumMechanicsProblemDefinition< DIM >::mConstantBodyForce.
double ContinuumMechanicsProblemDefinition< DIM >::GetDensity | ( | ) | [inline] |
Get the density
Definition at line 56 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mDensity.
double ContinuumMechanicsProblemDefinition< DIM >::GetNormalPressure | ( | ) | [inline] |
Get the pressure for the boundary elements (corresponding to vector returned by rGetTractionBoundaryElements()) (error if GetTractionBoundaryConditionType()!=PRESSURE_ON_DEFORMED)
Definition at line 199 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mNormalPressure, and ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType.
TractionBoundaryConditionType ContinuumMechanicsProblemDefinition< DIM >::GetTractionBoundaryConditionType | ( | ) | [inline] |
Get the traction (Neumann) boundary condition type
Definition at line 116 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType.
std::vector< unsigned > & ContinuumMechanicsProblemDefinition< DIM >::rGetDirichletNodes | ( | ) | [inline] |
Get the Dirichlet nodes
Definition at line 172 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodes.
std::vector< c_vector< double, DIM > > & ContinuumMechanicsProblemDefinition< DIM >::rGetDirichletNodeValues | ( | ) | [inline] |
Get the Dirichlet node values.
Definition at line 178 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodeValues.
std::vector< c_vector< double, DIM > > & ContinuumMechanicsProblemDefinition< DIM >::rGetElementwiseTractions | ( | ) | [inline] |
Get the element-wise tractions vector (corresponding to vector returned by rGetTractionBoundaryElements()) (error if GetTractionBoundaryConditionType()!=ELEMENTWISE_TRACTION)
Definition at line 191 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mElementwiseTractions, and ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType.
std::vector< BoundaryElement< DIM-1, DIM > * > & ContinuumMechanicsProblemDefinition< DIM >::rGetTractionBoundaryElements | ( | ) | [inline] |
Get the vector of traction boundary elements
Definition at line 184 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryElements.
void ContinuumMechanicsProblemDefinition< DIM >::SetApplyNormalPressureOnDeformedSurface | ( | std::vector< BoundaryElement< DIM-1, DIM > * > | rTractionBoundaryElements, | |
double | normalPressure | |||
) | [inline] |
Set traction (Neumann) boundary conditions. This version says that pressures should be applied on surfaces in the DEFORMED body in the outward normal direction.
rTractionBoundaryElements | The boundary elements | |
normalPressure | the corresponding pressure |
Definition at line 143 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mNormalPressure, ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType, and ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryElements.
void ContinuumMechanicsProblemDefinition< DIM >::SetBodyForce | ( | c_vector< double, DIM >(*)(c_vector< double, DIM > &rX, double t) | pFunction | ) | [inline] |
Set the body force to be used - this version sets a functional body force
pFunction | a function of space and time returning a vector |
Definition at line 69 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType, and ContinuumMechanicsProblemDefinition< DIM >::mpBodyForceFunction.
void ContinuumMechanicsProblemDefinition< DIM >::SetBodyForce | ( | c_vector< double, DIM > | bodyForce | ) | [inline] |
Set the body force to be used - this version sets a constant body force
bodyForce | the constant body force |
Definition at line 62 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType, and ContinuumMechanicsProblemDefinition< DIM >::mConstantBodyForce.
void ContinuumMechanicsProblemDefinition< DIM >::SetDensity | ( | double | density | ) | [inline] |
Set the density
density |
Definition at line 49 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mDensity.
void ContinuumMechanicsProblemDefinition< DIM >::SetTractionBoundaryConditions | ( | std::vector< BoundaryElement< DIM-1, DIM > * > | rTractionBoundaryElements, | |
c_vector< double, DIM >(*)(c_vector< double, DIM > &rX, double t) | pFunction | |||
) | [inline] |
Set traction (Neumann) boundary conditions. This version takes in a vector of boundary elements, and a function to be evaluated at points in these boundary elements
rTractionBoundaryElements | the boundary elements | |
pFunction | the traction function (a function of space and time, returning a vector) |
Definition at line 133 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mpTractionBoundaryConditionFunction, ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType, and ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryElements.
void ContinuumMechanicsProblemDefinition< DIM >::SetTractionBoundaryConditions | ( | std::vector< BoundaryElement< DIM-1, DIM > * > & | rTractionBoundaryElements, | |
std::vector< c_vector< double, DIM > > & | rElementwiseTractions | |||
) | [inline] |
Set traction (Neumann) boundary conditions. This version takes in a vector of boundary elements, and corresponding tractions for each one.
rTractionBoundaryElements | the boundary elements | |
rElementwiseTractions | corresponding tractions |
Definition at line 122 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mElementwiseTractions, ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType, and ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryElements.
void ContinuumMechanicsProblemDefinition< DIM >::SetZeroDirichletNodes | ( | std::vector< unsigned > & | rZeroDirichletNodes | ) | [inline] |
Set a list of nodes (indices) to be given zero Dirichlet boundary condition
rZeroDirichletNodes | the nodes at which the value (displacement/flow) is zero |
Definition at line 155 of file ContinuumMechanicsProblemDefinition.cpp.
References ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodes, ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodeValues, and ContinuumMechanicsProblemDefinition< DIM >::mrMesh.
Referenced by SolidMechanicsProblemDefinition< DIM >::SetZeroDisplacementNodes(), and StokesFlowProblemDefinition< DIM >::SetZeroFlowNodes().
void ContinuumMechanicsProblemDefinition< DIM >::Validate | ( | ) | [inline, virtual] |
Check all variables are set appropriately. Exceptions are thrown if any are not. Derived classes can override but should call this version as well.
Reimplemented in ElectroMechanicsProblemDefinition< DIM >, SolidMechanicsProblemDefinition< DIM >, and StokesFlowProblemDefinition< DIM >.
Definition at line 213 of file ContinuumMechanicsProblemDefinition.cpp.
References EXCEPTION, and ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodes.
const double ContinuumMechanicsProblemDefinition< DIM >::FREE = DBL_MAX [inline, static] |
Special value for Dirichlet nodes, indicating that a Dirichlet boundary condition in a particular dimension is not specified
Definition at line 71 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by SolidMechanicsProblemDefinition< DIM >::SetFixedNodes().
BodyForceType ContinuumMechanicsProblemDefinition< DIM >::mBodyForceType [protected] |
The body force type
Definition at line 85 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::EvaluateBodyForceFunction(), ContinuumMechanicsProblemDefinition< DIM >::GetBodyForce(), ContinuumMechanicsProblemDefinition< DIM >::GetBodyForceType(), ContinuumMechanicsProblemDefinition< DIM >::GetConstantBodyForce(), and ContinuumMechanicsProblemDefinition< DIM >::SetBodyForce().
c_vector<double,DIM> ContinuumMechanicsProblemDefinition< DIM >::mConstantBodyForce [protected] |
The constant body force, only used if mBodyForceType is set appropriately
Definition at line 88 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::GetBodyForce(), ContinuumMechanicsProblemDefinition< DIM >::GetConstantBodyForce(), and ContinuumMechanicsProblemDefinition< DIM >::SetBodyForce().
double ContinuumMechanicsProblemDefinition< DIM >::mDensity [protected] |
Density of the body (constant throughout body)
Definition at line 78 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::GetDensity(), and ContinuumMechanicsProblemDefinition< DIM >::SetDensity().
std::vector<unsigned> ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodes [protected] |
All nodes (including non-vertices) which have a dirichlet boundary condition (ie position prescribed in solid mechanics problems, flow prescribed in fluids problems).
Definition at line 120 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::rGetDirichletNodes(), SolidMechanicsProblemDefinition< DIM >::SetFixedNodes(), StokesFlowProblemDefinition< DIM >::SetPrescribedFlowNodes(), ContinuumMechanicsProblemDefinition< DIM >::SetZeroDirichletNodes(), and ContinuumMechanicsProblemDefinition< DIM >::Validate().
std::vector<c_vector<double,DIM> > ContinuumMechanicsProblemDefinition< DIM >::mDirichletNodeValues [protected] |
The values at the nodes with Dirichlet boundary conditions (displacement
Definition at line 123 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::rGetDirichletNodeValues(), SolidMechanicsProblemDefinition< DIM >::SetFixedNodes(), StokesFlowProblemDefinition< DIM >::SetPrescribedFlowNodes(), and ContinuumMechanicsProblemDefinition< DIM >::SetZeroDirichletNodes().
std::vector<c_vector<double,DIM> > ContinuumMechanicsProblemDefinition< DIM >::mElementwiseTractions [protected] |
The tractions on each surface element (only used if mTractionBoundaryConditionType is set appropriately)
Definition at line 104 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::rGetElementwiseTractions(), and ContinuumMechanicsProblemDefinition< DIM >::SetTractionBoundaryConditions().
double ContinuumMechanicsProblemDefinition< DIM >::mNormalPressure [protected] |
If the tractions are specified to correspond to a pressure acting on the surface: the pressure for the given boundary elements (only used if mTractionBoundaryConditionType is set appropriately)
Definition at line 108 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::GetNormalPressure(), and ContinuumMechanicsProblemDefinition< DIM >::SetApplyNormalPressureOnDeformedSurface().
c_vector<double,DIM>(* ContinuumMechanicsProblemDefinition< DIM >::mpBodyForceFunction)(c_vector< double, DIM > &rX, double t) [protected] |
The body force as a function of space and time, only used if mBodyForceType is set appropriately
Definition at line 91 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::EvaluateBodyForceFunction(), ContinuumMechanicsProblemDefinition< DIM >::GetBodyForce(), and ContinuumMechanicsProblemDefinition< DIM >::SetBodyForce().
c_vector<double,DIM>(* ContinuumMechanicsProblemDefinition< DIM >::mpTractionBoundaryConditionFunction)(c_vector< double, DIM > &rX, double t) [protected] |
The tractions as a function of space and time (only used if mTractionBoundaryConditionType is set appropriately)
Definition at line 111 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::EvaluateTractionFunction(), and ContinuumMechanicsProblemDefinition< DIM >::SetTractionBoundaryConditions().
QuadraticMesh<DIM>& ContinuumMechanicsProblemDefinition< DIM >::mrMesh [protected] |
The mesh being solved on
Definition at line 75 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by SolidMechanicsProblemDefinition< DIM >::GetCompressibleMaterialLaw(), SolidMechanicsProblemDefinition< DIM >::GetIncompressibleMaterialLaw(), SolidMechanicsProblemDefinition< DIM >::SetFixedNodes(), SolidMechanicsProblemDefinition< DIM >::SetMaterialLaw(), and ContinuumMechanicsProblemDefinition< DIM >::SetZeroDirichletNodes().
TractionBoundaryConditionType ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryConditionType [protected] |
The traction (Neumann) boundary condition type
Definition at line 98 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::EvaluateTractionFunction(), ContinuumMechanicsProblemDefinition< DIM >::GetNormalPressure(), ContinuumMechanicsProblemDefinition< DIM >::GetTractionBoundaryConditionType(), ContinuumMechanicsProblemDefinition< DIM >::rGetElementwiseTractions(), ContinuumMechanicsProblemDefinition< DIM >::SetApplyNormalPressureOnDeformedSurface(), and ContinuumMechanicsProblemDefinition< DIM >::SetTractionBoundaryConditions().
std::vector<BoundaryElement<DIM-1,DIM>*> ContinuumMechanicsProblemDefinition< DIM >::mTractionBoundaryElements [protected] |
The surface elements on which tractions are applied
Definition at line 101 of file ContinuumMechanicsProblemDefinition.hpp.
Referenced by ContinuumMechanicsProblemDefinition< DIM >::rGetTractionBoundaryElements(), ContinuumMechanicsProblemDefinition< DIM >::SetApplyNormalPressureOnDeformedSurface(), and ContinuumMechanicsProblemDefinition< DIM >::SetTractionBoundaryConditions().