11#ifndef MODEL_MODELDATA_H
12#define MODEL_MODELDATA_H
146 return util::methods::getKeyData<double>(key,
d_dbgData, issue_err);
155 util::methods::appendKeyData<double>(key, data,
d_dbgData, issue_err);
163 void setKeyData(std::string key,
double data,
bool issue_err =
false) {
164 util::methods::setKeyData<double>(key, data,
d_dbgData, issue_err);
249 void setX(
size_t i,
int dof,
double x) {
d_x[i][dof] = x; };
257 void addX(
size_t i,
int dof,
double x) {
d_x[i][dof] += x; };
296 void setU(
size_t i,
int dof,
double u) {
d_u[i][dof] = u; };
304 void addU(
size_t i,
int dof,
double u) {
d_u[i][dof] += u; };
343 void setV(
size_t i,
int dof,
double v) {
d_v[i][dof] = v; };
351 void addV(
size_t i,
int dof,
double v) {
d_v[i][dof] += v; };
390 void setF(
size_t i,
int dof,
double f) {
d_f[i][dof] = f; };
398 void addF(
size_t i,
int dof,
double f) {
d_f[i][dof] += f; };
454 void setFix(
size_t i,
const unsigned int &dof,
462 flag ? (
d_fix[i] |= 1UL << dof) : (
d_fix[i] &= ~(1UL << dof));
480 const double &
getMx(
size_t i)
const {
return d_mX[i]; };
487 void setMx(
size_t i,
const double &mx) {
d_mX[i] = mx; };
494 void addMx(
size_t i,
const double &mx) {
d_mX[i] += mx; };
633 std::vector<util::Point>
d_x;
636 std::vector<util::Point>
d_u;
639 std::vector<util::Point>
d_v;
645 std::vector<util::Point>
d_f;
A class to store model data.
std::vector< uint8_t > d_fix
Vector of fixity mask of each node.
std::vector< size_t > d_fContCompNodes
List of global nodes on which force (contact) is to be computed.
std::shared_ptr< inp::RestartDeck > d_restartDeck_p
Restart deck.
std::shared_ptr< inp::ContactDeck > d_cDeck_p
Contact deck.
double & getThetax(size_t i)
Get volumetric deformation (thetax) of the node.
void addX(size_t i, int dof, double x)
Add to specific current coordinate of the node.
void setFix(size_t i, const unsigned int &dof, const bool &flag)
Set fixity of the node.
util::Point & getXRef(size_t i)
Get reference coordinate of the node.
std::vector< std::vector< float > > d_neighPdSqdDist
Square distance neighbor data for peridynamic forces.
void setF(size_t i, int dof, double f)
Set force of the node.
void setVol(size_t i, const double &vol)
Set volume of the node.
void addXRef(size_t i, const util::Point &x)
Add reference coordinate of the node.
double getHorizon(size_t i)
Get horizon of particle.
std::vector< util::Point > d_f
Total force on the nodes.
const double & getThetax(size_t i) const
Get volumetric deformation (thetax) of the node.
std::vector< double > d_maxVelocityParticlesListTypeAll
Maximum velocity among all nodes in the particle for each particle.
const particle::BaseParticle * getParticleFromWallList(size_t i) const
Get pointer to wall.
particle::BaseParticle *& getParticleFromWallList(size_t i)
std::vector< float > d_eFB
Bond-based fracture energy of the nodes.
std::unique_ptr< NSearch > d_nsearch_p
Pointer to nsearch.
const util::Point & getV(size_t i) const
Get velocity of the node.
void addU(size_t i, int dof, double u)
Add to displacement of the node.
std::vector< std::vector< size_t > > d_neighC
Neighbor data for contact forces.
double d_hMax
Minimum mesh over all particles and walls.
double getKeyData(std::string key, bool issue_err=false)
Get data for a key.
std::vector< particle::BaseParticle * > d_particlesListTypeAll
List of particles + walls.
const util::Point & getU(size_t i) const
Get displacement of the node.
const double & getVol(size_t i) const
Get volume of the node.
double & getVol(size_t i)
Get volume of the node.
std::vector< util::Point > d_v
Velocity of the nodes.
std::vector< float > d_e
Energy of the nodes.
particle::BaseParticle *& getParticleFromParticleList(size_t i)
std::vector< util::Point > d_xRef
reference positions of the nodes
std::vector< std::vector< std::vector< size_t > > > d_neighWallNodes
Neighbor data for contact between particle and walls.
std::unique_ptr< loading::ParticleFLoading > d_fLoading_p
Pointer to force Loading object.
void addU(size_t i, const util::Point &u)
Add to displacement of the node.
std::vector< std::vector< size_t > > d_neighWallNodesCondensed
Neighbor data for contact between particle and walls condensed into single vector for each particle.
uint8_t & getFix(size_t i)
Get fixity of the node.
size_t d_infoN
Print log step interval.
std::vector< double > d_vol
Nodal volumes.
void addMx(size_t i, const double &mx)
Add to weighted-volume (mx) of the node.
std::vector< float > d_Z
Damage at nodes.
void setThetax(size_t i, const double &thetax)
Set volumetric deformation (thetax) of the node.
void setU(size_t i, int dof, double u)
Set displacement of the node.
std::vector< util::Point > d_u
Displacement of the nodes.
void setU(size_t i, const util::Point &u)
Set displacement of the node.
double d_contNeighSearchRadius
Neighborlist contact search radius (multiple of d_maxContactR). This variable will be updated during ...
void setXRef(size_t i, int dof, double x)
Set specific reference coordinate of the node.
std::vector< std::vector< std::vector< double > > > d_neighWallNodesDistance
Neighbor data (distance) for contact between particle and walls.
util::Point & getV(size_t i)
Get velocity of the node.
std::shared_ptr< inp::ModelDeck > d_modelDeck_p
Model deck.
std::vector< float > d_phi
Damage function at the nodes.
const particle::BaseParticle * getParticleFromParticleList(size_t i) const
Get pointer to particle (excluding wall)
void addV(size_t i, int dof, double v)
Add to velocity of the node.
std::vector< double > d_thetaX
Dilation.
const util::Point & getX(size_t i) const
Get current coordinate of the node.
std::vector< util::SymMatrix3 > d_stress
Stress in elements (values at quadrature points)
ModelData(inp::Input *deck)
Constructor.
const size_t & getPtId(size_t i) const
Get particle id given the location in particle list.
size_t d_contNeighUpdateInterval
Neighborlist update interval.
void setV(size_t i, const util::Point &v)
Set velocity of the node.
const util::Point & getXRef(size_t i) const
Get reference coordinate of the node.
particle::BaseParticle *& getParticleFromAllList(size_t i)
Get pointer to base particle.
size_t d_n
Current time step.
std::vector< util::Point > d_x
Current positions of the nodes.
std::vector< float > d_w
Work done on each of the nodes.
std::unique_ptr< loading::ParticleULoading > d_uLoading_p
Pointer to displacement Loading object.
void setXRef(size_t i, const util::Point &x)
Set reference coordinate of the node.
std::ofstream d_ppFile
File stream to output information.
std::vector< util::Point > d_xQuadCur
Current position of quadrature points.
std::vector< double > d_vMag
Magnitude of velocity of the nodes.
void addXRef(size_t i, int dof, double x)
Add specific reference coordinate of the node.
void setV(size_t i, int dof, double v)
Set velocity of the node.
const double & getMx(size_t i) const
Get weighted-volume (mx) of the node.
void setX(size_t i, int dof, double x)
Set specific current coordinate of the node.
float d_tk
Total kinetic energy.
size_t & getPtId(size_t i)
Get particle id given the location in particle list.
inp::Input * d_input_p
Pointer to Input object.
void setPtId(size_t i, const size_t &id)
Set particle id given the location in particle list.
std::vector< size_t > d_ptId
Global node to particle id (walls are assigned id after last particle id)
bool d_stop
flag to stop the simulation midway
void setF(size_t i, const util::Point &f)
Set force of the node.
std::shared_ptr< inp::OutputDeck > d_outputDeck_p
Output deck.
void addThetax(size_t i, const double &thetax)
Add to volumetric deformation (thetax) of the node.
double d_maxContactR
Maximum contact radius between over pairs of particles and walls.
void addVol(size_t i, const double &vol)
Add to volume of the node.
void setKeyData(std::string key, double data, bool issue_err=false)
Set value to data associated with key.
double d_maxVelocity
Maximum velocity among all nodes.
std::map< std::string, double > d_dbgData
Debug data.
void addX(size_t i, const util::Point &x)
Add current coordinate of the node.
double d_time
Current time.
size_t d_contNeighTimestepCounter
Contact neighborlist time step counter.
std::vector< uint8_t > d_forceFixity
Vector of fixity mask of each node for force.
double & getMx(size_t i)
Get weighted-volume (mx) of the node.
util::Point & getX(size_t i)
Get current coordinate of the node.
util::Point & getU(size_t i)
Get displacement of the node.
double getDensity(size_t i)
Get density of particle.
void addF(size_t i, int dof, double f)
Add to force of the node.
float d_teFB
Total bond-based fracture energy.
const uint8_t & getFix(size_t i) const
Get fixity of the node.
const particle::BaseParticle * getParticleFromAllList(size_t i) const
Get pointer to base particle.
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 p...
util::Point & getF(size_t i)
Get force of the node.
std::vector< float > d_eF
Fracture energy of the nodes.
double d_currentDt
Current timestep.
std::shared_ptr< inp::ParticleDeck > d_pDeck_p
Particle deck.
float d_tw
Total work done.
std::unique_ptr< geometry::Fracture > d_fracture_p
Fracture state of bonds.
std::vector< util::SymMatrix3 > d_strain
Strain in elements (values at quadrature points)
void appendKeyData(std::string key, double data, bool issue_err=false)
Append value to data associated with key.
double d_hMin
Maximum mesh over all particles and walls.
std::vector< particle::BaseParticle * > d_particlesListTypeParticle
List of particles.
std::vector< std::shared_ptr< particle::RefParticle > > d_referenceParticles
Pointer to reference particle.
void addF(size_t i, const util::Point &f)
Add to force of the node.
const util::Point & getF(size_t i) const
Get force of the node.
void setMx(size_t i, const double &mx)
Set weighted-volume (mx) of the node.
std::vector< double > d_mX
Weighted volume.
std::vector< inp::MatData > d_particlesMatDataList
List of particle material data. Only populated if needed for calculation of stress or other quantitie...
std::vector< std::vector< size_t > > d_neighPd
Neighbor data for peridynamic forces.
std::vector< particle::BaseParticle * > d_particlesListTypeWall
List of walls.
void setX(size_t i, const util::Point &x)
Set current coordinate of the node.
std::vector< size_t > d_fPdCompNodes
List of global nodes on which force (peridynamic/internal) is to be computed.
float d_teF
Total fracture energy.
void addV(size_t i, const util::Point &v)
Add to velocity of the node.
float d_te
Total internal energy.
A class for nearest neighbor search using nanoflann library.
A class to store particle geometry, nodal discretization, and methods.
nsearch::NFlannSearchKd< 3 > NSearch
Collection of methods and data related to particle object.
A structure to represent 3d vectors.