Peano
Loading...
Searching...
No Matches
Kernels.h
Go to the documentation of this file.
1// This file is part of the ExaGRyPE project. For conditions of distribution and
2// use, please see the copyright notice at www.peano-framework.org
3#pragma once
4
5
6#include <cmath>
7#include "tarch/tarch.h"
11#include "tarch/la/Vector.h"
12
13
14namespace exagrype {
15 namespace ccz4 {
16
17 #if defined(GPUOffloadingOMP)
18 #pragma omp declare target
19 #endif
36 #if defined(SharedOMP)
37 #pragma omp declare simd
38 #endif
39 void ncp(double* BgradQ, const double* const Q, const double* const gradQSerialised, const int normal,
40 const int CCZ4LapseType,
41 const double CCZ4ds,
42 const double CCZ4c,
43 const double CCZ4e,
44 const double CCZ4f,
45 const double CCZ4bs,
46 const double CCZ4sk,
47 const double CCZ4xi,
48 const double CCZ4mu,
49 const double CCZ4SO
50 );
51
68 #if defined(SharedOMP)
69 #pragma omp declare simd
70 #endif
71 void source(double* S, const double* const Q,
72 const int CCZ4LapseType,
73 const double CCZ4ds,
74 const double CCZ4c,
75 const double CCZ4e,
76 const double CCZ4f,
77 const double CCZ4bs,
78 const double CCZ4sk,
79 const double CCZ4xi,
80 const double CCZ4itau,
81 const double CCZ4eta,
82 const double CCZ4k1,
83 const double CCZ4k2,
84 const double CCZ4k3,
85 const double CCZ4SO
86 );
87
88 #if defined(SharedOMP)
89 #pragma omp declare simd
90 #endif
92 const double* const Q,
93 int normal,
94 const double CCZ4e,
95 const double CCZ4ds,
96 const double CCZ4GLMc,
97 const double CCZ4GLMd,
98 double* maxEigenvalue
99 );
100 #if defined(GPUOffloadingOMP)
101 #pragma omp end declare target
102 #endif
103
108 void admconstraints(double* constraints, const double* const Q, const double* const gradQSerialised);
109
113 void ThetaOutputNCP(double* NCPterm, const double* const Q, const double* const gradQSerialised, int normal);
119 void TestingOutput(double* terms, const double* const Q, const double* const gradQSerialised);
120
125 void Psi4Calc(double* Psi4, const double* const Q, const double* const gradQSerialised, double* coor);
126
127
135 void enforceCCZ4constraints(double* __restrict__ newQ);
136
175 const double* __restrict__ QWithHalo,
176 double* __restrict__ rightHandSide,
177 const tarch::la::Vector<3, double>& patchSize,
178 int numberOfGridCellsPerPatchPerAxis,
179 int haloSize,
180 int unknowns,
181 int auxiliaryVariables,
182 double sigma,
183 const int* quantities,
184 int numberOfQuantities
185 );
186 }
187}
Definition ccz4.py:1
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)
Non-conservative product of the first-order CCZ4 formulation.
void maxEigenvalue(const double *const Q, int normal, const double CCZ4e, const double CCZ4ds, const double CCZ4GLMc, const double CCZ4GLMd, double *maxEigenvalue)
void ThetaOutputNCP(double *NCPterm, const double *const Q, const double *const gradQSerialised, int normal)
A temporary test function, to output Hamilton constraint related term in theta, 1 terms: RPlusTwoNabl...
void admconstraints(double *constraints, const double *const Q, const double *const gradQSerialised)
This is a postprocessing routine to monitor if the physical constraints are fulfilled.
void source(double *S, const double *const Q, 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 CCZ4itau, const double CCZ4eta, const double CCZ4k1, const double CCZ4k2, const double CCZ4k3, const double CCZ4SO)
The source term is one out of two terms that we use in our CCZ4 formulation.
void addKreissOligerDissipation(const double *__restrict__ QWithHalo, double *__restrict__ rightHandSide, const tarch::la::Vector< 3, double > &patchSize, int numberOfGridCellsPerPatchPerAxis, int haloSize, int unknowns, int auxiliaryVariables, double sigma, const int *quantities, int numberOfQuantities)
Add the Kreiss-Oliger dissipation of a patch to its right-hand side.
void enforceCCZ4constraints(double *__restrict__ newQ)
A postprocessing routine which pushes the volume solution back into the area of the CCZ4 constraints.
void Psi4Calc(double *Psi4, const double *const Q, const double *const gradQSerialised, double *coor)
This function is for the calculation of psi4, a quantity related to gravitional wave.
void TestingOutput(double *terms, const double *const Q, const double *const gradQSerialised)
A temporary test function, to output some testing values 0,1 entries: Hamilton constraint related ter...
This file is part of the ExaGRyPE project.
Definition __init__.py:1
Simple vector class.
Definition Vector.h:159