MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
LbInterface< nDim > Class Template Referenceabstract

#include <lbinterface.h>

Inheritance diagram for LbInterface< nDim >:
[legend]
Collaboration diagram for LbInterface< nDim >:
[legend]

Public Member Functions

 LbInterface (LbSolver< nDim > *solver)
 Base class for the concrete interface treatment. More...
 
virtual ~LbInterface ()
 Destructor. More...
 
virtual void refineCell (const MInt parentId, const MInt *childIds)=0
 
virtual void removeChildren (const MInt parentId)=0
 
virtual void printInterfaceCells ()
 
void colorInterface ()
 Sets the interface cells to defined values (to be watched e.g. in DX) More...
 

Protected Attributes

MInt m_interfaceId {}
 
MInt m_noDistributions
 
std::vector< Collector< LbInterfaceCell > * > m_interfaceChildren
 
std::vector< Collector< LbParentCell > * > m_interfaceParents
 
MBool m_cellDependentForcing
 
MBool m_externalForcing
 
MBool m_isEELiquid
 
MInt m_methodId
 
MFloatm_Fext {}
 
MFloatm_Fg {}
 
MPrimitiveVariables< nDim > * PV
 
MFloat m_nu
 
MString m_interfaceMethod
 
MString m_adaptationInitMethod
 
MInt m_noCoefficients {}
 
MInt m_isThermal
 
MInt m_innerEnergy
 
LbSolver< nDim > * m_solver
 

Friends

template<MInt nDim_>
class LbSolver
 

Detailed Description

template<MInt nDim>
class LbInterface< nDim >

Base class for the treatment of refinement for the LB module

Implements the data structure and operations for the treatment of the interface between cells of different level.

Definition at line 31 of file lbinterface.h.

Constructor & Destructor Documentation

◆ LbInterface()

template<MInt nDim>
LbInterface< nDim >::LbInterface ( LbSolver< nDim > *  solver)
Author
Moritz Waldmann
Parameters
[in]LBsolver pointer

Definition at line 25 of file lbinterface.cpp.

26 : m_noDistributions(solver->m_noDistributions),
27 m_interfaceChildren(solver->m_interfaceChildren),
28 m_interfaceParents(solver->m_interfaceParents),
29 m_externalForcing(solver->m_externalForcing),
30 m_methodId(solver->m_methodId),
31 m_nu(solver->m_nu),
32 m_isThermal(solver->m_isThermal),
33 m_innerEnergy(solver->m_innerEnergy) {
34 TRACE();
35 m_solver = solver;
36 PV = solver->PV;
37
38 m_Fext = solver->m_Fext;
40 cerr << " Using external forcing at Interfaces!" << endl;
41 m_log << " Using external forcing at Interfaces!" << endl;
42 }
43 m_isEELiquid = solver->m_isEELiquid;
45 m_Fg = solver->m_EELiquid.Fg;
46}
MFloat m_nu
Definition: lbinterface.h:71
MPrimitiveVariables< nDim > * PV
Definition: lbinterface.h:67
MBool m_cellDependentForcing
Definition: lbinterface.h:58
MInt m_isThermal
Definition: lbinterface.h:77
MInt m_methodId
Definition: lbinterface.h:62
MBool m_externalForcing
Definition: lbinterface.h:59
MInt m_noDistributions
Definition: lbinterface.h:52
MBool m_isEELiquid
Definition: lbinterface.h:60
std::vector< Collector< LbParentCell > * > m_interfaceParents
Definition: lbinterface.h:55
MFloat * m_Fg
Definition: lbinterface.h:65
MFloat * m_Fext
Definition: lbinterface.h:64
MInt m_innerEnergy
Definition: lbinterface.h:78
LbSolver< nDim > * m_solver
Definition: lbinterface.h:80
std::vector< Collector< LbInterfaceCell > * > m_interfaceChildren
Definition: lbinterface.h:54
InfoOutFile m_log

◆ ~LbInterface()

template<MInt nDim>
LbInterface< nDim >::~LbInterface
virtual
Author
Julian Vorspohl j.vor.nosp@m.spoh.nosp@m.l@aia.nosp@m..rwt.nosp@m.h-aac.nosp@m.hen..nosp@m.de

Definition at line 54 of file lbinterface.cpp.

54 {
55 TRACE();
56}

Member Function Documentation

◆ colorInterface()

template<MInt nDim>
void LbInterface< nDim >::colorInterface

Definition at line 91 of file lbinterface.cpp.

91 {
92 TRACE();
93 MBool interfaceParent;
94 MBool nonOverlapping;
95 for(MInt parentId = 0; parentId < m_solver->grid().noCells(); parentId++) {
96 interfaceParent = false;
97 nonOverlapping = false;
98 for(MInt k = 0; k < IPOW2(nDim); k++) {
99 if(m_solver->c_childId(parentId, k) == -1) continue;
100 if(m_solver->a_isInterfaceChild(m_solver->c_childId(parentId, k))) {
101 nonOverlapping = true;
102 break;
103 }
104 }
105 if(nonOverlapping) continue;
106 // Check if neighbor is interface parent
107 for(MInt n = 0; n < m_noDistributions - 1; n++) {
108 for(MInt nk = 0; nk < IPOW2(nDim); nk++) {
109 if(m_solver->c_childId(parentId, nk) == -1) continue;
110 if(m_solver->a_isInterfaceChild(m_solver->c_childId(m_solver->c_neighborId(parentId, n), nk))) {
111 interfaceParent = true;
112 break;
113 }
114 }
115 if(interfaceParent) break;
116 }
117 if(!interfaceParent) continue;
118 for(MInt nk = 0; nk < IPOW2(nDim); nk++) {
119 if(m_solver->c_childId(parentId, nk) == -1) continue;
120 m_solver->a_variable(m_solver->c_childId(parentId, nk), 1) = -1.1;
121 }
122 }
123}
constexpr MLong IPOW2(MInt x)
int32_t MInt
Definition: maiatypes.h:62
bool MBool
Definition: maiatypes.h:58

◆ printInterfaceCells()

template<MInt nDim>
void LbInterface< nDim >::printInterfaceCells
virtual

Definition at line 60 of file lbinterface.cpp.

60 {
61 TRACE();
62 MInt noNghbrs = 0, noParentNghbrs = 0;
63 for(MInt i = m_solver->minLevel(); i < m_solver->maxLevel(); i++) {
64 m_log << m_interfaceChildren[i - m_solver->minLevel()]->size() << " Interface cells on level: " << i
65 << " ----------" << endl;
66 for(MInt j = 0; j < m_interfaceChildren[i - m_solver->minLevel()]->size(); j++) {
67 for(MInt x = 0; x < m_noDistributions - 1; x++) {
68 noNghbrs += m_solver->a_hasNeighbor(m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_cellId, x);
69 noParentNghbrs += m_solver->a_hasNeighbor(
70 m_solver->c_parentId(m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_cellId), x);
71 }
72 m_log << " cellID " << m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_cellId
73 << " position: " << m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_position
74 << " level: " << m_solver->a_level(m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_cellId)
75 << " neighbors: " << noNghbrs << " parentNghbrs: " << noParentNghbrs << endl;
76 m_log << " interpolation Neighbors: ";
77 for(MInt m = 0; m < IPOW2(nDim); m++) {
78 m_log << m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_interpolationNeighbors[m] << " ("
79 << m_interfaceChildren[i - m_solver->minLevel()]->a[j].m_interpolationCoefficients[m] << "), ";
80 }
81 m_log << endl << " - - - - -" << endl;
82 noNghbrs = 0;
83 noParentNghbrs = 0;
84 }
85 }
86 TERMM(0, AT_);
87}

◆ refineCell()

template<MInt nDim>
virtual void LbInterface< nDim >::refineCell ( const MInt  parentId,
const MInt childIds 
)
pure virtual

◆ removeChildren()

template<MInt nDim>
virtual void LbInterface< nDim >::removeChildren ( const MInt  parentId)
pure virtual

Friends And Related Function Documentation

◆ LbSolver

template<MInt nDim>
template<MInt nDim_>
friend class LbSolver
friend

Definition at line 34 of file lbinterface.h.

Member Data Documentation

◆ m_adaptationInitMethod

template<MInt nDim>
MString LbInterface< nDim >::m_adaptationInitMethod
protected

Definition at line 74 of file lbinterface.h.

◆ m_cellDependentForcing

template<MInt nDim>
MBool LbInterface< nDim >::m_cellDependentForcing
protected

Definition at line 58 of file lbinterface.h.

◆ m_externalForcing

template<MInt nDim>
MBool LbInterface< nDim >::m_externalForcing
protected

Definition at line 59 of file lbinterface.h.

◆ m_Fext

template<MInt nDim>
MFloat* LbInterface< nDim >::m_Fext {}
protected

Definition at line 64 of file lbinterface.h.

◆ m_Fg

template<MInt nDim>
MFloat* LbInterface< nDim >::m_Fg {}
protected

Definition at line 65 of file lbinterface.h.

◆ m_innerEnergy

template<MInt nDim>
MInt LbInterface< nDim >::m_innerEnergy
protected

Definition at line 78 of file lbinterface.h.

◆ m_interfaceChildren

template<MInt nDim>
std::vector<Collector<LbInterfaceCell>*> LbInterface< nDim >::m_interfaceChildren
protected

Definition at line 54 of file lbinterface.h.

◆ m_interfaceId

template<MInt nDim>
MInt LbInterface< nDim >::m_interfaceId {}
protected

Definition at line 50 of file lbinterface.h.

◆ m_interfaceMethod

template<MInt nDim>
MString LbInterface< nDim >::m_interfaceMethod
protected

Definition at line 73 of file lbinterface.h.

◆ m_interfaceParents

template<MInt nDim>
std::vector<Collector<LbParentCell>*> LbInterface< nDim >::m_interfaceParents
protected

Definition at line 55 of file lbinterface.h.

◆ m_isEELiquid

template<MInt nDim>
MBool LbInterface< nDim >::m_isEELiquid
protected

Definition at line 60 of file lbinterface.h.

◆ m_isThermal

template<MInt nDim>
MInt LbInterface< nDim >::m_isThermal
protected

Definition at line 77 of file lbinterface.h.

◆ m_methodId

template<MInt nDim>
MInt LbInterface< nDim >::m_methodId
protected

Definition at line 62 of file lbinterface.h.

◆ m_noCoefficients

template<MInt nDim>
MInt LbInterface< nDim >::m_noCoefficients {}
protected

Definition at line 75 of file lbinterface.h.

◆ m_noDistributions

template<MInt nDim>
MInt LbInterface< nDim >::m_noDistributions
protected

Definition at line 52 of file lbinterface.h.

◆ m_nu

template<MInt nDim>
MFloat LbInterface< nDim >::m_nu
protected

Definition at line 71 of file lbinterface.h.

◆ m_solver

template<MInt nDim>
LbSolver<nDim>* LbInterface< nDim >::m_solver
protected

Definition at line 80 of file lbinterface.h.

◆ PV

template<MInt nDim>
MPrimitiveVariables<nDim>* LbInterface< nDim >::PV
protected

Definition at line 67 of file lbinterface.h.


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