1 #ifndef AMReX_AmrParticleDataAdaptor_h
2 #define AMReX_AmrParticleDataAdaptor_h
5 #include <AMReX_Config.H>
15 #include "DataAdaptor.h"
19 template<
typename ParticleType,
int NArrayReal,
int NArrayInt>
20 class AmrParticleDataAdaptor :
public sensei::DataAdaptor
23 static AmrParticleDataAdaptor* New();
24 senseiTypeMacro(AmrParticleDataAdaptor, sensei::DataAdaptor);
29 const std::map<std::string, std::vector<int>> & rStructs = {},
30 const std::map<std::string, int> & iStructs = {},
31 const std::map<std::string, std::vector<int>> & rArrays = {},
32 const std::map<std::string, int> & iArrays = {}
36 #if SENSEI_VERSION_MAJOR >= 3
37 int GetMeshMetadata(
unsigned int id, sensei::MeshMetadataPtr &metadata)
override;
39 int GetMeshName(
unsigned int id, std::string &meshName)
override;
40 int GetMeshHasGhostNodes(
const std::string &meshName,
int &nLayers)
override;
41 int GetMeshHasGhostCells(
const std::string &meshName,
int &nLayers)
override;
42 int GetNumberOfArrays(
const std::string &meshName,
int association,
unsigned int &numberOfArrays)
override;
43 int GetArrayName(
const std::string &meshName,
int association,
unsigned int index, std::string &arrayName)
override;
45 int GetNumberOfMeshes(
unsigned int &numMeshes)
override;
46 int GetMesh(
const std::string &meshName,
bool structureOnly, svtkDataObject *&mesh)
override;
47 int AddGhostNodesArray(svtkDataObject* mesh,
const std::string &meshName)
override;
48 int AddGhostCellsArray(svtkDataObject* mesh,
const std::string &meshName)
override;
49 int AddArray(svtkDataObject* mesh,
const std::string &meshName,
int association,
const std::string &arrayName)
override;
50 int ReleaseData()
override;
53 AmrParticleDataAdaptor()
56 m_particleAdaptor = ParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::New();
59 ~AmrParticleDataAdaptor()
61 m_meshAdaptor->Delete();
62 m_particleAdaptor->Delete();
66 ParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>* m_particleAdaptor;
67 AmrDataAdaptor* m_meshAdaptor;
69 const std::string m_meshName =
"mesh";
70 const std::string m_particlesName =
"particles";
static AmrDataAdaptor * 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