24#ifndef DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
25#define DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
44template<
class TypeTag>
52 dim = GridView::dimension, dimWorld = GridView::dimensionworld
57 using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
59 using Indices =
typename GET_PROP_TYPE(TypeTag, ModelTraits)::Indices;
61 using BoundaryTypes =
typename GET_PROP_TYPE(TypeTag, BoundaryTypes);
62 using SolutionTypes =
typename GET_PROP(TypeTag, SolutionTypes);
63 using PrimaryVariables =
typename SolutionTypes::PrimaryVariables;
65 using Element =
typename GridView::Traits::template Codim<0>::Entity;
66 using Vertex =
typename GridView::Traits::template Codim<dim>::Entity;
67 using ElementGeometry =
typename Element::Geometry;
69 using Intersection =
typename GridView::Intersection;
70 using IntersectionGeometry =
typename Intersection::Geometry;
72 using GlobalPosition =
typename ElementGeometry::GlobalCoordinate;
73 using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
75 using DimVector = Dune::FieldVector<Scalar, dim>;
79 pressureEqIdx = Indices::pressureEqIdx,
84 innerEdgeFace = 2, innerSideFace = 1
88 realFaceArea = 0, fluxFaceArea = 1
96 using GlobalInteractionVolumeVector = std::vector<InteractionVolume>;
97 using FaceAreaVector = std::vector<Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2*dim> >;
104 void storeInteractionVolumeInfo();
118 Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2 * dim>(Dune::FieldVector<Scalar, 2>(0.0)));
121 asImp_().storeInteractionVolumeInfo();
279 DUNE_THROW(Dune::NotImplemented,
"Dimension not supported!");
299 Implementation &asImp_()
300 {
return *
static_cast<Implementation *
>(
this); }
303 const Implementation &asImp_()
const
304 {
return *
static_cast<const Implementation *
>(
this); }
318template<
class TypeTag>
320 std::vector < std::vector<int> >& elemVertMap)
322 int eIdxGlobal = problem_.variables().index(element);
323 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 0, dim);
324 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 7);
325 elemVertMap[vIdxGlobal][7] = eIdxGlobal;
327 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 1, dim);
328 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 6);
329 elemVertMap[vIdxGlobal][6] = eIdxGlobal;
331 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 2, dim);
332 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 5);
333 elemVertMap[vIdxGlobal][5] = eIdxGlobal;
335 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 3, dim);
336 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 4);
337 elemVertMap[vIdxGlobal][4] = eIdxGlobal;
339 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 4, dim);
340 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 3);
341 elemVertMap[vIdxGlobal][3] = eIdxGlobal;
343 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 5, dim);
344 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 2);
345 elemVertMap[vIdxGlobal][2] = eIdxGlobal;
347 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 6, dim);
348 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 1);
349 elemVertMap[vIdxGlobal][1] = eIdxGlobal;
351 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 7, dim);
352 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 0);
353 elemVertMap[vIdxGlobal][0] = eIdxGlobal;
369template<
class TypeTag>
371 std::vector < std::vector<int> >& elemVertMap)
373 BoundaryTypes bcType;
375 int eIdxGlobal = problem_.variables().index(element);
377 const ElementGeometry& geometry = element.geometry();
379 const auto referenceElement = ReferenceElements::general(geometry.type());
381 int levelI = element.level();
384 for (
const auto& intersection :
intersections(problem_.gridView(), element))
386 int indexInInside = intersection.indexInInside();
388 DimVector normal = intersection.centerUnitOuterNormal();
390 const IntersectionGeometry& isGeometry = intersection.geometry();
392 Scalar faceVol = isGeometry.volume();
394 const DimVector& globalPosFace = isGeometry.center();
396 bool takeIntersection =
true;
397 if (intersection.neighbor())
399 auto outside = intersection.outside();
400 int eIdxGlobalJ = problem_.variables().index(outside);
402 if (levelI == outside.level() && eIdxGlobal > eIdxGlobalJ)
403 takeIntersection =
false;
404 if (levelI < outside.level())
405 takeIntersection =
false;
408 if (takeIntersection)
410 addRealFaceArea_(faceVol, eIdxGlobal, indexInInside);
411 if (intersection.neighbor())
413 int eIdxGlobalJ = problem_.variables().index(intersection.outside());
414 addRealFaceArea_(faceVol, eIdxGlobalJ, intersection.indexInOutside());
417 for (
int i = 0; i < isGeometry.corners(); i++)
419 int localVertIdx = referenceElement.subEntity(indexInInside, 1, i, dim);
421 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, localVertIdx, dim);
425 if (elemVertMap[vIdxGlobal][0] == eIdxGlobal)
427 if (indexInInside == 1)
429 interactionVolume.setIndexOnElement(indexInInside, 0, 0);
430 interactionVolume.setNormal(normal, 0, 0);
431 interactionVolume.setFacePosition(globalPosFace, 0);
433 if (intersection.neighbor())
435 int indexInOutside = intersection.indexInOutside();
437 interactionVolume.setIndexOnElement(indexInOutside, 1, 1);
438 DimVector normalOutside = normal;
441 interactionVolume.setNormal(normalOutside, 1, 1);
444 else if (indexInInside == 3)
446 interactionVolume.setIndexOnElement(indexInInside, 0, 1);
447 interactionVolume.setNormal(normal, 0, 1);
448 interactionVolume.setFacePosition(globalPosFace, 3);
450 if (intersection.neighbor())
452 int indexInOutside = intersection.indexInOutside();
454 interactionVolume.setIndexOnElement(indexInOutside, 2, 0);
455 DimVector normalOutside = normal;
458 interactionVolume.setNormal(normalOutside, 2, 0);
461 else if (indexInInside == 5)
463 interactionVolume.setIndexOnElement(indexInInside, 0, 2);
464 interactionVolume.setNormal(normal, 0, 2);
465 interactionVolume.setFacePosition(globalPosFace, 8);
467 if (intersection.neighbor())
469 int indexInOutside = intersection.indexInOutside();
471 interactionVolume.setIndexOnElement(indexInOutside, 4, 0);
472 DimVector normalOutside = normal;
475 interactionVolume.setNormal(normalOutside, 4, 0);
479 if (elemVertMap[vIdxGlobal][1] == eIdxGlobal)
481 if (indexInInside == 3)
483 interactionVolume.setIndexOnElement(indexInInside, 1, 0);
484 interactionVolume.setNormal(normal, 1, 0);
485 interactionVolume.setFacePosition(globalPosFace, 1);
487 if (intersection.neighbor())
489 int indexInOutside = intersection.indexInOutside();
491 interactionVolume.setIndexOnElement(indexInOutside, 3, 1);
492 DimVector normalOutside = normal;
495 interactionVolume.setNormal(normalOutside, 3, 1);
498 else if (indexInInside == 0)
500 interactionVolume.setIndexOnElement(indexInInside, 1, 1);
501 interactionVolume.setNormal(normal, 1, 1);
502 interactionVolume.setFacePosition(globalPosFace, 0);
504 if (intersection.neighbor())
506 int indexInOutside = intersection.indexInOutside();
508 interactionVolume.setIndexOnElement(indexInOutside, 0, 0);
509 DimVector normalOutside = normal;
512 interactionVolume.setNormal(normalOutside, 0, 0);
515 else if (indexInInside == 5)
517 interactionVolume.setIndexOnElement(indexInInside, 1, 2);
518 interactionVolume.setNormal(normal, 1, 2);
519 interactionVolume.setFacePosition(globalPosFace, 9);
521 if (intersection.neighbor())
523 int indexInOutside = intersection.indexInOutside();
525 interactionVolume.setIndexOnElement(indexInOutside, 5, 0);
526 DimVector normalOutside = normal;
529 interactionVolume.setNormal(normalOutside, 5, 0);
533 if (elemVertMap[vIdxGlobal][2] == eIdxGlobal)
535 if (indexInInside == 2)
537 interactionVolume.setIndexOnElement(indexInInside, 2, 0);
538 interactionVolume.setNormal(normal, 2, 0);
539 interactionVolume.setFacePosition(globalPosFace, 3);
541 if (intersection.neighbor())
543 int indexInOutside = intersection.indexInOutside();
545 interactionVolume.setIndexOnElement(indexInOutside, 0, 1);
546 DimVector normalOutside = normal;
549 interactionVolume.setNormal(normalOutside, 0, 1);
552 else if (indexInInside == 1)
554 interactionVolume.setIndexOnElement(indexInInside, 2, 1);
555 interactionVolume.setNormal(normal, 2, 1);
556 interactionVolume.setFacePosition(globalPosFace, 2);
558 if (intersection.neighbor())
560 int indexInOutside = intersection.indexInOutside();
562 interactionVolume.setIndexOnElement(indexInOutside, 3, 0);
563 DimVector normalOutside = normal;
566 interactionVolume.setNormal(normalOutside, 3, 0);
569 else if (indexInInside == 5)
571 interactionVolume.setIndexOnElement(indexInInside, 2, 2);
572 interactionVolume.setNormal(normal, 2, 2);
573 interactionVolume.setFacePosition(globalPosFace, 11);
575 if (intersection.neighbor())
577 int indexInOutside = intersection.indexInOutside();
579 interactionVolume.setIndexOnElement(indexInOutside, 6, 0);
580 DimVector normalOutside = normal;
583 interactionVolume.setNormal(normalOutside, 6, 0);
587 if (elemVertMap[vIdxGlobal][3] == eIdxGlobal)
589 if (indexInInside == 0)
591 interactionVolume.setIndexOnElement(indexInInside, 3, 0);
592 interactionVolume.setNormal(normal, 3, 0);
593 interactionVolume.setFacePosition(globalPosFace, 2);
595 if (intersection.neighbor())
597 int indexInOutside = intersection.indexInOutside();
599 interactionVolume.setIndexOnElement(indexInOutside, 2, 1);
600 DimVector normalOutside = normal;
603 interactionVolume.setNormal(normalOutside, 2, 1);
606 else if (indexInInside == 2)
608 interactionVolume.setIndexOnElement(indexInInside, 3, 1);
609 interactionVolume.setNormal(normal, 3, 1);
610 interactionVolume.setFacePosition(globalPosFace, 1);
612 if (intersection.neighbor())
614 int indexInOutside = intersection.indexInOutside();
616 interactionVolume.setIndexOnElement(indexInOutside, 1, 0);
617 DimVector normalOutside = normal;
620 interactionVolume.setNormal(normalOutside, 1, 0);
623 else if (indexInInside == 5)
625 interactionVolume.setIndexOnElement(indexInInside, 3, 2);
626 interactionVolume.setNormal(normal, 3, 2);
627 interactionVolume.setFacePosition(globalPosFace, 10);
629 if (intersection.neighbor())
631 int indexInOutside = intersection.indexInOutside();
633 interactionVolume.setIndexOnElement(indexInOutside, 7, 0);
634 DimVector normalOutside = normal;
637 interactionVolume.setNormal(normalOutside, 7, 0);
641 if (elemVertMap[vIdxGlobal][4] == eIdxGlobal)
643 if (indexInInside == 4)
645 interactionVolume.setIndexOnElement(indexInInside, 4, 0);
646 interactionVolume.setNormal(normal, 4, 0);
647 interactionVolume.setFacePosition(globalPosFace, 8);
649 if (intersection.neighbor())
651 int indexInOutside = intersection.indexInOutside();
653 interactionVolume.setIndexOnElement(indexInOutside, 0, 2);
654 DimVector normalOutside = normal;
657 interactionVolume.setNormal(normalOutside, 0, 2);
660 else if (indexInInside == 1)
662 interactionVolume.setIndexOnElement(indexInInside, 4, 1);
663 interactionVolume.setNormal(normal, 4, 1);
664 interactionVolume.setFacePosition(globalPosFace, 4);
666 if (intersection.neighbor())
668 int indexInOutside = intersection.indexInOutside();
670 interactionVolume.setIndexOnElement(indexInOutside, 5, 2);
671 DimVector normalOutside = normal;
674 interactionVolume.setNormal(normalOutside, 5, 2);
677 else if (indexInInside == 3)
679 interactionVolume.setIndexOnElement(indexInInside, 4, 2);
680 interactionVolume.setNormal(normal, 4, 2);
681 interactionVolume.setFacePosition(globalPosFace, 7);
683 if (intersection.neighbor())
685 int indexInOutside = intersection.indexInOutside();
687 interactionVolume.setIndexOnElement(indexInOutside, 6, 1);
688 DimVector normalOutside = normal;
691 interactionVolume.setNormal(normalOutside, 6, 1);
695 if (elemVertMap[vIdxGlobal][5] == eIdxGlobal)
697 if (indexInInside == 4)
699 interactionVolume.setIndexOnElement(indexInInside, 5, 0);
700 interactionVolume.setNormal(normal, 5, 0);
701 interactionVolume.setFacePosition(globalPosFace, 9);
703 if (intersection.neighbor())
705 int indexInOutside = intersection.indexInOutside();
707 interactionVolume.setIndexOnElement(indexInOutside, 1, 2);
708 DimVector normalOutside = normal;
711 interactionVolume.setNormal(normalOutside, 1, 2);
714 else if (indexInInside == 3)
716 interactionVolume.setIndexOnElement(indexInInside, 5, 1);
717 interactionVolume.setNormal(normal, 5, 1);
718 interactionVolume.setFacePosition(globalPosFace, 5);
720 if (intersection.neighbor())
722 int indexInOutside = intersection.indexInOutside();
724 interactionVolume.setIndexOnElement(indexInOutside, 7, 2);
725 DimVector normalOutside = normal;
728 interactionVolume.setNormal(normalOutside, 7, 2);
732 else if (indexInInside == 0)
734 interactionVolume.setIndexOnElement(indexInInside, 5, 2);
735 interactionVolume.setNormal(normal, 5, 2);
736 interactionVolume.setFacePosition(globalPosFace, 4);
738 if (intersection.neighbor())
740 int indexInOutside = intersection.indexInOutside();
742 interactionVolume.setIndexOnElement(indexInOutside, 4, 1);
743 DimVector normalOutside = normal;
746 interactionVolume.setNormal(normalOutside, 4, 1);
750 if (elemVertMap[vIdxGlobal][6] == eIdxGlobal)
752 if (indexInInside == 4)
754 interactionVolume.setIndexOnElement(indexInInside, 6, 0);
755 interactionVolume.setNormal(normal, 6, 0);
756 interactionVolume.setFacePosition(globalPosFace, 11);
758 if (intersection.neighbor())
760 int indexInOutside = intersection.indexInOutside();
762 interactionVolume.setIndexOnElement(indexInOutside, 2, 2);
763 DimVector normalOutside = normal;
766 interactionVolume.setNormal(normalOutside, 2, 2);
769 else if (indexInInside == 2)
771 interactionVolume.setIndexOnElement(indexInInside, 6, 1);
772 interactionVolume.setNormal(normal, 6, 1);
773 interactionVolume.setFacePosition(globalPosFace, 7);
775 if (intersection.neighbor())
777 int indexInOutside = intersection.indexInOutside();
779 interactionVolume.setIndexOnElement(indexInOutside, 4, 2);
780 DimVector normalOutside = normal;
783 interactionVolume.setNormal(normalOutside, 4, 2);
786 else if (indexInInside == 1)
788 interactionVolume.setIndexOnElement(indexInInside, 6, 2);
789 interactionVolume.setNormal(normal, 6, 2);
790 interactionVolume.setFacePosition(globalPosFace, 6);
792 if (intersection.neighbor())
794 int indexInOutside = intersection.indexInOutside();
796 interactionVolume.setIndexOnElement(indexInOutside, 7, 1);
797 DimVector normalOutside = normal;
800 interactionVolume.setNormal(normalOutside, 7, 1);
804 if (elemVertMap[vIdxGlobal][7] == eIdxGlobal)
806 if (indexInInside == 4)
808 interactionVolume.setIndexOnElement(indexInInside, 7, 0);
809 interactionVolume.setNormal(normal, 7, 0);
810 interactionVolume.setFacePosition(globalPosFace, 10);
812 if (intersection.neighbor())
814 int indexInOutside = intersection.indexInOutside();
816 interactionVolume.setIndexOnElement(indexInOutside, 3, 2);
817 DimVector normalOutside = normal;
820 interactionVolume.setNormal(normalOutside, 3, 2);
823 else if (indexInInside == 0)
825 interactionVolume.setIndexOnElement(indexInInside, 7, 1);
826 interactionVolume.setNormal(normal, 7, 1);
827 interactionVolume.setFacePosition(globalPosFace, 6);
829 if (intersection.neighbor())
831 int indexInOutside = intersection.indexInOutside();
833 interactionVolume.setIndexOnElement(indexInOutside, 6, 2);
834 DimVector normalOutside = normal;
837 interactionVolume.setNormal(normalOutside, 6, 2);
840 else if (indexInInside == 2)
842 interactionVolume.setIndexOnElement(indexInInside, 7, 2);
843 interactionVolume.setNormal(normal, 7, 2);
844 interactionVolume.setFacePosition(globalPosFace, 5);
846 if (intersection.neighbor())
848 int indexInOutside = intersection.indexInOutside();
850 interactionVolume.setIndexOnElement(indexInOutside, 5, 1);
851 DimVector normalOutside = normal;
854 interactionVolume.setNormal(normalOutside, 5, 1);
858 if (intersection.boundary())
860 if (elemVertMap[vIdxGlobal][0] == eIdxGlobal)
862 if (indexInInside == 1)
864 problem_.boundaryTypes(bcType, intersection);
865 PrimaryVariables boundValues(0.0);
867 interactionVolume.setBoundary(bcType, 0);
868 if (bcType.isNeumann(pressureEqIdx))
870 problem_.neumann(boundValues, intersection);
871 boundValues *= faceVol/4.0;
872 interactionVolume.setNeumannCondition(boundValues, 0);
874 if (bcType.hasDirichlet())
876 problem_.dirichlet(boundValues, intersection);
877 interactionVolume.setDirichletCondition(boundValues, 0);
880 else if (indexInInside == 3)
882 problem_.boundaryTypes(bcType, intersection);
883 PrimaryVariables boundValues(0.0);
885 interactionVolume.setBoundary(bcType, 3);
886 if (bcType.isNeumann(pressureEqIdx))
888 problem_.neumann(boundValues, intersection);
889 boundValues *= faceVol/4.0;
890 interactionVolume.setNeumannCondition(boundValues, 3);
892 if (bcType.hasDirichlet())
894 problem_.dirichlet(boundValues, intersection);
895 interactionVolume.setDirichletCondition(boundValues, 3);
898 else if (indexInInside == 5)
900 problem_.boundaryTypes(bcType, intersection);
901 PrimaryVariables boundValues(0.0);
903 interactionVolume.setBoundary(bcType, 8);
904 if (bcType.isNeumann(pressureEqIdx))
906 problem_.neumann(boundValues, intersection);
907 boundValues *= faceVol/4.0;
908 interactionVolume.setNeumannCondition(boundValues, 8);
910 if (bcType.hasDirichlet())
912 problem_.dirichlet(boundValues, intersection);
913 interactionVolume.setDirichletCondition(boundValues, 8);
917 if (elemVertMap[vIdxGlobal][1] == eIdxGlobal)
919 if (indexInInside == 3)
921 problem_.boundaryTypes(bcType, intersection);
922 PrimaryVariables boundValues(0.0);
924 interactionVolume.setBoundary(bcType, 1);
925 if (bcType.isNeumann(pressureEqIdx))
927 problem_.neumann(boundValues, intersection);
928 boundValues *= faceVol/4.0;
929 interactionVolume.setNeumannCondition(boundValues, 1);
931 if (bcType.hasDirichlet())
933 problem_.dirichlet(boundValues, intersection);
934 interactionVolume.setDirichletCondition(boundValues, 1);
937 else if (indexInInside == 0)
939 problem_.boundaryTypes(bcType, intersection);
940 PrimaryVariables boundValues(0.0);
942 interactionVolume.setBoundary(bcType, 0);
943 if (bcType.isNeumann(pressureEqIdx))
945 problem_.neumann(boundValues, intersection);
946 boundValues *= faceVol/4.0;
947 interactionVolume.setNeumannCondition(boundValues, 0);
949 if (bcType.hasDirichlet())
951 problem_.dirichlet(boundValues, intersection);
952 interactionVolume.setDirichletCondition(boundValues, 0);
955 else if (indexInInside == 5)
957 problem_.boundaryTypes(bcType, intersection);
958 PrimaryVariables boundValues(0.0);
960 interactionVolume.setBoundary(bcType, 9);
961 if (bcType.isNeumann(pressureEqIdx))
963 problem_.neumann(boundValues, intersection);
964 boundValues *= faceVol/4.0;
965 interactionVolume.setNeumannCondition(boundValues, 9);
967 if (bcType.hasDirichlet())
969 problem_.dirichlet(boundValues, intersection);
970 interactionVolume.setDirichletCondition(boundValues, 9);
974 if (elemVertMap[vIdxGlobal][2] == eIdxGlobal)
976 if (indexInInside == 2)
978 problem_.boundaryTypes(bcType, intersection);
979 PrimaryVariables boundValues(0.0);
981 interactionVolume.setBoundary(bcType, 3);
982 if (bcType.isNeumann(pressureEqIdx))
984 problem_.neumann(boundValues, intersection);
985 boundValues *= faceVol/4.0;
986 interactionVolume.setNeumannCondition(boundValues, 3);
988 if (bcType.hasDirichlet())
990 problem_.dirichlet(boundValues, intersection);
991 interactionVolume.setDirichletCondition(boundValues, 3);
994 else if (indexInInside == 1)
996 problem_.boundaryTypes(bcType, intersection);
997 PrimaryVariables boundValues(0.0);
999 interactionVolume.setBoundary(bcType, 2);
1000 if (bcType.isNeumann(pressureEqIdx))
1002 problem_.neumann(boundValues, intersection);
1003 boundValues *= faceVol/4.0;
1004 interactionVolume.setNeumannCondition(boundValues, 2);
1006 if (bcType.hasDirichlet())
1008 problem_.dirichlet(boundValues, intersection);
1009 interactionVolume.setDirichletCondition(boundValues, 2);
1012 else if (indexInInside == 5)
1014 problem_.boundaryTypes(bcType, intersection);
1015 PrimaryVariables boundValues(0.0);
1017 interactionVolume.setBoundary(bcType, 11);
1018 if (bcType.isNeumann(pressureEqIdx))
1020 problem_.neumann(boundValues, intersection);
1021 boundValues *= faceVol/4.0;
1022 interactionVolume.setNeumannCondition(boundValues, 11);
1024 if (bcType.hasDirichlet())
1026 problem_.dirichlet(boundValues, intersection);
1027 interactionVolume.setDirichletCondition(boundValues, 11);
1031 if (elemVertMap[vIdxGlobal][3] == eIdxGlobal)
1033 if (indexInInside == 0)
1035 problem_.boundaryTypes(bcType, intersection);
1036 PrimaryVariables boundValues(0.0);
1038 interactionVolume.setBoundary(bcType, 2);
1039 if (bcType.isNeumann(pressureEqIdx))
1041 problem_.neumann(boundValues, intersection);
1042 boundValues *= faceVol/4.0;
1043 interactionVolume.setNeumannCondition(boundValues, 2);
1045 if (bcType.hasDirichlet())
1047 problem_.dirichlet(boundValues, intersection);
1048 interactionVolume.setDirichletCondition(boundValues, 2);
1051 else if (indexInInside == 2)
1053 problem_.boundaryTypes(bcType, intersection);
1054 PrimaryVariables boundValues(0.0);
1056 interactionVolume.setBoundary(bcType, 1);
1057 if (bcType.isNeumann(pressureEqIdx))
1059 problem_.neumann(boundValues, intersection);
1060 boundValues *= faceVol/4.0;
1061 interactionVolume.setNeumannCondition(boundValues, 1);
1063 if (bcType.hasDirichlet())
1065 problem_.dirichlet(boundValues, intersection);
1066 interactionVolume.setDirichletCondition(boundValues, 1);
1069 else if (indexInInside == 5)
1071 problem_.boundaryTypes(bcType, intersection);
1072 PrimaryVariables boundValues(0.0);
1074 interactionVolume.setBoundary(bcType, 10);
1075 if (bcType.isNeumann(pressureEqIdx))
1077 problem_.neumann(boundValues, intersection);
1078 boundValues *= faceVol/4.0;
1079 interactionVolume.setNeumannCondition(boundValues, 10);
1081 if (bcType.hasDirichlet())
1083 problem_.dirichlet(boundValues, intersection);
1084 interactionVolume.setDirichletCondition(boundValues, 10);
1088 if (elemVertMap[vIdxGlobal][4] == eIdxGlobal)
1090 if (indexInInside == 4)
1092 problem_.boundaryTypes(bcType, intersection);
1093 PrimaryVariables boundValues(0.0);
1095 interactionVolume.setBoundary(bcType, 8);
1096 if (bcType.isNeumann(pressureEqIdx))
1098 problem_.neumann(boundValues, intersection);
1099 boundValues *= faceVol/4.0;
1100 interactionVolume.setNeumannCondition(boundValues, 8);
1102 if (bcType.hasDirichlet())
1104 problem_.dirichlet(boundValues, intersection);
1105 interactionVolume.setDirichletCondition(boundValues, 8);
1108 else if (indexInInside == 1)
1110 problem_.boundaryTypes(bcType, intersection);
1111 PrimaryVariables boundValues(0.0);
1113 interactionVolume.setBoundary(bcType, 4);
1114 if (bcType.isNeumann(pressureEqIdx))
1116 problem_.neumann(boundValues, intersection);
1117 boundValues *= faceVol/4.0;
1118 interactionVolume.setNeumannCondition(boundValues, 4);
1120 if (bcType.hasDirichlet())
1122 problem_.dirichlet(boundValues, intersection);
1123 interactionVolume.setDirichletCondition(boundValues, 4);
1126 else if (indexInInside == 3)
1128 problem_.boundaryTypes(bcType, intersection);
1129 PrimaryVariables boundValues(0.0);
1131 interactionVolume.setBoundary(bcType, 7);
1132 if (bcType.isNeumann(pressureEqIdx))
1134 problem_.neumann(boundValues, intersection);
1135 boundValues *= faceVol/4.0;
1136 interactionVolume.setNeumannCondition(boundValues, 7);
1138 if (bcType.hasDirichlet())
1140 problem_.dirichlet(boundValues, intersection);
1141 interactionVolume.setDirichletCondition(boundValues, 7);
1145 if (elemVertMap[vIdxGlobal][5] == eIdxGlobal)
1147 if (indexInInside == 4)
1149 problem_.boundaryTypes(bcType, intersection);
1150 PrimaryVariables boundValues(0.0);
1152 interactionVolume.setBoundary(bcType, 9);
1153 if (bcType.isNeumann(pressureEqIdx))
1155 problem_.neumann(boundValues, intersection);
1156 boundValues *= faceVol/4.0;
1157 interactionVolume.setNeumannCondition(boundValues, 9);
1159 if (bcType.hasDirichlet())
1161 problem_.dirichlet(boundValues, intersection);
1162 interactionVolume.setDirichletCondition(boundValues, 9);
1165 else if (indexInInside == 3)
1167 problem_.boundaryTypes(bcType, intersection);
1168 PrimaryVariables boundValues(0.0);
1170 interactionVolume.setBoundary(bcType, 5);
1171 if (bcType.isNeumann(pressureEqIdx))
1173 problem_.neumann(boundValues, intersection);
1174 boundValues *= faceVol/4.0;
1175 interactionVolume.setNeumannCondition(boundValues, 5);
1177 if (bcType.hasDirichlet())
1179 problem_.dirichlet(boundValues, intersection);
1180 interactionVolume.setDirichletCondition(boundValues, 5);
1183 else if (indexInInside == 0)
1185 problem_.boundaryTypes(bcType, intersection);
1186 PrimaryVariables boundValues(0.0);
1188 interactionVolume.setBoundary(bcType, 4);
1189 if (bcType.isNeumann(pressureEqIdx))
1191 problem_.neumann(boundValues, intersection);
1192 boundValues *= faceVol/4.0;
1193 interactionVolume.setNeumannCondition(boundValues, 4);
1195 if (bcType.hasDirichlet())
1197 problem_.dirichlet(boundValues, intersection);
1198 interactionVolume.setDirichletCondition(boundValues, 4);
1202 if (elemVertMap[vIdxGlobal][6] == eIdxGlobal)
1204 if (indexInInside == 4)
1206 problem_.boundaryTypes(bcType, intersection);
1207 PrimaryVariables boundValues(0.0);
1209 interactionVolume.setBoundary(bcType, 11);
1210 if (bcType.isNeumann(pressureEqIdx))
1212 problem_.neumann(boundValues, intersection);
1213 boundValues *= faceVol/4.0;
1214 interactionVolume.setNeumannCondition(boundValues, 11);
1216 if (bcType.hasDirichlet())
1218 problem_.dirichlet(boundValues, intersection);
1219 interactionVolume.setDirichletCondition(boundValues, 11);
1222 else if (indexInInside == 2)
1224 problem_.boundaryTypes(bcType, intersection);
1225 PrimaryVariables boundValues(0.0);
1227 interactionVolume.setBoundary(bcType, 7);
1228 if (bcType.isNeumann(pressureEqIdx))
1230 problem_.neumann(boundValues, intersection);
1231 boundValues *= faceVol/4.0;
1232 interactionVolume.setNeumannCondition(boundValues, 7);
1234 if (bcType.hasDirichlet())
1236 problem_.dirichlet(boundValues, intersection);
1237 interactionVolume.setDirichletCondition(boundValues, 7);
1240 else if (indexInInside == 1)
1242 problem_.boundaryTypes(bcType, intersection);
1243 PrimaryVariables boundValues(0.0);
1245 interactionVolume.setBoundary(bcType, 6);
1246 if (bcType.isNeumann(pressureEqIdx))
1248 problem_.neumann(boundValues, intersection);
1249 boundValues *= faceVol/4.0;
1250 interactionVolume.setNeumannCondition(boundValues, 6);
1252 if (bcType.hasDirichlet())
1254 problem_.dirichlet(boundValues, intersection);
1255 interactionVolume.setDirichletCondition(boundValues, 6);
1259 if (elemVertMap[vIdxGlobal][7] == eIdxGlobal)
1261 if (indexInInside == 4)
1263 problem_.boundaryTypes(bcType, intersection);
1264 PrimaryVariables boundValues(0.0);
1266 interactionVolume.setBoundary(bcType, 10);
1267 if (bcType.isNeumann(pressureEqIdx))
1269 problem_.neumann(boundValues, intersection);
1270 boundValues *= faceVol/4.0;
1271 interactionVolume.setNeumannCondition(boundValues, 10);
1273 if (bcType.hasDirichlet())
1275 problem_.dirichlet(boundValues, intersection);
1276 interactionVolume.setDirichletCondition(boundValues, 10);
1279 else if (indexInInside == 0)
1281 problem_.boundaryTypes(bcType, intersection);
1282 PrimaryVariables boundValues(0.0);
1284 interactionVolume.setBoundary(bcType, 6);
1285 if (bcType.isNeumann(pressureEqIdx))
1287 problem_.neumann(boundValues, intersection);
1288 boundValues *= faceVol/4.0;
1289 interactionVolume.setNeumannCondition(boundValues, 6);
1291 if (bcType.hasDirichlet())
1293 problem_.dirichlet(boundValues, intersection);
1294 interactionVolume.setDirichletCondition(boundValues, 6);
1297 else if (indexInInside == 2)
1299 problem_.boundaryTypes(bcType, intersection);
1300 PrimaryVariables boundValues(0.0);
1302 interactionVolume.setBoundary(bcType, 5);
1303 if (bcType.isNeumann(pressureEqIdx))
1305 problem_.neumann(boundValues, intersection);
1306 boundValues *= faceVol/4.0;
1307 interactionVolume.setNeumannCondition(boundValues, 5);
1309 if (bcType.hasDirichlet())
1311 problem_.dirichlet(boundValues, intersection);
1312 interactionVolume.setDirichletCondition(boundValues, 5);
1339template<
class TypeTag>
1341 const Vertex& vertex,
bool sameLevel)
1343 const DimVector& centerPos = vertex.geometry().center();
1345 interactionVolume.setCenterPosition(centerPos);
1349 auto element1 = interactionVolume.getSubVolumeElement(0);
1350 auto element8 = interactionVolume.getSubVolumeElement(7);
1352 const ElementGeometry& geometry1 = element1.geometry();
1353 const ElementGeometry& geometry8 = element8.geometry();
1355 const auto referenceElement = ReferenceElements::general(geometry1.type());
1357 DimVector edgeCoord(geometry1.global(referenceElement.position(9, dim - 1)));
1358 interactionVolume.setEdgePosition(edgeCoord, 2);
1359 edgeCoord = geometry1.global(referenceElement.position(3, dim - 1));
1360 interactionVolume.setEdgePosition(edgeCoord, 0);
1361 edgeCoord = geometry1.global(referenceElement.position(11, dim - 1));
1362 interactionVolume.setEdgePosition(edgeCoord, 5);
1364 edgeCoord = geometry8.global(referenceElement.position(4, dim - 1));
1365 interactionVolume.setEdgePosition(edgeCoord, 4);
1366 edgeCoord = geometry8.global(referenceElement.position(6, dim - 1));
1367 interactionVolume.setEdgePosition(edgeCoord, 3);
1368 edgeCoord = geometry8.global(referenceElement.position(0, dim - 1));
1369 interactionVolume.setEdgePosition(edgeCoord, 1);
1372 DimVector edgeCoord1(interactionVolume.getEdgePosition(0));
1373 DimVector edgeCoord2(interactionVolume.getEdgePosition(1));
1374 DimVector edgeCoord3(interactionVolume.getEdgePosition(2));
1375 DimVector edgeCoord4(interactionVolume.getEdgePosition(3));
1376 DimVector edgeCoord5(interactionVolume.getEdgePosition(4));
1377 DimVector edgeCoord6(interactionVolume.getEdgePosition(5));
1379 DimVector crossProductVector1(0);
1380 DimVector crossProductVector2(0);
1382 GlobalPosition globalPosFace = interactionVolume.getFacePosition(0);
1383 crossProductVector1 = centerPos - globalPosFace;
1384 crossProductVector2 = edgeCoord1 - edgeCoord3;
1385 Scalar faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1386 interactionVolume.setFaceArea(faceArea, 0);
1388 globalPosFace = interactionVolume.getFacePosition(1);
1389 crossProductVector1 = centerPos - globalPosFace;
1390 crossProductVector2 = edgeCoord1 - edgeCoord4;
1392 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1394 interactionVolume.setFaceArea(faceArea, 1);
1396 globalPosFace = interactionVolume.getFacePosition(2);
1397 crossProductVector1 = centerPos - globalPosFace;
1398 crossProductVector2 = edgeCoord1 - edgeCoord5;
1399 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1400 interactionVolume.setFaceArea(faceArea, 2);
1402 globalPosFace = interactionVolume.getFacePosition(3);
1403 crossProductVector1 = centerPos - globalPosFace;
1404 crossProductVector2 = edgeCoord1 - edgeCoord6;
1405 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1406 interactionVolume.setFaceArea(faceArea, 3);
1408 globalPosFace = interactionVolume.getFacePosition(4);
1409 crossProductVector1 = centerPos - globalPosFace;
1410 crossProductVector2 = edgeCoord2 - edgeCoord3;
1411 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1412 interactionVolume.setFaceArea(faceArea, 4);
1414 globalPosFace = interactionVolume.getFacePosition(5);
1415 crossProductVector1 = centerPos - globalPosFace;
1416 crossProductVector2 = edgeCoord2 - edgeCoord4;
1417 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1418 interactionVolume.setFaceArea(faceArea, 5);
1420 globalPosFace = interactionVolume.getFacePosition(6);
1421 crossProductVector1 = centerPos - globalPosFace;
1422 crossProductVector2 = edgeCoord2 - edgeCoord5;
1423 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1424 interactionVolume.setFaceArea(faceArea, 6);
1426 globalPosFace = interactionVolume.getFacePosition(7);
1427 crossProductVector1 = centerPos - globalPosFace;
1428 crossProductVector2 = edgeCoord2 - edgeCoord6;
1429 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1430 interactionVolume.setFaceArea(faceArea, 7);
1432 globalPosFace = interactionVolume.getFacePosition(8);
1433 crossProductVector1 = centerPos - globalPosFace;
1434 crossProductVector2 = edgeCoord3 - edgeCoord6;
1435 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1436 interactionVolume.setFaceArea(faceArea, 8);
1438 globalPosFace = interactionVolume.getFacePosition(9);
1439 crossProductVector1 = centerPos - globalPosFace;
1440 crossProductVector2 = edgeCoord3 - edgeCoord4;
1441 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1442 interactionVolume.setFaceArea(faceArea, 9);
1444 globalPosFace = interactionVolume.getFacePosition(10);
1445 crossProductVector1 = centerPos - globalPosFace;
1446 crossProductVector2 = edgeCoord4 - edgeCoord5;
1447 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1448 interactionVolume.setFaceArea(faceArea, 10);
1450 globalPosFace = interactionVolume.getFacePosition(11);
1451 crossProductVector1 = centerPos - globalPosFace;
1452 crossProductVector2 = edgeCoord5 - edgeCoord6;
1453 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1454 interactionVolume.setFaceArea(faceArea, 11);
1476template<
class TypeTag>
1478 const Vertex& vertex)
1480 const DimVector& centerPos = vertex.geometry().center();
1482 interactionVolume.setCenterPosition(centerPos);
1485 switch (interactionVolume.getElementNumber())
1489 if (interactionVolume.hasSubVolumeElement(0))
1491 interactionVolume.setOutsideFace(1);
1492 interactionVolume.setOutsideFace(2);
1493 interactionVolume.setOutsideFace(4);
1494 interactionVolume.setOutsideFace(5);
1495 interactionVolume.setOutsideFace(6);
1496 interactionVolume.setOutsideFace(7);
1497 interactionVolume.setOutsideFace(9);
1498 interactionVolume.setOutsideFace(10);
1499 interactionVolume.setOutsideFace(11);
1501 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1502 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 0)/4.0,0);
1503 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 1)/4.0,3);
1504 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 2)/4.0,8);
1506 if (interactionVolume.hasSubVolumeElement(1))
1508 interactionVolume.setOutsideFace(2);
1509 interactionVolume.setOutsideFace(3);
1510 interactionVolume.setOutsideFace(4);
1511 interactionVolume.setOutsideFace(5);
1512 interactionVolume.setOutsideFace(6);
1513 interactionVolume.setOutsideFace(7);
1514 interactionVolume.setOutsideFace(8);
1515 interactionVolume.setOutsideFace(10);
1516 interactionVolume.setOutsideFace(11);
1518 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1519 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 0)/4.0,1);
1520 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 1)/4.0,0);
1521 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 2)/4.0,9);
1523 if (interactionVolume.hasSubVolumeElement(2))
1525 interactionVolume.setOutsideFace(0);
1526 interactionVolume.setOutsideFace(1);
1527 interactionVolume.setOutsideFace(4);
1528 interactionVolume.setOutsideFace(5);
1529 interactionVolume.setOutsideFace(6);
1530 interactionVolume.setOutsideFace(7);
1531 interactionVolume.setOutsideFace(8);
1532 interactionVolume.setOutsideFace(9);
1533 interactionVolume.setOutsideFace(10);
1535 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1536 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 0)/4.0,3);
1537 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 1)/4.0,2);
1538 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 2)/4.0,11);
1540 if (interactionVolume.hasSubVolumeElement(3))
1542 interactionVolume.setOutsideFace(0);
1543 interactionVolume.setOutsideFace(3);
1544 interactionVolume.setOutsideFace(4);
1545 interactionVolume.setOutsideFace(5);
1546 interactionVolume.setOutsideFace(6);
1547 interactionVolume.setOutsideFace(7);
1548 interactionVolume.setOutsideFace(8);
1549 interactionVolume.setOutsideFace(9);
1550 interactionVolume.setOutsideFace(11);
1552 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1553 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 0)/4.0,2);
1554 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 1)/4.0,1);
1555 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 2)/4.0,10);
1557 if (interactionVolume.hasSubVolumeElement(4))
1559 interactionVolume.setOutsideFace(0);
1560 interactionVolume.setOutsideFace(1);
1561 interactionVolume.setOutsideFace(2);
1562 interactionVolume.setOutsideFace(3);
1563 interactionVolume.setOutsideFace(5);
1564 interactionVolume.setOutsideFace(6);
1565 interactionVolume.setOutsideFace(9);
1566 interactionVolume.setOutsideFace(10);
1567 interactionVolume.setOutsideFace(11);
1569 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1570 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 0)/4.0,8);
1571 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 1)/4.0,4);
1572 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 2)/4.0,7);
1574 if (interactionVolume.hasSubVolumeElement(5))
1576 interactionVolume.setOutsideFace(0);
1577 interactionVolume.setOutsideFace(1);
1578 interactionVolume.setOutsideFace(2);
1579 interactionVolume.setOutsideFace(3);
1580 interactionVolume.setOutsideFace(6);
1581 interactionVolume.setOutsideFace(7);
1582 interactionVolume.setOutsideFace(8);
1583 interactionVolume.setOutsideFace(10);
1584 interactionVolume.setOutsideFace(11);
1586 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1587 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 0)/4.0,9);
1588 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 1)/4.0,5);
1589 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 2)/4.0,4);
1591 if (interactionVolume.hasSubVolumeElement(6))
1593 interactionVolume.setOutsideFace(0);
1594 interactionVolume.setOutsideFace(1);
1595 interactionVolume.setOutsideFace(2);
1596 interactionVolume.setOutsideFace(3);
1597 interactionVolume.setOutsideFace(4);
1598 interactionVolume.setOutsideFace(5);
1599 interactionVolume.setOutsideFace(8);
1600 interactionVolume.setOutsideFace(9);
1601 interactionVolume.setOutsideFace(10);
1603 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1604 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 0)/4.0,11);
1605 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 1)/4.0,7);
1606 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 2)/4.0,6);
1608 if (interactionVolume.hasSubVolumeElement(7))
1610 interactionVolume.setOutsideFace(0);
1611 interactionVolume.setOutsideFace(1);
1612 interactionVolume.setOutsideFace(2);
1613 interactionVolume.setOutsideFace(3);
1614 interactionVolume.setOutsideFace(4);
1615 interactionVolume.setOutsideFace(7);
1616 interactionVolume.setOutsideFace(8);
1617 interactionVolume.setOutsideFace(9);
1618 interactionVolume.setOutsideFace(11);
1620 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1621 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 0)/4.0,10);
1622 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 1)/4.0,6);
1623 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 2)/4.0,5);
1630 if (interactionVolume.hasSubVolumeElement(0))
1632 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1633 if (interactionVolume.hasSubVolumeElement(1))
1635 interactionVolume.setOutsideFace(4);
1636 interactionVolume.setOutsideFace(5);
1637 interactionVolume.setOutsideFace(6);
1638 interactionVolume.setOutsideFace(7);
1639 interactionVolume.setOutsideFace(2);
1640 interactionVolume.setOutsideFace(10);
1641 interactionVolume.setOutsideFace(11);
1643 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1644 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0,3);
1645 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0,8);
1646 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0,1);
1647 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0,9);
1651 if (interactionVolume.hasSubVolumeElement(2))
1653 interactionVolume.setOutsideFace(4);
1654 interactionVolume.setOutsideFace(5);
1655 interactionVolume.setOutsideFace(6);
1656 interactionVolume.setOutsideFace(7);
1657 interactionVolume.setOutsideFace(1);
1658 interactionVolume.setOutsideFace(9);
1659 interactionVolume.setOutsideFace(10);
1661 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1662 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0,0);
1663 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0,8);
1664 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0,2);
1665 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 2)/4.0,11);
1669 if (interactionVolume.hasSubVolumeElement(4))
1671 interactionVolume.setOutsideFace(1);
1672 interactionVolume.setOutsideFace(5);
1673 interactionVolume.setOutsideFace(9);
1674 interactionVolume.setOutsideFace(10);
1675 interactionVolume.setOutsideFace(2);
1676 interactionVolume.setOutsideFace(6);
1677 interactionVolume.setOutsideFace(11);
1679 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1680 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0,0);
1681 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0,3);
1682 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 1)/4.0,4);
1683 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 2)/4.0,7);
1688 if (interactionVolume.hasSubVolumeElement(7))
1690 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1691 if (interactionVolume.hasSubVolumeElement(5))
1693 interactionVolume.setOutsideFace(0);
1694 interactionVolume.setOutsideFace(1);
1695 interactionVolume.setOutsideFace(2);
1696 interactionVolume.setOutsideFace(3);
1697 interactionVolume.setOutsideFace(7);
1698 interactionVolume.setOutsideFace(8);
1699 interactionVolume.setOutsideFace(11);
1701 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1702 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0,10);
1703 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0,6);
1704 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 0)/4.0,9);
1705 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 2)/4.0,4);
1709 if (interactionVolume.hasSubVolumeElement(6))
1711 interactionVolume.setOutsideFace(0);
1712 interactionVolume.setOutsideFace(1);
1713 interactionVolume.setOutsideFace(2);
1714 interactionVolume.setOutsideFace(3);
1715 interactionVolume.setOutsideFace(4);
1716 interactionVolume.setOutsideFace(8);
1717 interactionVolume.setOutsideFace(9);
1719 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1720 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0,10);
1721 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0,5);
1722 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 0)/4.0,11);
1723 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 1)/4.0,7);
1727 if (interactionVolume.hasSubVolumeElement(3))
1729 interactionVolume.setOutsideFace(0);
1730 interactionVolume.setOutsideFace(4);
1731 interactionVolume.setOutsideFace(8);
1732 interactionVolume.setOutsideFace(9);
1733 interactionVolume.setOutsideFace(3);
1734 interactionVolume.setOutsideFace(7);
1735 interactionVolume.setOutsideFace(11);
1737 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1738 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0,6);
1739 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0,5);
1740 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 3, 0)/4.0,2);
1741 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 3, 1)/4.0,1);
1746 if (interactionVolume.hasSubVolumeElement(5))
1748 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1749 if (interactionVolume.hasSubVolumeElement(1))
1751 interactionVolume.setOutsideFace(3);
1752 interactionVolume.setOutsideFace(7);
1753 interactionVolume.setOutsideFace(8);
1754 interactionVolume.setOutsideFace(11);
1755 interactionVolume.setOutsideFace(2);
1756 interactionVolume.setOutsideFace(6);
1757 interactionVolume.setOutsideFace(10);
1759 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1760 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 1)/4.0,5);
1761 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 2)/4.0,4);
1762 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0,1);
1763 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 1)/4.0,0);
1767 if (interactionVolume.hasSubVolumeElement(4))
1769 interactionVolume.setOutsideFace(0);
1770 interactionVolume.setOutsideFace(1);
1771 interactionVolume.setOutsideFace(2);
1772 interactionVolume.setOutsideFace(3);
1773 interactionVolume.setOutsideFace(6);
1774 interactionVolume.setOutsideFace(10);
1775 interactionVolume.setOutsideFace(11);
1777 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1778 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 0)/4.0,9);
1779 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 1)/4.0,5);
1780 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 0)/4.0,8);
1781 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 2)/4.0,7);
1786 if (interactionVolume.hasSubVolumeElement(6))
1788 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1789 if (interactionVolume.hasSubVolumeElement(4))
1791 interactionVolume.setOutsideFace(1);
1792 interactionVolume.setOutsideFace(5);
1793 interactionVolume.setOutsideFace(9);
1794 interactionVolume.setOutsideFace(10);
1795 interactionVolume.setOutsideFace(0);
1796 interactionVolume.setOutsideFace(2);
1797 interactionVolume.setOutsideFace(3);
1799 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1800 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 0)/4.0,11);
1801 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 2)/4.0,6);
1802 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 0)/4.0,8);
1803 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 1)/4.0,4);
1807 if (interactionVolume.hasSubVolumeElement(2))
1809 interactionVolume.setOutsideFace(1);
1810 interactionVolume.setOutsideFace(5);
1811 interactionVolume.setOutsideFace(9);
1812 interactionVolume.setOutsideFace(10);
1813 interactionVolume.setOutsideFace(0);
1814 interactionVolume.setOutsideFace(4);
1815 interactionVolume.setOutsideFace(8);
1817 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1818 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 1)/4.0,7);
1819 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 2)/4.0,6);
1820 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 0)/4.0,3);
1821 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0,2);
1826 if (interactionVolume.hasSubVolumeElement(3))
1828 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1829 if (interactionVolume.hasSubVolumeElement(1))
1831 interactionVolume.setOutsideFace(4);
1832 interactionVolume.setOutsideFace(5);
1833 interactionVolume.setOutsideFace(6);
1834 interactionVolume.setOutsideFace(7);
1835 interactionVolume.setOutsideFace(3);
1836 interactionVolume.setOutsideFace(8);
1837 interactionVolume.setOutsideFace(11);
1839 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1840 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 0)/4.0,2);
1841 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 2)/4.0,10);
1842 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 1)/4.0,0);
1843 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0,9);
1847 if (interactionVolume.hasSubVolumeElement(2))
1849 interactionVolume.setOutsideFace(4);
1850 interactionVolume.setOutsideFace(5);
1851 interactionVolume.setOutsideFace(6);
1852 interactionVolume.setOutsideFace(7);
1853 interactionVolume.setOutsideFace(0);
1854 interactionVolume.setOutsideFace(8);
1855 interactionVolume.setOutsideFace(9);
1857 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1858 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 1)/4.0,1);
1859 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 2)/4.0,10);
1860 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 0)/4.0,3);
1861 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 2)/4.0,11);
1871 if (interactionVolume.hasSubVolumeElement(0))
1873 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1874 if (interactionVolume.hasSubVolumeElement(1))
1876 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1877 if (interactionVolume.hasSubVolumeElement(2) && interactionVolume.hasSubVolumeElement(3))
1879 interactionVolume.setOutsideFace(4);
1880 interactionVolume.setOutsideFace(5);
1881 interactionVolume.setOutsideFace(6);
1882 interactionVolume.setOutsideFace(7);
1884 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1885 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1886 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0, 8);
1887 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0, 9);
1888 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 2, 2)/4.0, 10);
1889 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 2)/4.0, 11);
1893 if (interactionVolume.hasSubVolumeElement(4) && interactionVolume.hasSubVolumeElement(5))
1895 interactionVolume.setOutsideFace(2);
1896 interactionVolume.setOutsideFace(6);
1897 interactionVolume.setOutsideFace(10);
1898 interactionVolume.setOutsideFace(11);
1900 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1901 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1902 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0, 3);
1903 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0, 1);
1904 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 2)/4.0, 7);
1905 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 5, 1)/4.0, 5);
1910 if (interactionVolume.hasSubVolumeElement(2) && interactionVolume.hasSubVolumeElement(4)
1911 && interactionVolume.hasSubVolumeElement(6))
1913 interactionVolume.setOutsideFace(1);
1914 interactionVolume.setOutsideFace(5);
1915 interactionVolume.setOutsideFace(9);
1916 interactionVolume.setOutsideFace(10);
1918 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1919 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1920 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1921 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0, 0);
1922 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0, 2);
1923 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 1)/4.0, 4);
1924 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 6, 2)/4.0, 6);
1929 if (interactionVolume.hasSubVolumeElement(7))
1931 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1932 if (interactionVolume.hasSubVolumeElement(5))
1934 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1935 if (interactionVolume.hasSubVolumeElement(1) && interactionVolume.hasSubVolumeElement(3))
1937 interactionVolume.setOutsideFace(3);
1938 interactionVolume.setOutsideFace(7);
1939 interactionVolume.setOutsideFace(8);
1940 interactionVolume.setOutsideFace(11);
1942 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1943 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1944 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0, 6);
1945 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 2)/4.0, 4);
1946 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 1, 1)/4.0, 0);
1947 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 0)/4.0, 2);
1951 if (interactionVolume.hasSubVolumeElement(4) && interactionVolume.hasSubVolumeElement(6))
1953 interactionVolume.setOutsideFace(0);
1954 interactionVolume.setOutsideFace(1);
1955 interactionVolume.setOutsideFace(2);
1956 interactionVolume.setOutsideFace(3);
1958 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1959 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1960 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0, 10);
1961 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 0)/4.0, 9);
1962 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 0)/4.0, 8);
1963 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 6, 0)/4.0, 11);
1968 if (interactionVolume.hasSubVolumeElement(6) && interactionVolume.hasSubVolumeElement(2)
1969 && interactionVolume.hasSubVolumeElement(3))
1971 interactionVolume.setOutsideFace(0);
1972 interactionVolume.setOutsideFace(4);
1973 interactionVolume.setOutsideFace(8);
1974 interactionVolume.setOutsideFace(9);
1976 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1977 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1978 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1979 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0, 5);
1980 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 1)/4.0, 7);
1981 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 2, 0)/4.0, 3);
1982 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 1)/4.0, 1);
1990 DUNE_THROW(Dune::NotImplemented,
"Boundary shape not implemented");
1999template<
class TypeTag>
2002 std::vector < std::vector<int> > elemVertMap(problem_.gridView().size(dim), std::vector<int>(8, -1));
2005 for (
const auto& element : elements(problem_.gridView()))
2006 storeSubVolumeElements(element, elemVertMap);
2008 for (
unsigned int i = 0; i < interactionVolumes_.size(); i++)
2009 if (interactionVolumes_[i].getElementNumber() == 0)
2010 interactionVolumes_[i].printInteractionVolumeInfo();
2013 for (
const auto& element : elements(problem_.gridView()))
2014 storeIntersectionInfo(element, elemVertMap);
2018 for (
const auto& vertex : vertices(problem_.gridView()))
2020 int vIdxGlobal = problem_.variables().index(vertex);
2022 InteractionVolume& interactionVolume = interactionVolumes_[vIdxGlobal];
2024 if (interactionVolume.getElementNumber() == 8)
2026 storeInnerInteractionVolume(interactionVolume, vertex);
2028 else if (interactionVolume.isBoundaryInteractionVolume())
2030 storeBoundaryInteractionVolume(interactionVolume, vertex);
2034 DUNE_THROW(Dune::NotImplemented,
"Interaction volume is no boundary volume but consists of less than 8 elements");
2043 if (!interactionVolume.isBoundaryInteractionVolume())
2045 auto element1 = interactionVolume.getSubVolumeElement(0);
2046 auto element2 = interactionVolume.getSubVolumeElement(1);
2047 auto element3 = interactionVolume.getSubVolumeElement(2);
2048 auto element4 = interactionVolume.getSubVolumeElement(3);
2049 auto element5 = interactionVolume.getSubVolumeElement(4);
2050 auto element6 = interactionVolume.getSubVolumeElement(5);
2051 auto element7 = interactionVolume.getSubVolumeElement(6);
2052 auto element8 = interactionVolume.getSubVolumeElement(7);
2054 int eIdxGlobal1 = problem_.variables().index(element1);
2055 int eIdxGlobal2 = problem_.variables().index(element2);
2056 int eIdxGlobal3 = problem_.variables().index(element3);
2057 int eIdxGlobal4 = problem_.variables().index(element4);
2058 int eIdxGlobal5 = problem_.variables().index(element5);
2059 int eIdxGlobal6 = problem_.variables().index(element6);
2060 int eIdxGlobal7 = problem_.variables().index(element7);
2061 int eIdxGlobal8 = problem_.variables().index(element8);
2063 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 0), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 0));
2064 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 1), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 1));
2065 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 2), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 2));
2066 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 0), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 0));
2067 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 1), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 1));
2068 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 2), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 2));
2069 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 0), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 0));
2070 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 1), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 1));
2071 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 2), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 2));
2072 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 0), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 0));
2073 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 1), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 1));
2074 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 2), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 2));
2075 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 0), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 0));
2076 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 1), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 1));
2077 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 2), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 2));
2078 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 0), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 0));
2079 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 1), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 1));
2080 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 2), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 2));
2081 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 0), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 0));
2082 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 1), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 1));
2083 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 2), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 2));
2084 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 0), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 0));
2085 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 1), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 1));
2086 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 2), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 2));
#define GET_PROP(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:281
#define GET_PROP_TYPE(TypeTag, PropTagName)
Definition: propertysystemmacros.hh:283
Class including the information of an interaction volume of a MPFA 3D method that does not change wit...
Dune::FieldVector< Scalar, 3 > crossProduct(const Dune::FieldVector< Scalar, 3 > &vec1, const Dune::FieldVector< Scalar, 3 > &vec2)
Cross product of two vectors in three-dimensional Euclidean space.
Definition: math.hh:631
Dune::IteratorRange< typename MultiDomainGlue< DomainGridView, TargetGridView, DomainMapper, TargetMapper >::Intersections::const_iterator > intersections(const MultiDomainGlue< DomainGridView, TargetGridView, DomainMapper, TargetMapper > &glue)
Range generator to iterate with range-based for loops over all intersections as follows: for (const a...
Definition: glue.hh:62
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
Property tag MPFAInteractionVolumeContainer
Type of the data container for one interaction volume.
Definition: porousmediumflow/sequential/cellcentered/mpfa/properties.hh:97
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
void storeIntersectionInfo(const Element &element, std::vector< std::vector< int > > &elemVertMap)
Stores information with respect to DUNE intersections in the interaction volumes.
Definition: 3dinteractionvolumecontainer.hh:370
void storeBoundaryInteractionVolume(InteractionVolume &interactionVolume, const Vertex &vertex)
Stores additional information for interaction volumes of boundary vertices.
Definition: 3dinteractionvolumecontainer.hh:1477
GlobalInteractionVolumeVector interactionVolumes_
Definition: 3dinteractionvolumecontainer.hh:295
FvMpfaL3dInteractionVolumeContainer(Problem &problem)
Constructs a FvMpfaL3dInteractionVolumeContainer object.
Definition: 3dinteractionvolumecontainer.hh:274
FaceAreaVector realFluxFaceArea_
Definition: 3dinteractionvolumecontainer.hh:296
Scalar getRealFaceArea(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the face area of the element.
Definition: 3dinteractionvolumecontainer.hh:247
GlobalInteractionVolumeVector & interactionVolumesGlobal() const
Returns the interaction volumes container.
Definition: 3dinteractionvolumecontainer.hh:164
Scalar faceAreaFactor(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the area weighting factor for the fluxes.
Definition: 3dinteractionvolumecontainer.hh:180
Problem & problem_
Definition: 3dinteractionvolumecontainer.hh:293
Scalar faceAreaFactor(int elemGlobalIdx, int indexInInside)
Returns the area weighting factor for the fluxes.
Definition: 3dinteractionvolumecontainer.hh:197
GlobalInteractionVolumeVector & interactionVolumesGlobal()
Returns the interaction volumes container.
Definition: 3dinteractionvolumecontainer.hh:158
void initialize(bool solveTwice=true)
Initializes the interaction volume container.
Definition: 3dinteractionvolumecontainer.hh:130
void addRealFluxFaceArea_(Scalar faceArea, int eIdxGlobal, int fIdx)
Definition: 3dinteractionvolumecontainer.hh:284
InteractionVolume & interactionVolume(int vertexIdx) const
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:152
void update()
Updates the interaction volume container.
Definition: 3dinteractionvolumecontainer.hh:112
void storeSubVolumeElements(const Element &element, std::vector< std::vector< int > > &elemVertMap)
Function for storing the elements of an interaction volume and constructing a map from a vertex to it...
Definition: 3dinteractionvolumecontainer.hh:319
void addRealFaceArea_(Scalar faceArea, int eIdxGlobal, int fIdx)
Definition: 3dinteractionvolumecontainer.hh:288
Scalar getRealFluxFaceArea(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the area trough which fluxes are calculated by the MPFA.
Definition: 3dinteractionvolumecontainer.hh:215
Scalar getRealFaceArea(int elemGlobalIdx, int indexInInside)
Returns the face area of the element.
Definition: 3dinteractionvolumecontainer.hh:262
InteractionVolume & interactionVolume(int vertexIdx)
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:142
Scalar getRealFluxFaceArea(int elemGlobalIdx, int indexInInside)
Returns the area trough which fluxes are calculated by the MPFA.
Definition: 3dinteractionvolumecontainer.hh:230
void storeInnerInteractionVolume(InteractionVolume &interactionVolume, const Vertex &vertex, bool sameLevel=true)
Stores additional information which can be constructed for interaction volumes of non-boundary vertic...
Definition: 3dinteractionvolumecontainer.hh:1340
Properties for a MPFA method.
Base file for properties related to sequential IMPET algorithms.