Advanced Multi-Physics (AMP)
On-Line Documentation
meshGenerators.h
Go to the documentation of this file.
1// This file contains classes for generating meshes that are used for different tests
2#ifndef included_AMP_Unit_test_Mesh_Generators_h
3#define included_AMP_Unit_test_Mesh_Generators_h
4
5#include "AMP/mesh/Mesh.h"
6#include "AMP/mesh/MeshFactory.h"
7#include "AMP/mesh/MeshParameters.h"
8#include "AMP/mesh/structured/BoxMesh.h"
9#include "AMP/utils/Database.h"
10
11namespace AMP::unit_test {
12
13
14// Base class for Mesh Generators
16{
17public:
18 virtual std::shared_ptr<AMP::Mesh::Mesh> getMesh();
19 virtual void build_mesh() = 0;
20 virtual ~MeshGenerator(){};
21 virtual std::string name() const = 0;
22
23protected:
24 std::shared_ptr<AMP::Mesh::Mesh> mesh;
25};
26
27
28// Class to create a cube
30{
31public:
32 AMPCubeGenerator() = delete;
33 AMPCubeGenerator( int nx ) : SIZE_X( nx ), SIZE_Y( nx ), SIZE_Z( nx ) {}
34 AMPCubeGenerator( int nx, int ny, int nz ) : SIZE_X( nx ), SIZE_Y( ny ), SIZE_Z( nz ) {}
35 void build_mesh() override;
36 std::string name() const override;
37 const int SIZE_X, SIZE_Y, SIZE_Z;
38};
39
40
41// Class to create a cylinder
43{
44public:
45 void build_mesh() override;
46 std::string name() const override { return "AMPCylinderGenerator"; }
47};
48
49
50// Class to create a tube
52{
53public:
54 void build_mesh() override;
55 std::string name() const override { return "AMPTubeGenerator"; }
56};
57
58
59// MulitMesh generator
61{
62public:
63 void build_mesh() override;
64 std::string name() const override { return "AMPMultiMeshGenerator"; }
65};
66
67
68// Surface subset generator
70{
71public:
73 SurfaceSubsetGenerator( std::shared_ptr<MeshGenerator> gen, int gcw );
74 void build_mesh() override;
75 std::string name() const override { return "SurfaceSubsetGenerator"; }
76
77private:
78 const int GCW;
79 std::shared_ptr<MeshGenerator> d_generator;
80};
81
82
83} // namespace AMP::unit_test
84
85
86// Include libmesh generators
87#ifdef AMP_USE_LIBMESH
88 #include "libmeshGenerators.h"
89#endif
90
91
92#endif
std::string name() const override
AMPCubeGenerator(int nx, int ny, int nz)
std::string name() const override
std::string name() const override
std::string name() const override
virtual std::shared_ptr< AMP::Mesh::Mesh > getMesh()
virtual std::string name() const =0
std::shared_ptr< AMP::Mesh::Mesh > mesh
std::shared_ptr< MeshGenerator > d_generator
std::string name() const override
SurfaceSubsetGenerator(std::shared_ptr< MeshGenerator > gen, int gcw)



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:40.
Comments on this page