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
91 #if defined(SharedOMP)
92 #pragma omp declare simd
93 #endif
94 void ncpFirstOrder(double* BgradQ, double* BgradQaux, const double* const Q, const double* const Qaux, const double* const gradQ, const double* const gradQaux, const int normal,
95 const int CCZ4LapseType,
96 const double CCZ4c,
97 const double CCZ4e,
98 const double CCZ4f,
99 const int CCZ4b,
100 const int CCZ4s,
101 const double CCZ4mu
102 );
103
107 #if defined(SharedOMP)
108 #pragma omp declare simd
109 #endif
110 void ncpSecondOrder(double* BgradQ, const double* const Q, const double* const Qaux, const double* const gradQ, const double* const gradQaux, const int normal,
111 const int CCZ4LapseType,
112 const double CCZ4c,
113 const double CCZ4e,
114 const double CCZ4f,
115 const int CCZ4b,
116 const int CCZ4s,
117 const double CCZ4mu
118 );
119
129 #if defined(SharedOMP)
130 #pragma omp declare simd
131 #endif
132 void sourceFirstOrder(double* S, double* Saux, const double* const Q, const double* const Qaux,
133 const int CCZ4LapseType,
134 const double CCZ4c,
135 const double CCZ4e,
136 const double CCZ4f,
137 const int CCZ4b,
138 const int CCZ4s,
139 const double CCZ4itau,
140 const double CCZ4eta,
141 const double CCZ4k1,
142 const double CCZ4k2,
143 const double CCZ4k3
144 );
145
149 #if defined(SharedOMP)
150 #pragma omp declare simd
151 #endif
152 void sourceSecondOrder(double* S, const double* const Q, const double* const Qaux,
153 const int CCZ4LapseType,
154 const double CCZ4c,
155 const double CCZ4e,
156 const double CCZ4f,
157 const int CCZ4b,
158 const int CCZ4s,
159 const double CCZ4itau,
160 const double CCZ4eta,
161 const double CCZ4k1,
162 const double CCZ4k2,
163 const double CCZ4k3
164 );
165
166 #if defined(SharedOMP)
167 #pragma omp declare simd
168 #endif
170 const double* const Q,
171 int normal,
172 const double CCZ4e,
173 const double CCZ4GLMc,
174 const double CCZ4GLMd,
175 double* maxEigenvalue
176 );
177
182 void admconstraints(double* constraints, const double* const Q, const double* const gradQSerialised);
183
187 void ThetaOutputNCP(double* NCPterm, const double* const Q, const double* const gradQSerialised, int normal);
193 void TestingOutput(double* terms, const double* const Q, const double* const gradQSerialised);
194
199 void Psi4Calc(double* Psi4, const double* const Q, const double* const gradQSerialised, double* coor);
200
201
211 void enforceCCZ4constraints(double* __restrict__ Q);
212
225 void enforceCCZ4constraintsOfEvolvedVariables(double* __restrict__ Q);
226
265 const double* __restrict__ QWithHalo,
266 double* __restrict__ rightHandSide,
267 const tarch::la::Vector<3, double>& patchSize,
268 int numberOfGridCellsPerPatchPerAxis,
269 int haloSize,
270 int unknowns,
271 int auxiliaryVariables,
272 double sigma,
273 const int* quantities,
274 int numberOfQuantities
275 );
276 }
277}
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 enforceCCZ4constraintsOfEvolvedVariables(double *__restrict__ Q)
The part of enforceCCZ4constraints() which only touches the first 25 unknowns.
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 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 sourceSecondOrder(double *S, const double *const Q, const double *const Qaux, const int CCZ4LapseType, const double CCZ4c, const double CCZ4e, const double CCZ4f, const int CCZ4b, const int CCZ4s, const double CCZ4itau, const double CCZ4eta, const double CCZ4k1, const double CCZ4k2, const double CCZ4k3)
Second-order variant of sourceFirstOrder(): updates the 25 primary entries only.
void sourceFirstOrder(double *S, double *Saux, const double *const Q, const double *const Qaux, const int CCZ4LapseType, const double CCZ4c, const double CCZ4e, const double CCZ4f, const int CCZ4b, const int CCZ4s, const double CCZ4itau, const double CCZ4eta, const double CCZ4k1, const double CCZ4k2, const double CCZ4k3)
The source term is one out of two terms that we use in our CCZ4 formulation.
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...
void maxEigenvalue(const double *const Q, int normal, const double CCZ4e, const double CCZ4GLMc, const double CCZ4GLMd, double *maxEigenvalue)
void ncpFirstOrder(double *BgradQ, double *BgradQaux, const double *const Q, const double *const Qaux, const double *const gradQ, const double *const gradQaux, const int normal, const int CCZ4LapseType, const double CCZ4c, const double CCZ4e, const double CCZ4f, const int CCZ4b, const int CCZ4s, const double CCZ4mu)
Non-conservative product of the first-order CCZ4 formulation.
void ncpSecondOrder(double *BgradQ, const double *const Q, const double *const Qaux, const double *const gradQ, const double *const gradQaux, const int normal, const int CCZ4LapseType, const double CCZ4c, const double CCZ4e, const double CCZ4f, const int CCZ4b, const int CCZ4s, const double CCZ4mu)
Second-order variant of ncpFirstOrder(): updates the 25 primary entries only.
void enforceCCZ4constraints(double *__restrict__ Q)
A postprocessing routine which pushes the volume solution back into the area of the CCZ4 constraints.
This file is part of the ExaGRyPE project.
Definition __init__.py:1
Simple vector class.
Definition Vector.h:159