NLMech  0.1.0
loading::InitialCondition Class Reference

A class to apply initial condition. More...

#include <initialCondition.h>

Collaboration diagram for loading::InitialCondition:
Collaboration graph

Public Member Functions

void apply (std::vector< util::Point3 > *u, std::vector< util::Point3 > *v, fe::Mesh *mesh)
 Applies initial condition to displacement and velocity. More...
 
 InitialCondition (inp::InitialConditionDeck *deck)
 Constructor. More...
 
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...
 

Private Member Functions

double getICFormula (const std::string &fn_type, const std::vector< double > &params, const util::Point3 &x, const size_t &dof, const size_t &dim)
 Computes the formula specified by input file. More...
 

Private Attributes

inp::InitialConditionDeckd_deck_p
 Initial condition deck.
 

Detailed Description

A class to apply initial condition.

This class processes input data and provides method to apply initial condition.

Constructor & Destructor Documentation

◆ InitialCondition()

loading::InitialCondition::InitialCondition ( inp::InitialConditionDeck deck)
explicit

Constructor.

Parameters
deckInput deck which contains user-specified information

Member Function Documentation

◆ apply()

void loading::InitialCondition::apply ( std::vector< util::Point3 > *  u,
std::vector< util::Point3 > *  v,
fe::Mesh mesh 
)

Applies initial condition to displacement and velocity.

Parameters
uVector nodal displacements
vVector nodal velocities
meshMesh object
Here is the call graph for this function:

◆ getICFormula()

double loading::InitialCondition::getICFormula ( const std::string &  fn_type,
const std::vector< double > &  params,
const util::Point3 x,
const size_t &  dof,
const size_t &  dim 
)
private

Computes the formula specified by input file.

Parameters
fn_typeType of function in formula
paramsList of required parameters
xCoordinate of point
dofDegree of freedom (0 for X, 1 for Y, 2 for Z)
dimDimension
Returns
value Value of formula at the point
Here is the call graph for this function:

◆ print()

void loading::InitialCondition::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 loading::InitialCondition::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:

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