Peano
Loading...
Searching...
No Matches
exagrype::scalarfield Namespace Reference

Functions

double advectionVelocity (const double *const ccz4Fields, const int normal)
 Advection velocity of the scalar field along one coordinate axis.
void nonconservativeProduct (const double *const ccz4Fields, const double *const deltaQ, const int normal, double *const BTimesDeltaQ)
 Non-conservative product of the advection equation.
double maxEigenvalue (const double *const ccz4Fields, const int normal)
 Maximum eigenvalue, i.e.
void initialValues (double *const Q, double *const ccz4Fields, const tarch::la::Vector< Dimensions, double > &x)
 Initial values: four sine waves along the x-axis with phase shifts.

Variables

constexpr int NumberOfUnknowns = 4
 Number of unknowns of the scalar field solver (exagrype.api.scalarfield.ScalarField.Unknowns).
constexpr int LapseIndex = 16
 Position of the lapse in the 58 entries of first-order CCZ4 (exagrype.api.FOCCZ4Solver.Unknowns).

Function Documentation

◆ advectionVelocity()

double exagrype::scalarfield::advectionVelocity ( const double *const ccz4Fields,
const int normal )

Advection velocity of the scalar field along one coordinate axis.

The scalar field is advected along the x-axis with the square of the lapse, which is the metric component g_xx of the gauge wave, i.e. the scalar field sees the spacetime, but does not feed back into it (fake coupling). Along the other axes, the velocity is zero.

Parameters
ccz4FieldsThe 58 entries of first-order CCZ4 in this volume.
normalAxis (0, 1 or 2).

◆ initialValues()

void exagrype::scalarfield::initialValues ( double *const Q,
double *const ccz4Fields,
const tarch::la::Vector< Dimensions, double > & x )

Initial values: four sine waves along the x-axis with phase shifts.

Unknown m (m=0,...,3) is sin(2 pi x + m pi/4). The solution of the advection equation on the gauge wave is known analytically (see benchmarks/exagrype/gauge-wave-with-scalar-field). The routine also sets the lapse of the auxiliary variables to one, so the first time step size is well-defined before any data has been exchanged with CCZ4.

Parameters
QThe four unknowns.
ccz4FieldsThe 58 entries of first-order CCZ4 in this volume.
xPosition of the volume.

◆ maxEigenvalue()

double exagrype::scalarfield::maxEigenvalue ( const double *const ccz4Fields,
const int normal )

Maximum eigenvalue, i.e.

the modulus of the advection velocity along the axis

◆ nonconservativeProduct()

void exagrype::scalarfield::nonconservativeProduct ( const double *const ccz4Fields,
const double *const deltaQ,
const int normal,
double *const BTimesDeltaQ )

Non-conservative product of the advection equation.

For \( \partial_t q + v \partial_x q = 0 \), the product of the matrix with deltaQ is the velocity times deltaQ. Overwrites the four entries of BTimesDeltaQ.

Parameters
ccz4FieldsThe 58 entries of first-order CCZ4 in this volume.
deltaQJump (Finite Volumes) or derivative times mesh width (Finite Differences) of the four unknowns.
normalAxis along which the product is evaluated.
BTimesDeltaQResult, four entries.

Variable Documentation

◆ LapseIndex

int exagrype::scalarfield::LapseIndex = 16
constexpr

Position of the lapse in the 58 entries of first-order CCZ4 (exagrype.api.FOCCZ4Solver.Unknowns).

The solver of the scalar field holds a copy of these entries as auxiliary variables.

Definition at line 20 of file ScalarFieldKernels.h.

◆ NumberOfUnknowns

int exagrype::scalarfield::NumberOfUnknowns = 4
constexpr

Number of unknowns of the scalar field solver (exagrype.api.scalarfield.ScalarField.Unknowns).

Definition at line 13 of file ScalarFieldKernels.h.