Chombo + EB + MF  3.2
MeshInterpI.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _MESHINTERPI_H_
12 #define _MESHINTERPI_H_
13 
14 #include "NamespaceHeader.H"
15 
16 template <class P>
17 void MeshInterp::deposit(const List<P>& a_particleList,
18  FArrayBox& a_rho,
19  InterpType& a_interpType)
20 {
21  for (ListIterator<P> lit(a_particleList); lit; ++lit)
22  {
23  const P& this_particle = lit();
24  const RealVect& this_x = this_particle.position();
25  const Real& this_m = this_particle.mass();
26  depositParticle(a_rho,
28  m_dx,
29  this_x,
30  this_m,
31  a_interpType);
32  }
33 }
34 
35 template <class P>
36 void MeshInterp::interpolate(List<P>& a_particleList,
37  const FArrayBox& a_field,
38  InterpType& a_interpType)
39 {
40  for (ListIterator<P> lit(a_particleList); lit; ++lit)
41  {
42  RealVect particleField(D_DECL6(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
43  P& this_particle = lit();
44  RealVect& this_x = this_particle.position();
45  interpolateParticle(particleField,
46  a_field,
48  m_dx,
49  this_x,
50  a_interpType);
51  this_particle.setAcceleration(particleField);
52  }
53 }
54 
55 #include "NamespaceFooter.H"
56 
57 #endif // include guard
#define D_DECL6(a, b, c, d, e, f)
Definition: CHArray.H:39
RealVect m_dx
Definition: MeshInterp.H:83
void deposit(const List< P > &a_particleList, FArrayBox &a_rho, InterpType &a_interpType)
Definition: MeshInterpI.H:17
Iterator over a List.
Definition: List.H:20
InterpType
Definition: MeshInterp.H:23
double Real
Definition: REAL.H:33
void interpolateParticle(RealVect &a_particleField, const FArrayBox &a_field, const RealVect &a_domainLeftEdge, const RealVect &a_dx, const RealVect &a_position, const InterpType &a_interpType)
void depositParticle(FArrayBox &a_rho, const RealVect &a_domainLeftEdge, const RealVect &a_dx, const RealVect &a_position, const Real &a_strength, const InterpType a_interpType)
A Real vector in SpaceDim-dimensional space.
Definition: RealVect.H:41
RealVect m_domainLeftEdge
Definition: MeshInterp.H:84
Definition: FArrayBox.H:45
void interpolate(List< P > &a_particleList, const FArrayBox &a_field, InterpType &a_interpType)
Definition: MeshInterpI.H:36