Advanced Multi-Physics (AMP)
On-Line Documentation
Classes | Static Public Member Functions | Static Private Attributes | List of all members
AMP::Mesh::meshTests Class Reference

A helper class to store/run tests for a mesh. More...

#include <meshTests.h>

Classes

class  MeshVectorFactory
 Factory to create a vector from a mesh. More...
 

Static Public Member Functions

static void cloneMesh (AMP::UnitTest &ut, std::shared_ptr< const AMP::Mesh::Mesh > mesh)
 Check clone.
 
static void DisplaceMeshScalar (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check displacement by a scalar.
 
static void DisplaceMeshVector (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check displacement by a vector.
 
static std::pair< size_t, size_t > ElementIteratorTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh, const AMP::Mesh::MeshIterator &iterator, const AMP::Mesh::GeomType type, const std::vector< int > &blockIds, const std::string &name)
 
static void getNodeNeighbors (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check neighbors.
 
static void getParents (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check parents.
 
static void MeshBasicTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Run basic tests.
 
static void MeshCountTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Checks the number of elements in a mesh.
 
static void MeshGeometryTestLoop (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Run all mesh geometry based tests.
 
static void MeshIteratorOperationTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Checks the mesh operators.
 
static void MeshIteratorSetOPTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Checks the mesh set operations.
 
static void MeshIteratorTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Checks the mesh iterators.
 
static void MeshMatrixTestLoop (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh, bool fast=false)
 Run all matrix based tests.
 
static void MeshPerformance (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check mesh performance.
 
static void MeshTestLoop (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Run all mesh based tests.
 
static void MeshVectorTestLoop (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh, bool fast=false)
 Run all vector based tests.
 
static void RowWriteTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh, int dofsPerNode, bool split)
 
template<int DOF_PER_NODE, bool SPLIT>
static void simpleNodalVectorTests (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh, std::shared_ptr< AMP::Discretization::DOFManager > DOFs, int gcw)
 Simple nodal vector tests.
 
static void TestBasicGeometry (AMP::UnitTest &ut, std::shared_ptr< const AMP::Mesh::Mesh > mesh)
 Basic geometry class tests.
 
static void testBlockIDs (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check block ids.
 
static void testBoxMesh (AMP::UnitTest &ut, std::shared_ptr< const AMP::Mesh::Mesh > mesh)
 Check BoxMesh.
 
static void testBoxMeshIndicies (AMP::UnitTest &ut, int ndim)
 Check box mesh indicies.
 
static void testID (AMP::UnitTest &ut)
 Check basic id info.
 
static void TestInside (AMP::UnitTest &ut, std::shared_ptr< const AMP::Mesh::Mesh > mesh)
 Checks Geometry::inside.
 
static void TestNormalGeometry (AMP::UnitTest &ut, std::shared_ptr< const AMP::Mesh::Mesh > mesh)
 Checks noraml.
 
static void TestPhysicalLogical (AMP::UnitTest &ut, std::shared_ptr< const AMP::Mesh::Mesh > mesh)
 Checks Geometry::inside.
 
static void VerifyBoundaryIDNodeIterator (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check boundary ids.
 
static void VerifyBoundaryIterator (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check boundary.
 
static void VerifyBoundaryIteratorTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 
static void VerifyElementForNode (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 
static void VerifyGetMatrixTrivialTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh, int dofsPerNode, bool split)
 
template<int DOF_PER_NODE, bool SPLIT>
static void VerifyGetVectorTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 VerifyGetVectorTest.
 
static void VerifyGhostIsOwned (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 Check ghost elements.
 
static void VerifyNodeElemMapIteratorTest (AMP::UnitTest &ut, std::shared_ptr< AMP::Mesh::Mesh > mesh)
 

Static Private Attributes

static std::shared_ptr< AMP::Mesh::MeshglobalMeshForMeshVectorFactory
 

Detailed Description

A helper class to store/run tests for a mesh.

Definition at line 20 of file meshTests.h.

Member Function Documentation

◆ cloneMesh()

static void AMP::Mesh::meshTests::cloneMesh ( AMP::UnitTest ut,
std::shared_ptr< const AMP::Mesh::Mesh mesh 
)
static

Check clone.

Test cloning a mesh

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ DisplaceMeshScalar()

static void AMP::Mesh::meshTests::DisplaceMeshScalar ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check displacement by a scalar.

Test if we correctly displace the mesh

Parameters
[out]utUnit test class to report the results
[in]meshMesh to test

◆ DisplaceMeshVector()

static void AMP::Mesh::meshTests::DisplaceMeshVector ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check displacement by a vector.

Test if we correctly displace the mesh

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ ElementIteratorTest()

static std::pair< size_t, size_t > AMP::Mesh::meshTests::ElementIteratorTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh,
const AMP::Mesh::MeshIterator iterator,
const AMP::Mesh::GeomType  type,
const std::vector< int > &  blockIds,
const std::string &  name 
)
static

◆ getNodeNeighbors()

static void AMP::Mesh::meshTests::getNodeNeighbors ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check neighbors.

Test if we correctly identify the node neighbors

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ getParents()

static void AMP::Mesh::meshTests::getParents ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check parents.

Test getting parent elements for each mesh element

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshBasicTest()

static void AMP::Mesh::meshTests::MeshBasicTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Run basic tests.

This test performs some very basic mesh tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshCountTest()

static void AMP::Mesh::meshTests::MeshCountTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Checks the number of elements in a mesh.

This test performs a series of simple tests on numLocalElements, numGlobalElements, and numGhostElements

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshGeometryTestLoop()

static void AMP::Mesh::meshTests::MeshGeometryTestLoop ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Run all mesh geometry based tests.

This test runs all the geometry-based tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshIteratorOperationTest()

static void AMP::Mesh::meshTests::MeshIteratorOperationTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Checks the mesh operators.

This test performs a series of simple tests on the operator== and operator!=

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshIteratorSetOPTest()

static void AMP::Mesh::meshTests::MeshIteratorSetOPTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Checks the mesh set operations.

This test performs a series of simple tests on the union, intersection, and compliment operations.

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshIteratorTest()

static void AMP::Mesh::meshTests::MeshIteratorTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Checks the mesh iterators.

This test performs a series of simple tests on the basic iterators within a mesh

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshMatrixTestLoop()

static void AMP::Mesh::meshTests::MeshMatrixTestLoop ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh,
bool  fast = false 
)
static

Run all matrix based tests.

This test runs all the matrix-based tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test
[in]fastSpeed up testing by eliminating some of the tests

◆ MeshPerformance()

static void AMP::Mesh::meshTests::MeshPerformance ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check mesh performance.

Test the performance of some common mesh operations

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshTestLoop()

static void AMP::Mesh::meshTests::MeshTestLoop ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Run all mesh based tests.

This test runs all the mesh-based tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ MeshVectorTestLoop()

static void AMP::Mesh::meshTests::MeshVectorTestLoop ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh,
bool  fast = false 
)
static

Run all vector based tests.

This test runs all the vector-based tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test
[in]fastSpeed up testing by eliminating some of the tests

◆ RowWriteTest()

static void AMP::Mesh::meshTests::RowWriteTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh,
int  dofsPerNode,
bool  split 
)
static

◆ simpleNodalVectorTests()

template<int DOF_PER_NODE, bool SPLIT>
static void AMP::Mesh::meshTests::simpleNodalVectorTests ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh,
std::shared_ptr< AMP::Discretization::DOFManager DOFs,
int  gcw 
)
static

Simple nodal vector tests.

Run a series of simple tests on a nodal vector

Parameters
[out]utUnit test class to report the results
[in]meshMesh to test
[in]DOFsDOF Manager to use
[in]gcwGhost cell width to use

◆ TestBasicGeometry()

static void AMP::Mesh::meshTests::TestBasicGeometry ( AMP::UnitTest ut,
std::shared_ptr< const AMP::Mesh::Mesh mesh 
)
static

Basic geometry class tests.

This runs the geometry only tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh contaning geometry to test

◆ testBlockIDs()

static void AMP::Mesh::meshTests::testBlockIDs ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check block ids.

This tests loops over the blocks, checking the iterators

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ testBoxMesh()

static void AMP::Mesh::meshTests::testBoxMesh ( AMP::UnitTest ut,
std::shared_ptr< const AMP::Mesh::Mesh mesh 
)
static

Check BoxMesh.

Test specific BoxMesh tests

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ testBoxMeshIndicies()

static void AMP::Mesh::meshTests::testBoxMeshIndicies ( AMP::UnitTest ut,
int  ndim 
)
static

Check box mesh indicies.

This tests checks conversion of box mesh indicies

Parameters
[in,out]utUnit test class to report the results
[in]ndimNumber of dimensions for test

◆ testID()

static void AMP::Mesh::meshTests::testID ( AMP::UnitTest ut)
static

Check basic id info.

This tests checks some trivial ids

Parameters
[in,out]utUnit test class to report the results

◆ TestInside()

static void AMP::Mesh::meshTests::TestInside ( AMP::UnitTest ut,
std::shared_ptr< const AMP::Mesh::Mesh mesh 
)
static

Checks Geometry::inside.

This test checks if all points in the mesh are inside the geometry

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ TestNormalGeometry()

static void AMP::Mesh::meshTests::TestNormalGeometry ( AMP::UnitTest ut,
std::shared_ptr< const AMP::Mesh::Mesh mesh 
)
static

Checks noraml.

This test checks that the mesh and geometry normals match

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ TestPhysicalLogical()

static void AMP::Mesh::meshTests::TestPhysicalLogical ( AMP::UnitTest ut,
std::shared_ptr< const AMP::Mesh::Mesh mesh 
)
static

Checks Geometry::inside.

This test checks the physical-logical-physical transformation

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ VerifyBoundaryIDNodeIterator()

static void AMP::Mesh::meshTests::VerifyBoundaryIDNodeIterator ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check boundary ids.

This tests loops over all boundary ids, checking the iterators

Parameters
[out]utUnit test class to report the results
[in]meshMesh to test

◆ VerifyBoundaryIterator()

static void AMP::Mesh::meshTests::VerifyBoundaryIterator ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check boundary.

This tests checks the boundary iterators

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ VerifyBoundaryIteratorTest()

static void AMP::Mesh::meshTests::VerifyBoundaryIteratorTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

◆ VerifyElementForNode()

static void AMP::Mesh::meshTests::VerifyElementForNode ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

◆ VerifyGetMatrixTrivialTest()

static void AMP::Mesh::meshTests::VerifyGetMatrixTrivialTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh,
int  dofsPerNode,
bool  split 
)
static

◆ VerifyGetVectorTest()

template<int DOF_PER_NODE, bool SPLIT>
static void AMP::Mesh::meshTests::VerifyGetVectorTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

VerifyGetVectorTest.

VerifyGetVectorTest

Parameters
[out]utUnit test class to report the results
[in]meshMesh to test

◆ VerifyGhostIsOwned()

static void AMP::Mesh::meshTests::VerifyGhostIsOwned ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Check ghost elements.

This tests checks that all ghost elements are owned by "owner processor"

Parameters
[in,out]utUnit test class to report the results
[in]meshMesh to test

◆ VerifyNodeElemMapIteratorTest()

static void AMP::Mesh::meshTests::VerifyNodeElemMapIteratorTest ( AMP::UnitTest ut,
std::shared_ptr< AMP::Mesh::Mesh mesh 
)
static

Member Data Documentation

◆ globalMeshForMeshVectorFactory

std::shared_ptr<AMP::Mesh::Mesh> AMP::Mesh::meshTests::globalMeshForMeshVectorFactory
staticprivate

Definition at line 346 of file meshTests.h.


The documentation for this class was generated from the following file:



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:43.
Comments on this page