OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::Eul2LagrOperator3D< T, DESCRIPTOR, PARTICLETYPE > Class Template Referencefinal

#include <eul2LagrPostProcessor3D.h>

+ Inheritance diagram for olb::Eul2LagrOperator3D< T, DESCRIPTOR, PARTICLETYPE >:
+ Collaboration diagram for olb::Eul2LagrOperator3D< T, DESCRIPTOR, PARTICLETYPE >:

Public Member Functions

 Eul2LagrOperator3D (ParticleSystem3D< T, PARTICLETYPE > &pSystem, SuperGeometry< T, 3 > &superGeometry)
 
bool operator() (BlockLattice< T, DESCRIPTOR > &blockLattice) override
 

Additional Inherited Members

- Protected Member Functions inherited from olb::Eul2LagrOperatorBase3D< T, DESCRIPTOR >
 Eul2LagrOperatorBase3D ()
 

Detailed Description

template<typename T, typename DESCRIPTOR, template< typename U > class PARTICLETYPE>
class olb::Eul2LagrOperator3D< T, DESCRIPTOR, PARTICLETYPE >

Definition at line 53 of file eul2LagrPostProcessor3D.h.

Constructor & Destructor Documentation

◆ Eul2LagrOperator3D()

template<typename T , typename DESCRIPTOR , template< typename U > class PARTICLETYPE>
olb::Eul2LagrOperator3D< T, DESCRIPTOR, PARTICLETYPE >::Eul2LagrOperator3D ( ParticleSystem3D< T, PARTICLETYPE > & pSystem,
SuperGeometry< T, 3 > & superGeometry )

Definition at line 37 of file eul2LagrPostProcessor3D.hh.

38 : _superGeometry(superGeometry),
39 _pSystem(pSystem)
40{}

Member Function Documentation

◆ operator()()

template<typename T , typename DESCRIPTOR , template< typename U > class PARTICLETYPE>
bool olb::Eul2LagrOperator3D< T, DESCRIPTOR, PARTICLETYPE >::operator() ( BlockLattice< T, DESCRIPTOR > & blockLattice)
overridevirtual

Implements olb::Eul2LagrOperatorBase3D< T, DESCRIPTOR >.

Definition at line 43 of file eul2LagrPostProcessor3D.hh.

44{
45#ifdef TEST_L
46 OstreamManager clout( std::cout,"eul2LagrOperator::operator()" );
47#endif
48 // Resetting the external field
49 for (int iX=0; iX<blockLattice.getNx(); ++iX) {
50 for (int iY=0; iY<blockLattice.getNy(); ++iY) {
51 for (int iZ=0; iZ<blockLattice.getNz(); ++iZ) {
52 blockLattice.get(iX,iY,iZ).template setField<descriptors::EUL2LAGR>(0.);
53 }
54 }
55 }
56
57 // Populating each voxel
58 int overlap = _superGeometry.getOverlap();
59 for (auto p : _pSystem.getParticlesPointer()) {
60 if (p->getActive()) {
61 T physPosP[] { p->getPos()[0], p->getPos()[1], p->getPos()[2] };
62 int latticeRoundedPosP[] {0, 0, 0, 0};
63 _superGeometry.getCuboidGeometry().getLatticeR (latticeRoundedPosP, physPosP);
64 latticeRoundedPosP[1] += overlap;
65 latticeRoundedPosP[2] += overlap;
66 latticeRoundedPosP[3] += overlap;
67 //Populating the lattice
68 T eul2LagrRho = blockLattice.get(&latticeRoundedPosP[1]).template getField<descriptors::EUL2LAGR>();
69 eul2LagrRho += 1.;
70 blockLattice.get(&latticeRoundedPosP[1]).template setField<descriptors::EUL2LAGR>(eul2LagrRho);
71 }
72 }
73
74 return true;
75}
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
int getOverlap()
Read and write access to the overlap.

References olb::BlockLattice< T, DESCRIPTOR >::get(), olb::BlockStructureD< D >::getNx(), olb::BlockStructureD< D >::getNy(), and olb::BlockStructureD< D >::getNz().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: