179 const double * NOALIAS Q,
180 const tarch::la::Vector<DIMENSIONS,double>& volumeX,
181 const tarch::la::Vector<DIMENSIONS,double>& volumeH,
186 logTraceInWith4Arguments(
"sourceTerm(...)", volumeX, volumeH, t, dt );
187 for(
int i=0; i<NumberOfUnknowns; i++){
188 assertion3( std::isfinite(Q[i]), i, volumeX, t );
220 for(
int i=0; i<NumberOfUnknowns; i++){
221 nonCriticalAssertion3( std::isfinite(S[i]), i, volumeX, t );
223 logTraceOut(
"sourceTerm(...)" );
258 const double * NOALIAS Q,
259 const double * NOALIAS deltaQ,
260 const tarch::la::Vector<DIMENSIONS,double>& faceCentre,
261 const tarch::la::Vector<DIMENSIONS,double>& volumeH,
265 double * NOALIAS BgradQ
267 logTraceInWith4Arguments(
"nonconservativeProduct(...)", faceCentre, volumeH, t, normal );
268 assertion( normal>=0 );
269 assertion( normal<DIMENSIONS );
272 for (
int i=0; i<NumberOfUnknowns; i++) {
273 nonCriticalAssertion4( std::isfinite(BgradQ[i]), i, faceCentre, t, normal );
275 logTraceOut(
"nonconservativeProduct(...)" );
301 ncp(BgradQ, Q, gradQSerialised, normal, CCZ4LapseType, CCZ4ds, CCZ4c, CCZ4e, CCZ4f, CCZ4bs, CCZ4sk, CCZ4xi, CCZ4mu, CCZ4SO);
305 const double * NOALIAS Q,
306 const tarch::la::Vector<DIMENSIONS,double>& volumeCentre,
307 const tarch::la::Vector<DIMENSIONS,double>& volumeH,
310 ::exahype2::RefinementCommand result = ::exahype2::RefinementCommand::Keep;
312 const double radius = tarch::la::norm2( volumeCentre );
318 result=::exahype2::RefinementCommand::Refine;
322 if (tarch::la::equals(t,0.0)){
323 constexpr int NumberOfRefinementLayers = 2;
325 double Radius[NumberOfRefinementLayers] = {8, 6};
326 double MaxH[NumberOfRefinementLayers] = {0.15,0.04};
327 result = ::exahype2::RefinementCommand::Keep;
328 for (
int i=0; i<NumberOfRefinementLayers; i++) {
329 if (radius<Radius[i] and tarch::la::max(volumeH)>MaxH[i]) {
330 result=::exahype2::RefinementCommand::Refine;
336 tarch::la::Vector<DIMENSIONS,double> leftBH = {-4.241, 0.0, 0.0};
337 tarch::la::Vector<DIMENSIONS,double> rightBH = { 4.241, 0.0, 0.0};
339 const double radius1 = tarch::la::norm2( volumeCentre - leftBH );
340 const double radius2 = tarch::la::norm2( volumeCentre - rightBH );
342 if (tarch::la::equals(t,0.0)){
343 if ( ((radius1<5) or (radius2<5)) and (volumeH(0)>1.0)) { result=::exahype2::RefinementCommand::Refine; }
344 else if ((radius1<2.5) or (radius2<2.5)) { result=::exahype2::RefinementCommand::Refine; }
345 else {result = ::exahype2::RefinementCommand::Keep;}
347 if ((Q[65]>0.1) and (volumeH(0)>1.0)) { result=::exahype2::RefinementCommand::Refine; }
348 else if (Q[65]>0.2) { result=::exahype2::RefinementCommand::Refine; }
349 else {result = ::exahype2::RefinementCommand::Keep;}
353 if (tarch::la::equals(t,0.0)){
354 constexpr int NumberOfRefinementLayers = 2;
355 double Radius[NumberOfRefinementLayers] = {4, 3};
356 double MaxH[NumberOfRefinementLayers] = {0.17,0.06};
358 result = ::exahype2::RefinementCommand::Keep;
359 for (
int i=0; i<NumberOfRefinementLayers; i++) {
360 if (radius<Radius[i] and tarch::la::max(volumeH)>MaxH[i]) {
361 result=::exahype2::RefinementCommand::Refine;
367 if (tarch::la::equals(t,0.0)){
368 constexpr int NumberOfRefinementLayers = 2;
369 double Radius[NumberOfRefinementLayers] = {4, 3};
370 double MaxH[NumberOfRefinementLayers] = {0.15,0.04};
372 result = ::exahype2::RefinementCommand::Keep;
373 for (
int i=0; i<NumberOfRefinementLayers; i++) {
374 if (radius<Radius[i] and tarch::la::max(volumeH)>MaxH[i]) {
375 result=::exahype2::RefinementCommand::Refine;
381 if (tarch::la::equals(t,0.0)){
382 constexpr int NumberOfRefinementLayers = 2;
383 double Radius[NumberOfRefinementLayers] = {4, 3};
384 double MaxH[NumberOfRefinementLayers] = {0.1,0.035};
386 result = ::exahype2::RefinementCommand::Keep;
387 for (
int i=0; i<NumberOfRefinementLayers; i++) {
388 if (radius<Radius[i] and tarch::la::max(volumeH)>MaxH[i]) {
389 result=::exahype2::RefinementCommand::Refine;
395 if (tarch::la::equals(t,0.0)){
396 constexpr int NumberOfRefinementLayers = 2;
397 double Radius[NumberOfRefinementLayers] = {3.0, 1.5};
398 double MaxH[NumberOfRefinementLayers] = {0.15,0.04};
399 result = ::exahype2::RefinementCommand::Keep;
400 for (
int i=0; i<NumberOfRefinementLayers; i++) {
401 if (radius<Radius[i] and tarch::la::max(volumeH)>MaxH[i]) {
402 result=::exahype2::RefinementCommand::Refine;
static void ncp(double *BgradQ, const double *const Q, const double *const gradQSerialised, const int normal, const int CCZ4LapseType, const double CCZ4ds, const double CCZ4c, const double CCZ4e, const double CCZ4f, const double CCZ4bs, const double CCZ4sk, const double CCZ4xi, const double CCZ4mu, const double CCZ4SO)