24#ifndef DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
25#define DUMUX_FVMPFAL3D_INTERACTIONVOLUMECONTAINER_HH
44template<
class TypeTag>
52 dim = GridView::dimension, dimWorld = GridView::dimensionworld
58 using ReferenceElements = Dune::ReferenceElements<Scalar, dim>;
64 using PrimaryVariables =
typename SolutionTypes::PrimaryVariables;
66 using Element =
typename GridView::Traits::template Codim<0>::Entity;
67 using Vertex =
typename GridView::Traits::template Codim<dim>::Entity;
68 using ElementGeometry =
typename Element::Geometry;
70 using Intersection =
typename GridView::Intersection;
71 using IntersectionGeometry =
typename Intersection::Geometry;
73 using GlobalPosition =
typename ElementGeometry::GlobalCoordinate;
74 using DimMatrix = Dune::FieldMatrix<Scalar, dim, dim>;
76 using DimVector = Dune::FieldVector<Scalar, dim>;
80 pressureEqIdx = Indices::pressureEqIdx,
85 innerEdgeFace = 2, innerSideFace = 1
89 realFaceArea = 0, fluxFaceArea = 1
97 using GlobalInteractionVolumeVector = std::vector<InteractionVolume>;
98 using FaceAreaVector = std::vector<Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2*dim> >;
105 void storeInteractionVolumeInfo();
119 Dune::FieldVector<Dune::FieldVector<Scalar, 2>, 2 * dim>(Dune::FieldVector<Scalar, 2>(0.0)));
122 asImp_().storeInteractionVolumeInfo();
280 DUNE_THROW(Dune::NotImplemented,
"Dimension not supported!");
300 Implementation &asImp_()
301 {
return *
static_cast<Implementation *
>(
this); }
304 const Implementation &asImp_()
const
305 {
return *
static_cast<const Implementation *
>(
this); }
319template<
class TypeTag>
321 std::vector < std::vector<int> >& elemVertMap)
323 int eIdxGlobal = problem_.variables().index(element);
324 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 0, dim);
325 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 7);
326 elemVertMap[vIdxGlobal][7] = eIdxGlobal;
328 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 1, dim);
329 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 6);
330 elemVertMap[vIdxGlobal][6] = eIdxGlobal;
332 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 2, dim);
333 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 5);
334 elemVertMap[vIdxGlobal][5] = eIdxGlobal;
336 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 3, dim);
337 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 4);
338 elemVertMap[vIdxGlobal][4] = eIdxGlobal;
340 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 4, dim);
341 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 3);
342 elemVertMap[vIdxGlobal][3] = eIdxGlobal;
344 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 5, dim);
345 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 2);
346 elemVertMap[vIdxGlobal][2] = eIdxGlobal;
348 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 6, dim);
349 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 1);
350 elemVertMap[vIdxGlobal][1] = eIdxGlobal;
352 vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 7, dim);
353 interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 0);
354 elemVertMap[vIdxGlobal][0] = eIdxGlobal;
370template<
class TypeTag>
372 std::vector < std::vector<int> >& elemVertMap)
374 BoundaryTypes bcType;
376 int eIdxGlobal = problem_.variables().index(element);
378 const ElementGeometry& geometry = element.geometry();
380 const auto referenceElement = ReferenceElements::general(geometry.type());
382 int levelI = element.level();
385 for (
const auto& intersection : intersections(problem_.gridView(), element))
387 int indexInInside = intersection.indexInInside();
389 DimVector normal = intersection.centerUnitOuterNormal();
391 const IntersectionGeometry& isGeometry = intersection.geometry();
393 Scalar faceVol = isGeometry.volume();
395 const DimVector& globalPosFace = isGeometry.center();
397 bool takeIntersection =
true;
398 if (intersection.neighbor())
400 auto outside = intersection.outside();
401 int eIdxGlobalJ = problem_.variables().index(outside);
403 if (levelI == outside.level() && eIdxGlobal > eIdxGlobalJ)
404 takeIntersection =
false;
405 if (levelI < outside.level())
406 takeIntersection =
false;
409 if (takeIntersection)
411 addRealFaceArea_(faceVol, eIdxGlobal, indexInInside);
412 if (intersection.neighbor())
414 int eIdxGlobalJ = problem_.variables().index(intersection.outside());
415 addRealFaceArea_(faceVol, eIdxGlobalJ, intersection.indexInOutside());
418 for (
int i = 0; i < isGeometry.corners(); i++)
420 int localVertIdx = referenceElement.subEntity(indexInInside, 1, i, dim);
422 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, localVertIdx, dim);
426 if (elemVertMap[vIdxGlobal][0] == eIdxGlobal)
428 if (indexInInside == 1)
430 interactionVolume.setIndexOnElement(indexInInside, 0, 0);
431 interactionVolume.setNormal(normal, 0, 0);
432 interactionVolume.setFacePosition(globalPosFace, 0);
434 if (intersection.neighbor())
436 int indexInOutside = intersection.indexInOutside();
438 interactionVolume.setIndexOnElement(indexInOutside, 1, 1);
439 DimVector normalOutside = normal;
442 interactionVolume.setNormal(normalOutside, 1, 1);
445 else if (indexInInside == 3)
447 interactionVolume.setIndexOnElement(indexInInside, 0, 1);
448 interactionVolume.setNormal(normal, 0, 1);
449 interactionVolume.setFacePosition(globalPosFace, 3);
451 if (intersection.neighbor())
453 int indexInOutside = intersection.indexInOutside();
455 interactionVolume.setIndexOnElement(indexInOutside, 2, 0);
456 DimVector normalOutside = normal;
459 interactionVolume.setNormal(normalOutside, 2, 0);
462 else if (indexInInside == 5)
464 interactionVolume.setIndexOnElement(indexInInside, 0, 2);
465 interactionVolume.setNormal(normal, 0, 2);
466 interactionVolume.setFacePosition(globalPosFace, 8);
468 if (intersection.neighbor())
470 int indexInOutside = intersection.indexInOutside();
472 interactionVolume.setIndexOnElement(indexInOutside, 4, 0);
473 DimVector normalOutside = normal;
476 interactionVolume.setNormal(normalOutside, 4, 0);
480 if (elemVertMap[vIdxGlobal][1] == eIdxGlobal)
482 if (indexInInside == 3)
484 interactionVolume.setIndexOnElement(indexInInside, 1, 0);
485 interactionVolume.setNormal(normal, 1, 0);
486 interactionVolume.setFacePosition(globalPosFace, 1);
488 if (intersection.neighbor())
490 int indexInOutside = intersection.indexInOutside();
492 interactionVolume.setIndexOnElement(indexInOutside, 3, 1);
493 DimVector normalOutside = normal;
496 interactionVolume.setNormal(normalOutside, 3, 1);
499 else if (indexInInside == 0)
501 interactionVolume.setIndexOnElement(indexInInside, 1, 1);
502 interactionVolume.setNormal(normal, 1, 1);
503 interactionVolume.setFacePosition(globalPosFace, 0);
505 if (intersection.neighbor())
507 int indexInOutside = intersection.indexInOutside();
509 interactionVolume.setIndexOnElement(indexInOutside, 0, 0);
510 DimVector normalOutside = normal;
513 interactionVolume.setNormal(normalOutside, 0, 0);
516 else if (indexInInside == 5)
518 interactionVolume.setIndexOnElement(indexInInside, 1, 2);
519 interactionVolume.setNormal(normal, 1, 2);
520 interactionVolume.setFacePosition(globalPosFace, 9);
522 if (intersection.neighbor())
524 int indexInOutside = intersection.indexInOutside();
526 interactionVolume.setIndexOnElement(indexInOutside, 5, 0);
527 DimVector normalOutside = normal;
530 interactionVolume.setNormal(normalOutside, 5, 0);
534 if (elemVertMap[vIdxGlobal][2] == eIdxGlobal)
536 if (indexInInside == 2)
538 interactionVolume.setIndexOnElement(indexInInside, 2, 0);
539 interactionVolume.setNormal(normal, 2, 0);
540 interactionVolume.setFacePosition(globalPosFace, 3);
542 if (intersection.neighbor())
544 int indexInOutside = intersection.indexInOutside();
546 interactionVolume.setIndexOnElement(indexInOutside, 0, 1);
547 DimVector normalOutside = normal;
550 interactionVolume.setNormal(normalOutside, 0, 1);
553 else if (indexInInside == 1)
555 interactionVolume.setIndexOnElement(indexInInside, 2, 1);
556 interactionVolume.setNormal(normal, 2, 1);
557 interactionVolume.setFacePosition(globalPosFace, 2);
559 if (intersection.neighbor())
561 int indexInOutside = intersection.indexInOutside();
563 interactionVolume.setIndexOnElement(indexInOutside, 3, 0);
564 DimVector normalOutside = normal;
567 interactionVolume.setNormal(normalOutside, 3, 0);
570 else if (indexInInside == 5)
572 interactionVolume.setIndexOnElement(indexInInside, 2, 2);
573 interactionVolume.setNormal(normal, 2, 2);
574 interactionVolume.setFacePosition(globalPosFace, 11);
576 if (intersection.neighbor())
578 int indexInOutside = intersection.indexInOutside();
580 interactionVolume.setIndexOnElement(indexInOutside, 6, 0);
581 DimVector normalOutside = normal;
584 interactionVolume.setNormal(normalOutside, 6, 0);
588 if (elemVertMap[vIdxGlobal][3] == eIdxGlobal)
590 if (indexInInside == 0)
592 interactionVolume.setIndexOnElement(indexInInside, 3, 0);
593 interactionVolume.setNormal(normal, 3, 0);
594 interactionVolume.setFacePosition(globalPosFace, 2);
596 if (intersection.neighbor())
598 int indexInOutside = intersection.indexInOutside();
600 interactionVolume.setIndexOnElement(indexInOutside, 2, 1);
601 DimVector normalOutside = normal;
604 interactionVolume.setNormal(normalOutside, 2, 1);
607 else if (indexInInside == 2)
609 interactionVolume.setIndexOnElement(indexInInside, 3, 1);
610 interactionVolume.setNormal(normal, 3, 1);
611 interactionVolume.setFacePosition(globalPosFace, 1);
613 if (intersection.neighbor())
615 int indexInOutside = intersection.indexInOutside();
617 interactionVolume.setIndexOnElement(indexInOutside, 1, 0);
618 DimVector normalOutside = normal;
621 interactionVolume.setNormal(normalOutside, 1, 0);
624 else if (indexInInside == 5)
626 interactionVolume.setIndexOnElement(indexInInside, 3, 2);
627 interactionVolume.setNormal(normal, 3, 2);
628 interactionVolume.setFacePosition(globalPosFace, 10);
630 if (intersection.neighbor())
632 int indexInOutside = intersection.indexInOutside();
634 interactionVolume.setIndexOnElement(indexInOutside, 7, 0);
635 DimVector normalOutside = normal;
638 interactionVolume.setNormal(normalOutside, 7, 0);
642 if (elemVertMap[vIdxGlobal][4] == eIdxGlobal)
644 if (indexInInside == 4)
646 interactionVolume.setIndexOnElement(indexInInside, 4, 0);
647 interactionVolume.setNormal(normal, 4, 0);
648 interactionVolume.setFacePosition(globalPosFace, 8);
650 if (intersection.neighbor())
652 int indexInOutside = intersection.indexInOutside();
654 interactionVolume.setIndexOnElement(indexInOutside, 0, 2);
655 DimVector normalOutside = normal;
658 interactionVolume.setNormal(normalOutside, 0, 2);
661 else if (indexInInside == 1)
663 interactionVolume.setIndexOnElement(indexInInside, 4, 1);
664 interactionVolume.setNormal(normal, 4, 1);
665 interactionVolume.setFacePosition(globalPosFace, 4);
667 if (intersection.neighbor())
669 int indexInOutside = intersection.indexInOutside();
671 interactionVolume.setIndexOnElement(indexInOutside, 5, 2);
672 DimVector normalOutside = normal;
675 interactionVolume.setNormal(normalOutside, 5, 2);
678 else if (indexInInside == 3)
680 interactionVolume.setIndexOnElement(indexInInside, 4, 2);
681 interactionVolume.setNormal(normal, 4, 2);
682 interactionVolume.setFacePosition(globalPosFace, 7);
684 if (intersection.neighbor())
686 int indexInOutside = intersection.indexInOutside();
688 interactionVolume.setIndexOnElement(indexInOutside, 6, 1);
689 DimVector normalOutside = normal;
692 interactionVolume.setNormal(normalOutside, 6, 1);
696 if (elemVertMap[vIdxGlobal][5] == eIdxGlobal)
698 if (indexInInside == 4)
700 interactionVolume.setIndexOnElement(indexInInside, 5, 0);
701 interactionVolume.setNormal(normal, 5, 0);
702 interactionVolume.setFacePosition(globalPosFace, 9);
704 if (intersection.neighbor())
706 int indexInOutside = intersection.indexInOutside();
708 interactionVolume.setIndexOnElement(indexInOutside, 1, 2);
709 DimVector normalOutside = normal;
712 interactionVolume.setNormal(normalOutside, 1, 2);
715 else if (indexInInside == 3)
717 interactionVolume.setIndexOnElement(indexInInside, 5, 1);
718 interactionVolume.setNormal(normal, 5, 1);
719 interactionVolume.setFacePosition(globalPosFace, 5);
721 if (intersection.neighbor())
723 int indexInOutside = intersection.indexInOutside();
725 interactionVolume.setIndexOnElement(indexInOutside, 7, 2);
726 DimVector normalOutside = normal;
729 interactionVolume.setNormal(normalOutside, 7, 2);
733 else if (indexInInside == 0)
735 interactionVolume.setIndexOnElement(indexInInside, 5, 2);
736 interactionVolume.setNormal(normal, 5, 2);
737 interactionVolume.setFacePosition(globalPosFace, 4);
739 if (intersection.neighbor())
741 int indexInOutside = intersection.indexInOutside();
743 interactionVolume.setIndexOnElement(indexInOutside, 4, 1);
744 DimVector normalOutside = normal;
747 interactionVolume.setNormal(normalOutside, 4, 1);
751 if (elemVertMap[vIdxGlobal][6] == eIdxGlobal)
753 if (indexInInside == 4)
755 interactionVolume.setIndexOnElement(indexInInside, 6, 0);
756 interactionVolume.setNormal(normal, 6, 0);
757 interactionVolume.setFacePosition(globalPosFace, 11);
759 if (intersection.neighbor())
761 int indexInOutside = intersection.indexInOutside();
763 interactionVolume.setIndexOnElement(indexInOutside, 2, 2);
764 DimVector normalOutside = normal;
767 interactionVolume.setNormal(normalOutside, 2, 2);
770 else if (indexInInside == 2)
772 interactionVolume.setIndexOnElement(indexInInside, 6, 1);
773 interactionVolume.setNormal(normal, 6, 1);
774 interactionVolume.setFacePosition(globalPosFace, 7);
776 if (intersection.neighbor())
778 int indexInOutside = intersection.indexInOutside();
780 interactionVolume.setIndexOnElement(indexInOutside, 4, 2);
781 DimVector normalOutside = normal;
784 interactionVolume.setNormal(normalOutside, 4, 2);
787 else if (indexInInside == 1)
789 interactionVolume.setIndexOnElement(indexInInside, 6, 2);
790 interactionVolume.setNormal(normal, 6, 2);
791 interactionVolume.setFacePosition(globalPosFace, 6);
793 if (intersection.neighbor())
795 int indexInOutside = intersection.indexInOutside();
797 interactionVolume.setIndexOnElement(indexInOutside, 7, 1);
798 DimVector normalOutside = normal;
801 interactionVolume.setNormal(normalOutside, 7, 1);
805 if (elemVertMap[vIdxGlobal][7] == eIdxGlobal)
807 if (indexInInside == 4)
809 interactionVolume.setIndexOnElement(indexInInside, 7, 0);
810 interactionVolume.setNormal(normal, 7, 0);
811 interactionVolume.setFacePosition(globalPosFace, 10);
813 if (intersection.neighbor())
815 int indexInOutside = intersection.indexInOutside();
817 interactionVolume.setIndexOnElement(indexInOutside, 3, 2);
818 DimVector normalOutside = normal;
821 interactionVolume.setNormal(normalOutside, 3, 2);
824 else if (indexInInside == 0)
826 interactionVolume.setIndexOnElement(indexInInside, 7, 1);
827 interactionVolume.setNormal(normal, 7, 1);
828 interactionVolume.setFacePosition(globalPosFace, 6);
830 if (intersection.neighbor())
832 int indexInOutside = intersection.indexInOutside();
834 interactionVolume.setIndexOnElement(indexInOutside, 6, 2);
835 DimVector normalOutside = normal;
838 interactionVolume.setNormal(normalOutside, 6, 2);
841 else if (indexInInside == 2)
843 interactionVolume.setIndexOnElement(indexInInside, 7, 2);
844 interactionVolume.setNormal(normal, 7, 2);
845 interactionVolume.setFacePosition(globalPosFace, 5);
847 if (intersection.neighbor())
849 int indexInOutside = intersection.indexInOutside();
851 interactionVolume.setIndexOnElement(indexInOutside, 5, 1);
852 DimVector normalOutside = normal;
855 interactionVolume.setNormal(normalOutside, 5, 1);
859 if (intersection.boundary())
861 if (elemVertMap[vIdxGlobal][0] == eIdxGlobal)
863 if (indexInInside == 1)
865 problem_.boundaryTypes(bcType, intersection);
866 PrimaryVariables boundValues(0.0);
868 interactionVolume.setBoundary(bcType, 0);
869 if (bcType.isNeumann(pressureEqIdx))
871 problem_.neumann(boundValues, intersection);
872 boundValues *= faceVol/4.0;
873 interactionVolume.setNeumannCondition(boundValues, 0);
875 if (bcType.hasDirichlet())
877 problem_.dirichlet(boundValues, intersection);
878 interactionVolume.setDirichletCondition(boundValues, 0);
881 else if (indexInInside == 3)
883 problem_.boundaryTypes(bcType, intersection);
884 PrimaryVariables boundValues(0.0);
886 interactionVolume.setBoundary(bcType, 3);
887 if (bcType.isNeumann(pressureEqIdx))
889 problem_.neumann(boundValues, intersection);
890 boundValues *= faceVol/4.0;
891 interactionVolume.setNeumannCondition(boundValues, 3);
893 if (bcType.hasDirichlet())
895 problem_.dirichlet(boundValues, intersection);
896 interactionVolume.setDirichletCondition(boundValues, 3);
899 else if (indexInInside == 5)
901 problem_.boundaryTypes(bcType, intersection);
902 PrimaryVariables boundValues(0.0);
904 interactionVolume.setBoundary(bcType, 8);
905 if (bcType.isNeumann(pressureEqIdx))
907 problem_.neumann(boundValues, intersection);
908 boundValues *= faceVol/4.0;
909 interactionVolume.setNeumannCondition(boundValues, 8);
911 if (bcType.hasDirichlet())
913 problem_.dirichlet(boundValues, intersection);
914 interactionVolume.setDirichletCondition(boundValues, 8);
918 if (elemVertMap[vIdxGlobal][1] == eIdxGlobal)
920 if (indexInInside == 3)
922 problem_.boundaryTypes(bcType, intersection);
923 PrimaryVariables boundValues(0.0);
925 interactionVolume.setBoundary(bcType, 1);
926 if (bcType.isNeumann(pressureEqIdx))
928 problem_.neumann(boundValues, intersection);
929 boundValues *= faceVol/4.0;
930 interactionVolume.setNeumannCondition(boundValues, 1);
932 if (bcType.hasDirichlet())
934 problem_.dirichlet(boundValues, intersection);
935 interactionVolume.setDirichletCondition(boundValues, 1);
938 else if (indexInInside == 0)
940 problem_.boundaryTypes(bcType, intersection);
941 PrimaryVariables boundValues(0.0);
943 interactionVolume.setBoundary(bcType, 0);
944 if (bcType.isNeumann(pressureEqIdx))
946 problem_.neumann(boundValues, intersection);
947 boundValues *= faceVol/4.0;
948 interactionVolume.setNeumannCondition(boundValues, 0);
950 if (bcType.hasDirichlet())
952 problem_.dirichlet(boundValues, intersection);
953 interactionVolume.setDirichletCondition(boundValues, 0);
956 else if (indexInInside == 5)
958 problem_.boundaryTypes(bcType, intersection);
959 PrimaryVariables boundValues(0.0);
961 interactionVolume.setBoundary(bcType, 9);
962 if (bcType.isNeumann(pressureEqIdx))
964 problem_.neumann(boundValues, intersection);
965 boundValues *= faceVol/4.0;
966 interactionVolume.setNeumannCondition(boundValues, 9);
968 if (bcType.hasDirichlet())
970 problem_.dirichlet(boundValues, intersection);
971 interactionVolume.setDirichletCondition(boundValues, 9);
975 if (elemVertMap[vIdxGlobal][2] == eIdxGlobal)
977 if (indexInInside == 2)
979 problem_.boundaryTypes(bcType, intersection);
980 PrimaryVariables boundValues(0.0);
982 interactionVolume.setBoundary(bcType, 3);
983 if (bcType.isNeumann(pressureEqIdx))
985 problem_.neumann(boundValues, intersection);
986 boundValues *= faceVol/4.0;
987 interactionVolume.setNeumannCondition(boundValues, 3);
989 if (bcType.hasDirichlet())
991 problem_.dirichlet(boundValues, intersection);
992 interactionVolume.setDirichletCondition(boundValues, 3);
995 else if (indexInInside == 1)
997 problem_.boundaryTypes(bcType, intersection);
998 PrimaryVariables boundValues(0.0);
1000 interactionVolume.setBoundary(bcType, 2);
1001 if (bcType.isNeumann(pressureEqIdx))
1003 problem_.neumann(boundValues, intersection);
1004 boundValues *= faceVol/4.0;
1005 interactionVolume.setNeumannCondition(boundValues, 2);
1007 if (bcType.hasDirichlet())
1009 problem_.dirichlet(boundValues, intersection);
1010 interactionVolume.setDirichletCondition(boundValues, 2);
1013 else if (indexInInside == 5)
1015 problem_.boundaryTypes(bcType, intersection);
1016 PrimaryVariables boundValues(0.0);
1018 interactionVolume.setBoundary(bcType, 11);
1019 if (bcType.isNeumann(pressureEqIdx))
1021 problem_.neumann(boundValues, intersection);
1022 boundValues *= faceVol/4.0;
1023 interactionVolume.setNeumannCondition(boundValues, 11);
1025 if (bcType.hasDirichlet())
1027 problem_.dirichlet(boundValues, intersection);
1028 interactionVolume.setDirichletCondition(boundValues, 11);
1032 if (elemVertMap[vIdxGlobal][3] == eIdxGlobal)
1034 if (indexInInside == 0)
1036 problem_.boundaryTypes(bcType, intersection);
1037 PrimaryVariables boundValues(0.0);
1039 interactionVolume.setBoundary(bcType, 2);
1040 if (bcType.isNeumann(pressureEqIdx))
1042 problem_.neumann(boundValues, intersection);
1043 boundValues *= faceVol/4.0;
1044 interactionVolume.setNeumannCondition(boundValues, 2);
1046 if (bcType.hasDirichlet())
1048 problem_.dirichlet(boundValues, intersection);
1049 interactionVolume.setDirichletCondition(boundValues, 2);
1052 else if (indexInInside == 2)
1054 problem_.boundaryTypes(bcType, intersection);
1055 PrimaryVariables boundValues(0.0);
1057 interactionVolume.setBoundary(bcType, 1);
1058 if (bcType.isNeumann(pressureEqIdx))
1060 problem_.neumann(boundValues, intersection);
1061 boundValues *= faceVol/4.0;
1062 interactionVolume.setNeumannCondition(boundValues, 1);
1064 if (bcType.hasDirichlet())
1066 problem_.dirichlet(boundValues, intersection);
1067 interactionVolume.setDirichletCondition(boundValues, 1);
1070 else if (indexInInside == 5)
1072 problem_.boundaryTypes(bcType, intersection);
1073 PrimaryVariables boundValues(0.0);
1075 interactionVolume.setBoundary(bcType, 10);
1076 if (bcType.isNeumann(pressureEqIdx))
1078 problem_.neumann(boundValues, intersection);
1079 boundValues *= faceVol/4.0;
1080 interactionVolume.setNeumannCondition(boundValues, 10);
1082 if (bcType.hasDirichlet())
1084 problem_.dirichlet(boundValues, intersection);
1085 interactionVolume.setDirichletCondition(boundValues, 10);
1089 if (elemVertMap[vIdxGlobal][4] == eIdxGlobal)
1091 if (indexInInside == 4)
1093 problem_.boundaryTypes(bcType, intersection);
1094 PrimaryVariables boundValues(0.0);
1096 interactionVolume.setBoundary(bcType, 8);
1097 if (bcType.isNeumann(pressureEqIdx))
1099 problem_.neumann(boundValues, intersection);
1100 boundValues *= faceVol/4.0;
1101 interactionVolume.setNeumannCondition(boundValues, 8);
1103 if (bcType.hasDirichlet())
1105 problem_.dirichlet(boundValues, intersection);
1106 interactionVolume.setDirichletCondition(boundValues, 8);
1109 else if (indexInInside == 1)
1111 problem_.boundaryTypes(bcType, intersection);
1112 PrimaryVariables boundValues(0.0);
1114 interactionVolume.setBoundary(bcType, 4);
1115 if (bcType.isNeumann(pressureEqIdx))
1117 problem_.neumann(boundValues, intersection);
1118 boundValues *= faceVol/4.0;
1119 interactionVolume.setNeumannCondition(boundValues, 4);
1121 if (bcType.hasDirichlet())
1123 problem_.dirichlet(boundValues, intersection);
1124 interactionVolume.setDirichletCondition(boundValues, 4);
1127 else if (indexInInside == 3)
1129 problem_.boundaryTypes(bcType, intersection);
1130 PrimaryVariables boundValues(0.0);
1132 interactionVolume.setBoundary(bcType, 7);
1133 if (bcType.isNeumann(pressureEqIdx))
1135 problem_.neumann(boundValues, intersection);
1136 boundValues *= faceVol/4.0;
1137 interactionVolume.setNeumannCondition(boundValues, 7);
1139 if (bcType.hasDirichlet())
1141 problem_.dirichlet(boundValues, intersection);
1142 interactionVolume.setDirichletCondition(boundValues, 7);
1146 if (elemVertMap[vIdxGlobal][5] == eIdxGlobal)
1148 if (indexInInside == 4)
1150 problem_.boundaryTypes(bcType, intersection);
1151 PrimaryVariables boundValues(0.0);
1153 interactionVolume.setBoundary(bcType, 9);
1154 if (bcType.isNeumann(pressureEqIdx))
1156 problem_.neumann(boundValues, intersection);
1157 boundValues *= faceVol/4.0;
1158 interactionVolume.setNeumannCondition(boundValues, 9);
1160 if (bcType.hasDirichlet())
1162 problem_.dirichlet(boundValues, intersection);
1163 interactionVolume.setDirichletCondition(boundValues, 9);
1166 else if (indexInInside == 3)
1168 problem_.boundaryTypes(bcType, intersection);
1169 PrimaryVariables boundValues(0.0);
1171 interactionVolume.setBoundary(bcType, 5);
1172 if (bcType.isNeumann(pressureEqIdx))
1174 problem_.neumann(boundValues, intersection);
1175 boundValues *= faceVol/4.0;
1176 interactionVolume.setNeumannCondition(boundValues, 5);
1178 if (bcType.hasDirichlet())
1180 problem_.dirichlet(boundValues, intersection);
1181 interactionVolume.setDirichletCondition(boundValues, 5);
1184 else if (indexInInside == 0)
1186 problem_.boundaryTypes(bcType, intersection);
1187 PrimaryVariables boundValues(0.0);
1189 interactionVolume.setBoundary(bcType, 4);
1190 if (bcType.isNeumann(pressureEqIdx))
1192 problem_.neumann(boundValues, intersection);
1193 boundValues *= faceVol/4.0;
1194 interactionVolume.setNeumannCondition(boundValues, 4);
1196 if (bcType.hasDirichlet())
1198 problem_.dirichlet(boundValues, intersection);
1199 interactionVolume.setDirichletCondition(boundValues, 4);
1203 if (elemVertMap[vIdxGlobal][6] == eIdxGlobal)
1205 if (indexInInside == 4)
1207 problem_.boundaryTypes(bcType, intersection);
1208 PrimaryVariables boundValues(0.0);
1210 interactionVolume.setBoundary(bcType, 11);
1211 if (bcType.isNeumann(pressureEqIdx))
1213 problem_.neumann(boundValues, intersection);
1214 boundValues *= faceVol/4.0;
1215 interactionVolume.setNeumannCondition(boundValues, 11);
1217 if (bcType.hasDirichlet())
1219 problem_.dirichlet(boundValues, intersection);
1220 interactionVolume.setDirichletCondition(boundValues, 11);
1223 else if (indexInInside == 2)
1225 problem_.boundaryTypes(bcType, intersection);
1226 PrimaryVariables boundValues(0.0);
1228 interactionVolume.setBoundary(bcType, 7);
1229 if (bcType.isNeumann(pressureEqIdx))
1231 problem_.neumann(boundValues, intersection);
1232 boundValues *= faceVol/4.0;
1233 interactionVolume.setNeumannCondition(boundValues, 7);
1235 if (bcType.hasDirichlet())
1237 problem_.dirichlet(boundValues, intersection);
1238 interactionVolume.setDirichletCondition(boundValues, 7);
1241 else if (indexInInside == 1)
1243 problem_.boundaryTypes(bcType, intersection);
1244 PrimaryVariables boundValues(0.0);
1246 interactionVolume.setBoundary(bcType, 6);
1247 if (bcType.isNeumann(pressureEqIdx))
1249 problem_.neumann(boundValues, intersection);
1250 boundValues *= faceVol/4.0;
1251 interactionVolume.setNeumannCondition(boundValues, 6);
1253 if (bcType.hasDirichlet())
1255 problem_.dirichlet(boundValues, intersection);
1256 interactionVolume.setDirichletCondition(boundValues, 6);
1260 if (elemVertMap[vIdxGlobal][7] == eIdxGlobal)
1262 if (indexInInside == 4)
1264 problem_.boundaryTypes(bcType, intersection);
1265 PrimaryVariables boundValues(0.0);
1267 interactionVolume.setBoundary(bcType, 10);
1268 if (bcType.isNeumann(pressureEqIdx))
1270 problem_.neumann(boundValues, intersection);
1271 boundValues *= faceVol/4.0;
1272 interactionVolume.setNeumannCondition(boundValues, 10);
1274 if (bcType.hasDirichlet())
1276 problem_.dirichlet(boundValues, intersection);
1277 interactionVolume.setDirichletCondition(boundValues, 10);
1280 else if (indexInInside == 0)
1282 problem_.boundaryTypes(bcType, intersection);
1283 PrimaryVariables boundValues(0.0);
1285 interactionVolume.setBoundary(bcType, 6);
1286 if (bcType.isNeumann(pressureEqIdx))
1288 problem_.neumann(boundValues, intersection);
1289 boundValues *= faceVol/4.0;
1290 interactionVolume.setNeumannCondition(boundValues, 6);
1292 if (bcType.hasDirichlet())
1294 problem_.dirichlet(boundValues, intersection);
1295 interactionVolume.setDirichletCondition(boundValues, 6);
1298 else if (indexInInside == 2)
1300 problem_.boundaryTypes(bcType, intersection);
1301 PrimaryVariables boundValues(0.0);
1303 interactionVolume.setBoundary(bcType, 5);
1304 if (bcType.isNeumann(pressureEqIdx))
1306 problem_.neumann(boundValues, intersection);
1307 boundValues *= faceVol/4.0;
1308 interactionVolume.setNeumannCondition(boundValues, 5);
1310 if (bcType.hasDirichlet())
1312 problem_.dirichlet(boundValues, intersection);
1313 interactionVolume.setDirichletCondition(boundValues, 5);
1340template<
class TypeTag>
1342 const Vertex& vertex,
bool sameLevel)
1344 const DimVector& centerPos = vertex.geometry().center();
1346 interactionVolume.setCenterPosition(centerPos);
1350 auto element1 = interactionVolume.getSubVolumeElement(0);
1351 auto element8 = interactionVolume.getSubVolumeElement(7);
1353 const ElementGeometry& geometry1 = element1.geometry();
1354 const ElementGeometry& geometry8 = element8.geometry();
1356 const auto referenceElement = ReferenceElements::general(geometry1.type());
1358 DimVector edgeCoord(geometry1.global(referenceElement.position(9, dim - 1)));
1359 interactionVolume.setEdgePosition(edgeCoord, 2);
1360 edgeCoord = geometry1.global(referenceElement.position(3, dim - 1));
1361 interactionVolume.setEdgePosition(edgeCoord, 0);
1362 edgeCoord = geometry1.global(referenceElement.position(11, dim - 1));
1363 interactionVolume.setEdgePosition(edgeCoord, 5);
1365 edgeCoord = geometry8.global(referenceElement.position(4, dim - 1));
1366 interactionVolume.setEdgePosition(edgeCoord, 4);
1367 edgeCoord = geometry8.global(referenceElement.position(6, dim - 1));
1368 interactionVolume.setEdgePosition(edgeCoord, 3);
1369 edgeCoord = geometry8.global(referenceElement.position(0, dim - 1));
1370 interactionVolume.setEdgePosition(edgeCoord, 1);
1373 DimVector edgeCoord1(interactionVolume.getEdgePosition(0));
1374 DimVector edgeCoord2(interactionVolume.getEdgePosition(1));
1375 DimVector edgeCoord3(interactionVolume.getEdgePosition(2));
1376 DimVector edgeCoord4(interactionVolume.getEdgePosition(3));
1377 DimVector edgeCoord5(interactionVolume.getEdgePosition(4));
1378 DimVector edgeCoord6(interactionVolume.getEdgePosition(5));
1380 DimVector crossProductVector1(0);
1381 DimVector crossProductVector2(0);
1383 GlobalPosition globalPosFace = interactionVolume.getFacePosition(0);
1384 crossProductVector1 = centerPos - globalPosFace;
1385 crossProductVector2 = edgeCoord1 - edgeCoord3;
1386 Scalar faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1387 interactionVolume.setFaceArea(faceArea, 0);
1389 globalPosFace = interactionVolume.getFacePosition(1);
1390 crossProductVector1 = centerPos - globalPosFace;
1391 crossProductVector2 = edgeCoord1 - edgeCoord4;
1393 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1395 interactionVolume.setFaceArea(faceArea, 1);
1397 globalPosFace = interactionVolume.getFacePosition(2);
1398 crossProductVector1 = centerPos - globalPosFace;
1399 crossProductVector2 = edgeCoord1 - edgeCoord5;
1400 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1401 interactionVolume.setFaceArea(faceArea, 2);
1403 globalPosFace = interactionVolume.getFacePosition(3);
1404 crossProductVector1 = centerPos - globalPosFace;
1405 crossProductVector2 = edgeCoord1 - edgeCoord6;
1406 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1407 interactionVolume.setFaceArea(faceArea, 3);
1409 globalPosFace = interactionVolume.getFacePosition(4);
1410 crossProductVector1 = centerPos - globalPosFace;
1411 crossProductVector2 = edgeCoord2 - edgeCoord3;
1412 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1413 interactionVolume.setFaceArea(faceArea, 4);
1415 globalPosFace = interactionVolume.getFacePosition(5);
1416 crossProductVector1 = centerPos - globalPosFace;
1417 crossProductVector2 = edgeCoord2 - edgeCoord4;
1418 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1419 interactionVolume.setFaceArea(faceArea, 5);
1421 globalPosFace = interactionVolume.getFacePosition(6);
1422 crossProductVector1 = centerPos - globalPosFace;
1423 crossProductVector2 = edgeCoord2 - edgeCoord5;
1424 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1425 interactionVolume.setFaceArea(faceArea, 6);
1427 globalPosFace = interactionVolume.getFacePosition(7);
1428 crossProductVector1 = centerPos - globalPosFace;
1429 crossProductVector2 = edgeCoord2 - edgeCoord6;
1430 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1431 interactionVolume.setFaceArea(faceArea, 7);
1433 globalPosFace = interactionVolume.getFacePosition(8);
1434 crossProductVector1 = centerPos - globalPosFace;
1435 crossProductVector2 = edgeCoord3 - edgeCoord6;
1436 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1437 interactionVolume.setFaceArea(faceArea, 8);
1439 globalPosFace = interactionVolume.getFacePosition(9);
1440 crossProductVector1 = centerPos - globalPosFace;
1441 crossProductVector2 = edgeCoord3 - edgeCoord4;
1442 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1443 interactionVolume.setFaceArea(faceArea, 9);
1445 globalPosFace = interactionVolume.getFacePosition(10);
1446 crossProductVector1 = centerPos - globalPosFace;
1447 crossProductVector2 = edgeCoord4 - edgeCoord5;
1448 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1449 interactionVolume.setFaceArea(faceArea, 10);
1451 globalPosFace = interactionVolume.getFacePosition(11);
1452 crossProductVector1 = centerPos - globalPosFace;
1453 crossProductVector2 = edgeCoord5 - edgeCoord6;
1454 faceArea =
crossProduct(crossProductVector1, crossProductVector2).two_norm()/2.0;
1455 interactionVolume.setFaceArea(faceArea, 11);
1477template<
class TypeTag>
1479 const Vertex& vertex)
1481 const DimVector& centerPos = vertex.geometry().center();
1483 interactionVolume.setCenterPosition(centerPos);
1486 switch (interactionVolume.getElementNumber())
1490 if (interactionVolume.hasSubVolumeElement(0))
1492 interactionVolume.setOutsideFace(1);
1493 interactionVolume.setOutsideFace(2);
1494 interactionVolume.setOutsideFace(4);
1495 interactionVolume.setOutsideFace(5);
1496 interactionVolume.setOutsideFace(6);
1497 interactionVolume.setOutsideFace(7);
1498 interactionVolume.setOutsideFace(9);
1499 interactionVolume.setOutsideFace(10);
1500 interactionVolume.setOutsideFace(11);
1502 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1503 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 0)/4.0,0);
1504 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 1)/4.0,3);
1505 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 0, 2)/4.0,8);
1507 if (interactionVolume.hasSubVolumeElement(1))
1509 interactionVolume.setOutsideFace(2);
1510 interactionVolume.setOutsideFace(3);
1511 interactionVolume.setOutsideFace(4);
1512 interactionVolume.setOutsideFace(5);
1513 interactionVolume.setOutsideFace(6);
1514 interactionVolume.setOutsideFace(7);
1515 interactionVolume.setOutsideFace(8);
1516 interactionVolume.setOutsideFace(10);
1517 interactionVolume.setOutsideFace(11);
1519 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1520 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 0)/4.0,1);
1521 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 1)/4.0,0);
1522 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 1, 2)/4.0,9);
1524 if (interactionVolume.hasSubVolumeElement(2))
1526 interactionVolume.setOutsideFace(0);
1527 interactionVolume.setOutsideFace(1);
1528 interactionVolume.setOutsideFace(4);
1529 interactionVolume.setOutsideFace(5);
1530 interactionVolume.setOutsideFace(6);
1531 interactionVolume.setOutsideFace(7);
1532 interactionVolume.setOutsideFace(8);
1533 interactionVolume.setOutsideFace(9);
1534 interactionVolume.setOutsideFace(10);
1536 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1537 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 0)/4.0,3);
1538 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 1)/4.0,2);
1539 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 2, 2)/4.0,11);
1541 if (interactionVolume.hasSubVolumeElement(3))
1543 interactionVolume.setOutsideFace(0);
1544 interactionVolume.setOutsideFace(3);
1545 interactionVolume.setOutsideFace(4);
1546 interactionVolume.setOutsideFace(5);
1547 interactionVolume.setOutsideFace(6);
1548 interactionVolume.setOutsideFace(7);
1549 interactionVolume.setOutsideFace(8);
1550 interactionVolume.setOutsideFace(9);
1551 interactionVolume.setOutsideFace(11);
1553 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1554 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 0)/4.0,2);
1555 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 1)/4.0,1);
1556 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 3, 2)/4.0,10);
1558 if (interactionVolume.hasSubVolumeElement(4))
1560 interactionVolume.setOutsideFace(0);
1561 interactionVolume.setOutsideFace(1);
1562 interactionVolume.setOutsideFace(2);
1563 interactionVolume.setOutsideFace(3);
1564 interactionVolume.setOutsideFace(5);
1565 interactionVolume.setOutsideFace(6);
1566 interactionVolume.setOutsideFace(9);
1567 interactionVolume.setOutsideFace(10);
1568 interactionVolume.setOutsideFace(11);
1570 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1571 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 0)/4.0,8);
1572 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 1)/4.0,4);
1573 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 4, 2)/4.0,7);
1575 if (interactionVolume.hasSubVolumeElement(5))
1577 interactionVolume.setOutsideFace(0);
1578 interactionVolume.setOutsideFace(1);
1579 interactionVolume.setOutsideFace(2);
1580 interactionVolume.setOutsideFace(3);
1581 interactionVolume.setOutsideFace(6);
1582 interactionVolume.setOutsideFace(7);
1583 interactionVolume.setOutsideFace(8);
1584 interactionVolume.setOutsideFace(10);
1585 interactionVolume.setOutsideFace(11);
1587 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1588 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 0)/4.0,9);
1589 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 1)/4.0,5);
1590 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 5, 2)/4.0,4);
1592 if (interactionVolume.hasSubVolumeElement(6))
1594 interactionVolume.setOutsideFace(0);
1595 interactionVolume.setOutsideFace(1);
1596 interactionVolume.setOutsideFace(2);
1597 interactionVolume.setOutsideFace(3);
1598 interactionVolume.setOutsideFace(4);
1599 interactionVolume.setOutsideFace(5);
1600 interactionVolume.setOutsideFace(8);
1601 interactionVolume.setOutsideFace(9);
1602 interactionVolume.setOutsideFace(10);
1604 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1605 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 0)/4.0,11);
1606 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 1)/4.0,7);
1607 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 6, 2)/4.0,6);
1609 if (interactionVolume.hasSubVolumeElement(7))
1611 interactionVolume.setOutsideFace(0);
1612 interactionVolume.setOutsideFace(1);
1613 interactionVolume.setOutsideFace(2);
1614 interactionVolume.setOutsideFace(3);
1615 interactionVolume.setOutsideFace(4);
1616 interactionVolume.setOutsideFace(7);
1617 interactionVolume.setOutsideFace(8);
1618 interactionVolume.setOutsideFace(9);
1619 interactionVolume.setOutsideFace(11);
1621 int eIdxGlobal = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1622 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 0)/4.0,10);
1623 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 1)/4.0,6);
1624 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal, 7, 2)/4.0,5);
1631 if (interactionVolume.hasSubVolumeElement(0))
1633 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1634 if (interactionVolume.hasSubVolumeElement(1))
1636 interactionVolume.setOutsideFace(4);
1637 interactionVolume.setOutsideFace(5);
1638 interactionVolume.setOutsideFace(6);
1639 interactionVolume.setOutsideFace(7);
1640 interactionVolume.setOutsideFace(2);
1641 interactionVolume.setOutsideFace(10);
1642 interactionVolume.setOutsideFace(11);
1644 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1645 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0,3);
1646 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0,8);
1647 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0,1);
1648 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0,9);
1652 if (interactionVolume.hasSubVolumeElement(2))
1654 interactionVolume.setOutsideFace(4);
1655 interactionVolume.setOutsideFace(5);
1656 interactionVolume.setOutsideFace(6);
1657 interactionVolume.setOutsideFace(7);
1658 interactionVolume.setOutsideFace(1);
1659 interactionVolume.setOutsideFace(9);
1660 interactionVolume.setOutsideFace(10);
1662 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1663 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0,0);
1664 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0,8);
1665 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0,2);
1666 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 2)/4.0,11);
1670 if (interactionVolume.hasSubVolumeElement(4))
1672 interactionVolume.setOutsideFace(1);
1673 interactionVolume.setOutsideFace(5);
1674 interactionVolume.setOutsideFace(9);
1675 interactionVolume.setOutsideFace(10);
1676 interactionVolume.setOutsideFace(2);
1677 interactionVolume.setOutsideFace(6);
1678 interactionVolume.setOutsideFace(11);
1680 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1681 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0,0);
1682 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0,3);
1683 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 1)/4.0,4);
1684 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 2)/4.0,7);
1689 if (interactionVolume.hasSubVolumeElement(7))
1691 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1692 if (interactionVolume.hasSubVolumeElement(5))
1694 interactionVolume.setOutsideFace(0);
1695 interactionVolume.setOutsideFace(1);
1696 interactionVolume.setOutsideFace(2);
1697 interactionVolume.setOutsideFace(3);
1698 interactionVolume.setOutsideFace(7);
1699 interactionVolume.setOutsideFace(8);
1700 interactionVolume.setOutsideFace(11);
1702 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1703 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0,10);
1704 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0,6);
1705 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 0)/4.0,9);
1706 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 2)/4.0,4);
1710 if (interactionVolume.hasSubVolumeElement(6))
1712 interactionVolume.setOutsideFace(0);
1713 interactionVolume.setOutsideFace(1);
1714 interactionVolume.setOutsideFace(2);
1715 interactionVolume.setOutsideFace(3);
1716 interactionVolume.setOutsideFace(4);
1717 interactionVolume.setOutsideFace(8);
1718 interactionVolume.setOutsideFace(9);
1720 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1721 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0,10);
1722 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0,5);
1723 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 0)/4.0,11);
1724 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 1)/4.0,7);
1728 if (interactionVolume.hasSubVolumeElement(3))
1730 interactionVolume.setOutsideFace(0);
1731 interactionVolume.setOutsideFace(4);
1732 interactionVolume.setOutsideFace(8);
1733 interactionVolume.setOutsideFace(9);
1734 interactionVolume.setOutsideFace(3);
1735 interactionVolume.setOutsideFace(7);
1736 interactionVolume.setOutsideFace(11);
1738 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1739 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0,6);
1740 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0,5);
1741 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 3, 0)/4.0,2);
1742 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 3, 1)/4.0,1);
1747 if (interactionVolume.hasSubVolumeElement(5))
1749 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1750 if (interactionVolume.hasSubVolumeElement(1))
1752 interactionVolume.setOutsideFace(3);
1753 interactionVolume.setOutsideFace(7);
1754 interactionVolume.setOutsideFace(8);
1755 interactionVolume.setOutsideFace(11);
1756 interactionVolume.setOutsideFace(2);
1757 interactionVolume.setOutsideFace(6);
1758 interactionVolume.setOutsideFace(10);
1760 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1761 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 1)/4.0,5);
1762 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 2)/4.0,4);
1763 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0,1);
1764 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 1)/4.0,0);
1768 if (interactionVolume.hasSubVolumeElement(4))
1770 interactionVolume.setOutsideFace(0);
1771 interactionVolume.setOutsideFace(1);
1772 interactionVolume.setOutsideFace(2);
1773 interactionVolume.setOutsideFace(3);
1774 interactionVolume.setOutsideFace(6);
1775 interactionVolume.setOutsideFace(10);
1776 interactionVolume.setOutsideFace(11);
1778 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1779 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 0)/4.0,9);
1780 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 5, 1)/4.0,5);
1781 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 0)/4.0,8);
1782 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 2)/4.0,7);
1787 if (interactionVolume.hasSubVolumeElement(6))
1789 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1790 if (interactionVolume.hasSubVolumeElement(4))
1792 interactionVolume.setOutsideFace(1);
1793 interactionVolume.setOutsideFace(5);
1794 interactionVolume.setOutsideFace(9);
1795 interactionVolume.setOutsideFace(10);
1796 interactionVolume.setOutsideFace(0);
1797 interactionVolume.setOutsideFace(2);
1798 interactionVolume.setOutsideFace(3);
1800 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1801 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 0)/4.0,11);
1802 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 2)/4.0,6);
1803 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 0)/4.0,8);
1804 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 4, 1)/4.0,4);
1808 if (interactionVolume.hasSubVolumeElement(2))
1810 interactionVolume.setOutsideFace(1);
1811 interactionVolume.setOutsideFace(5);
1812 interactionVolume.setOutsideFace(9);
1813 interactionVolume.setOutsideFace(10);
1814 interactionVolume.setOutsideFace(0);
1815 interactionVolume.setOutsideFace(4);
1816 interactionVolume.setOutsideFace(8);
1818 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1819 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 1)/4.0,7);
1820 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 6, 2)/4.0,6);
1821 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 0)/4.0,3);
1822 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0,2);
1827 if (interactionVolume.hasSubVolumeElement(3))
1829 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1830 if (interactionVolume.hasSubVolumeElement(1))
1832 interactionVolume.setOutsideFace(4);
1833 interactionVolume.setOutsideFace(5);
1834 interactionVolume.setOutsideFace(6);
1835 interactionVolume.setOutsideFace(7);
1836 interactionVolume.setOutsideFace(3);
1837 interactionVolume.setOutsideFace(8);
1838 interactionVolume.setOutsideFace(11);
1840 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1841 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 0)/4.0,2);
1842 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 2)/4.0,10);
1843 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 1)/4.0,0);
1844 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0,9);
1848 if (interactionVolume.hasSubVolumeElement(2))
1850 interactionVolume.setOutsideFace(4);
1851 interactionVolume.setOutsideFace(5);
1852 interactionVolume.setOutsideFace(6);
1853 interactionVolume.setOutsideFace(7);
1854 interactionVolume.setOutsideFace(0);
1855 interactionVolume.setOutsideFace(8);
1856 interactionVolume.setOutsideFace(9);
1858 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1859 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 1)/4.0,1);
1860 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 3, 2)/4.0,10);
1861 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 0)/4.0,3);
1862 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 2)/4.0,11);
1872 if (interactionVolume.hasSubVolumeElement(0))
1874 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(0));
1875 if (interactionVolume.hasSubVolumeElement(1))
1877 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1878 if (interactionVolume.hasSubVolumeElement(2) && interactionVolume.hasSubVolumeElement(3))
1880 interactionVolume.setOutsideFace(4);
1881 interactionVolume.setOutsideFace(5);
1882 interactionVolume.setOutsideFace(6);
1883 interactionVolume.setOutsideFace(7);
1885 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1886 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1887 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 2)/4.0, 8);
1888 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 2)/4.0, 9);
1889 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 2, 2)/4.0, 10);
1890 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 2)/4.0, 11);
1894 if (interactionVolume.hasSubVolumeElement(4) && interactionVolume.hasSubVolumeElement(5))
1896 interactionVolume.setOutsideFace(2);
1897 interactionVolume.setOutsideFace(6);
1898 interactionVolume.setOutsideFace(10);
1899 interactionVolume.setOutsideFace(11);
1901 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1902 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1903 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 1)/4.0, 3);
1904 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 1, 0)/4.0, 1);
1905 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 2)/4.0, 7);
1906 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 5, 1)/4.0, 5);
1911 if (interactionVolume.hasSubVolumeElement(2) && interactionVolume.hasSubVolumeElement(4)
1912 && interactionVolume.hasSubVolumeElement(6))
1914 interactionVolume.setOutsideFace(1);
1915 interactionVolume.setOutsideFace(5);
1916 interactionVolume.setOutsideFace(9);
1917 interactionVolume.setOutsideFace(10);
1919 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1920 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1921 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1922 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 0, 0)/4.0, 0);
1923 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 2, 1)/4.0, 2);
1924 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 1)/4.0, 4);
1925 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 6, 2)/4.0, 6);
1930 if (interactionVolume.hasSubVolumeElement(7))
1932 int eIdxGlobal1 = problem_.variables().index(interactionVolume.getSubVolumeElement(7));
1933 if (interactionVolume.hasSubVolumeElement(5))
1935 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(5));
1936 if (interactionVolume.hasSubVolumeElement(1) && interactionVolume.hasSubVolumeElement(3))
1938 interactionVolume.setOutsideFace(3);
1939 interactionVolume.setOutsideFace(7);
1940 interactionVolume.setOutsideFace(8);
1941 interactionVolume.setOutsideFace(11);
1943 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(1));
1944 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1945 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 1)/4.0, 6);
1946 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 2)/4.0, 4);
1947 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 1, 1)/4.0, 0);
1948 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 0)/4.0, 2);
1952 if (interactionVolume.hasSubVolumeElement(4) && interactionVolume.hasSubVolumeElement(6))
1954 interactionVolume.setOutsideFace(0);
1955 interactionVolume.setOutsideFace(1);
1956 interactionVolume.setOutsideFace(2);
1957 interactionVolume.setOutsideFace(3);
1959 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(4));
1960 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1961 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 0)/4.0, 10);
1962 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 5, 0)/4.0, 9);
1963 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 4, 0)/4.0, 8);
1964 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 6, 0)/4.0, 11);
1969 if (interactionVolume.hasSubVolumeElement(6) && interactionVolume.hasSubVolumeElement(2)
1970 && interactionVolume.hasSubVolumeElement(3))
1972 interactionVolume.setOutsideFace(0);
1973 interactionVolume.setOutsideFace(4);
1974 interactionVolume.setOutsideFace(8);
1975 interactionVolume.setOutsideFace(9);
1977 int eIdxGlobal2 = problem_.variables().index(interactionVolume.getSubVolumeElement(6));
1978 int eIdxGlobal3 = problem_.variables().index(interactionVolume.getSubVolumeElement(2));
1979 int eIdxGlobal4 = problem_.variables().index(interactionVolume.getSubVolumeElement(3));
1980 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal1, 7, 2)/4.0, 5);
1981 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal2, 6, 1)/4.0, 7);
1982 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal3, 2, 0)/4.0, 3);
1983 interactionVolume.setFaceArea(getRealFaceArea(interactionVolume, eIdxGlobal4, 3, 1)/4.0, 1);
1991 DUNE_THROW(Dune::NotImplemented,
"Boundary shape not implemented");
2000template<
class TypeTag>
2003 std::vector < std::vector<int> > elemVertMap(problem_.gridView().size(dim), std::vector<int>(8, -1));
2006 for (
const auto& element : elements(problem_.gridView()))
2007 storeSubVolumeElements(element, elemVertMap);
2009 for (
unsigned int i = 0; i < interactionVolumes_.size(); i++)
2010 if (interactionVolumes_[i].getElementNumber() == 0)
2011 interactionVolumes_[i].printInteractionVolumeInfo();
2014 for (
const auto& element : elements(problem_.gridView()))
2015 storeIntersectionInfo(element, elemVertMap);
2019 for (
const auto& vertex : vertices(problem_.gridView()))
2021 int vIdxGlobal = problem_.variables().index(vertex);
2023 InteractionVolume& interactionVolume = interactionVolumes_[vIdxGlobal];
2025 if (interactionVolume.getElementNumber() == 8)
2027 storeInnerInteractionVolume(interactionVolume, vertex);
2029 else if (interactionVolume.isBoundaryInteractionVolume())
2031 storeBoundaryInteractionVolume(interactionVolume, vertex);
2035 DUNE_THROW(Dune::NotImplemented,
"Interaction volume is no boundary volume but consists of less than 8 elements");
2044 if (!interactionVolume.isBoundaryInteractionVolume())
2046 auto element1 = interactionVolume.getSubVolumeElement(0);
2047 auto element2 = interactionVolume.getSubVolumeElement(1);
2048 auto element3 = interactionVolume.getSubVolumeElement(2);
2049 auto element4 = interactionVolume.getSubVolumeElement(3);
2050 auto element5 = interactionVolume.getSubVolumeElement(4);
2051 auto element6 = interactionVolume.getSubVolumeElement(5);
2052 auto element7 = interactionVolume.getSubVolumeElement(6);
2053 auto element8 = interactionVolume.getSubVolumeElement(7);
2055 int eIdxGlobal1 = problem_.variables().index(element1);
2056 int eIdxGlobal2 = problem_.variables().index(element2);
2057 int eIdxGlobal3 = problem_.variables().index(element3);
2058 int eIdxGlobal4 = problem_.variables().index(element4);
2059 int eIdxGlobal5 = problem_.variables().index(element5);
2060 int eIdxGlobal6 = problem_.variables().index(element6);
2061 int eIdxGlobal7 = problem_.variables().index(element7);
2062 int eIdxGlobal8 = problem_.variables().index(element8);
2064 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 0), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 0));
2065 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 1), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 1));
2066 addRealFluxFaceArea_(interactionVolume.getFaceArea(0, 2), eIdxGlobal1, interactionVolume.getIndexOnElement(0, 2));
2067 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 0), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 0));
2068 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 1), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 1));
2069 addRealFluxFaceArea_(interactionVolume.getFaceArea(1, 2), eIdxGlobal2, interactionVolume.getIndexOnElement(1, 2));
2070 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 0), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 0));
2071 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 1), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 1));
2072 addRealFluxFaceArea_(interactionVolume.getFaceArea(2, 2), eIdxGlobal3, interactionVolume.getIndexOnElement(2, 2));
2073 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 0), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 0));
2074 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 1), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 1));
2075 addRealFluxFaceArea_(interactionVolume.getFaceArea(3, 2), eIdxGlobal4, interactionVolume.getIndexOnElement(3, 2));
2076 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 0), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 0));
2077 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 1), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 1));
2078 addRealFluxFaceArea_(interactionVolume.getFaceArea(4, 2), eIdxGlobal5, interactionVolume.getIndexOnElement(4, 2));
2079 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 0), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 0));
2080 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 1), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 1));
2081 addRealFluxFaceArea_(interactionVolume.getFaceArea(5, 2), eIdxGlobal6, interactionVolume.getIndexOnElement(5, 2));
2082 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 0), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 0));
2083 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 1), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 1));
2084 addRealFluxFaceArea_(interactionVolume.getFaceArea(6, 2), eIdxGlobal7, interactionVolume.getIndexOnElement(6, 2));
2085 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 0), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 0));
2086 addRealFluxFaceArea_(interactionVolume.getFaceArea(7, 1), eIdxGlobal8, interactionVolume.getIndexOnElement(7, 1));
2087 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...
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
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:371
void storeBoundaryInteractionVolume(InteractionVolume &interactionVolume, const Vertex &vertex)
Stores additional information for interaction volumes of boundary vertices.
Definition: 3dinteractionvolumecontainer.hh:1478
GlobalInteractionVolumeVector interactionVolumes_
Definition: 3dinteractionvolumecontainer.hh:296
FvMpfaL3dInteractionVolumeContainer(Problem &problem)
Constructs a FvMpfaL3dInteractionVolumeContainer object.
Definition: 3dinteractionvolumecontainer.hh:275
FaceAreaVector realFluxFaceArea_
Definition: 3dinteractionvolumecontainer.hh:297
Scalar getRealFaceArea(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the face area of the element.
Definition: 3dinteractionvolumecontainer.hh:248
GetPropType< TypeTag, Properties::MPFAInteractionVolume > InteractionVolume
Type for storing an MPFA-interaction-volume. (Usually of type FvMpfaL3dInteractionVolume or FvMpfaL3d...
Definition: 3dinteractionvolumecontainer.hh:94
GlobalInteractionVolumeVector & interactionVolumesGlobal() const
Returns the interaction volumes container.
Definition: 3dinteractionvolumecontainer.hh:165
Scalar faceAreaFactor(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the area weighting factor for the fluxes.
Definition: 3dinteractionvolumecontainer.hh:181
Problem & problem_
Definition: 3dinteractionvolumecontainer.hh:294
Scalar faceAreaFactor(int elemGlobalIdx, int indexInInside)
Returns the area weighting factor for the fluxes.
Definition: 3dinteractionvolumecontainer.hh:198
GlobalInteractionVolumeVector & interactionVolumesGlobal()
Returns the interaction volumes container.
Definition: 3dinteractionvolumecontainer.hh:159
void initialize(bool solveTwice=true)
Initializes the interaction volume container.
Definition: 3dinteractionvolumecontainer.hh:131
void addRealFluxFaceArea_(Scalar faceArea, int eIdxGlobal, int fIdx)
Definition: 3dinteractionvolumecontainer.hh:285
InteractionVolume & interactionVolume(int vertexIdx) const
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:153
void update()
Updates the interaction volume container.
Definition: 3dinteractionvolumecontainer.hh:113
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:320
void addRealFaceArea_(Scalar faceArea, int eIdxGlobal, int fIdx)
Definition: 3dinteractionvolumecontainer.hh:289
Scalar getRealFluxFaceArea(InteractionVolume &interactionVolume, int elemGlobalIdx, int elemLocalIdx, int localFaceIdx)
Returns the area trough which fluxes are calculated by the MPFA.
Definition: 3dinteractionvolumecontainer.hh:216
Scalar getRealFaceArea(int elemGlobalIdx, int indexInInside)
Returns the face area of the element.
Definition: 3dinteractionvolumecontainer.hh:263
InteractionVolume & interactionVolume(int vertexIdx)
Returns an interaction volume.
Definition: 3dinteractionvolumecontainer.hh:143
Scalar getRealFluxFaceArea(int elemGlobalIdx, int indexInInside)
Returns the area trough which fluxes are calculated by the MPFA.
Definition: 3dinteractionvolumecontainer.hh:231
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:1341
Properties for a MPFA method.
Base file for properties related to sequential IMPET algorithms.