NLMech  0.1.0
inp::Input Class Reference

A class to read input file. More...

#include <input.h>

Collaboration diagram for inp::Input:
Collaboration graph

Public Member Functions

 Input (const std::string &filename)
 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...
 
Accessor methods
inp::FractureDeckgetFractureDeck ()
 Get the pointer to fracture deck. More...
 
inp::InitialConditionDeckgetInitialConditionDeck ()
 Get the pointer to initial condition deck. More...
 
inp::InteriorFlagsDeckgetInteriorFlagsDeck ()
 Get the pointer to interior flags deck. More...
 
inp::LoadingDeckgetLoadingDeck ()
 Get the pointer to loading deck. More...
 
inp::MassMatrixDeckgetMassMatrixDeck ()
 Get the pointer to mass matrix deck. More...
 
inp::MaterialDeckgetMaterialDeck ()
 Get the pointer to material deck. More...
 
inp::MeshDeckgetMeshDeck ()
 Get the pointer to mesh deck. More...
 
inp::ModelDeckgetModelDeck ()
 Get the pointer to model deck. More...
 
inp::NeighborDeckgetNeighborDeck ()
 Get the pointer to neighbor list deck. More...
 
inp::OutputDeckgetOutputDeck ()
 Get the pointer to output deck. More...
 
inp::PolicyDeckgetPolicyDeck ()
 Get the pointer to policy info deck. More...
 
inp::QuadratureDeckgetQuadratureDeck ()
 Get the pointer to quadrature deck. More...
 
inp::RestartDeckgetRestartDeck ()
 Get the pointer to restart deck. More...
 
inp::SolverDeckgetSolverDeck ()
 Get the pointer to solver deck. More...
 
inp::AbsorbingCondDeckgetAbsorbingCondDeck ()
 Get the pointer to absorbing condition deck. More...
 
const std::string getSpatialDiscretization ()
 Get the name of spatial discretization. More...
 

Private Member Functions

Setter methods

Reads input file into the respective decks

void setFractureDeck ()
 Read data into fracture deck and store its pointer.
 
void setInitialConditionDeck ()
 Read data into initial condition deck and store its pointer.
 
void setInteriorFlagsDeck ()
 Read data into interior flags deck and store its pointer.
 
void setLoadingDeck ()
 Read data into loading deck and store its pointer.
 
void setMassMatrixDeck ()
 Read data into mass matrix deck and store its pointer.
 
void setMaterialDeck ()
 Read data into material deck and store its pointer.
 
void setMeshDeck ()
 Read data into mesh deck and store its pointer.
 
void setModelDeck ()
 Read data into model deck and store its pointer.
 
void setNeighborDeck ()
 Read data into neighbor list deck and store its pointer.
 
void setOutputDeck ()
 Read data into output deck and store its pointer.
 
void setPolicyDeck ()
 Read data into policy deck and store its pointer.
 
void setQuadratureDeck ()
 Read data into quadrature deck and store its pointer.
 
void setRestartDeck ()
 Read data into restart deck and store its pointer.
 
void setAbsorbingCondDeck ()
 Read data into absorbing condition deck and store its pointer.
 
void setSolverDeck ()
 Read data into solver deck and store its pointer.
 

Private Attributes

Internal data
std::string d_inputFilename
 Name of input file.
 
Decks
inp::FractureDeckd_fractureDeck_p
 Pointer to deck holding fracture related data. More...
 
inp::InitialConditionDeckd_initialConditionDeck_p
 Pointer to deck holding initial condition related data. More...
 
inp::InteriorFlagsDeckd_interiorFlagsDeck_p
 Pointer to deck holding interior flags information.
 
inp::LoadingDeckd_loadingDeck_p
 Pointer to deck holding loading related data. More...
 
inp::MassMatrixDeckd_massMatrixDeck_p
 Pointer to deck holding mass matrix calculation related data. More...
 
inp::MaterialDeckd_materialDeck_p
 Pointer to deck holding material related data. More...
 
inp::MeshDeckd_meshDeck_p
 Pointer to deck holding geometry related data. More...
 
inp::ModelDeckd_modelDeck_p
 Pointer to deck holding problem related data. More...
 
inp::NeighborDeckd_neighborDeck_p
 Pointer to deck holding neighbor list related data. More...
 
inp::OutputDeckd_outputDeck_p
 Pointer to deck holding output related data. More...
 
inp::PolicyDeckd_policyDeck_p
 Pointer to deck holding policy related data. More...
 
inp::QuadratureDeckd_quadratureDeck_p
 Pointer to deck holding quadrature point approximation related data. More...
 
inp::RestartDeckd_restartDeck_p
 Pointer to deck holding restart related data such as restart filename and restart time step.
 
inp::SolverDeckd_solverDeck_p
 Pointer to deck holding solver related data. More...
 
inp::AbsorbingCondDeckd_absorbingCondDeck_p
 Pointer to deck holding absorbing condition related data.
 

Detailed Description

A class to read input file.

In this class we read input file and read the data into various decks. Input file is a YAML file.

Constructor & Destructor Documentation

◆ Input()

inp::Input::Input ( const std::string &  filename)
explicit

Constructor.

Parameters
filenameFilename of input file
Here is the call graph for this function:

Member Function Documentation

◆ getAbsorbingCondDeck()

inp::AbsorbingCondDeck * inp::Input::getAbsorbingCondDeck ( )

Get the pointer to absorbing condition deck.

Returns
Pointer to AbsorbingCondDeck

Referenced by model::FDModel< T >::FDModel().

Here is the caller graph for this function:

◆ getFractureDeck()

inp::FractureDeck * inp::Input::getFractureDeck ( )

Get the pointer to fracture deck.

Returns
Pointer to FractureDeck

◆ getInitialConditionDeck()

inp::InitialConditionDeck * inp::Input::getInitialConditionDeck ( )

Get the pointer to initial condition deck.

Returns
Pointer to InitialConditionDeck

◆ getInteriorFlagsDeck()

inp::InteriorFlagsDeck * inp::Input::getInteriorFlagsDeck ( )

Get the pointer to interior flags deck.

Returns
Pointer to InteriorFlagsDeck

◆ getLoadingDeck()

inp::LoadingDeck * inp::Input::getLoadingDeck ( )

Get the pointer to loading deck.

Returns
Pointer to LoadingDeck

◆ getMassMatrixDeck()

inp::MassMatrixDeck * inp::Input::getMassMatrixDeck ( )

Get the pointer to mass matrix deck.

Returns
Pointer to MassMatrixDeck

◆ getMaterialDeck()

inp::MaterialDeck * inp::Input::getMaterialDeck ( )

Get the pointer to material deck.

Returns
Pointer to MaterialDeck

◆ getMeshDeck()

inp::MeshDeck * inp::Input::getMeshDeck ( )

Get the pointer to mesh deck.

Returns
Pointer to GeometryDeck

◆ getModelDeck()

inp::ModelDeck * inp::Input::getModelDeck ( )

Get the pointer to model deck.

Returns
Pointer to ModelDeck

Referenced by model::FDModel< T >::FDModel(), model::Output::Output(), and model::QuasiStaticModel< T >::QuasiStaticModel().

Here is the caller graph for this function:

◆ getNeighborDeck()

inp::NeighborDeck * inp::Input::getNeighborDeck ( )

Get the pointer to neighbor list deck.

Returns
Pointer to NeighborDeck

Referenced by tools::pp::Compute::Compute().

Here is the caller graph for this function:

◆ getOutputDeck()

inp::OutputDeck * inp::Input::getOutputDeck ( )

Get the pointer to output deck.

Returns
Pointer to OutputDeck

Referenced by model::FDModel< T >::FDModel(), model::Output::Output(), and model::QuasiStaticModel< T >::QuasiStaticModel().

Here is the caller graph for this function:

◆ getPolicyDeck()

inp::PolicyDeck * inp::Input::getPolicyDeck ( )

Get the pointer to policy info deck.

Returns
Pointer to PolicyDeck

Referenced by model::FDModel< T >::FDModel(), and model::Output::Output().

Here is the caller graph for this function:

◆ getQuadratureDeck()

inp::QuadratureDeck * inp::Input::getQuadratureDeck ( )

Get the pointer to quadrature deck.

Returns
Pointer to QuadratureDeck

◆ getRestartDeck()

inp::RestartDeck * inp::Input::getRestartDeck ( )

Get the pointer to restart deck.

Returns
Pointer to RestartDeck

Referenced by model::FDModel< T >::restart().

Here is the caller graph for this function:

◆ getSolverDeck()

inp::SolverDeck * inp::Input::getSolverDeck ( )

Get the pointer to solver deck.

Returns
Pointer to SolverDeck

◆ getSpatialDiscretization()

const std::string inp::Input::getSpatialDiscretization ( )

Get the name of spatial discretization.

Return value can be of four kind:

  • "" (none)
  • finite_difference
  • weak_finite_element
  • nodal_finite_element
  • truss_finite_element
Returns
string Name of discretization

◆ print()

void inp::Input::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 inp::Input::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:

Field Documentation

◆ d_fractureDeck_p

inp::FractureDeck* inp::Input::d_fractureDeck_p
private

Pointer to deck holding fracture related data.

E.g. pre-crack location and orientation, crack-path update frequency, etc

◆ d_initialConditionDeck_p

inp::InitialConditionDeck* inp::Input::d_initialConditionDeck_p
private

Pointer to deck holding initial condition related data.

E.g. initial condition function type for velocity and displacement, parameters to compute initial condition function, projection method or interpolation method, etc

◆ d_loadingDeck_p

inp::LoadingDeck* inp::Input::d_loadingDeck_p
private

Pointer to deck holding loading related data.

E.g. displacement loading information, force loading information, etc

◆ d_massMatrixDeck_p

inp::MassMatrixDeck* inp::Input::d_massMatrixDeck_p
private

Pointer to deck holding mass matrix calculation related data.

E.g. mass matrix approximation type

◆ d_materialDeck_p

inp::MaterialDeck* inp::Input::d_materialDeck_p
private

Pointer to deck holding material related data.

E.g. type of material, influence function information, parameters, etc

◆ d_meshDeck_p

inp::MeshDeck* inp::Input::d_meshDeck_p
private

Pointer to deck holding geometry related data.

E.g. dimension, discretization type, mesh file, etc

◆ d_modelDeck_p

inp::ModelDeck* inp::Input::d_modelDeck_p
private

Pointer to deck holding problem related data.

E.g. type of simulation (central-difference, velocity-verlet, implicit) etc

◆ d_neighborDeck_p

inp::NeighborDeck* inp::Input::d_neighborDeck_p
private

Pointer to deck holding neighbor list related data.

E.g. factor of safety, volume correction, etc

◆ d_outputDeck_p

inp::OutputDeck* inp::Input::d_outputDeck_p
private

Pointer to deck holding output related data.

E.g. output frequency, output file format, output element-node connectivity flag, etc

◆ d_policyDeck_p

inp::PolicyDeck* inp::Input::d_policyDeck_p
private

Pointer to deck holding policy related data.

E.g. level of restriction in memory allocation, etc

◆ d_quadratureDeck_p

inp::QuadratureDeck* inp::Input::d_quadratureDeck_p
private

Pointer to deck holding quadrature point approximation related data.

E.g. order of approximation, order of approximation for mass matrix

◆ d_solverDeck_p

inp::SolverDeck* inp::Input::d_solverDeck_p
private

Pointer to deck holding solver related data.

E.g. solver parameters like tolerance, maximum iterations, solver type, etc


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