1 #ifndef AMReX_AmrMeshParticleDataAdaptor_h
2 #define AMReX_AmrMeshParticleDataAdaptor_h
5 #include <AMReX_Config.H>
15 #include "DataAdaptor.h"
19 template<
typename ParticleType,
int NArrayReal,
int NArrayInt>
20 class AmrMeshParticleDataAdaptor :
public sensei::DataAdaptor
23 static AmrMeshParticleDataAdaptor* New();
24 senseiTypeMacro(AmrMeshParticleDataAdaptor, sensei::DataAdaptor);
29 const std::vector<std::vector<std::string>> &mesh_names,
31 const std::map<std::string, std::vector<int>> & rStructs = {},
32 const std::map<std::string, int> & iStructs = {},
33 const std::map<std::string, std::vector<int>> & rArrays = {},
34 const std::map<std::string, int> & iArrays = {}
38 #if SENSEI_VERSION_MAJOR >= 3
39 int GetMeshMetadata(
unsigned int id, sensei::MeshMetadataPtr &metadata)
override;
41 int GetMeshName(
unsigned int id, std::string &meshName)
override;
42 int GetMeshHasGhostNodes(
const std::string &meshName,
int &nLayers)
override;
43 int GetMeshHasGhostCells(
const std::string &meshName,
int &nLayers)
override;
44 int GetNumberOfArrays(
const std::string &meshName,
int association,
unsigned int &numberOfArrays)
override;
45 int GetArrayName(
const std::string &meshName,
int association,
unsigned int index, std::string &arrayName)
override;
47 int GetNumberOfMeshes(
unsigned int &numMeshes)
override;
48 int GetMesh(
const std::string &meshName,
bool structureOnly, svtkDataObject *&mesh)
override;
49 int AddGhostNodesArray(svtkDataObject* mesh,
const std::string &meshName)
override;
50 int AddGhostCellsArray(svtkDataObject* mesh,
const std::string &meshName)
override;
51 int AddArray(svtkDataObject* mesh,
const std::string &meshName,
int association,
const std::string &arrayName)
override;
52 int ReleaseData()
override;
55 AmrMeshParticleDataAdaptor()
58 m_particleAdaptor = ParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::New();
61 ~AmrMeshParticleDataAdaptor()
63 m_meshAdaptor->Delete();
64 m_particleAdaptor->Delete();
68 ParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>* m_particleAdaptor;
69 AmrMeshDataAdaptor* m_meshAdaptor;
71 const std::string m_meshName =
"mesh";
72 const std::string m_particlesName =
"particles";
static AmrMeshDataAdaptor * New()
A distributed container for Particles sorted onto the levels, grids, and tiles of a block-structured ...
Definition: AMReX_ParticleContainer.H:145
Definition: AMReX_Amr.cpp:49