Class Mesh is the main class that holds all information to describe the current state of the mesh. More...
#include <Mesh.hpp>
Classes | |
struct | Border |
struct | BorderData |
Border data in CSR format. More... | |
class | BSExtent |
Simple Block Structured Mesh object. More... | |
class | Connectivity |
General connectivity object. More... | |
class | GenericCell_2 |
class | GenericElement |
class | GeometricEntity |
Connects continuous to discrete. More... | |
class | MeshUtilityObject |
class | NeighborHood |
class | NodalCoordinates |
struct | PartInfo |
class | Partition |
class | SolnMetaData |
class | TestFace |
struct | UnstructuredMesh |
Public Types | |
typedef IRAD::Primitive::IndexType | IndexType |
typedef IRAD::Primitive::ubyte | CellEntityIDType |
typedef std::pair< IndexType, CellEntityIDType > | SubEntityId |
typedef std::pair< SubEntityId, SubEntityId > | SymbolicFace |
typedef std::vector< IndexType > | IndexVec |
typedef IRAD::Primitive::MultiContainer < IndexType >::VecVec | MultiVec |
typedef IRAD::Primitive::MultiContainer < IndexType, IndexType > ::VecMap | VecMap |
typedef IRAD::Primitive::ubyte | GeoDimType |
typedef std::string | GeoNameType |
Public Member Functions | |
Mesh () | |
~Mesh () | |
void | addNode (Node *node) |
The following add/remove/get methods are utility methods to add, remove, or return instances of nodes, faces or elements. More... | |
void | addFace (Face *face) |
void | addElement (Element *element) |
void | removeNode (Node *node) |
void | removeFace (Face *face) |
void | removeElement (Element *element) |
Node * | getNode (int ID) |
The following get methods return a node, face or element. More... | |
Face * | getFace (int ID) |
Element * | getElement (int ID) |
int | getNumNodes () |
The following get methods return the number of nodes, faces, or elements currently in the model. More... | |
int | getNumFaces () |
int | getNumElements () |
boolean | addCohesive (int material1, int material2, int new_material=-1) |
The addCohesive method is the driver for the entire process of adding cohesive elements to the mesh. More... | |
void | replaceNode (Node *node, Node *new_node, ElementList *sep_elements, int new_material) |
void | write_boundary (ostream &stream) |
Public Attributes | |
const double | TOL = 1e-9 |
const double | LTOL = 0.0 - TOL |
const double | HTOL = 1.0 + TOL |
Private Member Functions | |
double | calcEdgeLength (int elementID) |
double | getMinEdge () |
void | setMinEdge (double me) |
Private Attributes | |
Node ** | d_nodes |
An ordered array of all nodes in the mesh. More... | |
int | d_numNodes |
The number of Nodes in the nodes array. More... | |
int | d_nodeArraySize |
The current size of the nodes array (must be as big or bigger than numNodes). More... | |
Face ** | d_faces |
1..* More... | |
int | d_numFaces |
int | d_faceArraySize |
Element ** | d_elements |
Array of all the Elements in the mesh. More... | |
int | d_numElements |
int | d_elementArraySize |
double | minEdge |
Friends | |
istream & | operator>> (istream &stream, Mesh &mesh) |
The mesh instream operator is used to drive the reading of the one input file to the code. More... | |
ostream & | operator<< (ostream &stream, Mesh &mesh) |
The mesh ostream operator is used to drive the writing of both output fils from the code. More... | |
Class Mesh is the main class that holds all information to describe the current state of the mesh.
It has several arrays that are arrays of node, face, and element objects. It contains the main work method for the cohesive insertion algorithm "addCohesive" that will be called from the main program.
typedef IRAD::Primitive::ubyte CellEntityIDType |
typedef IRAD::Primitive::ubyte GeoDimType |
typedef std::string GeoNameType |
typedef std::pair<IndexType,CellEntityIDType> SubEntityId |
typedef std::pair<SubEntityId,SubEntityId> SymbolicFace |
Mesh | ( | ) |
Definition at line 14 of file Mesh.cpp.
References minEdge, Element::setMesh(), and Face::setMesh().
~Mesh | ( | ) |
Definition at line 32 of file Mesh.cpp.
References d_elements, d_faces, d_nodes, d_numElements, d_numFaces, d_numNodes, and i.
boolean addCohesive | ( | int | material1, |
int | material2, | ||
int | new_material = -1 |
||
) |
The addCohesive method is the driver for the entire process of adding cohesive elements to the mesh.
Currently, it relies on the input of three integers: material 1 and material 2 are the element material types that should have cohesive elements inserted between them (they can be the same number if it is desired to insert cohesive elements between elements of the same type). new_material defaults to -1, and is the material type that cohesive elements will be assigned.
Definition at line 167 of file Mesh.cpp.
References d_faces, d_numFaces, FALSE, FaceList::get(), FaceListList::get(), NodeList::get(), Face::getElement1(), Face::getElement2(), Element::getMaterialType(), Face::getNodes(), Face::getNumNodes(), i, NodeList::index(), FaceListList::index(), FaceList::insert_first(), NodeList::insert_first(), FaceListList::insert_first(), Element::isCohesive(), j, NodeList::move_to(), FaceListList::next(), FaceList::next(), NodeList::next(), NodeList::reset(), FaceListList::reset(), FaceList::reset(), Node::separate(), FaceList::size(), NodeList::size(), and TRUE.
void addElement | ( | Element * | element | ) |
Definition at line 131 of file Mesh.cpp.
References d_elementArraySize, d_elements, d_numElements, and Element::setID().
Referenced by replaceNode().
void addFace | ( | Face * | face | ) |
Definition at line 96 of file Mesh.cpp.
References d_faceArraySize, d_faces, d_numFaces, face, and Face::setID().
Referenced by HexElement::setFaceFromNodes(), TetElement::setFaceFromNodes(), TCoElement::setFaceFromNodes(), and QCoElement::setFaceFromNodes().
void addNode | ( | Node * | node | ) |
The following add/remove/get methods are utility methods to add, remove, or return instances of nodes, faces or elements.
Pointers to the node, face, or element to be added or removed must be provided.
Definition at line 60 of file Mesh.cpp.
References d_nodeArraySize, d_nodes, d_numNodes, and Node::setID().
Referenced by Node::separate().
|
private |
Definition at line 396 of file Mesh.cpp.
References d_elements.
Referenced by operator>>().
|
inline |
Definition at line 143 of file Mesh.hpp.
References d_elements.
|
inline |
Definition at line 140 of file Mesh.hpp.
References d_faces.
Referenced by operator>>().
|
inlineprivate |
Definition at line 155 of file Mesh.hpp.
References minEdge.
Referenced by operator<<(), and operator>>().
|
inline |
The following get methods return a node, face or element.
To return one of these objects, it's ID must be supplied. Note: in the input file, all nodes and elements are given IDs by the file author. However, this code assumes that the nodes and elements are supplied in "ID" order, and it just returns the array element [ID-1]. Thus, if you skip an ID in the input file, and then ask for element ID=50 (assume you skipped 40), you will actually get element 51 back (51 as listed in the input file, but it will be the 50th element that was in the input file).
Definition at line 137 of file Mesh.hpp.
References d_nodes.
Referenced by operator>>().
|
inline |
|
inline |
Definition at line 149 of file Mesh.hpp.
References d_numFaces.
Referenced by operator>>().
|
inline |
The following get methods return the number of nodes, faces, or elements currently in the model.
These may not be the same as the sizes of the corresponding arrays in the Mesh class (d_nodes, etc. )
Definition at line 146 of file Mesh.hpp.
References d_numNodes.
void removeElement | ( | Element * | element | ) |
Definition at line 148 of file Mesh.cpp.
References d_elements, d_numElements, i, and Element::setID().
void removeFace | ( | Face * | face | ) |
Definition at line 112 of file Mesh.cpp.
References d_faces, d_numFaces, i, and Face::setID().
void removeNode | ( | Node * | node | ) |
Definition at line 77 of file Mesh.cpp.
References d_nodes, d_numNodes, i, and Node::setID().
void replaceNode | ( | Node * | node, |
Node * | new_node, | ||
ElementList * | sep_elements, | ||
int | new_material | ||
) |
Definition at line 245 of file Mesh.cpp.
References addElement(), ElementList::append(), Face::buildCohesive(), Face::containsNode(), ElementList::get(), FaceList::get(), Face::getElement1(), Face::getElement2(), Element::getFaces(), Element::getNumFaces(), i, ElementList::index(), FaceList::insert_first(), Element::isCohesive(), j, ElementList::move_to(), FaceList::next(), ElementList::next(), Element::replaceFaceNode(), Element::replaceNode(), ElementList::reset(), Element::setMaterialType(), ElementList::size(), and FaceList::size().
Referenced by Node::separate().
|
inlineprivate |
Definition at line 158 of file Mesh.hpp.
References minEdge.
Referenced by operator>>().
void write_boundary | ( | ostream & | stream | ) |
Definition at line 507 of file Mesh.cpp.
References d_faces, d_numFaces, Face::getElement1(), Element::getFaces(), Face::getFlag(), Element::getID(), Element::getNumFaces(), i, and j.
|
friend |
The mesh ostream operator is used to drive the writing of both output fils from the code.
These output files are the augmented node/element file (now containing cohesive elements), and the surface node description file. Note that the ostream operators for other classes actually do much of the work (i.e., node << knows how to write a node, element << knows how to write an element, etc.).
Definition at line 359 of file Mesh.cpp.
|
friend |
The mesh instream operator is used to drive the reading of the one input file to the code.
This input file contains the node and element definitions for the mesh. Note that the instream operators for other classes actually do much of the work (i.e., node >> knows how to read a node, element >> knows how to read an element, etc.).
Definition at line 402 of file Mesh.cpp.
|
private |
Definition at line 131 of file Mesh.hpp.
Referenced by addElement(), and operator>>().
|
private |
Array of all the Elements in the mesh.
1..*
Definition at line 129 of file Mesh.hpp.
Referenced by addElement(), calcEdgeLength(), getElement(), operator<<(), operator>>(), removeElement(), and ~Mesh().
|
private |
Definition at line 123 of file Mesh.hpp.
Referenced by addFace(), and operator>>().
|
private |
1..*
Definition at line 121 of file Mesh.hpp.
Referenced by addCohesive(), addFace(), getFace(), operator>>(), removeFace(), write_boundary(), and ~Mesh().
|
private |
The current size of the nodes array (must be as big or bigger than numNodes).
Used for dynamic allocation of space for the array.
Definition at line 116 of file Mesh.hpp.
Referenced by addNode(), and operator>>().
|
private |
An ordered array of all nodes in the mesh.
The index of each Node in the array is also stored as the ID in the Node object. 1..*
Definition at line 105 of file Mesh.hpp.
Referenced by addNode(), getNode(), operator<<(), operator>>(), removeNode(), and ~Mesh().
|
private |
Definition at line 130 of file Mesh.hpp.
Referenced by addElement(), getNumElements(), operator<<(), operator>>(), removeElement(), and ~Mesh().
|
private |
Definition at line 122 of file Mesh.hpp.
Referenced by addCohesive(), addFace(), getNumFaces(), removeFace(), write_boundary(), and ~Mesh().
|
private |
The number of Nodes in the nodes array.
Definition at line 110 of file Mesh.hpp.
Referenced by addNode(), getNumNodes(), operator<<(), operator>>(), removeNode(), and ~Mesh().
|
private |
Definition at line 133 of file Mesh.hpp.
Referenced by getMinEdge(), Mesh(), and setMinEdge().