Everything mesh. More...
Functions | |
int | GenerateCartesianGrid (Mesh::NodalCoordinates &nc, Mesh::BSExtent< Mesh::IndexType > &gridextent, std::vector< Mesh::IndexType > &gridsizes, GeoPrim::CBox &box) |
template<typename OuterCont , typename OutCont , typename InnerCont , typename MapType > | |
void | MapElements (OuterCont &src, OutCont &trg, MapType &m) |
template<typename ListContainerType , typename ListType > | |
IndexType | MaxNodeId (const ListContainerType &fc) |
Return the maximum of all elements of a multicontainer. More... | |
template<typename OuterCont , typename InnerCont , typename OutCont > | |
void | Flatten (OuterCont &con, OutCont &ocon) |
Populate OutCont with a flat list of entries from a multicontainer. More... | |
template<typename OuterContType > | |
IndexType | GetTotalSize (OuterContType &con) |
Return the total number of entries in a multicontainer. More... | |
template<typename OuterContType , typename InnerContType , typename RetCont , typename idxtype > | |
void | Container2CSR (RetCont &xadj, RetCont &adj, OuterContType &source) |
template<typename ListContainerType , typename ListType > | |
void | CreateAdjacentNodeList (std::vector< std::list< IndexType > > &anodelist, ListContainerType &fc, IndexType nnodes=0) |
Given an array of adjacent node lists (like an array of face connectivities), this function will loop thru and create a list of unique adjacent nodes for each node with the nodes that are actually adjacent in the lists More... | |
template<typename ListContainerType , typename ListType > | |
void | AdjEList (std::vector< std::list< IndexType > > &aelist, ListContainerType &dual_con, unsigned long nel=0) |
Given an array of adjacent node lists (like an array of face connectivities), this function will loop thru and create a list of unique adjacent nodes for each node Note that this is a little different from the AdjNodeList because in this version every node in each list is considered adjacent. More... | |
template<typename ConType , typename IConType > | |
IndexType | NumberOfEdges (ConType &con) |
template<typename ContainerType , typename Icont > | |
void | FormGraph (const ContainerType &adjlist) |
int | ReadMesh (const std::string &path, Mesh::UnstructuredMesh &mesh) |
int | GetMeshCentroids (Mesh::NodalCoordinates &nc, Mesh::Connectivity &conn, std::vector< double > ¢roids) |
int | CollideCellsWithBox (Mesh::NodalCoordinates &nc, Mesh::Connectivity &conn, GeoPrim::CBox &box, std::vector< Mesh::IndexType > &candidates, std::vector< Mesh::IndexType > &cells) |
int | CollideMeshWithBox (Mesh::NodalCoordinates &nc, Mesh::Connectivity &conn, GeoPrim::CBox &box, std::vector< Mesh::IndexType > &cells) |
bool | NewtonRaphson (GeoPrim::CVector &natc, IndexType elnum, const GenericElement &el, const Connectivity &ec, const NodalCoordinates &nc, const GeoPrim::CPoint &point) |
Newton-Raphson method, customized for using the GeoPrimitives and computational mesh constructs. More... | |
bool | NewtonRaphson_2 (GeoPrim::CVector &natc, IndexType elnum, const GenericCell_2 &el, const Connectivity &ec, const NodalCoordinates &nc, const GeoPrim::CPoint &point) |
Newton-Raphson method, customized for using the GeoPrimitives and computational mesh constructs. More... | |
bool | LUDcmp (GeoPrim::CVector a[], int indx[]) |
void | LUBksb (GeoPrim::CVector a[], int indx[], GeoPrim::CVector &b) |
void | GetCoordinateBounds (NodalCoordinates &nc, std::vector< double > &) |
void | GetMeshBoxes (const NodalCoordinates &nc, const Connectivity &ec, GeoPrim::CBox &mesh_box, GeoPrim::CBox &small_box, GeoPrim::CBox &large_box) |
Bounding boxes for a mesh. More... | |
void | FindElementsInBox (const GeoPrim::CBox &box, const NodalCoordinates &nc, const Connectivity &dc,std::list< IndexType > &elements) |
Get elements in box. More... | |
Mesh::IndexType | FindPointInCells (const GeoPrim::CPoint &p,const NodalCoordinates &nc,const Connectivity &ec,const std::vector< Mesh::IndexType > &elements,GeoPrim::CVector &natc) |
Locate element containing given physical point. More... | |
Mesh::IndexType | GlobalFindPointInMesh (const GeoPrim::CPoint &p, const NodalCoordinates &nc, const Connectivity &ec, const Connectivity &dc, const GeoPrim::CBox &box, GeoPrim::CVector &natc) |
Mesh::IndexType | FindPointInMesh_2 (const GeoPrim::CPoint &p,const NodalCoordinates &nc,const Connectivity &ec,const Connectivity &dc,const GeoPrim::CBox &box,GeoPrim::CVector &natc) |
Locate element containing given physical point. More... | |
Mesh::IndexType | FindPointInMesh (const GeoPrim::CPoint &p,const NodalCoordinates &nc,const Connectivity &ec,const Connectivity &dc,const GeoPrim::CBox &box,GeoPrim::CVector &natc) |
Locate element containing given physical point. More... | |
void | writeVtkData () |
Writes the merged grid and its data in VTK UNSTRUCTURED_GRID file format. More... | |
void | writeVtkFiles (std::vector< Mesh::UnstructuredMesh > &m) |
Writes the set of meshes into separate VTK files that can be visualized with Paraview. More... | |
void | printVtk (std::vector< double > &vlist, std::vector< std::vector< int > > &elist) |
This method prints the global grid in VTK file format. More... | |
std::istream & | operator>> (std::istream &iSt, Mesh::GeometricEntity &ge) |
std::istream & | operator>> (std::istream &iSt, Mesh::Connectivity &ec) |
std::istream & | operator>> (std::istream &iSt, Mesh::NodalCoordinates &nc) |
std::ostream & | operator<< (std::ostream &oSt, const Mesh::NodalCoordinates &nc) |
std::ostream & | operator<< (std::ostream &oSt, const Mesh::Connectivity &ec) |
std::ostream & | operator<< (std::ostream &oSt, const Mesh::GeometricEntity &ge) |
void | writeVtkData (NodalCoordinates &nc, Connectivity &con, const std::string &filename, std::vector< double > &soln) |
Writes the merged grid and its data in VTK UNSTRUCTURED_GRID file format. More... | |
Everything mesh.
VTK utilities for the Mesh data structures Author: George Zagaris (gzaga) ris@ illin ois. edu
The Mesh namespace encapsulates all the mesh-related data structures and algorithms that operate on them.
void Mesh::AdjEList | ( | std::vector< std::list< IndexType > > & | aelist, |
ListContainerType & | dual_con, | ||
unsigned long | nel = 0 |
||
) |
Given an array of adjacent node lists (like an array of face connectivities), this function will loop thru and create a list of unique adjacent nodes for each node Note that this is a little different from the AdjNodeList because in this version every node in each list is considered adjacent.
Definition at line 189 of file Mesh.H.
int Mesh::CollideCellsWithBox | ( | Mesh::NodalCoordinates & | nc, |
Mesh::Connectivity & | conn, | ||
GeoPrim::CBox & | box, | ||
std::vector< Mesh::IndexType > & | candidates, | ||
std::vector< Mesh::IndexType > & | cells | ||
) |
int Mesh::CollideMeshWithBox | ( | Mesh::NodalCoordinates & | nc, |
Mesh::Connectivity & | conn, | ||
GeoPrim::CBox & | box, | ||
std::vector< Mesh::IndexType > & | cells | ||
) |
void Mesh::Container2CSR | ( | RetCont & | xadj, |
RetCont & | adj, | ||
OuterContType & | source | ||
) |
void Mesh::CreateAdjacentNodeList | ( | std::vector< std::list< IndexType > > & | anodelist, |
ListContainerType & | fc, | ||
IndexType | nnodes = 0 |
||
) |
void Mesh::FindElementsInBox | ( | const GeoPrim::CBox & | box, |
const NodalCoordinates & | nc, | ||
const Connectivity & | dc, | ||
std::list< IndexType > & | elements | ||
) |
Get elements in box.
Given a box in a cartesian space, this function will populate a list<IndexType> with all the elements that lie within.
Inputs: CBox object (see GeoPrimitives.H) NodalCoordinates object ElementConnectivity object DualConnectivity object list<IndexType> stores results
Mesh::IndexType Mesh::FindPointInCells | ( | const GeoPrim::CPoint & | p, |
const NodalCoordinates & | nc, | ||
const Connectivity & | ec, | ||
const std::vector< Mesh::IndexType > & | elements, | ||
GeoPrim::CVector & | natc | ||
) |
Locate element containing given physical point.
This function will locate which element in a mesh contains a specified point by constructing a box around the point and solving (by Newton-Raphson) the system for each element that touches the box until the element is found.
Inputs: A point in cartesian, ie (X,Y,Z), coordinates A Nodal Coordinates object for the mesh An Element Connectivity object for the mesh Dual Connectivity object for the mesh CBox specifying the parameters of the box use
Returns: An integer indicating which element in the connectivity object contains the point. A 0 will indicate that the point could not be located.
The natural coordinates of the point in the containing element is returned in natc
Referenced by main(), and test().
Mesh::IndexType Mesh::FindPointInMesh | ( | const GeoPrim::CPoint & | p, |
const NodalCoordinates & | nc, | ||
const Connectivity & | ec, | ||
const Connectivity & | dc, | ||
const GeoPrim::CBox & | box, | ||
GeoPrim::CVector & | natc | ||
) |
Locate element containing given physical point.
This function will locate which element in a mesh contains a specified point by constructing a box around the point and solving (by Newton-Raphson) the system for each element that touches the box until the element is found.
Inputs: A point in cartesian, ie (X,Y,Z), coordinates A Nodal Coordinates object for the mesh An Element Connectivity object for the mesh Dual Connectivity object for the mesh CBox specifying the parameters of the box use
Returns: An integer indicating which element in the connectivity object contains the point. A 0 will indicate that the point could not be located.
The natural coordinates of the point in the containing element is returned in natc
Mesh::IndexType Mesh::FindPointInMesh_2 | ( | const GeoPrim::CPoint & | p, |
const NodalCoordinates & | nc, | ||
const Connectivity & | ec, | ||
const Connectivity & | dc, | ||
const GeoPrim::CBox & | box, | ||
GeoPrim::CVector & | natc | ||
) |
Locate element containing given physical point.
This function will locate which element in a mesh contains a specified point by constructing a box around the point and solving (by Newton-Raphson) the system for each element that touches the box until the element is found.
Inputs: A point in cartesian, ie (X,Y,Z), coordinates A Nodal Coordinates object for the mesh An Element Connectivity object for the mesh Dual Connectivity object for the mesh CBox specifying the parameters of the box use
Returns: An integer indicating which element in the connectivity object contains the point. A 0 will indicate that the point could not be located.
The natural coordinates of the point in the containing element is returned in natc
Referenced by main().
void Mesh::Flatten | ( | OuterCont & | con, |
OutCont & | ocon | ||
) |
Populate OutCont with a flat list of entries from a multicontainer.
void Mesh::FormGraph | ( | const ContainerType & | adjlist | ) |
int Mesh::GenerateCartesianGrid | ( | Mesh::NodalCoordinates & | nc, |
Mesh::BSExtent< Mesh::IndexType > & | gridextent, | ||
std::vector< Mesh::IndexType > & | gridsizes, | ||
GeoPrim::CBox & | box | ||
) |
void Mesh::GetCoordinateBounds | ( | NodalCoordinates & | nc, |
std::vector< double > & | bnds | ||
) |
void Mesh::GetMeshBoxes | ( | const NodalCoordinates & | nc, |
const Connectivity & | ec, | ||
GeoPrim::CBox & | mesh_box, | ||
GeoPrim::CBox & | small_box, | ||
GeoPrim::CBox & | large_box | ||
) |
Bounding boxes for a mesh.
This function will determine some bounding boxes for the mesh. Namely, it gets a box for the entire mesh, one for the smallest element and one for the largest.
Referenced by main().
int Mesh::GetMeshCentroids | ( | Mesh::NodalCoordinates & | nc, |
Mesh::Connectivity & | conn, | ||
std::vector< double > & | centroids | ||
) |
IndexType Mesh::GetTotalSize | ( | OuterContType & | con | ) |
Mesh::IndexType Mesh::GlobalFindPointInMesh | ( | const GeoPrim::CPoint & | p, |
const NodalCoordinates & | nc, | ||
const Connectivity & | ec, | ||
const Connectivity & | dc, | ||
const GeoPrim::CBox & | box, | ||
GeoPrim::CVector & | natc | ||
) |
void Mesh::LUBksb | ( | GeoPrim::CVector | a[], |
int | indx[], | ||
GeoPrim::CVector & | b | ||
) |
bool Mesh::LUDcmp | ( | GeoPrim::CVector | a[], |
int | indx[] | ||
) |
void Mesh::MapElements | ( | OuterCont & | src, |
OutCont & | trg, | ||
MapType & | m | ||
) |
IndexType Mesh::MaxNodeId | ( | const ListContainerType & | fc | ) |
Return the maximum of all elements of a multicontainer.
bool Mesh::NewtonRaphson | ( | GeoPrim::CVector & | natc, |
IndexType | elnum, | ||
const GenericElement & | el, | ||
const Connectivity & | ec, | ||
const NodalCoordinates & | nc, | ||
const GeoPrim::CPoint & | point | ||
) |
Newton-Raphson method, customized for using the GeoPrimitives and computational mesh constructs.
Parameters: double natc[] = initial guess at the natural coordinates IndexType elnum = index of the mesh element to use const ElementConnectivity &ec = The element connectivity for the mesh const NodalCoordinates &nc = The nodal coordinates for the mesh const CPoint &point = the point at which we wish a solution
bool Mesh::NewtonRaphson_2 | ( | GeoPrim::CVector & | natc, |
IndexType | elnum, | ||
const GenericCell_2 & | el, | ||
const Connectivity & | ec, | ||
const NodalCoordinates & | nc, | ||
const GeoPrim::CPoint & | point | ||
) |
Newton-Raphson method, customized for using the GeoPrimitives and computational mesh constructs.
Parameters: double natc[] = initial guess at the natural coordinates IndexType elnum = index of the mesh element to use const ElementConnectivity &ec = The element connectivity for the mesh const NodalCoordinates &nc = The nodal coordinates for the mesh const CPoint &point = the point at which we wish a solution
std::ostream& Mesh::operator<< | ( | std::ostream & | oSt, |
const Mesh::NodalCoordinates & | nc | ||
) |
Definition at line 2128 of file Mesh.C.
References n, and Mesh::NodalCoordinates::size().
std::ostream& Mesh::operator<< | ( | std::ostream & | oSt, |
const Mesh::Connectivity & | ec | ||
) |
std::ostream& Mesh::operator<< | ( | std::ostream & | oSt, |
const Mesh::GeometricEntity & | ge | ||
) |
std::istream& Mesh::operator>> | ( | std::istream & | iSt, |
Mesh::GeometricEntity & | ge | ||
) |
std::istream& Mesh::operator>> | ( | std::istream & | iSt, |
Mesh::Connectivity & | ec | ||
) |
Definition at line 2085 of file Mesh.C.
References Mesh::Connectivity::_nelem, i, Mesh::Connectivity::Resize(), and swap().
std::istream& Mesh::operator>> | ( | std::istream & | iSt, |
Mesh::NodalCoordinates & | nc | ||
) |
Definition at line 2108 of file Mesh.C.
References Mesh::NodalCoordinates::init(), n, and Mesh::NodalCoordinates::size().
void Mesh::printVtk | ( | std::vector< double > & | vlist, |
std::vector< std::vector< int > > & | elist | ||
) |
This method prints the global grid in VTK file format.
vlist | the global vertex list. |
elist | the element list. |
int Mesh::ReadMesh | ( | const std::string & | path, |
Mesh::UnstructuredMesh & | mesh | ||
) |
void Mesh::writeVtkData | ( | ) |
Writes the merged grid and its data in VTK UNSTRUCTURED_GRID file format.
Definition at line 645 of file hdf2pltV2.C.
References CELLDATA, i, j, NODEDATA, globarg::outputfile, and Program.
Referenced by printWindow().
void Mesh::writeVtkData | ( | NodalCoordinates & | nc, |
Connectivity & | con, | ||
const std::string & | filename, | ||
std::vector< double > & | soln | ||
) |
Writes the merged grid and its data in VTK UNSTRUCTURED_GRID file format.
Definition at line 143 of file MeshVTK.C.
References Mesh::Connectivity::Esize(), i, j, Mesh::NodalCoordinates::NNodes(), and Mesh::Connectivity::SyncSizes().
void Mesh::writeVtkFiles | ( | std::vector< Mesh::UnstructuredMesh > & | m | ) |
Writes the set of meshes into separate VTK files that can be visualized with Paraview.
The format of the files is {outputFile}.paneId.vtk.
m | the set of meshes. |