9 #ifndef INP_FRACTUREDECK_H
10 #define INP_FRACTUREDECK_H
12 #include "util/compare.h"
13 #include "util/point.h"
14 #include "util/transfomation.h"
17 #include "util/utilIO.h"
116 double theta = 0.0) {
169 double a = 0.5 * ((pt.
d_x - pb.
d_x) * (p.
d_y - pb.
d_y) -
197 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
199 std::ostringstream oss;
200 oss << tabS <<
"------- EdgeCrack --------" << std::endl << std::endl;
201 oss << tabS <<
"Orientation = " <<
d_o << std::endl;
202 oss << tabS <<
"Point 1 = " <<
d_pb << std::endl;
203 oss << tabS <<
"Point 2 = " <<
d_pt << std::endl;
204 oss << tabS <<
"Length = " <<
d_l << std::endl;
205 oss << tabS <<
"Angle = " <<
d_theta << std::endl;
206 oss << tabS << std::endl;
218 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); };
246 std::string
printStr(
int nt = 0,
int lvl = 0)
const {
248 std::ostringstream oss;
249 oss << tabS <<
"------- FractureDeck --------" << std::endl << std::endl;
250 oss << tabS <<
"Number of cracks = " <<
d_cracks.size() << std::endl;
251 for (
size_t i=0; i<
d_cracks.size(); i++) {
252 oss << tabS <<
"Crack " << i + 1 <<
" information" << std::endl;
253 oss <<
d_cracks[i].printStr(nt + 1, lvl);
256 oss << tabS << std::endl;
268 void print(
int nt = 0,
int lvl = 0)
const { std::cout <<
printStr(nt, lvl); };
Collection of methods and database related to input.
Definition: main.cpp:21
bool definitelyGreaterThan(const double &a, const double &b)
Compares if a > to b.
Definition: compare.cpp:25
bool definitelyLessThan(const double &a, const double &b)
Compares if a is < to b.
Definition: compare.cpp:30
std::string getTabS(int nt)
Generate a string contaning nt tabs.
Definition: utilIO.h:26
Collection of methods useful in simulation.
Definition: DataManager.h:50
A structure to edge crack of any orientation.
Definition: fractureDeck.h:22
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: fractureDeck.h:197
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: fractureDeck.h:218
double d_lb
Current length of crack on bottom side (left side)
Definition: fractureDeck.h:49
double d_lt
Current length of crack on top side (right side)
Definition: fractureDeck.h:46
bool ptRightside(util::Point3 p, util::Point3 pb, util::Point3 pt)
Checks if point lies on left(top) or right(bottom) of crack.
Definition: fractureDeck.h:183
util::Point3 d_vb
Velocity of bottom (left) crack tip.
Definition: fractureDeck.h:55
util::Point3 d_initPt
Top (right) crack tip location (initial)
Definition: fractureDeck.h:76
bool d_crackAcrivated
Is crack activated.
Definition: fractureDeck.h:92
double d_l
Total current length of crack.
Definition: fractureDeck.h:43
bool d_trackb
Track bottom point (left) of crack.
Definition: fractureDeck.h:85
bool d_trackt
Track top point (right) of crack.
Definition: fractureDeck.h:82
double d_theta
Angle the edge crack makes with the horizontal axis.
Definition: fractureDeck.h:40
util::Point3 d_oldPt
Top (right) crack tip location (old)
Definition: fractureDeck.h:70
int d_it
Closest id of node to top (right) crack tip.
Definition: fractureDeck.h:58
util::Point3 d_pb
Bottom (left) crack tip location.
Definition: fractureDeck.h:67
EdgeCrack()
Constructor.
Definition: fractureDeck.h:97
int d_ib
Closest id of node to bottom (left) crack tip.
Definition: fractureDeck.h:61
util::Point3 d_initPb
Bottom (left) crack tip location (initial)
Definition: fractureDeck.h:79
bool ptLeftside(util::Point3 p, util::Point3 pb, util::Point3 pt)
Checks if point lies on left(top) or right(bottom) of crack.
Definition: fractureDeck.h:156
util::Point3 d_oldPb
Bottom (left) crack tip location (old)
Definition: fractureDeck.h:73
bool ptOutside(util::Point3 p, int o, util::Point3 pb, util::Point3 pt, double theta=0.0)
Checks if point lies outside the crack.
Definition: fractureDeck.h:115
int d_o
Orientation of crack.
Definition: fractureDeck.h:31
util::Point3 d_vt
Velocity of top (right) crack tip.
Definition: fractureDeck.h:52
double d_activationTime
Activation time (for example when we abruptly slit the domain at specified time)
Definition: fractureDeck.h:89
util::Point3 d_pt
Top (right) crack tip location.
Definition: fractureDeck.h:64
Structure to read and store fracture related input data.
Definition: fractureDeck.h:227
std::vector< inp::EdgeCrack > d_cracks
Vector of pre-crack data.
Definition: fractureDeck.h:230
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing information about the instance of the object.
Definition: fractureDeck.h:246
FractureDeck()
Constructor.
Definition: fractureDeck.h:235
void print(int nt=0, int lvl=0) const
Prints the information about the instance of the object.
Definition: fractureDeck.h:268
A structure to represent 3d vectors.
Definition: point.h:29
double d_x
the x coordinate
Definition: point.h:32
double d_y
the y coordinate
Definition: point.h:35