Advanced Multi-Physics (AMP)
On-Line Documentation
MovableBoxMesh.h
Go to the documentation of this file.
1#ifndef included_AMP_MovableBoxMesh
2#define included_AMP_MovableBoxMesh
3
4#include "AMP/mesh/structured/BoxMesh.h"
5#include "AMP/utils/Array.h"
6
7#include <array>
8#include <vector>
9
10
11namespace AMP::Mesh {
12
13
24{
25public:
27 explicit MovableBoxMesh( const AMP::Mesh::BoxMesh &mesh );
28
29
31 std::string meshClass() const override;
32
33
41 Mesh::Movable isMeshMovable() const override;
42
43
45 bool operator==( const Mesh &mesh ) const override;
46
47
57 uint64_t positionHash() const override;
58
59
68 void displaceMesh( const std::vector<double> &x ) override;
69
78 void displaceMesh( std::shared_ptr<const AMP::LinearAlgebra::Vector> x ) override;
79
81 std::unique_ptr<Mesh> clone() const override;
82
91 void coord( const MeshElementIndex &index, double *pos ) const override;
92
97 std::array<AMP::Array<double>, 3> localCoord() const override;
98
103 std::array<AMP::Array<double>, 3> globalCoord() const override;
104
105
106public: // BoxMesh specific functionality
115
116
117public: // Restart functions
118 void writeRestart( int64_t ) const override;
120
121
122private:
123 MovableBoxMesh(); // Private empty constructor
124
125 // Index indicating number of times the position has changed
126 uint64_t d_pos_hash;
127
128 // The coordinates of the nodes
132 std::map<MeshElementIndex, MeshElementIndex> d_mapped;
133};
134
135
136} // namespace AMP::Mesh
137
138
139#endif
Class to manage reading/writing restart data.
Structure to uniquely identify an element.
Definition BoxMesh.h:109
A class used to represent a logically rectangular box mesh.
Definition BoxMesh.h:71
A class used to abstract away mesh from an application.
Definition Mesh.h:57
Movable
Enumeration for basic mesh-based quantities.
Definition Mesh.h:73
void displaceMesh(const std::vector< double > &x) override
Displace the entire mesh.
std::unique_ptr< Mesh > clone() const override
Virtual function to copy the mesh (allows us to properly copy the derived class)
MovableBoxMesh(const AMP::Mesh::BoxMesh &mesh)
Construct a movable box mesh from any existing box mesh.
void coord(const MeshElementIndex &index, double *pos) const override
Return a mesh element's coordinates given it's id.
Mesh::Movable isMeshMovable() const override
Is the mesh movable.
std::string meshClass() const override
Return a string with the mesh class name.
AMP::Geometry::Point physicalToLogical(const AMP::Geometry::Point &x) const override
Return the logical coordinates.
uint64_t positionHash() const override
Identify if the position has moved.
bool operator==(const Mesh &mesh) const override
Check if two meshes are equal.
void writeRestart(int64_t) const override
Write restart data to file.
std::map< MeshElementIndex, MeshElementIndex > d_mapped
MovableBoxMesh(int64_t, AMP::IO::RestartManager *)
std::array< AMP::Array< double >, 3 > globalCoord() const override
Return the vertex coordinates for the global box.
std::array< AMP::Array< double >, 3 > localCoord() const override
Return the vertex coordinates for the local box.
void displaceMesh(std::shared_ptr< const AMP::LinearAlgebra::Vector > x) override
Displace the entire mesh.
AMP::Array< double > d_coord



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