![]() |
v0.14.0 |
Auxiliary tools. More...
#include <src/interfaces/Tools.hpp>
Public Member Functions | |
MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const |
Tools (const MoFEM::Core &core) | |
![]() | |
virtual MoFEMErrorCode | query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const =0 |
template<class IFACE > | |
MoFEMErrorCode | registerInterface (bool error_if_registration_failed=true) |
Register interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE *&iface) const |
Get interface refernce to pointer of interface. More... | |
template<class IFACE > | |
MoFEMErrorCode | getInterface (IFACE **const iface) const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get interface pointer to pointer of interface. More... | |
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0> | |
IFACE | getInterface () const |
Get reference to interface. More... | |
template<class IFACE > | |
IFACE * | getInterface () const |
Function returning pointer to interface. More... | |
virtual | ~UnknownInterface ()=default |
Static Public Member Functions | |
static MoFEMErrorCode | outerProductOfEdgeIntegrationPtsForQuad (MatrixDouble &pts, const int edge0, const int edge1) |
static MoFEMErrorCode | outerProductOfEdgeIntegrationPtsForHex (MatrixDouble &pts, const int edge0, const int edge1, const int edge2) |
![]() | |
static MoFEMErrorCode | getLibVersion (Version &version) |
Get library version. More... | |
static MoFEMErrorCode | getFileVersion (moab::Interface &moab, Version &version) |
Get database major version. More... | |
static MoFEMErrorCode | setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD)) |
Get database major version. More... | |
static MoFEMErrorCode | getInterfaceVersion (Version &version) |
Get database major version. More... | |
Public Attributes | |
MoFEM::Core & | cOre |
Computational | |
enum | SEGMENT_MIN_DISTANCE { SOLUTION_EXIST , SEGMENT_ONE_IS_POINT , SEGMENT_TWO_IS_POINT , SEGMENT_TWO_AND_TWO_ARE_POINT , NO_SOLUTION } |
static constexpr double | shapeFunMBEDGE0At00 = N_MBEDGE0(0) |
static constexpr double | shapeFunMBEDGE1At00 = N_MBEDGE1(0) |
static constexpr std::array< double, 2 > | shapeFunMBEDGEAt00 |
Array of shape function at zero local point on reference element. More... | |
static constexpr double | diffN_MBEDGE0x = diffN_MBEDGE0 |
static constexpr double | diffN_MBEDGE1x = diffN_MBEDGE1 |
static constexpr std::array< double, 2 > | diffShapeFunMBEDGE |
static constexpr double | diffShapeFunMBTRI0x |
derivative of triangle shape function More... | |
static constexpr double | diffShapeFunMBTRI0y |
derivative of triangle shape function More... | |
static constexpr double | diffShapeFunMBTRI1x |
derivative of triangle shape function More... | |
static constexpr double | diffShapeFunMBTRI1y |
derivative of triangle shape function More... | |
static constexpr double | diffShapeFunMBTRI2x |
derivative of triangle shape function More... | |
static constexpr double | diffShapeFunMBTRI2y |
derivative of triangle shape function More... | |
static constexpr std::array< double, 6 > | diffShapeFunMBTRI |
static constexpr double | shapeFunMBTRI0At00 = N_MBTRI0(0, 0) |
static constexpr double | shapeFunMBTRI1At00 = N_MBTRI1(0, 0) |
static constexpr double | shapeFunMBTRI2At00 = N_MBTRI2(0, 0) |
static constexpr std::array< double, 3 > | shapeFunMBTRIAt00 |
Array of shape function at zero local point on reference element. More... | |
static constexpr double | diffShapeFunMBQUADAtCenter0x |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter0y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter1x |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter1y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter2x |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter2y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter3x |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBQUADAtCenter3y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter0x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter0y |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter0z |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter1x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter1y |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter1z |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter2x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter2y |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter2z |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter3x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter3y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter3z |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter4x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter4y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter4z |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter5x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter5y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter5z |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter6x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter6y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter6z |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter7x |
derivative of HEX shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter7y |
derivative of quad shape function More... | |
static constexpr double | diffShapeFunMBHEXAtCenter7z |
derivative of quad shape function More... | |
static constexpr std::array< double, 8 > | diffShapeFunMBQUADAtCenter |
static constexpr std::array< double, 24 > | diffShapeFunMBHEXAtCenter |
static constexpr double | diffShapeFunMBTET0x |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET0y |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET0z |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET1x |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET1y |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET1z |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET2x |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET2y |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET2z |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET3x |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET3y |
derivative of tetrahedral shape function More... | |
static constexpr double | diffShapeFunMBTET3z |
derivative of tetrahedral shape function More... | |
static constexpr std::array< double, 12 > | diffShapeFunMBTET |
static constexpr double | shapeFunMBTET0At000 = N_MBTET0(0, 0, 0) |
static constexpr double | shapeFunMBTET1At000 = N_MBTET1(0, 0, 0) |
static constexpr double | shapeFunMBTET2At000 = N_MBTET2(0, 0, 0) |
static constexpr double | shapeFunMBTET3At000 = N_MBTET3(0, 0, 0) |
static constexpr double | shapeFunMBTET0AtOneThird |
static constexpr double | shapeFunMBTET1AtOneThird |
static constexpr double | shapeFunMBTET2AtOneThird |
static constexpr double | shapeFunMBTET3AtOneThird |
static constexpr std::array< double, 4 > | shapeFunMBTETAt000 |
Array of shape function at zero local point on reference element. More... | |
static constexpr std::array< double, 4 > | shapeFunMBTETAtOneThird |
Array of shape function at center on reference element. More... | |
MoFEMErrorCode | minTetsQuality (const Range &tets, double &min_quality, Tag th=nullptr, boost::function< double(double, double)> f=[](double a, double b) -> double { return std::min(a, b);}) |
calculate minimal quality of tetrahedra in range More... | |
MoFEMErrorCode | getTetsWithQuality (Range &out_tets, const Range &tets, Tag th=nullptr, boost::function< bool(double)> f=[](double q) -> bool { if(q<=0) return true;else return false;}) |
Get the Tets With Quality. More... | |
MoFEMErrorCode | writeTetsWithQuality (const char *file_name, const char *file_type, const char *options, const Range &tets, Tag th=nullptr, boost::function< bool(double)> f=[](double q) -> bool { if(q<=0) return true;else return false;}) |
Write file with tetrahedral of given quality. More... | |
MoFEMErrorCode | getTriNormal (const EntityHandle tri, double *normal) const |
Get triangle normal. More... | |
double | getTriArea (const EntityHandle tri) const |
Get triangle area. More... | |
double | getEdgeLength (const EntityHandle edge) |
Get edge length. More... | |
MoFEMErrorCode | findMinDistanceFromTheEdges (const double *v_ptr, const int nb, Range edges, double *min_dist_ptr, double *o_ptr=nullptr, EntityHandle *o_segments=nullptr) const |
Find minimal distance to edges. More... | |
static double | volumeLengthQuality (const double *coords) |
Calculate tetrahedron volume length quality. More... | |
static double | tetVolume (const double *coords) |
Calculate volume of tetrahedron. More... | |
static double | shapeFunMBEDGE0 (const double x) |
static double | shapeFunMBEDGE1 (const double x) |
template<int LDB = 1> | |
static MoFEMErrorCode | shapeFunMBEDGE (double *shape, const double *ksi, const int nb) |
Calculate shape functions on edge. More... | |
static double | shapeFunMBTRI0 (const double x, const double y) |
static double | shapeFunMBTRI1 (const double x, const double y) |
static double | shapeFunMBTRI2 (const double x, const double y) |
template<int LDB = 1> | |
static MoFEMErrorCode | shapeFunMBTRI (double *shape, const double *ksi, const double *eta, const int nb) |
Calculate shape functions on triangle. More... | |
static double | shapeFunMBTET0 (const double x, const double y, const double z) |
static double | shapeFunMBTET1 (const double x, const double y, const double z) |
static double | shapeFunMBTET2 (const double x, const double y, const double z) |
static double | shapeFunMBTET3 (const double x, const double y, const double z) |
template<int LDB = 1> | |
static MoFEMErrorCode | shapeFunMBTET (double *shape, const double *ksi, const double *eta, const double *zeta, const double nb) |
Calculate shape functions on tetrahedron. More... | |
static MoFEMErrorCode | getLocalCoordinatesOnReferenceFourNodeTet (const double *elem_coords, const double *glob_coords, const int nb_nodes, double *local_coords) |
Get the Local Coordinates On Reference Four Node Tet object. More... | |
static MoFEMErrorCode | getLocalCoordinatesOnReferenceTriNodeTri (const double *elem_coords, const double *glob_coords, const int nb_nodes, double *local_coords) |
Get the Local Coordinates On Reference Four Node Tet object. More... | |
static MoFEMErrorCode | getLocalCoordinatesOnReferenceEdgeNodeEdge (const double *elem_coords, const double *glob_coords, const int nb_nodes, double *local_coords) |
Get the Local Coordinates On Reference Four Node Tet object. More... | |
static MoFEMErrorCode | checkIfPointIsInTet (const double tet_coords[], const double global_coord[], const double tol, bool &result) |
Check of point is in tetrahedral. More... | |
static MoFEMErrorCode | getTriNormal (const double *coords, double *normal) |
Get the Tri Normal objectGet triangle normal. More... | |
static double | getEdgeLength (const double *edge_coords) |
Get edge length. More... | |
static SEGMENT_MIN_DISTANCE | minDistancePointFromOnSegment (const double *w_ptr, const double *v_ptr, const double *p_ptr, double *const t_ptr=nullptr) |
Find closet point on the segment from the point. More... | |
static SEGMENT_MIN_DISTANCE | minDistanceFromSegments (const double *w_ptr, const double *v_ptr, const double *k_ptr, const double *l_ptr, double *const tvw_ptr=nullptr, double *const tlk_ptr=nullptr) |
Find points on two segments in closest distance. More... | |
Debugging | |
MoFEMErrorCode | checkVectorForNotANumber (const Problem *prb_ptr, const RowColData row_or_col, Vec v) |
Print all DOFs for which element of vector is not a number. More... | |
Enumerator | |
---|---|
SOLUTION_EXIST | |
SEGMENT_ONE_IS_POINT | |
SEGMENT_TWO_IS_POINT | |
SEGMENT_TWO_AND_TWO_ARE_POINT | |
NO_SOLUTION |
Definition at line 507 of file Tools.hpp.
|
inline |
|
static |
Check of point is in tetrahedral.
tet_coords | |
global_coord | |
tol | |
result |
Definition at line 284 of file Tools.cpp.
MoFEMErrorCode MoFEM::Tools::checkVectorForNotANumber | ( | const Problem * | prb_ptr, |
const RowColData | row_or_col, | ||
Vec | v | ||
) |
Print all DOFs for which element of vector is not a number.
Definition at line 304 of file Tools.cpp.
MoFEMErrorCode MoFEM::Tools::findMinDistanceFromTheEdges | ( | const double * | v_ptr, |
const int | nb, | ||
Range | edges, | ||
double * | min_dist_ptr, | ||
double * | o_ptr = nullptr , |
||
EntityHandle * | o_segments = nullptr |
||
) | const |
Find minimal distance to edges.
v_ptr | point coordinates |
nb | nb points |
edges | range of edges |
min_dist_ptr | on return minimal distance, on input starting distance |
o_ptr | coordinates of the point on edge |
o_segments | closest segments |
Definition at line 502 of file Tools.cpp.
Get edge length.
edge_coords |
Definition at line 382 of file Tools.cpp.
double MoFEM::Tools::getEdgeLength | ( | const EntityHandle | edge | ) |
Get edge length.
edge |
Definition at line 392 of file Tools.cpp.
|
static |
Get the Local Coordinates On Reference Four Node Tet object.
elem_coords | Global element node coordinates |
glob_coords | Globale coordinates |
nb_nodes | Number of points |
local_coords | Result |
Definition at line 200 of file Tools.cpp.
|
static |
Get the Local Coordinates On Reference Four Node Tet object.
elem_coords | Global element node coordinates |
glob_coords | Globale coordinates |
nb_nodes | Number of points |
local_coords | Result |
Definition at line 90 of file Tools.cpp.
|
static |
Get the Local Coordinates On Reference Four Node Tet object.
elem_coords | Global element node coordinates |
glob_coords | Globale coordinates |
nb_nodes | Number of points |
local_coords | Result |
Definition at line 142 of file Tools.cpp.
MoFEMErrorCode MoFEM::Tools::getTetsWithQuality | ( | Range & | out_tets, |
const Range & | tets, | ||
Tag | th = nullptr , |
||
boost::function< bool(double)> | f = [](double q) -> bool { if (q <= 0) return true; else return false; } |
||
) |
Get the Tets With Quality.
out_tets | |
tets | |
th | |
f |
Definition at line 241 of file Tools.cpp.
double MoFEM::Tools::getTriArea | ( | const EntityHandle | tri | ) | const |
Get triangle area.
tri |
Definition at line 375 of file Tools.cpp.
|
static |
Get the Tri Normal objectGet triangle normal.
coords | |
normal |
Definition at line 350 of file Tools.cpp.
MoFEMErrorCode MoFEM::Tools::getTriNormal | ( | const EntityHandle | tri, |
double * | normal | ||
) | const |
Get triangle normal.
tri | |
normal |
Definition at line 358 of file Tools.cpp.
|
static |
Find points on two segments in closest distance.
w_ptr | |
v_ptr | |
k_ptr | |
l_ptr | |
tvw_ptr | |
tlk_ptr |
Definition at line 436 of file Tools.cpp.
|
static |
Find closet point on the segment from the point.
w_ptr | segment first vertex coordinate |
v_ptr | segment second vertex coordinate |
p_ptr | coordinate of point |
t_ptr | distance on the segment |
Definition at line 413 of file Tools.cpp.
MoFEMErrorCode MoFEM::Tools::minTetsQuality | ( | const Range & | tets, |
double & | min_quality, | ||
Tag | th = nullptr , |
||
boost::function< double(double, double)> | f = [](double a, double b) -> double { return std::min(a, b); } |
||
) |
calculate minimal quality of tetrahedra in range
tets | range |
min_quality | mimimal quality |
Definition at line 51 of file Tools.cpp.
|
static |
Definition at line 626 of file Tools.cpp.
|
static |
Definition at line 577 of file Tools.cpp.
|
virtual |
|
static |
Calculate shape functions on edge.
1 |
shape | shape functions |
ksi | pointer to first local coordinates |
nb | number of points |
Definition at line 617 of file Tools.hpp.
|
static |
Calculate shape functions on tetrahedron.
1 |
shape | shape functions |
ksi | pointer to first local coordinates |
eta | pointer to second local coordinates |
zeta | pointer to first third coordinates |
nb | number of points |
Definition at line 673 of file Tools.hpp.
|
static |
Calculate shape functions on triangle.
1 |
shape | shape functions |
ksi | pointer to first local coordinates |
eta | pointer to second local coordinates |
nb | number of points |
Definition at line 642 of file Tools.hpp.
Calculate volume of tetrahedron.
coords |
Definition at line 32 of file Tools.cpp.
Calculate tetrahedron volume length quality.
coords | tet coordinates |
Definition at line 17 of file Tools.cpp.
MoFEMErrorCode MoFEM::Tools::writeTetsWithQuality | ( | const char * | file_name, |
const char * | file_type, | ||
const char * | options, | ||
const Range & | tets, | ||
Tag | th = nullptr , |
||
boost::function< bool(double)> | f = [](double q) -> bool { if (q <= 0) return true; else return false; } |
||
) |
Write file with tetrahedral of given quality.
file_name | |
file_type | |
options | |
tets | |
th | |
f |
Definition at line 266 of file Tools.cpp.
MoFEM::Core& MoFEM::Tools::cOre |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of HEX shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
derivative of quad shape function
|
staticconstexpr |
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
derivative of tetrahedral shape function
|
staticconstexpr |
|
staticconstexpr |
derivative of triangle shape function
|
staticconstexpr |
derivative of triangle shape function
|
staticconstexpr |
derivative of triangle shape function
|
staticconstexpr |
derivative of triangle shape function
|
staticconstexpr |
derivative of triangle shape function
|
staticconstexpr |
derivative of triangle shape function
|
staticconstexpr |
Array of shape function at zero local point on reference element.
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
Array of shape function at zero local point on reference element.
|
staticconstexpr |
Array of shape function at center on reference element.
|
staticconstexpr |
Array of shape function at zero local point on reference element.