MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / adapt

Method adapt

tools/Assembler/Mesh/FEMeshFactory.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7using namespace FEMeshFactory;
8
9FEMeshPtr FEMeshFactory::adapt(MeshPtr mesh) {
10 const size_t dim = mesh->get_dim();
11 const size_t num_voxels = mesh->get_num_voxels();
12 if (dim == 2) {
13 return FEMeshPtr(new TriangleMesh(mesh));
14 } else if (dim == 3 && num_voxels == 0) {
15 return FEMeshPtr(new TriangleMesh(mesh));
16 } else {
17 return FEMeshPtr(new TetrahedronMesh(mesh));
18 }
19}

Callers

nothing calls this directly

Calls 2

get_dimMethod · 0.45
get_num_voxelsMethod · 0.45

Tested by

no test coverage detected