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),
32 m_isThermal(solver->m_isThermal),
33 m_innerEnergy(solver->m_innerEnergy) {
40 cerr <<
" Using external forcing at Interfaces!" << endl;
41 m_log <<
" Using external forcing at Interfaces!" << endl;
45 m_Fg = solver->m_EELiquid.Fg;
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);
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: ";
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] <<
"), ";
81 m_log << endl <<
" - - - - -" << endl;
93 MBool interfaceParent;
95 for(
MInt parentId = 0; parentId < m_solver->grid().noCells(); parentId++) {
96 interfaceParent =
false;
97 nonOverlapping =
false;
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;
105 if(nonOverlapping)
continue;
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;
115 if(interfaceParent)
break;
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;
LbInterface(LbSolver< nDim > *solver)
Base class for the concrete interface treatment.
void colorInterface()
Sets the interface cells to defined values (to be watched e.g. in DX)
MPrimitiveVariables< nDim > * PV
MBool m_cellDependentForcing
virtual ~LbInterface()
Destructor.
virtual void printInterfaceCells()
LbSolver< nDim > * m_solver
constexpr MLong IPOW2(MInt x)