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

Method check_normals

tests/tools/Assembler/Mesh/MiscChecker.cpp:4–16  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include "MiscChecker.h"
3
4void MiscChecker::check_normals(FEMeshPtr mesh) {
5 const size_t num_bd_faces = mesh->getNbrBoundaryFaces();
6 const size_t num_bd_nodes = mesh->getNbrBoundaryNodes();
7 for (size_t i=0; i<num_bd_faces; i++) {
8 VectorF normal = mesh->getBoundaryFaceNormal(i);
9 ASSERT_FLOAT_EQ(1.0, normal.norm());
10 }
11
12 for (size_t i=0; i<num_bd_nodes; i++) {
13 VectorF normal = mesh->getBoundaryNodeNormal(i);
14 ASSERT_FLOAT_EQ(1.0, normal.norm());
15 }
16}
17
18void MiscChecker::check_volumes(FEMeshPtr mesh) {
19 const size_t num_elements = mesh->getNbrElements();

Callers

nothing calls this directly

Calls 5

normMethod · 0.80
getNbrBoundaryFacesMethod · 0.45
getNbrBoundaryNodesMethod · 0.45
getBoundaryFaceNormalMethod · 0.45
getBoundaryNodeNormalMethod · 0.45

Tested by

no test coverage detected