PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
model::ModelData Class Reference

A class to store model data. More...

#include <modelData.h>

Inheritance diagram for model::ModelData:
Collaboration diagram for model::ModelData:

Public Member Functions

 ModelData (inp::Input *deck)
 Constructor.
 
const particle::BaseParticlegetParticleFromAllList (size_t i) const
 Get pointer to base particle.
 
particle::BaseParticle *& getParticleFromAllList (size_t i)
 Get pointer to base particle.
 
const particle::BaseParticlegetParticleFromParticleList (size_t i) const
 Get pointer to particle (excluding wall)
 
particle::BaseParticle *& getParticleFromParticleList (size_t i)
 
const particle::BaseParticlegetParticleFromWallList (size_t i) const
 Get pointer to wall.
 
particle::BaseParticle *& getParticleFromWallList (size_t i)
 
double getDensity (size_t i)
 Get density of particle.
 
double getHorizon (size_t i)
 Get horizon of particle.
 
size_t & getPtId (size_t i)
 Get particle id given the location in particle list.
 
const size_t & getPtId (size_t i) const
 Get particle id given the location in particle list.
 
void setPtId (size_t i, const size_t &id)
 Set particle id given the location in particle list.
 
double getKeyData (std::string key, bool issue_err=false)
 Get data for a key.
 
void appendKeyData (std::string key, double data, bool issue_err=false)
 Append value to data associated with key.
 
void setKeyData (std::string key, double data, bool issue_err=false)
 Set value to data associated with key.
 
Get and set reference coordinate
util::PointgetXRef (size_t i)
 Get reference coordinate of the node.
 
const util::PointgetXRef (size_t i) const
 Get reference coordinate of the node.
 
void setXRef (size_t i, const util::Point &x)
 Set reference coordinate of the node.
 
void addXRef (size_t i, const util::Point &x)
 Add reference coordinate of the node.
 
void setXRef (size_t i, int dof, double x)
 Set specific reference coordinate of the node.
 
void addXRef (size_t i, int dof, double x)
 Add specific reference coordinate of the node.
 
Get and set current coordinate
util::PointgetX (size_t i)
 Get current coordinate of the node.
 
const util::PointgetX (size_t i) const
 Get current coordinate of the node.
 
void setX (size_t i, const util::Point &x)
 Set current coordinate of the node.
 
void addX (size_t i, const util::Point &x)
 Add current coordinate of the node.
 
void setX (size_t i, int dof, double x)
 Set specific current coordinate of the node.
 
void addX (size_t i, int dof, double x)
 Add to specific current coordinate of the node.
 
Get and set displacement
util::PointgetU (size_t i)
 Get displacement of the node.
 
const util::PointgetU (size_t i) const
 Get displacement of the node.
 
void setU (size_t i, const util::Point &u)
 Set displacement of the node.
 
void addU (size_t i, const util::Point &u)
 Add to displacement of the node.
 
void setU (size_t i, int dof, double u)
 Set displacement of the node.
 
void addU (size_t i, int dof, double u)
 Add to displacement of the node.
 
Get and set velocity
util::PointgetV (size_t i)
 Get velocity of the node.
 
const util::PointgetV (size_t i) const
 Get velocity of the node.
 
void setV (size_t i, const util::Point &v)
 Set velocity of the node.
 
void addV (size_t i, const util::Point &v)
 Add to velocity of the node.
 
void setV (size_t i, int dof, double v)
 Set velocity of the node.
 
void addV (size_t i, int dof, double v)
 Add to velocity of the node.
 
Get and set force
util::PointgetF (size_t i)
 Get force of the node.
 
const util::PointgetF (size_t i) const
 Get force of the node.
 
void setF (size_t i, const util::Point &f)
 Set force of the node.
 
void addF (size_t i, const util::Point &f)
 Add to force of the node.
 
void setF (size_t i, int dof, double f)
 Set force of the node.
 
void addF (size_t i, int dof, double f)
 Add to force of the node.
 
Get and set volume
double & getVol (size_t i)
 Get volume of the node.
 
const double & getVol (size_t i) const
 Get volume of the node.
 
void setVol (size_t i, const double &vol)
 Set volume of the node.
 
void addVol (size_t i, const double &vol)
 Add to volume of the node.
 
Get and set fixity
uint8_t & getFix (size_t i)
 Get fixity of the node.
 
const uint8_t & getFix (size_t i) const
 Get fixity of the node.
 
void setFix (size_t i, const unsigned int &dof, const bool &flag)
 Set fixity of the node.
 
Get and set mx
double & getMx (size_t i)
 Get weighted-volume (mx) of the node.
 
const double & getMx (size_t i) const
 Get weighted-volume (mx) of the node.
 
void setMx (size_t i, const double &mx)
 Set weighted-volume (mx) of the node.
 
void addMx (size_t i, const double &mx)
 Add to weighted-volume (mx) of the node.
 
Get and set thetax
double & getThetax (size_t i)
 Get volumetric deformation (thetax) of the node.
 
const double & getThetax (size_t i) const
 Get volumetric deformation (thetax) of the node.
 
void setThetax (size_t i, const double &thetax)
 Set volumetric deformation (thetax) of the node.
 
void addThetax (size_t i, const double &thetax)
 Add to volumetric deformation (thetax) of the node.
 

Data Fields

size_t d_n
 Current time step.
 
double d_time
 Current time.
 
double d_currentDt
 Current timestep.
 
size_t d_infoN
 Print log step interval.
 
std::map< std::string, double > d_dbgData
 Debug data.
 
std::ofstream d_ppFile
 File stream to output information.
 
inp::Inputd_input_p
 Pointer to Input object.
 
std::shared_ptr< inp::ModelDeckd_modelDeck_p
 Model deck.
 
std::shared_ptr< inp::RestartDeckd_restartDeck_p
 Restart deck.
 
std::shared_ptr< inp::OutputDeckd_outputDeck_p
 Output deck.
 
std::shared_ptr< inp::ParticleDeckd_pDeck_p
 Particle deck.
 
std::shared_ptr< inp::ContactDeckd_cDeck_p
 Contact deck.
 
bool d_stop
 flag to stop the simulation midway
 
double d_hMax
 Minimum mesh over all particles and walls.
 
double d_hMin
 Maximum mesh over all particles and walls.
 
double d_maxContactR
 Maximum contact radius between over pairs of particles and walls.
 
size_t d_contNeighUpdateInterval
 Neighborlist update interval.
 
size_t d_contNeighTimestepCounter
 Contact neighborlist time step counter.
 
double d_contNeighSearchRadius
 Neighborlist contact search radius (multiple of d_maxContactR). This variable will be updated during simulation based on maximum velocity.
 
std::vector< std::shared_ptr< particle::RefParticle > > d_referenceParticles
 Pointer to reference particle.
 
std::vector< particle::BaseParticle * > d_particlesListTypeAll
 List of particles + walls.
 
std::vector< particle::BaseParticle * > d_particlesListTypeParticle
 List of particles.
 
std::vector< particle::BaseParticle * > d_particlesListTypeWall
 List of walls.
 
std::vector< inp::MatDatad_particlesMatDataList
 List of particle material data. Only populated if needed for calculation of stress or other quantities.
 
std::vector< double > d_maxVelocityParticlesListTypeAll
 Maximum velocity among all nodes in the particle for each particle.
 
double d_maxVelocity
 Maximum velocity among all nodes.
 
std::vector< std::vector< size_t > > d_zInfo
 Zone information of particles. For zone 0, d_zInfo[0] = [n1, n2] where n1 is the index at which the particle in this zone starts in d_particlesListTypeAll and n2 is the index + 1, where index is at which the particle in this zone ends.
 
std::unique_ptr< loading::ParticleULoadingd_uLoading_p
 Pointer to displacement Loading object.
 
std::unique_ptr< loading::ParticleFLoadingd_fLoading_p
 Pointer to force Loading object.
 
std::unique_ptr< geometry::Fractured_fracture_p
 Fracture state of bonds.
 
std::unique_ptr< NSearchd_nsearch_p
 Pointer to nsearch.
 
std::vector< util::Pointd_xRef
 reference positions of the nodes
 
std::vector< util::Pointd_x
 Current positions of the nodes.
 
std::vector< util::Pointd_u
 Displacement of the nodes.
 
std::vector< util::Pointd_v
 Velocity of the nodes.
 
std::vector< double > d_vMag
 Magnitude of velocity of the nodes.
 
std::vector< util::Pointd_f
 Total force on the nodes.
 
std::vector< double > d_vol
 Nodal volumes.
 
std::vector< size_t > d_ptId
 Global node to particle id (walls are assigned id after last particle id)
 
std::vector< std::vector< size_t > > d_neighC
 Neighbor data for contact forces.
 
std::vector< std::vector< size_t > > d_neighPd
 Neighbor data for peridynamic forces.
 
std::vector< std::vector< float > > d_neighPdSqdDist
 Square distance neighbor data for peridynamic forces.
 
std::vector< std::vector< std::vector< size_t > > > d_neighWallNodes
 Neighbor data for contact between particle and walls.
 
std::vector< std::vector< std::vector< double > > > d_neighWallNodesDistance
 Neighbor data (distance) for contact between particle and walls.
 
std::vector< std::vector< size_t > > d_neighWallNodesCondensed
 Neighbor data for contact between particle and walls condensed into single vector for each particle.
 
std::vector< uint8_t > d_fix
 Vector of fixity mask of each node.
 
std::vector< uint8_t > d_forceFixity
 Vector of fixity mask of each node for force.
 
std::vector< double > d_thetaX
 Dilation.
 
std::vector< double > d_mX
 Weighted volume.
 
std::vector< size_t > d_fPdCompNodes
 List of global nodes on which force (peridynamic/internal) is to be computed.
 
std::vector< size_t > d_fContCompNodes
 List of global nodes on which force (contact) is to be computed.
 
std::vector< float > d_Z
 Damage at nodes.
 
Minor simulation data

These are postprocessing data and are created if only required during output or postprocessing.

std::vector< float > d_e
 Energy of the nodes.
 
std::vector< float > d_w
 Work done on each of the nodes.
 
std::vector< float > d_phi
 Damage function \( \phi \) at the nodes.
 
std::vector< float > d_eF
 Fracture energy of the nodes.
 
std::vector< float > d_eFB
 Bond-based fracture energy of the nodes.
 
std::vector< util::Pointd_xQuadCur
 Current position of quadrature points.
 
std::vector< util::SymMatrix3d_strain
 Strain in elements (values at quadrature points)
 
std::vector< util::SymMatrix3d_stress
 Stress in elements (values at quadrature points)
 
float d_te
 Total internal energy.
 
float d_tw
 Total work done.
 
float d_tk
 Total kinetic energy.
 
float d_teF
 Total fracture energy.
 
float d_teFB
 Total bond-based fracture energy.
 

Detailed Description

A class to store model data.

Definition at line 47 of file modelData.h.

Constructor & Destructor Documentation

◆ ModelData()

model::ModelData::ModelData ( inp::Input deck)
inline

Constructor.

Parameters
deckInput deck

Definition at line 54 of file modelData.h.

55 : d_n(0),
56 d_time(0.),
57 d_currentDt(0.),
58 d_infoN(1),
59 d_input_p(deck),
64 d_stop(false), d_hMax(0.), d_hMin(0.), d_maxContactR(0.),
68 d_uLoading_p(nullptr), d_fLoading_p(nullptr),
69 d_fracture_p(nullptr), d_nsearch_p(nullptr) {}
std::shared_ptr< inp::ParticleDeck > getParticleDeck()
Get the pointer to particle deck.
Definition input.cpp:181
std::shared_ptr< inp::ModelDeck > getModelDeck()
Get the pointer to model deck.
Definition input.cpp:172
std::shared_ptr< inp::ContactDeck > getContactDeck()
Get the pointer to contact deck.
Definition input.cpp:183
std::shared_ptr< inp::RestartDeck > getRestartDeck()
Get the pointer to restart deck.
Definition input.cpp:178
std::shared_ptr< inp::OutputDeck > getOutputDeck()
Get the pointer to output deck.
Definition input.cpp:175
std::shared_ptr< inp::RestartDeck > d_restartDeck_p
Restart deck.
Definition modelData.h:555
std::shared_ptr< inp::ContactDeck > d_cDeck_p
Contact deck.
Definition modelData.h:564
std::unique_ptr< NSearch > d_nsearch_p
Pointer to nsearch.
Definition modelData.h:627
double d_hMax
Minimum mesh over all particles and walls.
Definition modelData.h:571
std::unique_ptr< loading::ParticleFLoading > d_fLoading_p
Pointer to force Loading object.
Definition modelData.h:621
size_t d_infoN
Print log step interval.
Definition modelData.h:540
double d_contNeighSearchRadius
Neighborlist contact search radius (multiple of d_maxContactR). This variable will be updated during ...
Definition modelData.h:586
std::shared_ptr< inp::ModelDeck > d_modelDeck_p
Model deck.
Definition modelData.h:552
size_t d_contNeighUpdateInterval
Neighborlist update interval.
Definition modelData.h:580
size_t d_n
Current time step.
Definition modelData.h:531
std::unique_ptr< loading::ParticleULoading > d_uLoading_p
Pointer to displacement Loading object.
Definition modelData.h:618
inp::Input * d_input_p
Pointer to Input object.
Definition modelData.h:549
bool d_stop
flag to stop the simulation midway
Definition modelData.h:568
std::shared_ptr< inp::OutputDeck > d_outputDeck_p
Output deck.
Definition modelData.h:558
double d_maxContactR
Maximum contact radius between over pairs of particles and walls.
Definition modelData.h:577
double d_time
Current time.
Definition modelData.h:534
size_t d_contNeighTimestepCounter
Contact neighborlist time step counter.
Definition modelData.h:583
double d_currentDt
Current timestep.
Definition modelData.h:537
std::shared_ptr< inp::ParticleDeck > d_pDeck_p
Particle deck.
Definition modelData.h:561
std::unique_ptr< geometry::Fracture > d_fracture_p
Fracture state of bonds.
Definition modelData.h:624
double d_hMin
Maximum mesh over all particles and walls.
Definition modelData.h:574

Member Function Documentation

◆ addF() [1/2]

void model::ModelData::addF ( size_t  i,
const util::Point f 
)
inline

Add to force of the node.

Parameters
iGlobal id of node
fForce to add

Definition at line 382 of file modelData.h.

382{ d_f[i] += f; };
std::vector< util::Point > d_f
Total force on the nodes.
Definition modelData.h:645

References d_f.

◆ addF() [2/2]

void model::ModelData::addF ( size_t  i,
int  dof,
double  f 
)
inline

Add to force of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
fForce to add

Definition at line 398 of file modelData.h.

398{ d_f[i][dof] += f; };

References d_f.

◆ addMx()

void model::ModelData::addMx ( size_t  i,
const double &  mx 
)
inline

Add to weighted-volume (mx) of the node.

Parameters
iGlobal id of node
mxWeighted-volume to add

Definition at line 494 of file modelData.h.

494{ d_mX[i] += mx; };
std::vector< double > d_mX
Weighted volume.
Definition modelData.h:696

References d_mX.

◆ addThetax()

void model::ModelData::addThetax ( size_t  i,
const double &  thetax 
)
inline

Add to volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
thetaxVolumetric deformation to add

Definition at line 525 of file modelData.h.

525{ d_thetaX[i] += thetax; };
std::vector< double > d_thetaX
Dilation.
Definition modelData.h:690

References d_thetaX.

◆ addU() [1/2]

void model::ModelData::addU ( size_t  i,
const util::Point u 
)
inline

Add to displacement of the node.

Parameters
iGlobal id of node
uDisplacement to add

Definition at line 288 of file modelData.h.

288{ d_u[i] += u; };
std::vector< util::Point > d_u
Displacement of the nodes.
Definition modelData.h:636

References d_u.

◆ addU() [2/2]

void model::ModelData::addU ( size_t  i,
int  dof,
double  u 
)
inline

Add to displacement of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
uDisplacement to add

Definition at line 304 of file modelData.h.

304{ d_u[i][dof] += u; };

References d_u.

◆ addV() [1/2]

void model::ModelData::addV ( size_t  i,
const util::Point v 
)
inline

Add to velocity of the node.

Parameters
iGlobal id of node
vVelocity to add

Definition at line 335 of file modelData.h.

335{ d_v[i] += v; };
std::vector< util::Point > d_v
Velocity of the nodes.
Definition modelData.h:639

References d_v.

◆ addV() [2/2]

void model::ModelData::addV ( size_t  i,
int  dof,
double  v 
)
inline

Add to velocity of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
vVelocity to add

Definition at line 351 of file modelData.h.

351{ d_v[i][dof] += v; };

References d_v.

◆ addVol()

void model::ModelData::addVol ( size_t  i,
const double &  vol 
)
inline

Add to volume of the node.

Parameters
iGlobal id of node
volVolume to add

Definition at line 429 of file modelData.h.

429{ d_vol[i] += vol; };
std::vector< double > d_vol
Nodal volumes.
Definition modelData.h:648

References d_vol.

◆ addX() [1/2]

void model::ModelData::addX ( size_t  i,
const util::Point x 
)
inline

Add current coordinate of the node.

Parameters
iGlobal id of node
xCurrent coordinate to add

Definition at line 241 of file modelData.h.

241{ d_x[i] += x; };
std::vector< util::Point > d_x
Current positions of the nodes.
Definition modelData.h:633

References d_x.

◆ addX() [2/2]

void model::ModelData::addX ( size_t  i,
int  dof,
double  x 
)
inline

Add to specific current coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xCurrent coordinate to add

Definition at line 257 of file modelData.h.

257{ d_x[i][dof] += x; };

References d_x.

◆ addXRef() [1/2]

void model::ModelData::addXRef ( size_t  i,
const util::Point x 
)
inline

Add reference coordinate of the node.

Parameters
iGlobal id of node
xReference coordinate to add

Definition at line 194 of file modelData.h.

194{ d_xRef[i] += x; };
std::vector< util::Point > d_xRef
reference positions of the nodes
Definition modelData.h:630

References d_xRef.

◆ addXRef() [2/2]

void model::ModelData::addXRef ( size_t  i,
int  dof,
double  x 
)
inline

Add specific reference coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xReference coordinate to add

Definition at line 210 of file modelData.h.

210{ d_xRef[i][dof] += x; };

References d_xRef.

◆ appendKeyData()

void model::ModelData::appendKeyData ( std::string  key,
double  data,
bool  issue_err = false 
)
inline

Append value to data associated with key.

Parameters
keyKey to append the data to

Definition at line 154 of file modelData.h.

154 {
155 util::methods::appendKeyData<double>(key, data, d_dbgData, issue_err);
156 };
std::map< std::string, double > d_dbgData
Debug data.
Definition modelData.h:543

References d_dbgData.

Referenced by peridynamics::Model::computeForces().

Here is the caller graph for this function:

◆ getDensity()

double model::ModelData::getDensity ( size_t  i)

Get density of particle.

Parameters
iLocation in the particle list
Returns
rho Density

Definition at line 14 of file modelData.cpp.

14 {
15 return d_particlesListTypeAll[d_ptId[i]]->getDensity();
16};
std::vector< particle::BaseParticle * > d_particlesListTypeAll
List of particles + walls.
Definition modelData.h:592
std::vector< size_t > d_ptId
Global node to particle id (walls are assigned id after last particle id)
Definition modelData.h:652

References d_particlesListTypeAll, and d_ptId.

◆ getF() [1/2]

util::Point & model::ModelData::getF ( size_t  i)
inline

Get force of the node.

Parameters
iGlobal id of node
Returns
f Force

Definition at line 365 of file modelData.h.

365{ return d_f[i]; };

References d_f.

◆ getF() [2/2]

const util::Point & model::ModelData::getF ( size_t  i) const
inline

Get force of the node.

Parameters
iGlobal id of node
Returns
f Force

Definition at line 368 of file modelData.h.

368{ return d_f[i]; };

References d_f.

◆ getFix() [1/2]

uint8_t & model::ModelData::getFix ( size_t  i)
inline

Get fixity of the node.

Parameters
iGlobal id of node
Returns
flag Fixity

Definition at line 443 of file modelData.h.

443{ return d_fix[i]; };
std::vector< uint8_t > d_fix
Vector of fixity mask of each node.
Definition modelData.h:680

References d_fix.

◆ getFix() [2/2]

const uint8_t & model::ModelData::getFix ( size_t  i) const
inline

Get fixity of the node.

Parameters
iGlobal id of node
Returns
flag Fixity

Definition at line 446 of file modelData.h.

446{ return d_fix[i]; };

References d_fix.

◆ getHorizon()

double model::ModelData::getHorizon ( size_t  i)

Get horizon of particle.

Parameters
iLocation in the particle list
Returns
eps Horizon

Definition at line 17 of file modelData.cpp.

17 {
18 return d_particlesListTypeAll[d_ptId[i]]->getHorizon();
19}

◆ getKeyData()

double model::ModelData::getKeyData ( std::string  key,
bool  issue_err = false 
)
inline

Get data for a key.

Parameters
keyKey to access the data
Returns
data Value of data

Definition at line 145 of file modelData.h.

145 {
146 return util::methods::getKeyData<double>(key, d_dbgData, issue_err);
147 };

References d_dbgData.

Referenced by peridynamics::Model::computeForces().

Here is the caller graph for this function:

◆ getMx() [1/2]

double & model::ModelData::getMx ( size_t  i)
inline

Get weighted-volume (mx) of the node.

Parameters
iGlobal id of node
Returns
mx Weighted-volume

Definition at line 477 of file modelData.h.

477{ return d_mX[i]; };

References d_mX.

◆ getMx() [2/2]

const double & model::ModelData::getMx ( size_t  i) const
inline

Get weighted-volume (mx) of the node.

Parameters
iGlobal id of node
Returns
mx Weighted-volume

Definition at line 480 of file modelData.h.

480{ return d_mX[i]; };

References d_mX.

◆ getParticleFromAllList() [1/2]

particle::BaseParticle *& model::ModelData::getParticleFromAllList ( size_t  i)
inline

Get pointer to base particle.

Parameters
iLocation in the particle list
Returns
Pointer Pointer to base particle

Definition at line 80 of file modelData.h.

80 { return

References d_particlesListTypeAll.

◆ getParticleFromAllList() [2/2]

const particle::BaseParticle * model::ModelData::getParticleFromAllList ( size_t  i) const
inline

Get pointer to base particle.

Parameters
iLocation in the particle list
Returns
Pointer Pointer to base particle

Definition at line 76 of file modelData.h.

76 { return

References d_particlesListTypeAll.

◆ getParticleFromParticleList() [1/2]

particle::BaseParticle *& model::ModelData::getParticleFromParticleList ( size_t  i)
inline

Definition at line 92 of file modelData.h.

92 { return
std::vector< particle::BaseParticle * > d_particlesListTypeParticle
List of particles.
Definition modelData.h:595

References d_particlesListTypeParticle.

◆ getParticleFromParticleList() [2/2]

const particle::BaseParticle * model::ModelData::getParticleFromParticleList ( size_t  i) const
inline

Get pointer to particle (excluding wall)

Parameters
iLocation in the particle list
Returns
Pointer Pointer to particle

Definition at line 88 of file modelData.h.

88 { return

References d_particlesListTypeParticle.

◆ getParticleFromWallList() [1/2]

particle::BaseParticle *& model::ModelData::getParticleFromWallList ( size_t  i)
inline

Definition at line 104 of file modelData.h.

104 { return
std::vector< particle::BaseParticle * > d_particlesListTypeWall
List of walls.
Definition modelData.h:598

References d_particlesListTypeWall.

◆ getParticleFromWallList() [2/2]

const particle::BaseParticle * model::ModelData::getParticleFromWallList ( size_t  i) const
inline

Get pointer to wall.

Parameters
iLocation in the wall list
Returns
Pointer Pointer to wall

Definition at line 100 of file modelData.h.

100 { return

References d_particlesListTypeWall.

◆ getPtId() [1/2]

size_t & model::ModelData::getPtId ( size_t  i)
inline

Get particle id given the location in particle list.

Parameters
iLocation in the particle list
Returns
Id Particle id

Definition at line 126 of file modelData.h.

126{ return d_ptId[i]; };

References d_ptId.

◆ getPtId() [2/2]

const size_t & model::ModelData::getPtId ( size_t  i) const
inline

Get particle id given the location in particle list.

Parameters
iLocation in the particle list
Returns
Id Particle id

Definition at line 129 of file modelData.h.

129{ return d_ptId[i]; };

References d_ptId.

◆ getThetax() [1/2]

double & model::ModelData::getThetax ( size_t  i)
inline

Get volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
Returns
thetax Volumetric deformation

Definition at line 508 of file modelData.h.

508{ return d_thetaX[i]; };

References d_thetaX.

◆ getThetax() [2/2]

const double & model::ModelData::getThetax ( size_t  i) const
inline

Get volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
Returns
thetax Volumetric deformation

Definition at line 511 of file modelData.h.

511{ return d_thetaX[i]; };

References d_thetaX.

◆ getU() [1/2]

util::Point & model::ModelData::getU ( size_t  i)
inline

Get displacement of the node.

Parameters
iGlobal id of node
Returns
u Displacement

Definition at line 271 of file modelData.h.

271{ return d_u[i]; };

References d_u.

◆ getU() [2/2]

const util::Point & model::ModelData::getU ( size_t  i) const
inline

Get displacement of the node.

Parameters
iGlobal id of node
Returns
u Displacement

Definition at line 274 of file modelData.h.

274{ return d_u[i]; };

References d_u.

◆ getV() [1/2]

util::Point & model::ModelData::getV ( size_t  i)
inline

Get velocity of the node.

Parameters
iGlobal id of node
Returns
v Velocity

Definition at line 318 of file modelData.h.

318{ return d_v[i]; };

References d_v.

◆ getV() [2/2]

const util::Point & model::ModelData::getV ( size_t  i) const
inline

Get velocity of the node.

Parameters
iGlobal id of node
Returns
v Velocity

Definition at line 321 of file modelData.h.

321{ return d_v[i]; };

References d_v.

◆ getVol() [1/2]

double & model::ModelData::getVol ( size_t  i)
inline

Get volume of the node.

Parameters
iGlobal id of node
Returns
vol Volume

Definition at line 412 of file modelData.h.

412{ return d_vol[i]; };

References d_vol.

◆ getVol() [2/2]

const double & model::ModelData::getVol ( size_t  i) const
inline

Get volume of the node.

Parameters
iGlobal id of node
Returns
vol Volume

Definition at line 415 of file modelData.h.

415{ return d_vol[i]; };

References d_vol.

◆ getX() [1/2]

util::Point & model::ModelData::getX ( size_t  i)
inline

Get current coordinate of the node.

Parameters
iGlobal id of node
Returns
x Current coordinate

Definition at line 224 of file modelData.h.

224{ return d_x[i]; };

References d_x.

◆ getX() [2/2]

const util::Point & model::ModelData::getX ( size_t  i) const
inline

Get current coordinate of the node.

Parameters
iGlobal id of node
Returns
x Current coordinate

Definition at line 227 of file modelData.h.

227{ return d_x[i]; };

References d_x.

◆ getXRef() [1/2]

util::Point & model::ModelData::getXRef ( size_t  i)
inline

Get reference coordinate of the node.

Parameters
iGlobal id of node
Returns
x Reference coordinate

Definition at line 177 of file modelData.h.

177{ return d_xRef[i]; };

References d_xRef.

◆ getXRef() [2/2]

const util::Point & model::ModelData::getXRef ( size_t  i) const
inline

Get reference coordinate of the node.

Parameters
iGlobal id of node
Returns
x Reference coordinate

Definition at line 180 of file modelData.h.

180{ return d_xRef[i]; };

References d_xRef.

◆ setF() [1/2]

void model::ModelData::setF ( size_t  i,
const util::Point f 
)
inline

Set force of the node.

Parameters
iGlobal id of node
fForce to set

Definition at line 375 of file modelData.h.

375{ d_f[i] = f; };

References d_f.

◆ setF() [2/2]

void model::ModelData::setF ( size_t  i,
int  dof,
double  f 
)
inline

Set force of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
fForce to set

Definition at line 390 of file modelData.h.

390{ d_f[i][dof] = f; };

References d_f.

◆ setFix()

void model::ModelData::setFix ( size_t  i,
const unsigned int &  dof,
const bool &  flag 
)
inline

Set fixity of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
flagFixity to set

Definition at line 454 of file modelData.h.

455 {
456 // to set i^th bit as true of integer a,
457 // a |= 1UL << (i % 8)
458
459 // to set i^th bit as false of integer a,
460 // a &= ~(1UL << (i % 8))
461
462 flag ? (d_fix[i] |= 1UL << dof) : (d_fix[i] &= ~(1UL << dof));
463 };

References d_fix.

◆ setKeyData()

void model::ModelData::setKeyData ( std::string  key,
double  data,
bool  issue_err = false 
)
inline

Set value to data associated with key.

Parameters
keyKey to append the data to

Definition at line 163 of file modelData.h.

163 {
164 util::methods::setKeyData<double>(key, data, d_dbgData, issue_err);
165 };

References d_dbgData.

◆ setMx()

void model::ModelData::setMx ( size_t  i,
const double &  mx 
)
inline

Set weighted-volume (mx) of the node.

Parameters
iGlobal id of node
mxWeighted-volume to set

Definition at line 487 of file modelData.h.

487{ d_mX[i] = mx; };

References d_mX.

◆ setPtId()

void model::ModelData::setPtId ( size_t  i,
const size_t &  id 
)
inline

Set particle id given the location in particle list.

Parameters
iLocation in the particle list
idParticle id to set

Definition at line 136 of file modelData.h.

136{ d_ptId[i] = id; };

References d_ptId.

◆ setThetax()

void model::ModelData::setThetax ( size_t  i,
const double &  thetax 
)
inline

Set volumetric deformation (thetax) of the node.

Parameters
iGlobal id of node
thetaxVolumetric deformation to set

Definition at line 518 of file modelData.h.

518{ d_thetaX[i] = thetax; };

References d_thetaX.

◆ setU() [1/2]

void model::ModelData::setU ( size_t  i,
const util::Point u 
)
inline

Set displacement of the node.

Parameters
iGlobal id of node
uDisplacement to set

Definition at line 281 of file modelData.h.

281{ d_u[i] = u; };

References d_u.

◆ setU() [2/2]

void model::ModelData::setU ( size_t  i,
int  dof,
double  u 
)
inline

Set displacement of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
uDisplacement to set

Definition at line 296 of file modelData.h.

296{ d_u[i][dof] = u; };

References d_u.

◆ setV() [1/2]

void model::ModelData::setV ( size_t  i,
const util::Point v 
)
inline

Set velocity of the node.

Parameters
iGlobal id of node
vVelocity to set

Definition at line 328 of file modelData.h.

328{ d_v[i] = v; };

References d_v.

◆ setV() [2/2]

void model::ModelData::setV ( size_t  i,
int  dof,
double  v 
)
inline

Set velocity of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
vVelocity to set

Definition at line 343 of file modelData.h.

343{ d_v[i][dof] = v; };

References d_v.

◆ setVol()

void model::ModelData::setVol ( size_t  i,
const double &  vol 
)
inline

Set volume of the node.

Parameters
iGlobal id of node
volVolume to set

Definition at line 422 of file modelData.h.

422{ d_vol[i] = vol; };

References d_vol.

◆ setX() [1/2]

void model::ModelData::setX ( size_t  i,
const util::Point x 
)
inline

Set current coordinate of the node.

Parameters
iGlobal id of node
xCurrent coordinate to set

Definition at line 234 of file modelData.h.

234{ d_x[i] = x; };

References d_x.

◆ setX() [2/2]

void model::ModelData::setX ( size_t  i,
int  dof,
double  x 
)
inline

Set specific current coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xCurrent coordinate to set

Definition at line 249 of file modelData.h.

249{ d_x[i][dof] = x; };

References d_x.

◆ setXRef() [1/2]

void model::ModelData::setXRef ( size_t  i,
const util::Point x 
)
inline

Set reference coordinate of the node.

Parameters
iGlobal id of node
xReference coordinate to set

Definition at line 187 of file modelData.h.

187{ d_xRef[i] = x; };

References d_xRef.

◆ setXRef() [2/2]

void model::ModelData::setXRef ( size_t  i,
int  dof,
double  x 
)
inline

Set specific reference coordinate of the node.

Parameters
iGlobal id of node
dofDirection or degree of freedom to be modified
xReference coordinate to set

Definition at line 202 of file modelData.h.

202{ d_xRef[i][dof] = x; };

References d_xRef.

Field Documentation

◆ d_cDeck_p

std::shared_ptr<inp::ContactDeck> model::ModelData::d_cDeck_p

Contact deck.

Definition at line 564 of file modelData.h.

Referenced by twoparticle_demo::Model::twoParticleTestPenetrationDist().

◆ d_contNeighSearchRadius

double model::ModelData::d_contNeighSearchRadius

Neighborlist contact search radius (multiple of d_maxContactR). This variable will be updated during simulation based on maximum velocity.

Definition at line 586 of file modelData.h.

◆ d_contNeighTimestepCounter

size_t model::ModelData::d_contNeighTimestepCounter

Contact neighborlist time step counter.

Definition at line 583 of file modelData.h.

◆ d_contNeighUpdateInterval

size_t model::ModelData::d_contNeighUpdateInterval

Neighborlist update interval.

Definition at line 580 of file modelData.h.

◆ d_currentDt

double model::ModelData::d_currentDt

Current timestep.

Definition at line 537 of file modelData.h.

◆ d_dbgData

std::map<std::string, double> model::ModelData::d_dbgData

Debug data.

Definition at line 543 of file modelData.h.

Referenced by appendKeyData(), getKeyData(), and setKeyData().

◆ d_e

std::vector<float> model::ModelData::d_e

Energy of the nodes.

Definition at line 716 of file modelData.h.

◆ d_eF

std::vector<float> model::ModelData::d_eF

Fracture energy of the nodes.

Definition at line 725 of file modelData.h.

◆ d_eFB

std::vector<float> model::ModelData::d_eFB

Bond-based fracture energy of the nodes.

Definition at line 728 of file modelData.h.

◆ d_f

std::vector<util::Point> model::ModelData::d_f

Total force on the nodes.

Definition at line 645 of file modelData.h.

Referenced by addF(), addF(), getF(), getF(), setF(), and setF().

◆ d_fContCompNodes

std::vector<size_t> model::ModelData::d_fContCompNodes

List of global nodes on which force (contact) is to be computed.

Definition at line 703 of file modelData.h.

◆ d_fix

std::vector<uint8_t> model::ModelData::d_fix

Vector of fixity mask of each node.

First bit represents x-dof, second represents y-dof, and third represents z-dof. 0 represents free dof and 1 represents fixed dof.

We store data in uint8_t type which can hold 8 bit. At present we only use first 3 bits.

Definition at line 680 of file modelData.h.

Referenced by getFix(), getFix(), and setFix().

◆ d_fLoading_p

std::unique_ptr<loading::ParticleFLoading> model::ModelData::d_fLoading_p

Pointer to force Loading object.

Definition at line 621 of file modelData.h.

◆ d_forceFixity

std::vector<uint8_t> model::ModelData::d_forceFixity

Vector of fixity mask of each node for force.

Definition at line 683 of file modelData.h.

◆ d_fPdCompNodes

std::vector<size_t> model::ModelData::d_fPdCompNodes

List of global nodes on which force (peridynamic/internal) is to be computed.

Definition at line 700 of file modelData.h.

◆ d_fracture_p

std::unique_ptr<geometry::Fracture> model::ModelData::d_fracture_p

Fracture state of bonds.

Definition at line 624 of file modelData.h.

◆ d_hMax

double model::ModelData::d_hMax

Minimum mesh over all particles and walls.

Definition at line 571 of file modelData.h.

◆ d_hMin

double model::ModelData::d_hMin

Maximum mesh over all particles and walls.

Definition at line 574 of file modelData.h.

◆ d_infoN

size_t model::ModelData::d_infoN

◆ d_input_p

inp::Input* model::ModelData::d_input_p

Pointer to Input object.

Definition at line 549 of file modelData.h.

◆ d_maxContactR

double model::ModelData::d_maxContactR

Maximum contact radius between over pairs of particles and walls.

Definition at line 577 of file modelData.h.

◆ d_maxVelocity

double model::ModelData::d_maxVelocity

Maximum velocity among all nodes.

Definition at line 610 of file modelData.h.

◆ d_maxVelocityParticlesListTypeAll

std::vector<double> model::ModelData::d_maxVelocityParticlesListTypeAll

Maximum velocity among all nodes in the particle for each particle.

Definition at line 607 of file modelData.h.

◆ d_modelDeck_p

◆ d_mX

std::vector<double> model::ModelData::d_mX

Weighted volume.

In case of nonlinear peridynamic state based model, this data is not required

Definition at line 696 of file modelData.h.

Referenced by addMx(), getMx(), getMx(), and setMx().

◆ d_n

◆ d_neighC

std::vector<std::vector<size_t> > model::ModelData::d_neighC

Neighbor data for contact forces.

Definition at line 655 of file modelData.h.

◆ d_neighPd

std::vector<std::vector<size_t> > model::ModelData::d_neighPd

Neighbor data for peridynamic forces.

Definition at line 658 of file modelData.h.

◆ d_neighPdSqdDist

std::vector<std::vector<float> > model::ModelData::d_neighPdSqdDist

Square distance neighbor data for peridynamic forces.

Definition at line 661 of file modelData.h.

◆ d_neighWallNodes

std::vector<std::vector<std::vector<size_t> > > model::ModelData::d_neighWallNodes

Neighbor data for contact between particle and walls.

Definition at line 664 of file modelData.h.

◆ d_neighWallNodesCondensed

std::vector<std::vector<size_t> > model::ModelData::d_neighWallNodesCondensed

Neighbor data for contact between particle and walls condensed into single vector for each particle.

Definition at line 670 of file modelData.h.

◆ d_neighWallNodesDistance

std::vector<std::vector<std::vector<double> > > model::ModelData::d_neighWallNodesDistance

Neighbor data (distance) for contact between particle and walls.

Definition at line 667 of file modelData.h.

◆ d_nsearch_p

std::unique_ptr<NSearch> model::ModelData::d_nsearch_p

Pointer to nsearch.

Definition at line 627 of file modelData.h.

◆ d_outputDeck_p

std::shared_ptr<inp::OutputDeck> model::ModelData::d_outputDeck_p

◆ d_particlesListTypeAll

◆ d_particlesListTypeParticle

std::vector<particle::BaseParticle*> model::ModelData::d_particlesListTypeParticle

List of particles.

Definition at line 595 of file modelData.h.

Referenced by getParticleFromParticleList(), and getParticleFromParticleList().

◆ d_particlesListTypeWall

std::vector<particle::BaseParticle*> model::ModelData::d_particlesListTypeWall

List of walls.

Definition at line 598 of file modelData.h.

Referenced by getParticleFromWallList(), and getParticleFromWallList().

◆ d_particlesMatDataList

std::vector<inp::MatData> model::ModelData::d_particlesMatDataList

List of particle material data. Only populated if needed for calculation of stress or other quantities.

Definition at line 604 of file modelData.h.

Referenced by twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_pDeck_p

◆ d_phi

std::vector<float> model::ModelData::d_phi

Damage function \( \phi \) at the nodes.

Definition at line 722 of file modelData.h.

◆ d_ppFile

std::ofstream model::ModelData::d_ppFile

File stream to output information.

Definition at line 546 of file modelData.h.

Referenced by twoparticle_demo::Model::Model(), and twoparticle_demo::Model::twoParticleTest().

◆ d_ptId

std::vector<size_t> model::ModelData::d_ptId

Global node to particle id (walls are assigned id after last particle id)

Definition at line 652 of file modelData.h.

Referenced by getDensity(), getPtId(), getPtId(), and setPtId().

◆ d_referenceParticles

std::vector<std::shared_ptr<particle::RefParticle> > model::ModelData::d_referenceParticles

Pointer to reference particle.

Definition at line 589 of file modelData.h.

◆ d_restartDeck_p

std::shared_ptr<inp::RestartDeck> model::ModelData::d_restartDeck_p

Restart deck.

Definition at line 555 of file modelData.h.

◆ d_stop

bool model::ModelData::d_stop

flag to stop the simulation midway

Definition at line 568 of file modelData.h.

◆ d_strain

std::vector<util::SymMatrix3> model::ModelData::d_strain

Strain in elements (values at quadrature points)

Definition at line 734 of file modelData.h.

Referenced by twoparticle_demo::Model::run(), and twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_stress

std::vector<util::SymMatrix3> model::ModelData::d_stress

Stress in elements (values at quadrature points)

Definition at line 737 of file modelData.h.

Referenced by twoparticle_demo::Model::run(), and twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_te

float model::ModelData::d_te

Total internal energy.

Definition at line 740 of file modelData.h.

◆ d_teF

float model::ModelData::d_teF

Total fracture energy.

Definition at line 749 of file modelData.h.

◆ d_teFB

float model::ModelData::d_teFB

Total bond-based fracture energy.

Definition at line 752 of file modelData.h.

◆ d_thetaX

std::vector<double> model::ModelData::d_thetaX

Dilation.

In case of nonlinear peridynamic state based model, this will be the spherical (hydrostatic) strain

Definition at line 690 of file modelData.h.

Referenced by addThetax(), getThetax(), getThetax(), and setThetax().

◆ d_time

double model::ModelData::d_time

Current time.

Definition at line 534 of file modelData.h.

Referenced by twoparticle_demo::Model::integrate(), and twoparticle_demo::Model::twoParticleTest().

◆ d_tk

float model::ModelData::d_tk

Total kinetic energy.

Definition at line 746 of file modelData.h.

◆ d_tw

float model::ModelData::d_tw

Total work done.

Definition at line 743 of file modelData.h.

◆ d_u

std::vector<util::Point> model::ModelData::d_u

Displacement of the nodes.

Definition at line 636 of file modelData.h.

Referenced by addU(), addU(), getU(), getU(), setU(), setU(), and twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_uLoading_p

std::unique_ptr<loading::ParticleULoading> model::ModelData::d_uLoading_p

Pointer to displacement Loading object.

Definition at line 618 of file modelData.h.

◆ d_v

std::vector<util::Point> model::ModelData::d_v

Velocity of the nodes.

Definition at line 639 of file modelData.h.

Referenced by addV(), addV(), getV(), getV(), setV(), and setV().

◆ d_vMag

std::vector<double> model::ModelData::d_vMag

Magnitude of velocity of the nodes.

Definition at line 642 of file modelData.h.

◆ d_vol

std::vector<double> model::ModelData::d_vol

Nodal volumes.

Definition at line 648 of file modelData.h.

Referenced by addVol(), getVol(), getVol(), and setVol().

◆ d_w

std::vector<float> model::ModelData::d_w

Work done on each of the nodes.

Definition at line 719 of file modelData.h.

◆ d_x

std::vector<util::Point> model::ModelData::d_x

Current positions of the nodes.

Definition at line 633 of file modelData.h.

Referenced by addX(), addX(), peridynamics::Model::computeForces(), getX(), getX(), setX(), setX(), and twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_xQuadCur

std::vector<util::Point> model::ModelData::d_xQuadCur

Current position of quadrature points.

Definition at line 731 of file modelData.h.

Referenced by twoparticle_demo::Model::run(), and twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_xRef

std::vector<util::Point> model::ModelData::d_xRef

reference positions of the nodes

Definition at line 630 of file modelData.h.

Referenced by addXRef(), addXRef(), getXRef(), getXRef(), setXRef(), setXRef(), and twoparticle_demo::Model::twoParticleTestMaxShearStress().

◆ d_Z

std::vector<float> model::ModelData::d_Z

Damage at nodes.

Definition at line 706 of file modelData.h.

◆ d_zInfo

std::vector<std::vector<size_t> > model::ModelData::d_zInfo

Zone information of particles. For zone 0, d_zInfo[0] = [n1, n2] where n1 is the index at which the particle in this zone starts in d_particlesListTypeAll and n2 is the index + 1, where index is at which the particle in this zone ends.

Definition at line 615 of file modelData.h.


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