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

#include <periodicBoundary3D.h>

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

Public Member Functions

 PeriodicBoundary3D (SuperGeometry< T, 3 > sg, bool x, bool y, bool z)
 
 PeriodicBoundary3D (PeriodicBoundary3D< T, PARTICLETYPE > &f)
 
virtual ~PeriodicBoundary3D ()
 
virtual void applyBoundary (typename std::deque< PARTICLETYPE< T > >::iterator &p, ParticleSystem3D< T, PARTICLETYPE > &psSys)
 
unsigned int * getJumper ()
 Returns number of particles that moved through the periodic boundary Order: x+, x-, y+, y-, z+, z-.
 
- Public Member Functions inherited from olb::Boundary3D< T, PARTICLETYPE >
 Boundary3D ()
 
 Boundary3D (Boundary3D< T, PARTICLETYPE > &)
 
 Boundary3D (const Boundary3D< T, PARTICLETYPE > &)
 
virtual ~Boundary3D ()
 

Additional Inherited Members

- Protected Attributes inherited from olb::Boundary3D< T, PARTICLETYPE >
OstreamManager clout
 

Detailed Description

template<typename T, template< typename U > class PARTICLETYPE>
class olb::PeriodicBoundary3D< T, PARTICLETYPE >

Definition at line 43 of file periodicBoundary3D.h.

Constructor & Destructor Documentation

◆ PeriodicBoundary3D() [1/2]

template<typename T , template< typename U > class PARTICLETYPE>
olb::PeriodicBoundary3D< T, PARTICLETYPE >::PeriodicBoundary3D ( SuperGeometry< T, 3 > sg,
bool x,
bool y,
bool z )

Definition at line 63 of file periodicBoundary3D.h.

64 : Boundary3D<T, PARTICLETYPE>(),
65 _minPhys(3, T()), _maxPhys(3, T()), _extend(3, T()),
66 _x(x),
67 _y(y),
68 _z(z), _cuboidGeometry(sg.getCuboidGeometry())
69{
70 _minPhys = sg.getStatistics().getMinPhysR(1);
71 _maxPhys = sg.getStatistics().getMaxPhysR(1);
72 _extend[0] = _maxPhys[0] - _minPhys[0];
73 _extend[1] = _maxPhys[1] - _minPhys[1];
74 _extend[2] = _maxPhys[2] - _minPhys[2];
75 for (int i=0; i<6; ++i) {
76 _jumper[i] = 0;
77 }
78 _overlap = sg.getOverlap();
79}
SuperGeometryStatistics< T, D > & getStatistics()
Returns the statistics object.
CuboidGeometry< T, D > & getCuboidGeometry()
Read and write access to cuboid geometry.
int getOverlap()
Read and write access to the overlap.

References olb::SuperStructure< T, D >::getOverlap(), and olb::SuperGeometry< T, D >::getStatistics().

+ Here is the call graph for this function:

◆ PeriodicBoundary3D() [2/2]

template<typename T , template< typename U > class PARTICLETYPE>
olb::PeriodicBoundary3D< T, PARTICLETYPE >::PeriodicBoundary3D ( PeriodicBoundary3D< T, PARTICLETYPE > & f)

◆ ~PeriodicBoundary3D()

template<typename T , template< typename U > class PARTICLETYPE>
virtual olb::PeriodicBoundary3D< T, PARTICLETYPE >::~PeriodicBoundary3D ( )
inlinevirtual

Definition at line 48 of file periodicBoundary3D.h.

48{ };

Member Function Documentation

◆ applyBoundary()

template<typename T , template< typename U > class PARTICLETYPE>
void olb::PeriodicBoundary3D< T, PARTICLETYPE >::applyBoundary ( typename std::deque< PARTICLETYPE< T > >::iterator & p,
ParticleSystem3D< T, PARTICLETYPE > & psSys )
virtual

Implements olb::Boundary3D< T, PARTICLETYPE >.

Definition at line 82 of file periodicBoundary3D.h.

85{
86 if (_x) {
87 if (p->getPos()[0] > _maxPhys[0]) {
88 p->getPos()[0] -= _extend[0];
89 ++_jumper[0];
90 int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
91 p->setCuboid(C);
92 }
93 else if (p->getPos()[0] < _minPhys[0]) {
94 p->getPos()[0] += _extend[0];
95 ++_jumper[1];
96 int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
97 p->setCuboid(C);
98 }
99 }
100 if (_y) {
101 if (p->getPos()[1] > _maxPhys[1]) {
102 p->getPos()[1] -= _extend[1];
103 ++_jumper[2];
104 int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
105 p->setCuboid(C);
106 }
107 else if (p->getPos()[1] < _minPhys[1]) {
108 p->getPos()[1] += _extend[1];
109 ++_jumper[3];
110 int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
111 p->setCuboid(C);
112 }
113 }
114 if (_z) {
115 if (p->getPos()[2] > _maxPhys[2]) {
116 p->getPos()[2] -= _extend[2];
117 ++_jumper[4];
118 int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
119 p->setCuboid(C);
120 }
121 else if (p->getPos()[2] < _minPhys[2]) {
122 p->getPos()[2] += _extend[2];
123 ++_jumper[5];
124 int C = this->_cuboidGeometry.get_iC(p->getPos()[0], p->getPos()[1], p->getPos()[2], _overlap);
125 p->setCuboid(C);
126 }
127 }
128}

◆ getJumper()

template<typename T , template< typename U > class PARTICLETYPE>
unsigned int * olb::PeriodicBoundary3D< T, PARTICLETYPE >::getJumper ( )

Returns number of particles that moved through the periodic boundary Order: x+, x-, y+, y-, z+, z-.

Definition at line 131 of file periodicBoundary3D.h.

132{
133 return _jumper;
134}

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