6 This is a straightforward modification of ReconstructPatchAndApplyFunctor._Template_TouchCellFirstTime_Fill_Halos
7 in the blockstructured toolkit.
11 // Bring in the auxiliary patches, i.e., befill halo.
13 for(int d=0; d<Dimensions; d++) {{
14 logTraceInWith1Argument( "touchCellFirstTime(...)::loopOverFace", d );
16 // d-loop over all dimensions except d. The vector k's entry d is set
17 // to 0. We start with the left/bottom face, i.e. the one closer to the
18 // coordinate system's origin.
20 dfore(k,{DOFS_PER_AXIS},d,0) {{
21 std::pair<double,double> oldNewWeightsLeft = ::exahype2::getInterpolationWeights(
22 fineGridFaces""" + solver +
"""FaceLabel(d).getOldTimeStamp(0),
23 fineGridFaces""" + solver +
"""FaceLabel(d).getNewTimeStamp(0),
24 fineGridCell""" + solver +
"""CellLabel.getTimeStamp()
26 std::pair<double,double> oldNewWeightsRight = ::exahype2::getInterpolationWeights(
27 fineGridFaces""" + solver +
"""FaceLabel(d+Dimensions).getOldTimeStamp(1),
28 fineGridFaces""" + solver +
"""FaceLabel(d+Dimensions).getNewTimeStamp(1),
29 fineGridCell""" + solver +
"""CellLabel.getTimeStamp()
32 for (int i=0; i<{OVERLAP}; i++) {{
33 tarch::la::Vector<Dimensions,int> destinationCell = k + tarch::la::Vector<Dimensions,int>({OVERLAP});
34 tarch::la::Vector<Dimensions,int> sourceCell = k;
35 destinationCell(d) = i;
38 int destinationCellSerialised = peano4::utils::dLinearised(destinationCell,{DOFS_PER_AXIS} + 2*{OVERLAP});
39 int sourceCellSerialised = serialisePatchIndex(sourceCell,d);
41 for (int unknown=0; unknown<{NUMBER_OF_UNKNOWNS}; unknown++) {{
42 oldQWithHalo[destinationCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown]
43 = oldNewWeightsLeft.first * fineGridFaces""" + solver +
"""QOld(d).value[ sourceCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ]
44 + oldNewWeightsLeft.second * fineGridFaces""" + solver +
"""QNew(d).value[ sourceCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ];
45 {ASSERTION_WITH_7_ARGUMENTS}(
46 {ASSERTION_PREFIX_FOR_HALO} or
47 oldQWithHalo[ destinationCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ]==oldQWithHalo[ destinationCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ],
48 sourceCell, destinationCell, unknown, d, marker.toString(), _treeNumber, marker.toString()
52 destinationCell(d) = i+{DOFS_PER_AXIS}+{OVERLAP};
53 sourceCell(d) = i+{OVERLAP};
55 destinationCellSerialised = peano4::utils::dLinearised(destinationCell,{DOFS_PER_AXIS} + 2*{OVERLAP});
56 sourceCellSerialised = serialisePatchIndex(sourceCell,d);
57 for (int unknown=0; unknown<{NUMBER_OF_UNKNOWNS}; unknown++) {{
58 oldQWithHalo[destinationCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown]
59 = oldNewWeightsLeft.first * fineGridFaces""" + solver +
"""QOld(d+Dimensions).value[ sourceCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ]
60 + oldNewWeightsLeft.second * fineGridFaces""" + solver +
"""QNew(d+Dimensions).value[ sourceCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ];
61 {ASSERTION_WITH_7_ARGUMENTS}(
62 {ASSERTION_PREFIX_FOR_HALO} or
63 oldQWithHalo[ destinationCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ]==oldQWithHalo[ destinationCellSerialised*{NUMBER_OF_UNKNOWNS}+unknown ],
64 sourceCell, destinationCell, unknown, d, marker.toString(), _treeNumber, marker.toString()
69 logTraceOut("touchCellFirstTime(...)::loopOverFace");
create_halo_layer_construction_with_interpolation_for_reconstructed_patch(solver)
This is a straightforward modification of ReconstructPatchAndApplyFunctor._Template_TouchCellFirstTim...