10#include "exahype2/RefinementControl.h"
11#include "repositories/SolverRepository.h"
12#include "peano4/datamanagement/FaceMarker.h"
13#include "tarch/multicore/Lock.h"
22 if (twoPunctures ==
nullptr) {
61 const tarch::la::Vector<DIMENSIONS, double>& volumeCentre,
62 const tarch::la::Vector<DIMENSIONS, double>& volumeH,
63 bool gridIsConstructed
65 logTraceInWith3Arguments(
"initialCondition(...)", volumeCentre, volumeH, gridIsConstructed);
69 logTraceOut(
"initialCondition(...)");
78 const peano4::datamanagement::CellMarker& marker
84 const peano4::datamanagement::CellMarker& marker
88 for (
int d = 0; d < DIMENSIONS; d++) {
89 tarch::la::Vector<DIMENSIONS, double> neighbourCellCentre = marker.x();
91 neighbourCellCentre(d) = marker.x()(d) - marker.h()(d);
94 neighbourCellCentre(d) = marker.x()(d) + marker.h()(d);
104 const peano4::datamanagement::CellMarker& marker,
int faceNumber
107 const int normal = faceNumber % DIMENSIONS;
108 tarch::la::Vector<DIMENSIONS, double> adjacentCellCentre = marker.x();
109 adjacentCellCentre(normal) += faceNumber >= DIMENSIONS ? marker.h()(normal) : -marker.h()(normal);
117 const peano4::datamanagement::FaceMarker& marker
119 const int normal = marker.getSelectedFaceNumber() % DIMENSIONS;
121 tarch::la::Vector<DIMENSIONS, double> leftCellCentre = marker.x();
122 tarch::la::Vector<DIMENSIONS, double> rightCellCentre = marker.x();
124 leftCellCentre(normal) -= 0.5 * marker.h()(normal);
125 rightCellCentre(normal) += 0.5 * marker.h()(normal);
132 const peano4::datamanagement::FaceMarker& marker
134 const int normal = marker.getSelectedFaceNumber() % DIMENSIONS;
136 tarch::la::Vector<DIMENSIONS, double> leftCellCentre = marker.x();
137 tarch::la::Vector<DIMENSIONS, double> rightCellCentre = marker.x();
139 leftCellCentre(normal) -= 0.5 * marker.h()(normal);
140 rightCellCentre(normal) += 0.5 * marker.h()(normal);
147 const tarch::la::Vector<DIMENSIONS, double>& cellCentre,
const tarch::la::Vector<DIMENSIONS, double>& cellH
149 return tarch::la::norm2(cellCentre) - tarch::la::norm2(0.5 * cellH) < BlackHoleFVRegion;
153 double globalMinTimeStamp,
double globalMaxTimeStamp,
double globalMinTimeStepSize,
double globalMaxTimeStepSize
155 AbstractCCZ4SBH_FV::startTimeStep(
156 globalMinTimeStamp, globalMaxTimeStamp, globalMinTimeStepSize, globalMaxTimeStepSize
163 AbstractCCZ4SBH_FV::finishTimeStep();
165 logInfo(
"finishTimeStep()",
"number of patches on this rank=" <<
_numberOfPatches);
constexpr double timeStepSize
virtual void initialCondition(double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &volumeCentre, const tarch::la::Vector< DIMENSIONS, double > &volumeH, bool gridIsConstructed) override
virtual void startTimeStep(double globalMinTimeStamp, double globalMaxTimeStamp, double globalMinTimeStepSize, double globalMaxTimeStepSize) override
Call superclass and after that report/maintain _numberOfPatches.
void incNumberOfPatches()
static bool areBothAdjacentCellsOverlappingWithBHImpactArea(const peano4::datamanagement::FaceMarker &marker)
Check two adjacent octants.
void reduceAdmissibleTimeStepSize(double timeStepSize)
Overwrite limiters time step size.
static bool isCellOverlappingWithBHImpactArea(const peano4::datamanagement::CellMarker &marker)
Is octant area overlapping with BH impact area.
static bool areAllFaceConnectedCellsOverlappingWithBHImpactArea(const peano4::datamanagement::CellMarker &marker)
static tarch::multicore::BooleanSemaphore _semaphore
static bool isOneAdjacentCellOverlappingWithBHImpactArea(const peano4::datamanagement::FaceMarker &marker)
CCZ4SBH_FV()
Initialise the two punctures object if required.
virtual void finishTimeStep() override
Call superclass and after that report/maintain _numberOfPatches.
static tarch::logging::Log _log
void ApplyTwoPunctures(double *NOALIAS Q, const tarch::la::Vector< DIMENSIONS, double > &X, double t, TP::TwoPunctures *tp, bool low_res)
void prepareTwoPunctures()
TP::TwoPunctures * twoPunctures
std::string grid_setup_method