All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SurgSim::Physics::FemRepresentationParameters Class Reference

The FemRepresentationParameters class defines the physical parameters for all Finite Element Model (1D, 2D, 3D) More...

#include <SurgSim/Physics/FemRepresentationParameters.h>

Collaboration diagram for SurgSim::Physics::FemRepresentationParameters:
Collaboration graph
[legend]

Public Member Functions

 FemRepresentationParameters ()
 Default constructor. More...
 
virtual ~FemRepresentationParameters ()
 Destructor. More...
 
bool operator== (const FemRepresentationParameters &p) const
 Comparison operator (equality test) More...
 
bool operator!= (const FemRepresentationParameters &p) const
 Comparison operator (difference test) More...
 
bool addBoundaryCondition (size_t nodeId)
 Add a boundary condition. More...
 
bool removeBoundaryCondition (size_t nodeId)
 Remove a boundary condition. More...
 
size_t addBoundaryConditions (const std::vector< size_t > &boundaryConditions)
 Add boundary conditions. More...
 
void clearBoundaryConditions ()
 Remove all boundary conditions. More...
 
const std::vector< size_t > & getBoundaryConditions () const
 Get all boundary conditions. More...
 
void setBoundaryConditionMass (double mass)
 Set the boundary condition mass property. More...
 
double getBoundaryConditionMass () const
 Get the boundary condition mass property. More...
 
void setBoundaryConditionInverseMass (double invMass)
 Set the boundary condition inverse mass property. More...
 
double getBoundaryConditionInverseMass () const
 Get the boundary condition inverse mass property. More...
 
void setDensity (double rho)
 Set the mass density of the fem. More...
 
double getDensity () const
 Get the mass density of the fem. More...
 
void setRayleighDampingMass (double massCoef)
 Set the Rayleigh damping mass parameter. More...
 
double getRayleighDampingMass () const
 Get the Rayleigh damping mass parameter. More...
 
void setRayleighDampingStiffness (double stiffnessCoef)
 Set the Rayleigh damping stiffness parameter. More...
 
double getRayleighDampingStiffness () const
 Get the Rayleigh damping stiffness parameter. More...
 
void setYoungModulus (double E)
 Set the Young modulus of the material. More...
 
double getYoungModulus () const
 Get the material Young modulus. More...
 
void setPoissonRatio (double nu)
 Set the Poisson ratio of the material. More...
 
double getPoissonRatio () const
 Get the material Poisson ratio. More...
 
bool isValid () const
 Test if the the parameters are fully set and ready. More...
 

Private Member Functions

void checkValidity ()
 Check the validity of the parameters and set the flag m_isValid accordingly. More...
 

Private Attributes

std::vector< size_t > m_boundaryConditions
 Boundary conditions (vector of node indices to fix) More...
 
double m_boundaryConditionsMass
 Boundary conditions mass property (useful to build the system matrix) More...
 
double m_boundaryConditionsInverseMass
 Boundary conditions mass property (useful to build the system matrix inverse) Note that m_boundaryConditionsInverseMass can be different than 1.0/m_boundaryConditionsMass. More...
 
double m_rho
 Density of the object (in Kg.m-3) More...
 
double m_rayleighDampingMass
 Rayleigh damping, mass parameter (in s-1) More...
 
double m_rayleighDampingStiffness
 Rayleigh damping, stiffness parameter (in s) More...
 
double m_youngModulus
 Young modulus (in N.m-2 or Pa or Kg.m-1.s-2) More...
 
double m_poissonRatio
 Poisson ratio (unit less) Theoretically within (-1, 0.5) with 0.5 for incompressible material In general within [ 0, 0.5) More...
 
bool m_isValid
 Validity of the set of parameters. More...
 

Detailed Description

The FemRepresentationParameters class defines the physical parameters for all Finite Element Model (1D, 2D, 3D)

Constructor & Destructor Documentation

SurgSim::Physics::FemRepresentationParameters::FemRepresentationParameters ( )

Default constructor.

SurgSim::Physics::FemRepresentationParameters::~FemRepresentationParameters ( )
virtual

Destructor.

Member Function Documentation

bool SurgSim::Physics::FemRepresentationParameters::addBoundaryCondition ( size_t  nodeId)

Add a boundary condition.

Parameters
nodeIdThe nodeId of the Fem to be fixed
Returns
True if the boundary condition has been added, False otherwise
size_t SurgSim::Physics::FemRepresentationParameters::addBoundaryConditions ( const std::vector< size_t > &  boundaryConditions)

Add boundary conditions.

Parameters
boundaryConditionsThe vector of all boundary conditions to be added (nodeIdx)
Returns
The number of boundary conditions actually added
void SurgSim::Physics::FemRepresentationParameters::checkValidity ( )
private

Check the validity of the parameters and set the flag m_isValid accordingly.

void SurgSim::Physics::FemRepresentationParameters::clearBoundaryConditions ( )

Remove all boundary conditions.

double SurgSim::Physics::FemRepresentationParameters::getBoundaryConditionInverseMass ( ) const

Get the boundary condition inverse mass property.

Returns
The inverse mass assigned to boundary condition nodes
double SurgSim::Physics::FemRepresentationParameters::getBoundaryConditionMass ( ) const

Get the boundary condition mass property.

Returns
The mass assigned to boundary condition nodes
const std::vector< size_t > & SurgSim::Physics::FemRepresentationParameters::getBoundaryConditions ( ) const

Get all boundary conditions.

Returns
The vector of all boundary conditions (nodeIds)
double SurgSim::Physics::FemRepresentationParameters::getDensity ( ) const

Get the mass density of the fem.

Returns
The density if it has been provided, 0 otherwise (in Kg.m-3)
double SurgSim::Physics::FemRepresentationParameters::getPoissonRatio ( ) const

Get the material Poisson ratio.

Returns
The Poisson ratio of the material (unitless)
double SurgSim::Physics::FemRepresentationParameters::getRayleighDampingMass ( ) const

Get the Rayleigh damping mass parameter.

Returns
The Rayleigh damping mass parameter (in s-1)
double SurgSim::Physics::FemRepresentationParameters::getRayleighDampingStiffness ( ) const

Get the Rayleigh damping stiffness parameter.

Returns
The Rayleigh damping stiffness parameter (in s)
double SurgSim::Physics::FemRepresentationParameters::getYoungModulus ( ) const

Get the material Young modulus.

Returns
The Young modulus of the material (in N.m-2)
bool SurgSim::Physics::FemRepresentationParameters::isValid ( ) const

Test if the the parameters are fully set and ready.

Returns
True if the set of parameters is valid
Note
Valid if mass density and Young modulus strictly positive
and Poisson ratio in ]-1, 0.5[ and both Rayleigh parameters positive or null
bool SurgSim::Physics::FemRepresentationParameters::operator!= ( const FemRepresentationParameters p) const

Comparison operator (difference test)

Parameters
pA FemRepresentationParameters to compare it to
Returns
False if the 2 parameters set are equals, True otherwise
bool SurgSim::Physics::FemRepresentationParameters::operator== ( const FemRepresentationParameters p) const

Comparison operator (equality test)

Parameters
pA FemRepresentationParameters to compare it to
Returns
True if the 2 parameters set are equals, False otherwise
bool SurgSim::Physics::FemRepresentationParameters::removeBoundaryCondition ( size_t  nodeId)

Remove a boundary condition.

Parameters
nodeIdThe nodeId of the Fem to be removed from the boundary conditions list
Returns
True if the boundary condition has been removed, False otherwise
void SurgSim::Physics::FemRepresentationParameters::setBoundaryConditionInverseMass ( double  invMass)

Set the boundary condition inverse mass property.

Parameters
invMassThe inverse mass to be assigned to boundary condition nodes
void SurgSim::Physics::FemRepresentationParameters::setBoundaryConditionMass ( double  mass)

Set the boundary condition mass property.

Parameters
massThe mass to be assigned to boundary condition nodes
void SurgSim::Physics::FemRepresentationParameters::setDensity ( double  rho)

Set the mass density of the fem.

Parameters
rhoThe mass density (in Kg.m-3)
void SurgSim::Physics::FemRepresentationParameters::setPoissonRatio ( double  nu)

Set the Poisson ratio of the material.

Parameters
nuThe Poisson ratio of the material (unitless)
void SurgSim::Physics::FemRepresentationParameters::setRayleighDampingMass ( double  massCoef)

Set the Rayleigh damping mass parameter.

Parameters
massCoefThe Rayleigh damping mass parameter (in s-1)
void SurgSim::Physics::FemRepresentationParameters::setRayleighDampingStiffness ( double  stiffnessCoef)

Set the Rayleigh damping stiffness parameter.

Parameters
stiffnessCoefThe Rayleigh damping stiffness parameter (in s)
void SurgSim::Physics::FemRepresentationParameters::setYoungModulus ( double  E)

Set the Young modulus of the material.

Parameters
EThe Young modulus of the material (in N.m-2)

Member Data Documentation

std::vector<size_t> SurgSim::Physics::FemRepresentationParameters::m_boundaryConditions
private

Boundary conditions (vector of node indices to fix)

double SurgSim::Physics::FemRepresentationParameters::m_boundaryConditionsInverseMass
private

Boundary conditions mass property (useful to build the system matrix inverse) Note that m_boundaryConditionsInverseMass can be different than 1.0/m_boundaryConditionsMass.

double SurgSim::Physics::FemRepresentationParameters::m_boundaryConditionsMass
private

Boundary conditions mass property (useful to build the system matrix)

bool SurgSim::Physics::FemRepresentationParameters::m_isValid
private

Validity of the set of parameters.

double SurgSim::Physics::FemRepresentationParameters::m_poissonRatio
private

Poisson ratio (unit less) Theoretically within (-1, 0.5) with 0.5 for incompressible material In general within [ 0, 0.5)

double SurgSim::Physics::FemRepresentationParameters::m_rayleighDampingMass
private

Rayleigh damping, mass parameter (in s-1)

double SurgSim::Physics::FemRepresentationParameters::m_rayleighDampingStiffness
private

Rayleigh damping, stiffness parameter (in s)

double SurgSim::Physics::FemRepresentationParameters::m_rho
private

Density of the object (in Kg.m-3)

double SurgSim::Physics::FemRepresentationParameters::m_youngModulus
private

Young modulus (in N.m-2 or Pa or Kg.m-1.s-2)


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