PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
Loading...
Searching...
No Matches
fe::QuadData Struct Reference

A struct to store the quadrature data. List of data are. More...

#include <quadData.h>

Collaboration diagram for fe::QuadData:

Public Member Functions

 QuadData ()
 Constructor.
 
std::string printStr (int nt=0, int lvl=0) const
 Returns the string containing printable information about the object.
 
void print (int nt=0, int lvl=0) const
 Prints the information about the object.
 

Data Fields

double d_w
 Quadrature weight.
 
util::Point d_p
 Quadrature point in 1-d, 2-d or 3-d.
 
std::vector< double > d_shapes
 Value of shape functions at quad point p.
 
std::vector< std::vector< double > > d_derShapes
 Value of derivative of shape functions at quad point p.
 
std::vector< std::vector< double > > d_J
 Jacobian of the map from reference element to the element.
 
double d_detJ
 Determinant of the Jacobian of the map from reference element to the element.
 

Detailed Description

A struct to store the quadrature data. List of data are.

Definition at line 23 of file quadData.h.

Constructor & Destructor Documentation

◆ QuadData()

fe::QuadData::QuadData ( )
inline

Constructor.

Definition at line 69 of file quadData.h.

69: d_w(0.), d_p(util::Point()), d_detJ(0.){};
double d_w
Quadrature weight.
Definition quadData.h:26
util::Point d_p
Quadrature point in 1-d, 2-d or 3-d.
Definition quadData.h:29
double d_detJ
Determinant of the Jacobian of the map from reference element to the element.
Definition quadData.h:64
A structure to represent 3d vectors.
Definition point.h:30

Member Function Documentation

◆ print()

void fe::QuadData::print ( int  nt = 0,
int  lvl = 0 
) const
inline

Prints the information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)

Definition at line 102 of file quadData.h.

102{ std::cout << printStr(nt, lvl); };
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition quadData.h:78

References printStr().

Here is the call graph for this function:

◆ printStr()

std::string fe::QuadData::printStr ( int  nt = 0,
int  lvl = 0 
) const
inline

Returns the string containing printable information about the object.

Parameters
ntNumber of tabs to append before printing
lvlInformation level (higher means more information)
Returns
string String containing printable information about the object

Definition at line 78 of file quadData.h.

78 {
79
80 auto tabS = util::io::getTabS(nt);
81 std::ostringstream oss;
82 oss << tabS << "------- QuadData --------" << std::endl << std::endl;
83 oss << tabS << "Weight = " << d_w << std::endl;
84 oss << tabS << "Point = " << d_p.printStr() << std::endl;
85 oss << tabS << "Shapes = " << util::io::printStr(d_shapes, 0) << std::endl;
86 oss << tabS << "Derivative = " << util::io::printStr(d_derShapes, 0)
87 << std::endl;
88 oss << tabS << "Jacobian = " << util::io::printStr(d_J, 0)
89 << std::endl;
90 oss << tabS << "Det(J) = " << d_detJ << std::endl;
91 oss << std::endl;
92
93 return oss.str();
94 };
std::string getTabS(int nt)
Returns tab spaces of given size.
Definition io.h:40
std::string printStr(const T &msg, int nt=print_default_tab)
Returns formatted string for output.
Definition io.h:54
std::vector< double > d_shapes
Value of shape functions at quad point p.
Definition quadData.h:37
std::vector< std::vector< double > > d_derShapes
Value of derivative of shape functions at quad point p.
Definition quadData.h:50
std::vector< std::vector< double > > d_J
Jacobian of the map from reference element to the element.
Definition quadData.h:58
std::string printStr(int nt=0, int lvl=0) const
Returns the string containing printable information about the object.
Definition point.h:94

References d_derShapes, d_detJ, d_J, d_p, d_shapes, d_w, util::io::getTabS(), util::io::printStr(), and util::Point::printStr().

Referenced by print().

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ d_derShapes

std::vector<std::vector<double> > fe::QuadData::d_derShapes

Value of derivative of shape functions at quad point p.

Size will be the number of vertices the element has. E.g. for triangle element shapes will have three entries.

x-derivative of ith shape function is d_derShapes[i][0]

y-derivative of ith shape function is d_derShapes[i][1]

Definition at line 50 of file quadData.h.

Referenced by fe::LineElem::init(), fe::QuadElem::init(), fe::TetElem::init(), fe::TriElem::init(), and printStr().

◆ d_detJ

double fe::QuadData::d_detJ

Determinant of the Jacobian of the map from reference element to the element.

Definition at line 64 of file quadData.h.

Referenced by fe::LineElem::init(), fe::QuadElem::init(), fe::TetElem::init(), fe::TriElem::init(), and printStr().

◆ d_J

std::vector<std::vector<double> > fe::QuadData::d_J

Jacobian of the map from reference element to the element.

In 1-d, size is 1, 2-d size is \( 2\times 2\), and in 3-d size is \( 3\times 3\).

Definition at line 58 of file quadData.h.

Referenced by fe::LineElem::init(), fe::QuadElem::init(), fe::TetElem::init(), fe::TriElem::init(), and printStr().

◆ d_p

util::Point fe::QuadData::d_p

Quadrature point in 1-d, 2-d or 3-d.

Definition at line 29 of file quadData.h.

Referenced by fe::LineElem::init(), fe::QuadElem::init(), fe::TetElem::init(), fe::TriElem::init(), and printStr().

◆ d_shapes

std::vector<double> fe::QuadData::d_shapes

Value of shape functions at quad point p.

Size will be the number of vertices the element has. E.g. for triangle element shapes will have three entries.

Definition at line 37 of file quadData.h.

Referenced by fe::LineElem::init(), fe::QuadElem::init(), fe::TetElem::init(), fe::TriElem::init(), printStr(), and test::testTriElemTime().

◆ d_w

double fe::QuadData::d_w

The documentation for this struct was generated from the following file: