![]() |
MechSys
1.0
Computing library for simulations in continuum and discrete mechanics
|
#include <mesh.h>
Public Member Functions | |
Generic (int TheNDim) | |
virtual | ~Generic () |
void | ReadMesh (char const *FileKey, bool IsShell=false) |
(.mesh) Erase old mesh and read mesh from python file | |
void | SetSize (size_t NumVerts, size_t NumCells) |
Erase old mesh and set number of vertices. | |
void | SetVert (int iVert, int Tag, double X, double Y, double Z=0) |
Set vertex. | |
void | SetCell (int iCell, int Tag, Array< int > const &Con) |
Set element ... => connectivity. | |
void | SetBryTag (int iCell, int iEdgeFace, int Tag) |
Set element's edge or face tag. | |
void | FindNeigh () |
Find neighbours of each cell. | |
void | GenO2Verts () |
Generate O2 (mid) vertices. | |
void | Erase () |
Erase current mesh (deallocate memory) | |
void | TagVertex (int Tag, int Idx) |
Tag a vertex given its iVert. | |
int | TagVertex (int Tag, double x, double y, double z=0.0, double Tol=1.0e-5) |
Tag a vertex. Returns the index of vertex in Verts array. | |
void | TagVertsLine (int Tag, double x0, double y0, double AlpDeg, double Tol=1.0e-5) |
Tag vertices along Line y = y0 + tan(AlpRad)*x. | |
void | TagSegsLine (int Tag, double x0, double y0, double AlpDeg, double Tol=1.0e-5) |
Tag segments/edges along line y = y0 + tan(AlpRad)*x. | |
void | TagHorzSegs (int Tag, double y, double xMin, double xMax, double Tol=1.0e-5) |
Tag horizontal segment/edge inside xMin and xMax. | |
void | GroundTags (int LTag=-10, int RTag=-10, int BTag=-20, double Tol=1.0e-5) |
Set tags for the left and right (vertical) edges and bottom (horizontal) edge. | |
int | PushVert (int Tag, double X, double Y, double Z=0) |
Push vertex. | |
int | PushCell (int Tag, Array< int > const &Con) |
Push element. | |
void | AddLinCells (Array< int > const &IDsOrTags) |
Set linear cells given edge tags (edg_tag,edg_tag,...) or pair of vertices (v0,v1,new_elem_tag, v0,v1,new_elem_tag, ...) or both. | |
void | AddPin (int VertexIdOrTag) |
void | Check (double Tol=1.0e-3) const |
Check if there are overlapping nodes. | |
void | WriteVTU (char const *FileKey, int VolSurfOrBoth=0) const |
(.vtu) Write output file for ParaView. Vol=0, Surf=1, Both=2 | |
void | WriteMPY (char const *FileKey, bool WithTags=true, bool WithIDs=true, bool WithShares=false, char const *Extra=NULL) const |
(.mpy) Write Python script that calls mesh_drawing.py | |
void | WriteJSON (char const *FileKey) const |
int | FindVert (int Tag) const |
Find ID of first vertex with Tag. Returns -1 if not found. | |
void | BoundingBox (Vec3_t &Min, Vec3_t &Max) const |
Limits of mesh. | |
void | ThrowError (std::istringstream &iss, char const *Message) const |
Used in ReadMesh. | |
void | Adjacency (Array< int > &Xadj, Array< int > &Adjncy, bool Full=false) |
Find list of adjacent elements. | |
void | PartDomain (int NParts, bool Full=false, int *Part=NULL) |
Partition domain. | |
void | GenGroundSG (Array< double > const &X, Array< double > const &Y, double FootingLx=-1) |
Generate ground square/box according to Smith and Griffiths' numbering. | |
void | GenGroundSG (size_t Nx, size_t Ny, double Dx=1.0, double Dy=1.0) |
Smith-Griffiths' ground. | |
void | GenSector (size_t Nr, size_t Nth, double r, double R, double ThetaRad) |
Generate a Circular sector. | |
void | Quad4ToTri3 (bool BackDiagonal=true) |
Convert Quad4 mesh to Tri3 mesh. | |
void | Quad8ToTri6 (bool BackDiagonal=true) |
Convert Quad8 mesh to Tri6 mesh. | |
void | Tri6ToTri15 () |
Convert Tri6 mesh to Tri15 mesh. | |
void | Tri3ToTri6 () |
Convert Tri3 mesh to Tri6 mesh. | |
void | Refine () |
Refine frames: split Lin2 cells into two. | |
void | Tri6Shape (double r, double s, Vec_t &N) const |
Tri6 Shape functions (used in Tri6ToTri15). N(6) needs to be pre-resized. | |
Public Attributes | |
int | NDim |
Space dimension. | |
bool | IsShell |
Is shell mesh ? (only surface) | |
Array< Vertex * > | Verts |
Vertices. | |
Array< Cell * > | Cells |
Cells. | |
Array< Vertex * > | TgdVerts |
Tagged Vertices. | |
Array< Cell * > | TgdCells |
Tagged Cells. | |
BryCell_t | Bry2Cells |
map: bry (edge/face ids) => neighbours cells | |
Pin_t | Pins |
Pins. | |
bool | WithInfo |
Output information ? |
Mesh::Generic::Generic | ( | int | TheNDim | ) | [inline] |
virtual Mesh::Generic::~Generic | ( | ) | [inline, virtual] |
void Mesh::Generic::AddLinCells | ( | Array< int > const & | IDsOrTags | ) | [inline] |
Set linear cells given edge tags (edg_tag,edg_tag,...) or pair of vertices (v0,v1,new_elem_tag, v0,v1,new_elem_tag, ...) or both.
void Mesh::Generic::AddPin | ( | int | VertexIdOrTag | ) | [inline] |
void Mesh::Generic::Adjacency | ( | Array< int > & | Xadj, |
Array< int > & | Adjncy, | ||
bool | Full = false |
||
) | [inline] |
Find list of adjacent elements.
void Mesh::Generic::BoundingBox | ( | Vec3_t & | Min, |
Vec3_t & | Max | ||
) | const [inline] |
Limits of mesh.
void Mesh::Generic::Check | ( | double | Tol = 1.0e-3 | ) | const [inline] |
Check if there are overlapping nodes.
void Mesh::Generic::Erase | ( | ) | [inline] |
Erase current mesh (deallocate memory)
void Mesh::Generic::FindNeigh | ( | ) | [inline] |
Find neighbours of each cell.
int Mesh::Generic::FindVert | ( | int | Tag | ) | const [inline] |
Find ID of first vertex with Tag. Returns -1 if not found.
void Mesh::Generic::GenGroundSG | ( | Array< double > const & | X, |
Array< double > const & | Y, | ||
double | FootingLx = -1 |
||
) | [inline] |
Generate ground square/box according to Smith and Griffiths' numbering.
void Mesh::Generic::GenGroundSG | ( | size_t | Nx, |
size_t | Ny, | ||
double | Dx = 1.0 , |
||
double | Dy = 1.0 |
||
) | [inline] |
Smith-Griffiths' ground.
void Mesh::Generic::GenO2Verts | ( | ) | [inline] |
Generate O2 (mid) vertices.
void Mesh::Generic::GenSector | ( | size_t | Nr, |
size_t | Nth, | ||
double | r, | ||
double | R, | ||
double | ThetaRad | ||
) | [inline] |
Generate a Circular sector.
void Mesh::Generic::GroundTags | ( | int | LTag = -10 , |
int | RTag = -10 , |
||
int | BTag = -20 , |
||
double | Tol = 1.0e-5 |
||
) | [inline] |
Set tags for the left and right (vertical) edges and bottom (horizontal) edge.
void Mesh::Generic::PartDomain | ( | int | NParts, |
bool | Full = false , |
||
int * | Part = NULL |
||
) | [inline] |
Partition domain.
int Mesh::Generic::PushCell | ( | int | Tag, |
Array< int > const & | Con | ||
) | [inline] |
Push element.
int Mesh::Generic::PushVert | ( | int | Tag, |
double | X, | ||
double | Y, | ||
double | Z = 0 |
||
) | [inline] |
Push vertex.
void Mesh::Generic::Quad4ToTri3 | ( | bool | BackDiagonal = true | ) | [inline] |
Convert Quad4 mesh to Tri3 mesh.
void Mesh::Generic::Quad8ToTri6 | ( | bool | BackDiagonal = true | ) | [inline] |
Convert Quad8 mesh to Tri6 mesh.
void Mesh::Generic::ReadMesh | ( | char const * | FileKey, |
bool | IsShell = false |
||
) | [inline] |
(.mesh) Erase old mesh and read mesh from python file
void Mesh::Generic::Refine | ( | ) | [inline] |
Refine frames: split Lin2 cells into two.
void Mesh::Generic::SetBryTag | ( | int | iCell, |
int | iEdgeFace, | ||
int | Tag | ||
) | [inline] |
Set element's edge or face tag.
void Mesh::Generic::SetCell | ( | int | iCell, |
int | Tag, | ||
Array< int > const & | Con | ||
) | [inline] |
Set element ... => connectivity.
void Mesh::Generic::SetSize | ( | size_t | NumVerts, |
size_t | NumCells | ||
) | [inline] |
Erase old mesh and set number of vertices.
void Mesh::Generic::SetVert | ( | int | iVert, |
int | Tag, | ||
double | X, | ||
double | Y, | ||
double | Z = 0 |
||
) | [inline] |
Set vertex.
void Mesh::Generic::TagHorzSegs | ( | int | Tag, |
double | y, | ||
double | xMin, | ||
double | xMax, | ||
double | Tol = 1.0e-5 |
||
) | [inline] |
Tag horizontal segment/edge inside xMin and xMax.
void Mesh::Generic::TagSegsLine | ( | int | Tag, |
double | x0, | ||
double | y0, | ||
double | AlpDeg, | ||
double | Tol = 1.0e-5 |
||
) | [inline] |
Tag segments/edges along line y = y0 + tan(AlpRad)*x.
void Mesh::Generic::TagVertex | ( | int | Tag, |
int | Idx | ||
) | [inline] |
Tag a vertex given its iVert.
int Mesh::Generic::TagVertex | ( | int | Tag, |
double | x, | ||
double | y, | ||
double | z = 0.0 , |
||
double | Tol = 1.0e-5 |
||
) | [inline] |
Tag a vertex. Returns the index of vertex in Verts array.
void Mesh::Generic::TagVertsLine | ( | int | Tag, |
double | x0, | ||
double | y0, | ||
double | AlpDeg, | ||
double | Tol = 1.0e-5 |
||
) | [inline] |
Tag vertices along Line y = y0 + tan(AlpRad)*x.
void Mesh::Generic::ThrowError | ( | std::istringstream & | iss, |
char const * | Message | ||
) | const [inline] |
Used in ReadMesh.
void Mesh::Generic::Tri3ToTri6 | ( | ) | [inline] |
Convert Tri3 mesh to Tri6 mesh.
void Mesh::Generic::Tri6Shape | ( | double | r, |
double | s, | ||
Vec_t & | N | ||
) | const [inline] |
Tri6 Shape functions (used in Tri6ToTri15). N(6) needs to be pre-resized.
void Mesh::Generic::Tri6ToTri15 | ( | ) | [inline] |
Convert Tri6 mesh to Tri15 mesh.
void Mesh::Generic::WriteJSON | ( | char const * | FileKey | ) | const [inline] |
void Mesh::Generic::WriteMPY | ( | char const * | FileKey, |
bool | WithTags = true , |
||
bool | WithIDs = true , |
||
bool | WithShares = false , |
||
char const * | Extra = NULL |
||
) | const [inline] |
(.mpy) Write Python script that calls mesh_drawing.py
void Mesh::Generic::WriteVTU | ( | char const * | FileKey, |
int | VolSurfOrBoth = 0 |
||
) | const [inline] |
(.vtu) Write output file for ParaView. Vol=0, Surf=1, Both=2
map: bry (edge/face ids) => neighbours cells
Cells.
Is shell mesh ? (only surface)
Space dimension.
Pins.
Tagged Cells.
Tagged Vertices.
Vertices.
Output information ?