NLMech  0.1.0
geometry::VolumeCorrection Class Reference

A class to to compute the volume correction for state-based models. More...

#include <volumeCorrection.h>

Collaboration diagram for geometry::VolumeCorrection:
Collaboration graph

Public Member Functions

void print (int nt=0, int lvl=0) const
 Prints the information about the instance of the object. More...
 
std::string printStr (int nt=0, int lvl=0) const
 Returns the string containing information about the instance of the object. More...
 
 VolumeCorrection (data::DataManager *dataManager)
 Constructor. More...
 

Data Fields

std::vector< std::vector< double > > * d_volumeCorrection_p
 Volume correction for the neighborhood of each node.
 
std::vector< double > * d_weightedVolume_p
 Weighted volume of nodes.
 

Private Member Functions

void correctVolume (const double &horizon, const double &dx, geometry::Neighbor *neighbors, const std::vector< util::Point3 > *nodes)
 Computes the volume correction for each node inside the neighborhood. Since nodes close the boundary of the neighborhood have less volume inside the neighborhood and should have less influence while computing the forces. More...
 
void weightedVolume (geometry::Neighbor *neighbors, const std::vector< util::Point3 > *nodes, fe::Mesh *p_mesh)
 Computes the weighted volume $m_i = \sum\limits_{j\in B_\delta(x_i)} w \vert x_j - x_i \vert V_j$ with $w$ as the influence function for each discrete node. More...
 

Detailed Description

A class to to compute the volume correction for state-based models.

This class implements the so-called volume correction for state-based PD models using the approach described by Silling and implementation details are described by Littlewood.

See also
https://doi.org/10.1007/s10659-007-9125-1

Constructor & Destructor Documentation

◆ VolumeCorrection()

geometry::VolumeCorrection::VolumeCorrection ( data::DataManager dataManager)

Constructor.

Parameters
dataManagerPointer to the data manager object
Here is the call graph for this function:

Member Function Documentation

◆ correctVolume()

void geometry::VolumeCorrection::correctVolume ( const double &  horizon,
const double &  dx,
geometry::Neighbor neighbors,
const std::vector< util::Point3 > *  nodes 
)
private

Computes the volume correction for each node inside the neighborhood. Since nodes close the boundary of the neighborhood have less volume inside the neighborhood and should have less influence while computing the forces.

Parameters
horizonHorizon
dxNodal spacing
neighborsClass containing the neighborhoods
nodesPointer to nodal positions

Referenced by VolumeCorrection().

Here is the caller graph for this function:

◆ print()

void geometry::VolumeCorrection::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the instance of the object.

Parameters
ntNumber of tabs to append before each line of string
lvlLevel of information sought (higher level means more information)
Here is the call graph for this function:

◆ printStr()

std::string geometry::VolumeCorrection::printStr ( int  nt = 0,
int  lvl = 0 
) const

Returns the string containing information about the instance of the object.

Parameters
ntNumber of tabs to append before each line of string
lvlLevel of information sought (higher level means more information)
Returns
string String containing information about this object

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ weightedVolume()

void geometry::VolumeCorrection::weightedVolume ( geometry::Neighbor neighbors,
const std::vector< util::Point3 > *  nodes,
fe::Mesh p_mesh 
)
private

Computes the weighted volume $m_i = \sum\limits_{j\in B_\delta(x_i)} w \vert x_j - x_i \vert V_j$ with $w$ as the influence function for each discrete node.

Parameters
neighborsClass containing the neighborhoods
nodesPointer to nodal positions
p_meshPointer to the mesh object

Referenced by VolumeCorrection().

Here is the caller graph for this function:

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