24#ifndef DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
25#define DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
44template<
class TypeTag>
52 dim = GridView::dimension, dimWorld = GridView::dimensionworld
62 using PrimaryVariables =
typename SolutionTypes::PrimaryVariables;
64 using Element =
typename GridView::Traits::template Codim<0>::Entity;
65 using Vertex =
typename GridView::Traits::template Codim<dim>::Entity;
66 using ElementGeometry =
typename Element::Geometry;
68 using Intersection =
typename GridView::Intersection;
69 using IntersectionGeometry =
typename Intersection::Geometry;
71 using GlobalPosition =
typename ElementGeometry::GlobalCoordinate;
72 using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
74 using DimVector = Dune::FieldVector<Scalar, dim>;
78 pressureEqIdx = Indices::pressureEqIdx,
83 innerEdgeFace = 2, innerSideFace = 1
87 realFaceArea = 0, fluxFaceArea = 1
95 using GlobalInteractionVolumeVector = std::vector<InteractionVolume>;
96 using FaceAreaVector = std::vector<Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2*dim> >;
103 void storeInteractionVolumeInfo();
117 Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2 * dim>(Dune::FieldVector<Scalar, 2>(0.0)));
120 asImp_().storeInteractionVolumeInfo();
278 DUNE_THROW(Dune::NotImplemented,
"Dimension not supported!");
298 Implementation &asImp_()
299 {
return *
static_cast<Implementation *
>(
this); }
302 const Implementation &asImp_()
const
303 {
return *
static_cast<const Implementation *
>(
this); }
317template<
class TypeTag>
319 std::vector < std::vector<int> >& elemVertMap)
321 int eIdxGlobal = problem_.variables().index(element);
322 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 0, dim);
323 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 7);
324 elemVertMap[vIdxGlobal][7] = eIdxGlobal;
326 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 1, dim);
327 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 6);
328 elemVertMap[vIdxGlobal][6] = eIdxGlobal;
330 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 2, dim);
331 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 5);
332 elemVertMap[vIdxGlobal][5] = eIdxGlobal;
334 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 3, dim);
335 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 4);
336 elemVertMap[vIdxGlobal][4] = eIdxGlobal;
338 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 4, dim);
339 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 3);
340 elemVertMap[vIdxGlobal][3] = eIdxGlobal;
342 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 5, dim);
343 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 2);
344 elemVertMap[vIdxGlobal][2] = eIdxGlobal;
346 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 6, dim);
347 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 1);
348 elemVertMap[vIdxGlobal][1] = eIdxGlobal;
350 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 7, dim);
351 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 0);
352 elemVertMap[vIdxGlobal][0] = eIdxGlobal;
368template<
class TypeTag>
370 std::vector < std::vector<int> >& elemVertMap)
372 BoundaryTypes bcType;
374 int eIdxGlobal = problem_.variables().index(element);
376 const ElementGeometry& geometry = element.geometry();
377 const auto refElement = referenceElement(geometry);
379 int levelI = element.level();
382 for (
const auto& intersection : intersections(problem_.gridView(), element))
384 int indexInInside = intersection.indexInInside();
386 DimVector
normal = intersection.centerUnitOuterNormal();
388 const IntersectionGeometry& isGeometry = intersection.geometry();
390 Scalar faceVol = isGeometry.volume();
392 const DimVector& globalPosFace = isGeometry.center();
394 bool takeIntersection =
true;
395 if (intersection.neighbor())
397 auto outside = intersection.outside();
398 int eIdxGlobalJ = problem_.variables().index(outside);
400 if (levelI == outside.level() && eIdxGlobal > eIdxGlobalJ)
401 takeIntersection =
false;
402 if (levelI < outside.level())
403 takeIntersection =
false;
406 if (takeIntersection)
408 addRealFaceArea_(faceVol, eIdxGlobal, indexInInside);
409 if (intersection.neighbor())
411 int eIdxGlobalJ = problem_.variables().index(intersection.outside());
412 addRealFaceArea_(faceVol, eIdxGlobalJ, intersection.indexInOutside());
415 for (
int i = 0; i < isGeometry.corners(); i++)
417 int localVertIdx = refElement.subEntity(indexInInside, 1, i, dim);
419 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, localVertIdx, dim);
423 if (elemVertMap[vIdxGlobal][0] == eIdxGlobal)
425 if (indexInInside == 1)
427 interactionVolume.setIndexOnElement(indexInInside, 0, 0);
428 interactionVolume.setNormal(
normal, 0, 0);
429 interactionVolume.setFacePosition(globalPosFace, 0);
431 if (intersection.neighbor())
433 int indexInOutside = intersection.indexInOutside();
435 interactionVolume.setIndexOnElement(indexInOutside, 1, 1);
436 DimVector normalOutside =
normal;
439 interactionVolume.setNormal(normalOutside, 1, 1);
442 else if (indexInInside == 3)
444 interactionVolume.setIndexOnElement(indexInInside, 0, 1);
445 interactionVolume.setNormal(
normal, 0, 1);
446 interactionVolume.setFacePosition(globalPosFace, 3);
448 if (intersection.neighbor())
450 int indexInOutside = intersection.indexInOutside();
452 interactionVolume.setIndexOnElement(indexInOutside, 2, 0);
453 DimVector normalOutside =
normal;
456 interactionVolume.setNormal(normalOutside, 2, 0);
459 else if (indexInInside == 5)
461 interactionVolume.setIndexOnElement(indexInInside, 0, 2);
462 interactionVolume.setNormal(
normal, 0, 2);
463 interactionVolume.setFacePosition(globalPosFace, 8);
465 if (intersection.neighbor())
467 int indexInOutside = intersection.indexInOutside();
469 interactionVolume.setIndexOnElement(indexInOutside, 4, 0);
470 DimVector normalOutside =
normal;
473 interactionVolume.setNormal(normalOutside, 4, 0);
477 if (elemVertMap[vIdxGlobal][1] == eIdxGlobal)
479 if (indexInInside == 3)
481 interactionVolume.setIndexOnElement(indexInInside, 1, 0);
482 interactionVolume.setNormal(
normal, 1, 0);
483 interactionVolume.setFacePosition(globalPosFace, 1);
485 if (intersection.neighbor())
487 int indexInOutside = intersection.indexInOutside();
489 interactionVolume.setIndexOnElement(indexInOutside, 3, 1);
490 DimVector normalOutside =
normal;
493 interactionVolume.setNormal(normalOutside, 3, 1);
496 else if (indexInInside == 0)
498 interactionVolume.setIndexOnElement(indexInInside, 1, 1);
499 interactionVolume.setNormal(
normal, 1, 1);
500 interactionVolume.setFacePosition(globalPosFace, 0);
502 if (intersection.neighbor())
504 int indexInOutside = intersection.indexInOutside();
506 interactionVolume.setIndexOnElement(indexInOutside, 0, 0);
507 DimVector normalOutside =
normal;
510 interactionVolume.setNormal(normalOutside, 0, 0);
513 else if (indexInInside == 5)
515 interactionVolume.setIndexOnElement(indexInInside, 1, 2);
516 interactionVolume.setNormal(
normal, 1, 2);
517 interactionVolume.setFacePosition(globalPosFace, 9);
519 if (intersection.neighbor())
521 int indexInOutside = intersection.indexInOutside();
523 interactionVolume.setIndexOnElement(indexInOutside, 5, 0);
524 DimVector normalOutside =
normal;
527 interactionVolume.setNormal(normalOutside, 5, 0);
531 if (elemVertMap[vIdxGlobal][2] == eIdxGlobal)
533 if (indexInInside == 2)
535 interactionVolume.setIndexOnElement(indexInInside, 2, 0);
536 interactionVolume.setNormal(
normal, 2, 0);
537 interactionVolume.setFacePosition(globalPosFace, 3);
539 if (intersection.neighbor())
541 int indexInOutside = intersection.indexInOutside();
543 interactionVolume.setIndexOnElement(indexInOutside, 0, 1);
544 DimVector normalOutside =
normal;
547 interactionVolume.setNormal(normalOutside, 0, 1);
550 else if (indexInInside == 1)
552 interactionVolume.setIndexOnElement(indexInInside, 2, 1);
553 interactionVolume.setNormal(
normal, 2, 1);
554 interactionVolume.setFacePosition(globalPosFace, 2);
556 if (intersection.neighbor())
558 int indexInOutside = intersection.indexInOutside();
560 interactionVolume.setIndexOnElement(indexInOutside, 3, 0);
561 DimVector normalOutside =
normal;
564 interactionVolume.setNormal(normalOutside, 3, 0);
567 else if (indexInInside == 5)
569 interactionVolume.setIndexOnElement(indexInInside, 2, 2);
570 interactionVolume.setNormal(
normal, 2, 2);
571 interactionVolume.setFacePosition(globalPosFace, 11);
573 if (intersection.neighbor())
575 int indexInOutside = intersection.indexInOutside();
577 interactionVolume.setIndexOnElement(indexInOutside, 6, 0);
578 DimVector normalOutside =
normal;
581 interactionVolume.setNormal(normalOutside, 6, 0);
585 if (elemVertMap[vIdxGlobal][3] == eIdxGlobal)
587 if (indexInInside == 0)
589 interactionVolume.setIndexOnElement(indexInInside, 3, 0);
590 interactionVolume.setNormal(
normal, 3, 0);
591 interactionVolume.setFacePosition(globalPosFace, 2);
593 if (intersection.neighbor())
595 int indexInOutside = intersection.indexInOutside();
597 interactionVolume.setIndexOnElement(indexInOutside, 2, 1);
598 DimVector normalOutside =
normal;
601 interactionVolume.setNormal(normalOutside, 2, 1);
604 else if (indexInInside == 2)
606 interactionVolume.setIndexOnElement(indexInInside, 3, 1);
607 interactionVolume.setNormal(
normal, 3, 1);
608 interactionVolume.setFacePosition(globalPosFace, 1);
610 if (intersection.neighbor())
612 int indexInOutside = intersection.indexInOutside();
614 interactionVolume.setIndexOnElement(indexInOutside, 1, 0);
615 DimVector normalOutside =
normal;
618 interactionVolume.setNormal(normalOutside, 1, 0);
621 else if (indexInInside == 5)
623 interactionVolume.setIndexOnElement(indexInInside, 3, 2);
624 interactionVolume.setNormal(
normal, 3, 2);
625 interactionVolume.setFacePosition(globalPosFace, 10);
627 if (intersection.neighbor())
629 int indexInOutside = intersection.indexInOutside();
631 interactionVolume.setIndexOnElement(indexInOutside, 7, 0);
632 DimVector normalOutside =
normal;
635 interactionVolume.setNormal(normalOutside, 7, 0);
639 if (elemVertMap[vIdxGlobal][4] == eIdxGlobal)
641 if (indexInInside == 4)
643 interactionVolume.setIndexOnElement(indexInInside, 4, 0);
644 interactionVolume.setNormal(
normal, 4, 0);
645 interactionVolume.setFacePosition(globalPosFace, 8);
647 if (intersection.neighbor())
649 int indexInOutside = intersection.indexInOutside();
651 interactionVolume.setIndexOnElement(indexInOutside, 0, 2);
652 DimVector normalOutside =
normal;
655 interactionVolume.setNormal(normalOutside, 0, 2);
658 else if (indexInInside == 1)
660 interactionVolume.setIndexOnElement(indexInInside, 4, 1);
661 interactionVolume.setNormal(
normal, 4, 1);
662 interactionVolume.setFacePosition(globalPosFace, 4);
664 if (intersection.neighbor())
666 int indexInOutside = intersection.indexInOutside();
668 interactionVolume.setIndexOnElement(indexInOutside, 5, 2);
669 DimVector normalOutside =
normal;
672 interactionVolume.setNormal(normalOutside, 5, 2);
675 else if (indexInInside == 3)
677 interactionVolume.setIndexOnElement(indexInInside, 4, 2);
678 interactionVolume.setNormal(
normal, 4, 2);
679 interactionVolume.setFacePosition(globalPosFace, 7);
681 if (intersection.neighbor())
683 int indexInOutside = intersection.indexInOutside();
685 interactionVolume.setIndexOnElement(indexInOutside, 6, 1);
686 DimVector normalOutside =
normal;
689 interactionVolume.setNormal(normalOutside, 6, 1);
693 if (elemVertMap[vIdxGlobal][5] == eIdxGlobal)
695 if (indexInInside == 4)
697 interactionVolume.setIndexOnElement(indexInInside, 5, 0);
698 interactionVolume.setNormal(
normal, 5, 0);
699 interactionVolume.setFacePosition(globalPosFace, 9);
701 if (intersection.neighbor())
703 int indexInOutside = intersection.indexInOutside();
705 interactionVolume.setIndexOnElement(indexInOutside, 1, 2);
706 DimVector normalOutside =
normal;
709 interactionVolume.setNormal(normalOutside, 1, 2);
712 else if (indexInInside == 3)
714 interactionVolume.setIndexOnElement(indexInInside, 5, 1);
715 interactionVolume.setNormal(
normal, 5, 1);
716 interactionVolume.setFacePosition(globalPosFace, 5);
718 if (intersection.neighbor())
720 int indexInOutside = intersection.indexInOutside();
722 interactionVolume.setIndexOnElement(indexInOutside, 7, 2);
723 DimVector normalOutside =
normal;
726 interactionVolume.setNormal(normalOutside, 7, 2);
730 else if (indexInInside == 0)
732 interactionVolume.setIndexOnElement(indexInInside, 5, 2);
733 interactionVolume.setNormal(
normal, 5, 2);
734 interactionVolume.setFacePosition(globalPosFace, 4);
736 if (intersection.neighbor())
738 int indexInOutside = intersection.indexInOutside();
740 interactionVolume.setIndexOnElement(indexInOutside, 4, 1);
741 DimVector normalOutside =
normal;
744 interactionVolume.setNormal(normalOutside, 4, 1);
748 if (elemVertMap[vIdxGlobal][6] == eIdxGlobal)
750 if (indexInInside == 4)
752 interactionVolume.setIndexOnElement(indexInInside, 6, 0);
753 interactionVolume.setNormal(
normal, 6, 0);
754 interactionVolume.setFacePosition(globalPosFace, 11);
756 if (intersection.neighbor())
758 int indexInOutside = intersection.indexInOutside();
760 interactionVolume.setIndexOnElement(indexInOutside, 2, 2);
761 DimVector normalOutside =
normal;
764 interactionVolume.setNormal(normalOutside, 2, 2);
767 else if (indexInInside == 2)
769 interactionVolume.setIndexOnElement(indexInInside, 6, 1);
770 interactionVolume.setNormal(
normal, 6, 1);
771 interactionVolume.setFacePosition(globalPosFace, 7);
773 if (intersection.neighbor())
775 int indexInOutside = intersection.indexInOutside();
777 interactionVolume.setIndexOnElement(indexInOutside, 4, 2);
778 DimVector normalOutside =
normal;
781 interactionVolume.setNormal(normalOutside, 4, 2);
784 else if (indexInInside == 1)
786 interactionVolume.setIndexOnElement(indexInInside, 6, 2);
787 interactionVolume.setNormal(
normal, 6, 2);
788 interactionVolume.setFacePosition(globalPosFace, 6);
790 if (intersection.neighbor())
792 int indexInOutside = intersection.indexInOutside();
794 interactionVolume.setIndexOnElement(indexInOutside, 7, 1);
795 DimVector normalOutside =
normal;
798 interactionVolume.setNormal(normalOutside, 7, 1);
802 if (elemVertMap[vIdxGlobal][7] == eIdxGlobal)
804 if (indexInInside == 4)
806 interactionVolume.setIndexOnElement(indexInInside, 7, 0);
807 interactionVolume.setNormal(
normal, 7, 0);
808 interactionVolume.setFacePosition(globalPosFace, 10);
810 if (intersection.neighbor())
812 int indexInOutside = intersection.indexInOutside();
814 interactionVolume.setIndexOnElement(indexInOutside, 3, 2);
815 DimVector normalOutside =
normal;
818 interactionVolume.setNormal(normalOutside, 3, 2);
821 else if (indexInInside == 0)
823 interactionVolume.setIndexOnElement(indexInInside, 7, 1);
824 interactionVolume.setNormal(
normal, 7, 1);
825 interactionVolume.setFacePosition(globalPosFace, 6);
827 if (intersection.neighbor())
829 int indexInOutside = intersection.indexInOutside();
831 interactionVolume.setIndexOnElement(indexInOutside, 6, 2);
832 DimVector normalOutside =
normal;
835 interactionVolume.setNormal(normalOutside, 6, 2);
838 else if (indexInInside == 2)
840 interactionVolume.setIndexOnElement(indexInInside, 7, 2);
841 interactionVolume.setNormal(
normal, 7, 2);
842 interactionVolume.setFacePosition(globalPosFace, 5);
844 if (intersection.neighbor())
846 int indexInOutside = intersection.indexInOutside();
848 interactionVolume.setIndexOnElement(indexInOutside, 5, 1);
849 DimVector normalOutside =
normal;
852 interactionVolume.setNormal(normalOutside, 5, 1);
856 if (intersection.boundary())
858 if (elemVertMap[vIdxGlobal][0] == eIdxGlobal)
860 if (indexInInside == 1)
862 problem_.boundaryTypes(bcType, intersection);
863 PrimaryVariables boundValues(0.0);
865 interactionVolume.setBoundary(bcType, 0);
866 if (bcType.isNeumann(pressureEqIdx))
868 problem_.neumann(boundValues, intersection);
869 boundValues *= faceVol/4.0;
870 interactionVolume.setNeumannCondition(boundValues, 0);
872 if (bcType.hasDirichlet())
874 problem_.dirichlet(boundValues, intersection);
875 interactionVolume.setDirichletCondition(boundValues, 0);
878 else if (indexInInside == 3)
880 problem_.boundaryTypes(bcType, intersection);
881 PrimaryVariables boundValues(0.0);
883 interactionVolume.setBoundary(bcType, 3);
884 if (bcType.isNeumann(pressureEqIdx))
886 problem_.neumann(boundValues, intersection);
887 boundValues *= faceVol/4.0;
888 interactionVolume.setNeumannCondition(boundValues, 3);
890 if (bcType.hasDirichlet())
892 problem_.dirichlet(boundValues, intersection);
893 interactionVolume.setDirichletCondition(boundValues, 3);
896 else if (indexInInside == 5)
898 problem_.boundaryTypes(bcType, intersection);
899 PrimaryVariables boundValues(0.0);
901 interactionVolume.setBoundary(bcType, 8);
902 if (bcType.isNeumann(pressureEqIdx))
904 problem_.neumann(boundValues, intersection);
905 boundValues *= faceVol/4.0;
906 interactionVolume.setNeumannCondition(boundValues, 8);
908 if (bcType.hasDirichlet())
910 problem_.dirichlet(boundValues, intersection);
911 interactionVolume.setDirichletCondition(boundValues, 8);
915 if (elemVertMap[vIdxGlobal][1] == eIdxGlobal)
917 if (indexInInside == 3)
919 problem_.boundaryTypes(bcType, intersection);
920 PrimaryVariables boundValues(0.0);
922 interactionVolume.setBoundary(bcType, 1);
923 if (bcType.isNeumann(pressureEqIdx))
925 problem_.neumann(boundValues, intersection);
926 boundValues *= faceVol/4.0;
927 interactionVolume.setNeumannCondition(boundValues, 1);
929 if (bcType.hasDirichlet())
931 problem_.dirichlet(boundValues, intersection);
932 interactionVolume.setDirichletCondition(boundValues, 1);
935 else if (indexInInside == 0)
937 problem_.boundaryTypes(bcType, intersection);
938 PrimaryVariables boundValues(0.0);
940 interactionVolume.setBoundary(bcType, 0);
941 if (bcType.isNeumann(pressureEqIdx))
943 problem_.neumann(boundValues, intersection);
944 boundValues *= faceVol/4.0;
945 interactionVolume.setNeumannCondition(boundValues, 0);
947 if (bcType.hasDirichlet())
949 problem_.dirichlet(boundValues, intersection);
950 interactionVolume.setDirichletCondition(boundValues, 0);
953 else if (indexInInside == 5)
955 problem_.boundaryTypes(bcType, intersection);
956 PrimaryVariables boundValues(0.0);
958 interactionVolume.setBoundary(bcType, 9);
959 if (bcType.isNeumann(pressureEqIdx))
961 problem_.neumann(boundValues, intersection);
962 boundValues *= faceVol/4.0;
963 interactionVolume.setNeumannCondition(boundValues, 9);
965 if (bcType.hasDirichlet())
967 problem_.dirichlet(boundValues, intersection);
968 interactionVolume.setDirichletCondition(boundValues, 9);
972 if (elemVertMap[vIdxGlobal][2] == eIdxGlobal)
974 if (indexInInside == 2)
976 problem_.boundaryTypes(bcType, intersection);
977 PrimaryVariables boundValues(0.0);
979 interactionVolume.setBoundary(bcType, 3);
980 if (bcType.isNeumann(pressureEqIdx))
982 problem_.neumann(boundValues, intersection);
983 boundValues *= faceVol/4.0;
984 interactionVolume.setNeumannCondition(boundValues, 3);
986 if (bcType.hasDirichlet())
988 problem_.dirichlet(boundValues, intersection);
989 interactionVolume.setDirichletCondition(boundValues, 3);
992 else if (indexInInside == 1)
994 problem_.boundaryTypes(bcType, intersection);
995 PrimaryVariables boundValues(0.0);
997 interactionVolume.setBoundary(bcType, 2);
998 if (bcType.isNeumann(pressureEqIdx))
1000 problem_.neumann(boundValues, intersection);
1001 boundValues *= faceVol/4.0;
1002 interactionVolume.setNeumannCondition(boundValues, 2);
1004 if (bcType.hasDirichlet())
1006 problem_.dirichlet(boundValues, intersection);
1007 interactionVolume.setDirichletCondition(boundValues, 2);
1010 else if (indexInInside == 5)
1012 problem_.boundaryTypes(bcType, intersection);
1013 PrimaryVariables boundValues(0.0);
1015 interactionVolume.setBoundary(bcType, 11);
1016 if (bcType.isNeumann(pressureEqIdx))
1018 problem_.neumann(boundValues, intersection);
1019 boundValues *= faceVol/4.0;
1020 interactionVolume.setNeumannCondition(boundValues, 11);
1022 if (bcType.hasDirichlet())
1024 problem_.dirichlet(boundValues, intersection);
1025 interactionVolume.setDirichletCondition(boundValues, 11);
1029 if (elemVertMap[vIdxGlobal][3] == eIdxGlobal)
1031 if (indexInInside == 0)
1033 problem_.boundaryTypes(bcType, intersection);
1034 PrimaryVariables boundValues(0.0);
1036 interactionVolume.setBoundary(bcType, 2);
1037 if (bcType.isNeumann(pressureEqIdx))
1039 problem_.neumann(boundValues, intersection);
1040 boundValues *= faceVol/4.0;
1041 interactionVolume.setNeumannCondition(boundValues, 2);
1043 if (bcType.hasDirichlet())
1045 problem_.dirichlet(boundValues, intersection);
1046 interactionVolume.setDirichletCondition(boundValues, 2);
1049 else if (indexInInside == 2)
1051 problem_.boundaryTypes(bcType, intersection);
1052 PrimaryVariables boundValues(0.0);
1054 interactionVolume.setBoundary(bcType, 1);
1055 if (bcType.isNeumann(pressureEqIdx))
1057 problem_.neumann(boundValues, intersection);
1058 boundValues *= faceVol/4.0;
1059 interactionVolume.setNeumannCondition(boundValues, 1);
1061 if (bcType.hasDirichlet())
1063 problem_.dirichlet(boundValues, intersection);
1064 interactionVolume.setDirichletCondition(boundValues, 1);
1067 else if (indexInInside == 5)
1069 problem_.boundaryTypes(bcType, intersection);
1070 PrimaryVariables boundValues(0.0);
1072 interactionVolume.setBoundary(bcType, 10);
1073 if (bcType.isNeumann(pressureEqIdx))
1075 problem_.neumann(boundValues, intersection);
1076 boundValues *= faceVol/4.0;
1077 interactionVolume.setNeumannCondition(boundValues, 10);
1079 if (bcType.hasDirichlet())
1081 problem_.dirichlet(boundValues, intersection);
1082 interactionVolume.setDirichletCondition(boundValues, 10);
1086 if (elemVertMap[vIdxGlobal][4] == eIdxGlobal)
1088 if (indexInInside == 4)
1090 problem_.boundaryTypes(bcType, intersection);
1091 PrimaryVariables boundValues(0.0);
1093 interactionVolume.setBoundary(bcType, 8);
1094 if (bcType.isNeumann(pressureEqIdx))
1096 problem_.neumann(boundValues, intersection);
1097 boundValues *= faceVol/4.0;
1098 interactionVolume.setNeumannCondition(boundValues, 8);
1100 if (bcType.hasDirichlet())
1102 problem_.dirichlet(boundValues, intersection);
1103 interactionVolume.setDirichletCondition(boundValues, 8);
1106 else if (indexInInside == 1)
1108 problem_.boundaryTypes(bcType, intersection);
1109 PrimaryVariables boundValues(0.0);
1111 interactionVolume.setBoundary(bcType, 4);
1112 if (bcType.isNeumann(pressureEqIdx))
1114 problem_.neumann(boundValues, intersection);
1115 boundValues *= faceVol/4.0;
1116 interactionVolume.setNeumannCondition(boundValues, 4);
1118 if (bcType.hasDirichlet())
1120 problem_.dirichlet(boundValues, intersection);
1121 interactionVolume.setDirichletCondition(boundValues, 4);
1124 else if (indexInInside == 3)
1126 problem_.boundaryTypes(bcType, intersection);
1127 PrimaryVariables boundValues(0.0);
1129 interactionVolume.setBoundary(bcType, 7);
1130 if (bcType.isNeumann(pressureEqIdx))
1132 problem_.neumann(boundValues, intersection);
1133 boundValues *= faceVol/4.0;
1134 interactionVolume.setNeumannCondition(boundValues, 7);
1136 if (bcType.hasDirichlet())
1138 problem_.dirichlet(boundValues, intersection);
1139 interactionVolume.setDirichletCondition(boundValues, 7);
1143 if (elemVertMap[vIdxGlobal][5] == eIdxGlobal)
1145 if (indexInInside == 4)
1147 problem_.boundaryTypes(bcType, intersection);
1148 PrimaryVariables boundValues(0.0);
1150 interactionVolume.setBoundary(bcType, 9);
1151 if (bcType.isNeumann(pressureEqIdx))
1153 problem_.neumann(boundValues, intersection);
1154 boundValues *= faceVol/4.0;
1155 interactionVolume.setNeumannCondition(boundValues, 9);
1157 if (bcType.hasDirichlet())
1159 problem_.dirichlet(boundValues, intersection);
1160 interactionVolume.setDirichletCondition(boundValues, 9);
1163 else if (indexInInside == 3)
1165 problem_.boundaryTypes(bcType, intersection);
1166 PrimaryVariables boundValues(0.0);
1168 interactionVolume.setBoundary(bcType, 5);
1169 if (bcType.isNeumann(pressureEqIdx))
1171 problem_.neumann(boundValues, intersection);
1172 boundValues *= faceVol/4.0;
1173 interactionVolume.setNeumannCondition(boundValues, 5);
1175 if (bcType.hasDirichlet())
1177 problem_.dirichlet(boundValues, intersection);
1178 interactionVolume.setDirichletCondition(boundValues, 5);
1181 else if (indexInInside == 0)
1183 problem_.boundaryTypes(bcType, intersection);
1184 PrimaryVariables boundValues(0.0);
1186 interactionVolume.setBoundary(bcType, 4);
1187 if (bcType.isNeumann(pressureEqIdx))
1189 problem_.neumann(boundValues, intersection);
1190 boundValues *= faceVol/4.0;
1191 interactionVolume.setNeumannCondition(boundValues, 4);
1193 if (bcType.hasDirichlet())
1195 problem_.dirichlet(boundValues, intersection);
1196 interactionVolume.setDirichletCondition(boundValues, 4);
1200 if (elemVertMap[vIdxGlobal][6] == eIdxGlobal)
1202 if (indexInInside == 4)
1204 problem_.boundaryTypes(bcType, intersection);
1205 PrimaryVariables boundValues(0.0);
1207 interactionVolume.setBoundary(bcType, 11);
1208 if (bcType.isNeumann(pressureEqIdx))
1210 problem_.neumann(boundValues, intersection);
1211 boundValues *= faceVol/4.0;
1212 interactionVolume.setNeumannCondition(boundValues, 11);
1214 if (bcType.hasDirichlet())
1216 problem_.dirichlet(boundValues, intersection);
1217 interactionVolume.setDirichletCondition(boundValues, 11);
1220 else if (indexInInside == 2)
1222 problem_.boundaryTypes(bcType, intersection);
1223 PrimaryVariables boundValues(0.0);
1225 interactionVolume.setBoundary(bcType, 7);
1226 if (bcType.isNeumann(pressureEqIdx))
1228 problem_.neumann(boundValues, intersection);
1229 boundValues *= faceVol/4.0;
1230 interactionVolume.setNeumannCondition(boundValues, 7);
1232 if (bcType.hasDirichlet())
1234 problem_.dirichlet(boundValues, intersection);
1235 interactionVolume.setDirichletCondition(boundValues, 7);
1238 else if (indexInInside == 1)
1240 problem_.boundaryTypes(bcType, intersection);
1241 PrimaryVariables boundValues(0.0);
1243 interactionVolume.setBoundary(bcType, 6);
1244 if (bcType.isNeumann(pressureEqIdx))
1246 problem_.neumann(boundValues, intersection);
1247 boundValues *= faceVol/4.0;
1248 interactionVolume.setNeumannCondition(boundValues, 6);
1250 if (bcType.hasDirichlet())
1252 problem_.dirichlet(boundValues, intersection);
1253 interactionVolume.setDirichletCondition(boundValues, 6);
1257 if (elemVertMap[vIdxGlobal][7] == eIdxGlobal)
1259 if (indexInInside == 4)
1261 problem_.boundaryTypes(bcType, intersection);
1262 PrimaryVariables boundValues(0.0);
1264 interactionVolume.setBoundary(bcType, 10);
1265 if (bcType.isNeumann(pressureEqIdx))
1267 problem_.neumann(boundValues, intersection);
1268 boundValues *= faceVol/4.0;
1269 interactionVolume.setNeumannCondition(boundValues, 10);
1271 if (bcType.hasDirichlet())
1273 problem_.dirichlet(boundValues, intersection);
1274 interactionVolume.setDirichletCondition(boundValues, 10);
1277 else if (indexInInside == 0)
1279 problem_.boundaryTypes(bcType, intersection);
1280 PrimaryVariables boundValues(0.0);
1282 interactionVolume.setBoundary(bcType, 6);
1283 if (bcType.isNeumann(pressureEqIdx))
1285 problem_.neumann(boundValues, intersection);
1286 boundValues *= faceVol/4.0;
1287 interactionVolume.setNeumannCondition(boundValues, 6);
1289 if (bcType.hasDirichlet())
1291 problem_.dirichlet(boundValues, intersection);
1292 interactionVolume.setDirichletCondition(boundValues, 6);
1295 else if (indexInInside == 2)
1297 problem_.boundaryTypes(bcType, intersection);
1298 PrimaryVariables boundValues(0.0);
1300 interactionVolume.setBoundary(bcType, 5);
1301 if (bcType.isNeumann(pressureEqIdx))
1303 problem_.neumann(boundValues, intersection);
1304 boundValues *= faceVol/4.0;
1305 interactionVolume.setNeumannCondition(boundValues, 5);
1307 if (bcType.hasDirichlet())
1309 problem_.dirichlet(boundValues, intersection);
1310 interactionVolume.setDirichletCondition(boundValues, 5);
1337template<
class TypeTag>
1339 const Vertex& vertex,
bool sameLevel)
1341 const DimVector& centerPos = vertex.geometry().center();
1343 interactionVolume.setCenterPosition(centerPos);
1347 auto element1 = interactionVolume.getSubVolumeElement(0);
1348 auto element8 = interactionVolume.getSubVolumeElement(7);
1350 const ElementGeometry& geometry1 = element1.geometry();
1351 const ElementGeometry& geometry8 = element8.geometry();
1353 const auto refElement = referenceElement(geometry1);
1355 DimVector edgeCoord(geometry1.global(refElement.position(9, dim - 1)));
1356 interactionVolume.setEdgePosition(edgeCoord, 2);
1357 edgeCoord = geometry1.global(refElement.position(3, dim - 1));
1358 interactionVolume.setEdgePosition(edgeCoord, 0);
1359 edgeCoord = geometry1.global(refElement.position(11, dim - 1));
1360 interactionVolume.setEdgePosition(edgeCoord, 5);
1362 edgeCoord = geometry8.global(refElement.position(4, dim - 1));
1363 interactionVolume.setEdgePosition(edgeCoord, 4);
1364 edgeCoord = geometry8.global(refElement.position(6, dim - 1));
1365 interactionVolume.setEdgePosition(edgeCoord, 3);
1366 edgeCoord = geometry8.global(refElement.position(0, dim - 1));
1367 interactionVolume.setEdgePosition(edgeCoord, 1);
1370 DimVector edgeCoord1(interactionVolume.getEdgePosition(0));
1371 DimVector edgeCoord2(interactionVolume.getEdgePosition(1));
1372 DimVector edgeCoord3(interactionVolume.getEdgePosition(2));
1373 DimVector edgeCoord4(interactionVolume.getEdgePosition(3));
1374 DimVector edgeCoord5(interactionVolume.getEdgePosition(4));
1375 DimVector edgeCoord6(interactionVolume.getEdgePosition(5));
1377 DimVector crossProductVector1(0);
1378 DimVector crossProductVector2(0);
1380 GlobalPosition globalPosFace = interactionVolume.getFacePosition(0);
1381 crossProductVector1 = centerPos - globalPosFace;
1382 crossProductVector2 = edgeCoord1 - edgeCoord3;
1383 Scalar faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1384 interactionVolume.setFaceArea(faceArea, 0);
1386 globalPosFace = interactionVolume.getFacePosition(1);
1387 crossProductVector1 = centerPos - globalPosFace;
1388 crossProductVector2 = edgeCoord1 - edgeCoord4;
1390 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1392 interactionVolume.setFaceArea(faceArea, 1);
1394 globalPosFace = interactionVolume.getFacePosition(2);
1395 crossProductVector1 = centerPos - globalPosFace;
1396 crossProductVector2 = edgeCoord1 - edgeCoord5;
1397 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1398 interactionVolume.setFaceArea(faceArea, 2);
1400 globalPosFace = interactionVolume.getFacePosition(3);
1401 crossProductVector1 = centerPos - globalPosFace;
1402 crossProductVector2 = edgeCoord1 - edgeCoord6;
1403 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1404 interactionVolume.setFaceArea(faceArea, 3);
1406 globalPosFace = interactionVolume.getFacePosition(4);
1407 crossProductVector1 = centerPos - globalPosFace;
1408 crossProductVector2 = edgeCoord2 - edgeCoord3;
1409 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1410 interactionVolume.setFaceArea(faceArea, 4);
1412 globalPosFace = interactionVolume.getFacePosition(5);
1413 crossProductVector1 = centerPos - globalPosFace;
1414 crossProductVector2 = edgeCoord2 - edgeCoord4;
1415 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1416 interactionVolume.setFaceArea(faceArea, 5);
1418 globalPosFace = interactionVolume.getFacePosition(6);
1419 crossProductVector1 = centerPos - globalPosFace;
1420 crossProductVector2 = edgeCoord2 - edgeCoord5;
1421 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1422 interactionVolume.setFaceArea(faceArea, 6);
1424 globalPosFace = interactionVolume.getFacePosition(7);
1425 crossProductVector1 = centerPos - globalPosFace;
1426 crossProductVector2 = edgeCoord2 - edgeCoord6;
1427 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1428 interactionVolume.setFaceArea(faceArea, 7);
1430 globalPosFace = interactionVolume.getFacePosition(8);
1431 crossProductVector1 = centerPos - globalPosFace;
1432 crossProductVector2 = edgeCoord3 - edgeCoord6;
1433 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1434 interactionVolume.setFaceArea(faceArea, 8);
1436 globalPosFace = interactionVolume.getFacePosition(9);
1437 crossProductVector1 = centerPos - globalPosFace;
1438 crossProductVector2 = edgeCoord3 - edgeCoord4;
1439 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1440 interactionVolume.setFaceArea(faceArea, 9);
1442 globalPosFace = interactionVolume.getFacePosition(10);
1443 crossProductVector1 = centerPos - globalPosFace;
1444 crossProductVector2 = edgeCoord4 - edgeCoord5;
1445 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1446 interactionVolume.setFaceArea(faceArea, 10);
1448 globalPosFace = interactionVolume.getFacePosition(11);
1449 crossProductVector1 = centerPos - globalPosFace;
1450 crossProductVector2 = edgeCoord5 - edgeCoord6;
1451 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1452 interactionVolume.setFaceArea(faceArea, 11);
1474template<
class TypeTag>
1476 const Vertex& vertex)
1478 const DimVector& centerPos = vertex.geometry().center();
1480 interactionVolume.setCenterPosition(centerPos);
1483 switch (interactionVolume.getElementNumber())
1487 if (interactionVolume.hasSubVolumeElement(0))
1489 interactionVolume.setOutsideFace(1);
1490 interactionVolume.setOutsideFace(2);
1491 interactionVolume.setOutsideFace(4);
1492 interactionVolume.setOutsideFace(5);
1493 interactionVolume.setOutsideFace(6);
1494 interactionVolume.setOutsideFace(7);
1495 interactionVolume.setOutsideFace(9);
1496 interactionVolume.setOutsideFace(10);
1497 interactionVolume.setOutsideFace(11);
1499 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1500 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 0)/4.0,0);
1501 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 1)/4.0,3);
1502 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 2)/4.0,8);
1504 if (interactionVolume.hasSubVolumeElement(1))
1506 interactionVolume.setOutsideFace(2);
1507 interactionVolume.setOutsideFace(3);
1508 interactionVolume.setOutsideFace(4);
1509 interactionVolume.setOutsideFace(5);
1510 interactionVolume.setOutsideFace(6);
1511 interactionVolume.setOutsideFace(7);
1512 interactionVolume.setOutsideFace(8);
1513 interactionVolume.setOutsideFace(10);
1514 interactionVolume.setOutsideFace(11);
1516 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1517 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 0)/4.0,1);
1518 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 1)/4.0,0);
1519 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 2)/4.0,9);
1521 if (interactionVolume.hasSubVolumeElement(2))
1523 interactionVolume.setOutsideFace(0);
1524 interactionVolume.setOutsideFace(1);
1525 interactionVolume.setOutsideFace(4);
1526 interactionVolume.setOutsideFace(5);
1527 interactionVolume.setOutsideFace(6);
1528 interactionVolume.setOutsideFace(7);
1529 interactionVolume.setOutsideFace(8);
1530 interactionVolume.setOutsideFace(9);
1531 interactionVolume.setOutsideFace(10);
1533 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1534 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 0)/4.0,3);
1535 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 1)/4.0,2);
1536 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 2)/4.0,11);
1538 if (interactionVolume.hasSubVolumeElement(3))
1540 interactionVolume.setOutsideFace(0);
1541 interactionVolume.setOutsideFace(3);
1542 interactionVolume.setOutsideFace(4);
1543 interactionVolume.setOutsideFace(5);
1544 interactionVolume.setOutsideFace(6);
1545 interactionVolume.setOutsideFace(7);
1546 interactionVolume.setOutsideFace(8);
1547 interactionVolume.setOutsideFace(9);
1548 interactionVolume.setOutsideFace(11);
1550 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1551 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 0)/4.0,2);
1552 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 1)/4.0,1);
1553 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 2)/4.0,10);
1555 if (interactionVolume.hasSubVolumeElement(4))
1557 interactionVolume.setOutsideFace(0);
1558 interactionVolume.setOutsideFace(1);
1559 interactionVolume.setOutsideFace(2);
1560 interactionVolume.setOutsideFace(3);
1561 interactionVolume.setOutsideFace(5);
1562 interactionVolume.setOutsideFace(6);
1563 interactionVolume.setOutsideFace(9);
1564 interactionVolume.setOutsideFace(10);
1565 interactionVolume.setOutsideFace(11);
1567 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1568 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 0)/4.0,8);
1569 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 1)/4.0,4);
1570 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 2)/4.0,7);
1572 if (interactionVolume.hasSubVolumeElement(5))
1574 interactionVolume.setOutsideFace(0);
1575 interactionVolume.setOutsideFace(1);
1576 interactionVolume.setOutsideFace(2);
1577 interactionVolume.setOutsideFace(3);
1578 interactionVolume.setOutsideFace(6);
1579 interactionVolume.setOutsideFace(7);
1580 interactionVolume.setOutsideFace(8);
1581 interactionVolume.setOutsideFace(10);
1582 interactionVolume.setOutsideFace(11);
1584 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1585 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 0)/4.0,9);
1586 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 1)/4.0,5);
1587 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 2)/4.0,4);
1589 if (interactionVolume.hasSubVolumeElement(6))
1591 interactionVolume.setOutsideFace(0);
1592 interactionVolume.setOutsideFace(1);
1593 interactionVolume.setOutsideFace(2);
1594 interactionVolume.setOutsideFace(3);
1595 interactionVolume.setOutsideFace(4);
1596 interactionVolume.setOutsideFace(5);
1597 interactionVolume.setOutsideFace(8);
1598 interactionVolume.setOutsideFace(9);
1599 interactionVolume.setOutsideFace(10);
1601 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1602 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 0)/4.0,11);
1603 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 1)/4.0,7);
1604 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 2)/4.0,6);
1606 if (interactionVolume.hasSubVolumeElement(7))
1608 interactionVolume.setOutsideFace(0);
1609 interactionVolume.setOutsideFace(1);
1610 interactionVolume.setOutsideFace(2);
1611 interactionVolume.setOutsideFace(3);
1612 interactionVolume.setOutsideFace(4);
1613 interactionVolume.setOutsideFace(7);
1614 interactionVolume.setOutsideFace(8);
1615 interactionVolume.setOutsideFace(9);
1616 interactionVolume.setOutsideFace(11);
1618 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1619 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 0)/4.0,10);
1620 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 1)/4.0,6);
1621 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 2)/4.0,5);
1628 if (interactionVolume.hasSubVolumeElement(0))
1630 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1631 if (interactionVolume.hasSubVolumeElement(1))
1633 interactionVolume.setOutsideFace(4);
1634 interactionVolume.setOutsideFace(5);
1635 interactionVolume.setOutsideFace(6);
1636 interactionVolume.setOutsideFace(7);
1637 interactionVolume.setOutsideFace(2);
1638 interactionVolume.setOutsideFace(10);
1639 interactionVolume.setOutsideFace(11);
1641 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1642 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0,3);
1643 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0,8);
1644 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0,1);
1645 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0,9);
1649 if (interactionVolume.hasSubVolumeElement(2))
1651 interactionVolume.setOutsideFace(4);
1652 interactionVolume.setOutsideFace(5);
1653 interactionVolume.setOutsideFace(6);
1654 interactionVolume.setOutsideFace(7);
1655 interactionVolume.setOutsideFace(1);
1656 interactionVolume.setOutsideFace(9);
1657 interactionVolume.setOutsideFace(10);
1659 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1660 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0,0);
1661 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0,8);
1662 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0,2);
1663 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 2)/4.0,11);
1667 if (interactionVolume.hasSubVolumeElement(4))
1669 interactionVolume.setOutsideFace(1);
1670 interactionVolume.setOutsideFace(5);
1671 interactionVolume.setOutsideFace(9);
1672 interactionVolume.setOutsideFace(10);
1673 interactionVolume.setOutsideFace(2);
1674 interactionVolume.setOutsideFace(6);
1675 interactionVolume.setOutsideFace(11);
1677 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1678 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0,0);
1679 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0,3);
1680 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 1)/4.0,4);
1681 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 2)/4.0,7);
1686 if (interactionVolume.hasSubVolumeElement(7))
1688 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1689 if (interactionVolume.hasSubVolumeElement(5))
1691 interactionVolume.setOutsideFace(0);
1692 interactionVolume.setOutsideFace(1);
1693 interactionVolume.setOutsideFace(2);
1694 interactionVolume.setOutsideFace(3);
1695 interactionVolume.setOutsideFace(7);
1696 interactionVolume.setOutsideFace(8);
1697 interactionVolume.setOutsideFace(11);
1699 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1700 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0,10);
1701 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0,6);
1702 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 0)/4.0,9);
1703 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 2)/4.0,4);
1707 if (interactionVolume.hasSubVolumeElement(6))
1709 interactionVolume.setOutsideFace(0);
1710 interactionVolume.setOutsideFace(1);
1711 interactionVolume.setOutsideFace(2);
1712 interactionVolume.setOutsideFace(3);
1713 interactionVolume.setOutsideFace(4);
1714 interactionVolume.setOutsideFace(8);
1715 interactionVolume.setOutsideFace(9);
1717 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1718 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0,10);
1719 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0,5);
1720 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 0)/4.0,11);
1721 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 1)/4.0,7);
1725 if (interactionVolume.hasSubVolumeElement(3))
1727 interactionVolume.setOutsideFace(0);
1728 interactionVolume.setOutsideFace(4);
1729 interactionVolume.setOutsideFace(8);
1730 interactionVolume.setOutsideFace(9);
1731 interactionVolume.setOutsideFace(3);
1732 interactionVolume.setOutsideFace(7);
1733 interactionVolume.setOutsideFace(11);
1735 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1736 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0,6);
1737 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0,5);
1738 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 3, 0)/4.0,2);
1739 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 3, 1)/4.0,1);
1744 if (interactionVolume.hasSubVolumeElement(5))
1746 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1747 if (interactionVolume.hasSubVolumeElement(1))
1749 interactionVolume.setOutsideFace(3);
1750 interactionVolume.setOutsideFace(7);
1751 interactionVolume.setOutsideFace(8);
1752 interactionVolume.setOutsideFace(11);
1753 interactionVolume.setOutsideFace(2);
1754 interactionVolume.setOutsideFace(6);
1755 interactionVolume.setOutsideFace(10);
1757 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1758 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 1)/4.0,5);
1759 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 2)/4.0,4);
1760 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0,1);
1761 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 1)/4.0,0);
1765 if (interactionVolume.hasSubVolumeElement(4))
1767 interactionVolume.setOutsideFace(0);
1768 interactionVolume.setOutsideFace(1);
1769 interactionVolume.setOutsideFace(2);
1770 interactionVolume.setOutsideFace(3);
1771 interactionVolume.setOutsideFace(6);
1772 interactionVolume.setOutsideFace(10);
1773 interactionVolume.setOutsideFace(11);
1775 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1776 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 0)/4.0,9);
1777 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 1)/4.0,5);
1778 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 0)/4.0,8);
1779 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 2)/4.0,7);
1784 if (interactionVolume.hasSubVolumeElement(6))
1786 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1787 if (interactionVolume.hasSubVolumeElement(4))
1789 interactionVolume.setOutsideFace(1);
1790 interactionVolume.setOutsideFace(5);
1791 interactionVolume.setOutsideFace(9);
1792 interactionVolume.setOutsideFace(10);
1793 interactionVolume.setOutsideFace(0);
1794 interactionVolume.setOutsideFace(2);
1795 interactionVolume.setOutsideFace(3);
1797 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1798 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 0)/4.0,11);
1799 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 2)/4.0,6);
1800 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 0)/4.0,8);
1801 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 1)/4.0,4);
1805 if (interactionVolume.hasSubVolumeElement(2))
1807 interactionVolume.setOutsideFace(1);
1808 interactionVolume.setOutsideFace(5);
1809 interactionVolume.setOutsideFace(9);
1810 interactionVolume.setOutsideFace(10);
1811 interactionVolume.setOutsideFace(0);
1812 interactionVolume.setOutsideFace(4);
1813 interactionVolume.setOutsideFace(8);
1815 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1816 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 1)/4.0,7);
1817 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 2)/4.0,6);
1818 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 0)/4.0,3);
1819 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0,2);
1824 if (interactionVolume.hasSubVolumeElement(3))
1826 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1827 if (interactionVolume.hasSubVolumeElement(1))
1829 interactionVolume.setOutsideFace(4);
1830 interactionVolume.setOutsideFace(5);
1831 interactionVolume.setOutsideFace(6);
1832 interactionVolume.setOutsideFace(7);
1833 interactionVolume.setOutsideFace(3);
1834 interactionVolume.setOutsideFace(8);
1835 interactionVolume.setOutsideFace(11);
1837 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1838 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 0)/4.0,2);
1839 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 2)/4.0,10);
1840 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 1)/4.0,0);
1841 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0,9);
1845 if (interactionVolume.hasSubVolumeElement(2))
1847 interactionVolume.setOutsideFace(4);
1848 interactionVolume.setOutsideFace(5);
1849 interactionVolume.setOutsideFace(6);
1850 interactionVolume.setOutsideFace(7);
1851 interactionVolume.setOutsideFace(0);
1852 interactionVolume.setOutsideFace(8);
1853 interactionVolume.setOutsideFace(9);
1855 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1856 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 1)/4.0,1);
1857 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 2)/4.0,10);
1858 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 0)/4.0,3);
1859 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 2)/4.0,11);
1869 if (interactionVolume.hasSubVolumeElement(0))
1871 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1872 if (interactionVolume.hasSubVolumeElement(1))
1874 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1875 if (interactionVolume.hasSubVolumeElement(2) && interactionVolume.hasSubVolumeElement(3))
1877 interactionVolume.setOutsideFace(4);
1878 interactionVolume.setOutsideFace(5);
1879 interactionVolume.setOutsideFace(6);
1880 interactionVolume.setOutsideFace(7);
1882 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1883 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1884 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0, 8);
1885 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0, 9);
1886 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 2, 2)/4.0, 10);
1887 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 2)/4.0, 11);
1891 if (interactionVolume.hasSubVolumeElement(4) && interactionVolume.hasSubVolumeElement(5))
1893 interactionVolume.setOutsideFace(2);
1894 interactionVolume.setOutsideFace(6);
1895 interactionVolume.setOutsideFace(10);
1896 interactionVolume.setOutsideFace(11);
1898 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1899 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1900 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0, 3);
1901 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0, 1);
1902 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 2)/4.0, 7);
1903 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 5, 1)/4.0, 5);
1908 if (interactionVolume.hasSubVolumeElement(2) && interactionVolume.hasSubVolumeElement(4)
1909 && interactionVolume.hasSubVolumeElement(6))
1911 interactionVolume.setOutsideFace(1);
1912 interactionVolume.setOutsideFace(5);
1913 interactionVolume.setOutsideFace(9);
1914 interactionVolume.setOutsideFace(10);
1916 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1917 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1918 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1919 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0, 0);
1920 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0, 2);
1921 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 1)/4.0, 4);
1922 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 6, 2)/4.0, 6);
1927 if (interactionVolume.hasSubVolumeElement(7))
1929 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1930 if (interactionVolume.hasSubVolumeElement(5))
1932 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1933 if (interactionVolume.hasSubVolumeElement(1) && interactionVolume.hasSubVolumeElement(3))
1935 interactionVolume.setOutsideFace(3);
1936 interactionVolume.setOutsideFace(7);
1937 interactionVolume.setOutsideFace(8);
1938 interactionVolume.setOutsideFace(11);
1940 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1941 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1942 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0, 6);
1943 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 2)/4.0, 4);
1944 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 1, 1)/4.0, 0);
1945 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 0)/4.0, 2);
1949 if (interactionVolume.hasSubVolumeElement(4) && interactionVolume.hasSubVolumeElement(6))
1951 interactionVolume.setOutsideFace(0);
1952 interactionVolume.setOutsideFace(1);
1953 interactionVolume.setOutsideFace(2);
1954 interactionVolume.setOutsideFace(3);
1956 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1957 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1958 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0, 10);
1959 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 0)/4.0, 9);
1960 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 0)/4.0, 8);
1961 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 6, 0)/4.0, 11);
1966 if (interactionVolume.hasSubVolumeElement(6) && interactionVolume.hasSubVolumeElement(2)
1967 && interactionVolume.hasSubVolumeElement(3))
1969 interactionVolume.setOutsideFace(0);
1970 interactionVolume.setOutsideFace(4);
1971 interactionVolume.setOutsideFace(8);
1972 interactionVolume.setOutsideFace(9);
1974 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1975 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1976 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1977 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0, 5);
1978 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 1)/4.0, 7);
1979 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 2, 0)/4.0, 3);
1980 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 1)/4.0, 1);
1988 DUNE_THROW(Dune::NotImplemented,
"Boundary shape not implemented");
1997template<
class TypeTag>
2000 std::vector < std::vector<int> > elemVertMap(problem_.gridView().size(dim), std::vector<int>(8, -1));
2003 for (
const auto& element : elements(problem_.gridView()))
2004 storeSubVolumeElements(element, elemVertMap);
2006 for (
unsigned int i = 0; i < interactionVolumes_.size(); i++)
2007 if (interactionVolumes_[i].getElementNumber() == 0)
2008 interactionVolumes_[i].printInteractionVolumeInfo();
2011 for (
const auto& element : elements(problem_.gridView()))
2012 storeIntersectionInfo(element, elemVertMap);
2016 for (
const auto& vertex : vertices(problem_.gridView()))
2018 int vIdxGlobal = problem_.variables().index(vertex);
2020 InteractionVolume& interactionVolume = interactionVolumes_[vIdxGlobal];
2022 if (interactionVolume.getElementNumber() == 8)
2024 storeInnerInteractionVolume(interactionVolume, vertex);
2026 else if (interactionVolume.isBoundaryInteractionVolume())
2028 storeBoundaryInteractionVolume(interactionVolume, vertex);
2032 DUNE_THROW(Dune::NotImplemented,
"Interaction volume is no boundary volume but consists of less than 8 elements");
2041 if (!interactionVolume.isBoundaryInteractionVolume())
2043 auto element1 = interactionVolume.getSubVolumeElement(0);
2044 auto element2 = interactionVolume.getSubVolumeElement(1);
2045 auto element3 = interactionVolume.getSubVolumeElement(2);
2046 auto element4 = interactionVolume.getSubVolumeElement(3);
2047 auto element5 = interactionVolume.getSubVolumeElement(4);
2048 auto element6 = interactionVolume.getSubVolumeElement(5);
2049 auto element7 = interactionVolume.getSubVolumeElement(6);
2050 auto element8 = interactionVolume.getSubVolumeElement(7);
2052 int eIdxGlobal1 = problem_.variables().index(element1);
2053 int eIdxGlobal2 = problem_.variables().index(element2);
2054 int eIdxGlobal3 = problem_.variables().index(element3);
2055 int eIdxGlobal4 = problem_.variables().index(element4);
2056 int eIdxGlobal5 = problem_.variables().index(element5);
2057 int eIdxGlobal6 = problem_.variables().index(element6);
2058 int eIdxGlobal7 = problem_.variables().index(element7);
2059 int eIdxGlobal8 = problem_.variables().index(element8);
2061 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 0), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 0));
2062 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 1), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 1));
2063 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 2), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 2));
2064 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 0), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 0));
2065 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 1), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 1));
2066 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 2), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 2));
2067 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 0), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 0));
2068 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 1), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 1));
2069 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 2), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 2));
2070 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 0), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 0));
2071 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 1), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 1));
2072 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 2), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 2));
2073 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 0), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 0));
2074 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 1), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 1));
2075 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 2), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 2));
2076 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 0), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 0));
2077 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 1), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 1));
2078 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 2), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 2));
2079 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 0), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 0));
2080 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 1), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 1));
2081 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 2), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 2));
2082 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 0), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 0));
2083 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 1), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 1));
2084 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 2), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 2));
Class including the information of an interaction volume of a MPFA 3D method that does not change wit...
Vector normal(const Vector &v)
Create a vector normal to the given one (v is expected to be non-zero)
Definition: geometry/normal.hh:36
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:640
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type GetProp
get the type of a property (equivalent to old macro GET_PROP(...))
Definition: propertysystem.hh:140
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition: propertysystem.hh:149
Interactionvolume container for 3-d MPFA L-method.
Definition: 3dinteractionvolumecontainer.hh:46
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:369
void storeBoundaryInteractionVolume(InteractionVolume &interactionVolume, const Vertex &vertex)
Stores additional information for interaction volumes of boundary vertices.
Definition: 3dinteractionvolumecontainer.hh:1475
GlobalInteractionVolumeVector interactionVolumes_
Definition: 3dinteractionvolumecontainer.hh:294
FvMpfaL3dInteractionVolumeContainer(Problem &problem)
Constructs a FvMpfaL3dInteractionVolumeContainer object.
Definition: 3dinteractionvolumecontainer.hh:273
FaceAreaVector realFluxFaceArea_
Definition: 3dinteractionvolumecontainer.hh:295
Scalar getRealFaceArea(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the face area of the element.
Definition: 3dinteractionvolumecontainer.hh:246
GetPropType< TypeTag, Properties::MPFAInteractionVolume > InteractionVolume
Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3d...
Definition: 3dinteractionvolumecontainer.hh:92
GlobalInteractionVolumeVector & interactionVolumesGlobal() const
Returns the interaction volumes container.
Definition: 3dinteractionvolumecontainer.hh:163
Scalar faceAreaFactor(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the area weighting factor for the fluxes.
Definition: 3dinteractionvolumecontainer.hh:179
Problem & problem_
Definition: 3dinteractionvolumecontainer.hh:292
Scalar faceAreaFactor(int elemGlobalIdx, int indexInInside)
Returns the area weighting factor for the fluxes.
Definition: 3dinteractionvolumecontainer.hh:196
GlobalInteractionVolumeVector & interactionVolumesGlobal()
Returns the interaction volumes container.
Definition: 3dinteractionvolumecontainer.hh:157
void initialize(bool solveTwice=true)
Initializes the interaction volume container.
Definition: 3dinteractionvolumecontainer.hh:129
void addRealFluxFaceArea_(Scalar faceArea, int eIdxGlobal, int fIdx)
Definition: 3dinteractionvolumecontainer.hh:283
InteractionVolume & interactionVolume(int vertexIdx) const
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:151
void update()
Updates the interaction volume container.
Definition: 3dinteractionvolumecontainer.hh:111
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:318
void addRealFaceArea_(Scalar faceArea, int eIdxGlobal, int fIdx)
Definition: 3dinteractionvolumecontainer.hh:287
Scalar getRealFluxFaceArea(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the area trough which fluxes are calculated by the MPFA.
Definition: 3dinteractionvolumecontainer.hh:214
Scalar getRealFaceArea(int elemGlobalIdx, int indexInInside)
Returns the face area of the element.
Definition: 3dinteractionvolumecontainer.hh:261
InteractionVolume & interactionVolume(int vertexIdx)
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:141
Scalar getRealFluxFaceArea(int elemGlobalIdx, int indexInInside)
Returns the area trough which fluxes are calculated by the MPFA.
Definition: 3dinteractionvolumecontainer.hh:229
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:1338
Properties for a MPFA method.
Base file for properties related to sequential IMPET algorithms.