Class SurfaceMesh

Class Documentation

class SurfaceMesh

Generic surface mesh class. This class facilitates many functions within the mesh environment including logically determining volumes.

Public Functions

explicit SurfaceMesh(const InputParameters &params)
inline const std::vector<Vector3> &GetVertices() const
inline const std::vector<Face> &GetTriangles() const
SurfaceMesh()
~SurfaceMesh()
int ImportFromOBJFile(const std::string &fileName, bool as_poly = false, const Vector3 &transform = Vector3(0, 0, 0))

Loads a surface mesh from a wavefront .obj file.

int ImportFromTriangleFiles(const char *fileName, bool as_poly)

Loads a surface mesh from triangle’s file format.

int ImportFromMshFiles(const char *fileName, bool as_poly)

Loads a surface mesh from gmsh’s file format.

void 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).

void 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.

Public Static Functions

static InputParameters GetInputParameters()
static std::shared_ptr<SurfaceMesh> Create(const ParameterBlock &params)

Protected Attributes

std::vector<Vector3> vertices_
std::vector<Vector3> tex_vertices_

Texture vertices.

std::vector<Vector3> normals_
std::vector<Face> faces_
std::vector<Edge> lines_
std::vector<std::shared_ptr<PolyFace>> poly_faces_

Polygonal faces.

std::vector<int> physical_region_map_

Friends

friend std::ostream &operator<<(std::ostream &os, SurfaceMesh &dt)