Chi-Tech
|
#include <chi_surfacemesh.h>
Public Member Functions | |
const std::vector< chi_mesh::Vertex > & | GetVertices () const |
const std::vector< chi_mesh::Face > & | GetTriangles () const |
const std::vector< chi_mesh::PolyFace * > & | GetPolygons () const |
SurfaceMesh () | |
~SurfaceMesh () | |
int | ImportFromOBJFile (const std::string &fileName, bool as_poly=false, const chi_mesh::Vector3 &transform=Vector3(0, 0, 0)) |
int | ImportFromTriangleFiles (const char *fileName, bool as_poly) |
int | ImportFromMshFiles (const char *fileName, bool as_poly) |
void | ExportToOBJFile (const char *fileName) |
void | ExportToPolyFile (const char *fileName) |
void | UpdateInternalConnectivity () |
bool | CheckNegativeSense (double x, double y, double z) |
void | SplitByPatch (std::vector< chi_mesh::SurfaceMesh * > &patches) |
void | ExtractOpenEdgesToObj (const char *fileName) |
void | CheckCyclicDependencies (int num_angles) |
void | GetMeshStats () |
void | ComputeLoadBalancing (std::vector< double > &x_cuts, std::vector< double > &y_cuts) |
Static Public Member Functions | |
static SurfaceMesh * | CreateFromDivisions (std::vector< double > &vertices_1d_x, std::vector< double > &vertices_1d_y) |
Protected Attributes | |
std::vector< chi_mesh::Vertex > | vertices_ |
std::vector< chi_mesh::Vertex > | tex_vertices_ |
Texture vertices. More... | |
std::vector< chi_mesh::Normal > | normals_ |
std::vector< chi_mesh::Face > | faces_ |
std::vector< chi_mesh::Edge > | lines_ |
std::vector< chi_mesh::PolyFace * > | poly_faces_ |
Polygonal faces. More... | |
std::vector< int > | physical_region_map_ |
Friends | |
std::ostream & | operator<< (std::ostream &os, SurfaceMesh &dt) |
Generic surface mesh class. This class facilitates many functions within the mesh environment including logically determining volumes.
Definition at line 13 of file chi_surfacemesh.h.
chi_mesh::SurfaceMesh::SurfaceMesh | ( | ) |
Default constructor.
Definition at line 5 of file chi_surfacemesh_constrdestr.cc.
chi_mesh::SurfaceMesh::~SurfaceMesh | ( | ) |
Default destructor.
Definition at line 12 of file chi_surfacemesh_constrdestr.cc.
void chi_mesh::SurfaceMesh::CheckCyclicDependencies | ( | int | num_angles | ) |
Checks for cyclic dependencies in this mesh. Transport type sweeps have a step where the inter-cell dependency is acyclically sorted. This step is repeated here.
Definition at line 14 of file chi_surfacemesh_meshstats.cc.
bool chi_mesh::SurfaceMesh::CheckNegativeSense | ( | double | x, |
double | y, | ||
double | z | ||
) |
Definition at line 4 of file chi_surfacemesh_checksense.cc.
void chi_mesh::SurfaceMesh::ComputeLoadBalancing | ( | std::vector< double > & | x_cuts, |
std::vector< double > & | y_cuts | ||
) |
Computes load balancing parameters from a set of predictive cuts. Does not actually perform these cuts.
Definition at line 186 of file chi_surfacemesh_meshstats.cc.
|
static |
Creates a 2D orthogonal mesh from a set of vertices in x and y. The vertices along a dimension merely represents the divisions. They are not the complete vertices defining a cell. For example:
This code will create a 2x2 mesh with .
Definition at line 559 of file chi_surfacemesh_loadexport.cc.
void chi_mesh::SurfaceMesh::ExportToOBJFile | ( | const char * | fileName | ) |
Exports the triangular faces of a surface mesh to wavefront .obj files.
Definition at line 864 of file chi_surfacemesh_loadexport.cc.
void chi_mesh::SurfaceMesh::ExportToPolyFile | ( | const char * | fileName | ) |
Exports a PSLG to triangle1.6's .poly format.
Definition at line 939 of file chi_surfacemesh_loadexport.cc.
void chi_mesh::SurfaceMesh::ExtractOpenEdgesToObj | ( | const char * | fileName | ) |
Extract open edges to wavefront obj format.
Definition at line 11 of file chi_surfacemesh_extractopenedges.cc.
void chi_mesh::SurfaceMesh::GetMeshStats | ( | ) |
Gets simple mesh statistics.
Definition at line 101 of file chi_surfacemesh_meshstats.cc.
|
inline |
Definition at line 33 of file chi_surfacemesh.h.
|
inline |
Definition at line 30 of file chi_surfacemesh.h.
|
inline |
Definition at line 27 of file chi_surfacemesh.h.
int chi_mesh::SurfaceMesh::ImportFromMshFiles | ( | const char * | fileName, |
bool | as_poly = false |
||
) |
Loads a surface mesh from gmsh's file format.
Definition at line 667 of file chi_surfacemesh_loadexport.cc.
int chi_mesh::SurfaceMesh::ImportFromOBJFile | ( | const std::string & | fileName, |
bool | as_poly = false , |
||
const chi_mesh::Vector3 & | transform = Vector3(0,0,0) |
||
) |
Loads a surface mesh from a wavefront .obj file.
Definition at line 13 of file chi_surfacemesh_loadexport.cc.
int chi_mesh::SurfaceMesh::ImportFromTriangleFiles | ( | const char * | fileName, |
bool | as_poly = false |
||
) |
Loads a surface mesh from triangle's file format.
Definition at line 395 of file chi_surfacemesh_loadexport.cc.
void chi_mesh::SurfaceMesh::SplitByPatch | ( | std::vector< chi_mesh::SurfaceMesh * > & | patches | ) |
Splits the surface by patch.
Definition at line 4 of file chi_surfacemesh_splitbypatch.cc.
void chi_mesh::SurfaceMesh::UpdateInternalConnectivity | ( | ) |
Runs over the faces of the surfacemesh and determines neighbors. The algorithm first establishes which cells subscribe to each vertex and then loops over faces and edges. For each edge, only the subscribing faces are searched for neighbors. This routine has time complexity O(N).
Definition at line 16 of file chi_surfacemesh_internalconn.cc.
|
friend |
Definition at line 23 of file chi_surfacemesh_constrdestr.cc.
|
protected |
Definition at line 19 of file chi_surfacemesh.h.
|
protected |
Definition at line 20 of file chi_surfacemesh.h.
|
protected |
Definition at line 18 of file chi_surfacemesh.h.
|
protected |
Definition at line 23 of file chi_surfacemesh.h.
|
protected |
Polygonal faces.
Definition at line 21 of file chi_surfacemesh.h.
|
protected |
Texture vertices.
Definition at line 17 of file chi_surfacemesh.h.
|
protected |
Definition at line 16 of file chi_surfacemesh.h.