24#ifndef DUMUX_FVMPFAL3D_2P2CINTERACTIONVOLUMECONTAINER_ADAPTIVE_HH
25#define DUMUX_FVMPFAL3D_2P2CINTERACTIONVOLUMECONTAINER_ADAPTIVE_HH
45template<
class TypeTag>
53 dim = GridView::dimension, dimWorld = GridView::dimensionworld
58 using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
60 using BoundaryTypes =
typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
61 using PrimaryVariables =
typename GET_PROP(TypeTag, SolutionTypes)::PrimaryVariables;
63 using GridTypeIndices =
typename GET_PROP_TYPE(TypeTag, GridTypeIndices);
65 using Element =
typename GridView::Traits::template Codim<0>::Entity;
66 using ElementGeometry =
typename Element::Geometry;
67 using Vertex =
typename GridView::Traits::template Codim<dim>::Entity;
69 using IntersectionIterator =
typename GridView::IntersectionIterator;
70 using Intersection =
typename GridView::Intersection;
71 using IntersectionGeometry =
typename Intersection::Geometry;
73 using GlobalPosition = Dune::FieldVector<Scalar, dimWorld>;
74 using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
76 using DimVector = Dune::FieldVector<Scalar, dim>;
80 pressureEqIdx = Indices::pressureEqIdx,
84 innerEdgeFace = 2, innerSideFace = 1
88 realFaceArea = 0, fluxFaceArea = 1
95 using GlobalInteractionVolumeVector = std::vector<InteractionVolume>;
96 using FaceAreaVector = std::vector<Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2*dim> >;
101 const int localidxLarge,
103 bool& properFluxDirection);
106 bool& properFluxDirection);
109 bool& properFluxDirection);
116 DUNE_THROW(Dune::NotImplemented,
"Dimension not supported!");
128template<
class TypeTag>
150template<
class TypeTag>
152 const int localIdxLarge,
154 bool& properFluxDirection)
156 int subVolumeFaceIdx = -1;
159 int localFaceIdxInside = isIt->indexInInside();
160 switch(localIdxLarge)
163 if(localFaceIdxInside == 0)
165 subVolumeFaceIdx = 6;
166 properFluxDirection =
false;
168 else if(localFaceIdxInside == 2)
169 subVolumeFaceIdx = 5;
170 else if(localFaceIdxInside == 4)
171 subVolumeFaceIdx = 10;
175 if(localFaceIdxInside == 1)
176 subVolumeFaceIdx = 6;
177 else if(localFaceIdxInside == 2)
179 subVolumeFaceIdx = 7;
180 properFluxDirection =
false;
182 else if(localFaceIdxInside == 4)
184 subVolumeFaceIdx = 11;
185 properFluxDirection =
false;
190 if(localFaceIdxInside == 0)
191 subVolumeFaceIdx = 4;
192 else if(localFaceIdxInside == 3)
194 subVolumeFaceIdx = 5;
195 properFluxDirection =
false;
197 else if(localFaceIdxInside == 4)
199 subVolumeFaceIdx = 9;
200 properFluxDirection =
false;
205 if(localFaceIdxInside == 1)
207 subVolumeFaceIdx = 4;
208 properFluxDirection =
false;
210 else if(localFaceIdxInside == 3)
211 subVolumeFaceIdx = 7;
212 else if(localFaceIdxInside == 4)
213 subVolumeFaceIdx = 8;
217 if(localFaceIdxInside == 0)
218 subVolumeFaceIdx = 2;
219 else if(localFaceIdxInside == 2)
221 subVolumeFaceIdx = 1;
222 properFluxDirection =
false;
224 else if(localFaceIdxInside == 5)
226 subVolumeFaceIdx = 10;
227 properFluxDirection =
false;
232 if(localFaceIdxInside == 1)
234 subVolumeFaceIdx = 2;
235 properFluxDirection =
false;
237 else if(localFaceIdxInside == 2)
238 subVolumeFaceIdx = 3;
239 else if(localFaceIdxInside == 5)
240 subVolumeFaceIdx = 11;
244 if(localFaceIdxInside == 0)
246 subVolumeFaceIdx = 0;
247 properFluxDirection =
false;
249 else if(localFaceIdxInside == 3)
250 subVolumeFaceIdx = 1;
251 else if(localFaceIdxInside == 5)
252 subVolumeFaceIdx = 9;
256 if(localFaceIdxInside == 1)
257 subVolumeFaceIdx = 0;
258 else if(localFaceIdxInside == 3)
260 subVolumeFaceIdx = 3;
261 properFluxDirection =
false;
263 else if(localFaceIdxInside == 5)
265 subVolumeFaceIdx = 8;
266 properFluxDirection =
false;
271 return subVolumeFaceIdx;
286template<
class TypeTag>
289 bool& properFluxDirection)
291 int mapI(-5), mapJ(-5);
292 int mapI2(-5), mapJ2(-5);
294 for (
int i= 0; i<interactionVolume.getElementNumber(); i++)
296 if(isIt->inside() == interactionVolume.getSubVolumeElement(i))
304 if(isIt->outside() == interactionVolume.getSubVolumeElement(i))
313 for(
int passionfruit = 0; passionfruit <=1; passionfruit++)
315 if(mapI== 0 || mapJ == 0)
320 properFluxDirection =
false;
326 properFluxDirection =
false;
331 if(mapI== 1 || mapJ == 1)
334 properFluxDirection =
false;
340 properFluxDirection =
false;
346 else if(mapI== 2 || mapJ == 2)
349 properFluxDirection =
false;
355 else if(mapI== 3 || mapJ == 3)
358 properFluxDirection =
false;
364 else if(mapI== 4 || mapJ == 4)
369 properFluxDirection =
false;
375 properFluxDirection =
false;
381 else if(mapI== 5 || mapJ == 5)
384 properFluxDirection =
false;
390 else if(mapI== 6 || mapJ == 6)
393 properFluxDirection =
false;
406 Dune::dgrave <<
" Could not find "<< interactionVolume.getHangingNodeType() <<
" case configuration for I = "
407 << problem_.variables().index(isIt->inside()) <<
" localIdx " << mapI <<
" , "
408 << problem_.variables().index(isIt->outside()) <<
" localIdx " << mapJ << std::endl;
425template<
class TypeTag>
428 bool& properFluxDirection)
430 int mapI(-5), mapJ(-5);
431 int mapI2(-5), mapJ2(-5);
433 for (
int i= 0; i<interactionVolume.getElementNumber(); i++)
435 if(isIt->inside() == interactionVolume.getSubVolumeElement(i))
443 if(isIt->outside() == interactionVolume.getSubVolumeElement(i))
452 for(
int passionfruit = 0; passionfruit <=1; passionfruit++)
455 if(mapI== 0 || mapJ == 0)
458 properFluxDirection =
false;
464 properFluxDirection =
false;
471 properFluxDirection =
false;
475 else if(mapI== 1 || mapJ == 1)
478 properFluxDirection =
false;
484 properFluxDirection =
false;
490 else if(mapI== 2 || mapJ == 2)
493 properFluxDirection =
false;
499 properFluxDirection =
false;
505 else if(mapI== 3 || mapJ == 3)
508 properFluxDirection =
false;
514 else if(mapI== 4 || mapJ == 4)
517 properFluxDirection =
false;
523 properFluxDirection =
false;
529 else if(mapI== 5 || mapJ == 5)
532 properFluxDirection =
false;
538 else if(mapI== 6 || mapJ == 6)
541 properFluxDirection =
false;
554 Dune::dgrave <<
" Could not find "<< interactionVolume.getHangingNodeType() <<
" case configuration for I = "
555 << problem_.variables().index(isIt->inside()) <<
" localIdx " << mapI <<
" and "
556 << problem_.variables().index(isIt->outside()) <<
" localIdx " << mapJ << std::endl;
#define GET_PROP(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:281
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
Contains a class to exchange entries of a vector.
Interactionvolume container for 3-d MPFA L-method on an h-adaptive grid.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Property tag MPFAInteractionVolume
Type of the data container for one interaction volume.
Definition: porousmediumflow/sequential/cellcentered/mpfa/properties.hh:96
Interactionvolume container for 3-d MPFA L-method.
Definition: 3dinteractionvolumecontainer.hh:46
typename GET_PROP_TYPE(TypeTag, MPFAInteractionVolume) InteractionVolume
Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3d...
Definition: 3dinteractionvolumecontainer.hh:93
InteractionVolume & interactionVolume(int vertexIdx)
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:142
Interactionvolume container for 3-d MPFA L-method on an h-adaptive grid.
Definition: 3dinteractionvolumecontaineradaptive.hh:47
Interaction volume container for compositional adaptive 3-d (using MPFA L-method) Model.
Definition: fvmpfal3dinteractionvolumecontaineradaptive.hh:47
FvMpfaL3d2P2CInteractionVolumeContainerAdaptive(Problem &problem)
Definition: fvmpfal3dinteractionvolumecontaineradaptive.hh:111
int getMpfaCase6cells(const IntersectionIterator &isIt, InteractionVolume &interactionVolume, bool &properFluxDirection)
Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 6 cells.
Definition: fvmpfal3dinteractionvolumecontaineradaptive.hh:287
void storeBoundaryInteractionVolume(InteractionVolume &interactionVolume, const Vertex &vertex)
Overwrites the method from the base class FvMpfaL3dInteractionVolumeContainerAdaptive On each boundar...
Definition: fvmpfal3dinteractionvolumecontaineradaptive.hh:129
int getMpfaCase2or4cells(const IntersectionIterator &isIt, InteractionVolume &interactionVolume, bool &properFluxDirection)
Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 2/4 cells.
Definition: fvmpfal3dinteractionvolumecontaineradaptive.hh:426
int getMpfaCase8cells(const IntersectionIterator &isIt, const int localidxLarge, InteractionVolume &interactionVolume, bool &properFluxDirection)
Determine the subVolumeFaceIdx for a given intersection and interactionVolume with 8 cells.
Definition: fvmpfal3dinteractionvolumecontaineradaptive.hh:151