NLMech  0.1.0
initialCondition.h
1 // Copyright (c) 2019 Prashant K. Jha
3 // Copyright (c) 2019 Patrick Diehl
4 //
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 
9 #ifndef LOADING_INITIALCONDITION_H
10 #define LOADING_INITIALCONDITION_H
11 
12 #include "util/point.h" // definition of Point3
13 #include <string>
14 #include <vector>
15 
16 // forward declaration of initial condition deck
17 namespace inp {
18 struct InitialConditionDeck;
19 }
20 
21 // forward declaration
22 namespace fe {
23 class Mesh;
24 }
25 
26 namespace loading {
27 
35 
36 public:
42 
49  void apply(std::vector<util::Point3> *u, std::vector<util::Point3> *v,
50  fe::Mesh *mesh);
51 
61  std::string printStr(int nt = 0, int lvl = 0) const;
62 
70  void print(int nt = 0, int lvl = 0) const { std::cout << printStr(nt, lvl); };
71 
72 private:
82  double getICFormula(const std::string &fn_type,
83  const std::vector<double> &params, const util::Point3 &x,
84  const size_t &dof, const size_t &dim);
85 
88 };
89 
90 } // namespace loading
91 
92 #endif // LOADING_INITIALCONDITION_H
A class for mesh data.
Definition: mesh.h:49
A class to apply initial condition.
Definition: initialCondition.h:34
InitialCondition(inp::InitialConditionDeck *deck)
Constructor.
Definition: initialCondition.cpp:18
void apply(std::vector< util::Point3 > *u, std::vector< util::Point3 > *v, fe::Mesh *mesh)
Applies initial condition to displacement and velocity.
Definition: initialCondition.cpp:21
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: initialCondition.h:70
inp::InitialConditionDeck * d_deck_p
Initial condition deck.
Definition: initialCondition.h:87
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.
Definition: initialCondition.cpp:69
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: initialCondition.cpp:84
Collection of methods and data related to finite element and mesh.
Definition: baseElem.h:15
Collection of methods and database related to input.
Definition: main.cpp:21
Collection of methods and database related to loading.
Definition: DataManager.h:38
Structure to read and store policy data.
Definition: initialConditionDeck.h:78
A structure to represent 3d vectors.
Definition: point.h:29