33namespace amrex
44{
55// -----------------------------------------------------------------------------
6- template <typename ParticleType, int NArrayReal, int NArrayInt>
7- AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>*
8- AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::New()
6+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
7+ AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >*
8+ AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::New()
99{
10- auto result = new AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>;
10+ auto result = new AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >;
1111 result->InitializeObjectBase ();
1212 return result;
1313}
1414
1515// -----------------------------------------------------------------------------
16- template <typename ParticleType, int NArrayReal, int NArrayInt>
17- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::SetDataSource(
16+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
17+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::SetDataSource(
1818 AmrMesh *mesh,
1919 const std::vector<amrex::Vector<amrex::MultiFab>*> &mesh_states,
2020 const std::vector<std::vector<std::string>> &mesh_names,
21- amrex::ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt> * particles,
21+ amrex::ParticleContainer_impl<ParticleType, NArrayReal, NArrayInt, Allocator > * particles,
2222 const std::map<std::string, std::vector<int >> & rStructs,
2323 const std::map<std::string, int > & iStructs,
2424 const std::map<std::string, std::vector<int >> & rArrays,
@@ -31,8 +31,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::SetDataSour
3131
3232// SENSEI API
3333#if SENSEI_VERSION_MAJOR >= 3
34- template <typename ParticleType, int NArrayReal, int NArrayInt>
35- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshMetadata(
34+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
35+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetMeshMetadata(
3636 unsigned int id,
3737 sensei::MeshMetadataPtr &metadata)
3838{
@@ -49,8 +49,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshMeta
4949}
5050
5151#else
52- template <typename ParticleType, int NArrayReal, int NArrayInt>
53- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshName(
52+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
53+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetMeshName(
5454 unsigned int id,
5555 std::string &meshName)
5656{
@@ -66,8 +66,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshName
6666 return -1 ;
6767}
6868
69- template <typename ParticleType, int NArrayReal, int NArrayInt>
70- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshHasGhostNodes(
69+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
70+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetMeshHasGhostNodes(
7171 const std::string &meshName, int &nLayers)
7272{
7373 if (id == 0 )
@@ -82,8 +82,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshHasG
8282 return -1 ;
8383}
8484
85- template <typename ParticleType, int NArrayReal, int NArrayInt>
86- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshHasGhostCells(
85+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
86+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetMeshHasGhostCells(
8787 const std::string &meshName, int &nLayers)
8888{
8989 if (id == 0 )
@@ -98,8 +98,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMeshHasG
9898 return -1 ;
9999}
100100
101- template <typename ParticleType, int NArrayReal, int NArrayInt>
102- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetNumberOfArrays(
101+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
102+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetNumberOfArrays(
103103 const std::string &meshName,
104104 int association,
105105 unsigned int &numberOfArrays)
@@ -116,8 +116,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetNumberOf
116116 return -1 ;
117117}
118118
119- template <typename ParticleType, int NArrayReal, int NArrayInt>
120- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetArrayName(
119+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
120+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetArrayName(
121121 const std::string &meshName,
122122 int association,
123123 unsigned int index,
@@ -136,16 +136,16 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetArrayNam
136136}
137137#endif
138138
139- template <typename ParticleType, int NArrayReal, int NArrayInt>
140- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetNumberOfMeshes(
139+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
140+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetNumberOfMeshes(
141141 unsigned int &numMeshes)
142142{
143143 numMeshes = 2 ;
144144 return 0 ;
145145}
146146
147- template <typename ParticleType, int NArrayReal, int NArrayInt>
148- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMesh(
147+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
148+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::GetMesh(
149149 const std::string &meshName,
150150 bool structureOnly,
151151 svtkDataObject *&mesh)
@@ -162,8 +162,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::GetMesh(
162162 return -1 ;
163163}
164164
165- template <typename ParticleType, int NArrayReal, int NArrayInt>
166- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::AddGhostNodesArray(
165+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
166+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::AddGhostNodesArray(
167167 svtkDataObject* mesh,
168168 const std::string &meshName)
169169{
@@ -179,8 +179,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::AddGhostNod
179179 return -1 ;
180180}
181181
182- template <typename ParticleType, int NArrayReal, int NArrayInt>
183- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::AddGhostCellsArray(
182+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
183+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::AddGhostCellsArray(
184184 svtkDataObject* mesh,
185185 const std::string &meshName)
186186{
@@ -196,8 +196,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::AddGhostCel
196196 return -1 ;
197197}
198198
199- template <typename ParticleType, int NArrayReal, int NArrayInt>
200- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::AddArray(
199+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
200+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::AddArray(
201201 svtkDataObject* mesh,
202202 const std::string &meshName,
203203 int association,
@@ -215,8 +215,8 @@ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::AddArray(
215215 return -1 ;
216216}
217217
218- template <typename ParticleType, int NArrayReal, int NArrayInt>
219- int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt>::ReleaseData()
218+ template <typename ParticleType, int NArrayReal, int NArrayInt, template < class > class Allocator >
219+ int AmrMeshParticleDataAdaptor<ParticleType, NArrayReal, NArrayInt, Allocator >::ReleaseData()
220220{
221221 this ->m_particleAdaptor ->ReleaseData ();
222222 this ->m_meshAdaptor ->ReleaseData ();
0 commit comments