![]() |
Peano
|
Functions | |
tarch::la::Vector< Dimensions, int > | mapParticleOntoVoxel (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, const tarch::la::Vector< Dimensions, double > &particleX) |
Assume that we have a particle suspended in a cell. | |
tarch::la::Vector< Dimensions, int > | mapBiasedParticleOntoVoxel (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, const tarch::la::Vector< Dimensions, double > &particleX) |
Similar to mapParticleOntoVoxel() but this time, we always take the biased voxel to the left. | |
double | projectValueOntoParticle_piecewiseConstant (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, int unknownsPerVoxel, const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &particleX, int unknown) |
Project one quantity from the patch data onto the particle. | |
double | projectValueOntoParticle_piecewiseLinear (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, int unknownsPerVoxel, const double *__restrict__ Q, const tarch::la::Vector< Dimensions, double > &particleX, int unknown) |
template<typename Particle , int SourceIndex, int... SourceIndices> | |
void | projectValuesOntoParticle_piecewiseConstant (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, int unknownsPerVoxel, const double *__restrict__ Q, Particle &particle, int destinationIndex) |
Actual realisation of the projection routine. | |
template<typename Particle , int SourceIndex, int... SourceIndices> | |
void | projectValuesOntoParticle_piecewiseLinear (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, int unknownsPerVoxel, const double *__restrict__ Q, Particle &particle, int destinationIndex) |
template<typename Particle > | |
void | projectValuesOntoParticle_piecewiseConstant (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, int unknownsPerVoxel, const double *__restrict__ Q, Particle &particle, int destinationIndex) |
End-point of variadic templates and therefore nop. | |
template<typename Particle > | |
void | projectValuesOntoParticle_piecewiseLinear (const peano4::datamanagement::CellMarker &marker, int voxelsPerAxis, int unknownsPerVoxel, const double *__restrict__ Q, Particle &particle, int destinationIndex) |
End-point of variadic templates and therefore nop. | |
tarch::la::Vector< Dimensions, int > exahype2::fv::internal::mapBiasedParticleOntoVoxel | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
const tarch::la::Vector< Dimensions, double > & | particleX ) |
Similar to mapParticleOntoVoxel() but this time, we always take the biased voxel to the left.
Let a 1d patch be divided into voxels of size h. Up to 1.5h, the operation returns 0. From 1.5h-2.5h, the function yields a 1. So we always are biased towards the left neighbour, which is useful whenever we use the outcome as input for a linear interpolation. In this context, the result is also bounded by 0 to the bottom (which is a natural choice), but no component of the result vector exceeds voxelsPerAxis-2. You can always increment an entry safely by a one.
Definition at line 29 of file Tracer.cpp.
References assertion3.
Referenced by projectValueOntoParticle_piecewiseLinear().
tarch::la::Vector< Dimensions, int > exahype2::fv::internal::mapParticleOntoVoxel | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
const tarch::la::Vector< Dimensions, double > & | particleX ) |
Assume that we have a particle suspended in a cell.
The cell hosts a regular Cartesian mesh. The routine computes the correct voxel.
You can convert the result via
int voxelIndex = peano4::utils::dLinearised(voxel,voxelsPerAxis);
into an index to access your Q array. The whole construct assumes that Q is not surrounded by a halo layer. If you have a halo layer, you have to add (1,1,1) to the result and then increment voxelsPerAxis by two.
Definition at line 9 of file Tracer.cpp.
References assertion.
Referenced by projectValueOntoParticle_piecewiseConstant().
double exahype2::fv::internal::projectValueOntoParticle_piecewiseConstant | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
int | unknownsPerVoxel, | ||
const double *__restrict__ | Q, | ||
const tarch::la::Vector< Dimensions, double > & | particleX, | ||
int | unknown ) |
Project one quantity from the patch data onto the particle.
marker | Cell marker describing the cell's geometric/spatial properties. |
voxelsPerAxis | Describe patch. We assume that the pathch has not halo. |
unknownsPerVoxel | |
Q | Voxel field, i.e. actual patch data. Has the dimensions \( voxelsPerAxis^d \cdot unknownsPerVoxel \). |
particleX | Position of particle. |
unknown | Which unknown from data field to pick. |
Definition at line 49 of file Tracer.cpp.
References peano4::utils::dLinearised(), and mapParticleOntoVoxel().
Referenced by exahype2::fv::projectAllValuesOntoParticle_piecewiseConstant(), exahype2::fv::projectValueOntoParticle_piecewiseConstant(), and projectValuesOntoParticle_piecewiseConstant().
double exahype2::fv::internal::projectValueOntoParticle_piecewiseLinear | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
int | unknownsPerVoxel, | ||
const double *__restrict__ | Q, | ||
const tarch::la::Vector< Dimensions, double > & | particleX, | ||
int | unknown ) |
Definition at line 66 of file Tracer.cpp.
References _log, std::abs(), assertion3, dfor2, peano4::utils::dLinearised(), enddforx, exahype2::fv::getVolumeLength(), mapBiasedParticleOntoVoxel(), and tarch::la::smallerEquals().
Referenced by exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear(), exahype2::fv::projectAllValuesOntoParticle_piecewiseLinear_explicit_Euler(), exahype2::fv::projectValueOntoParticle_piecewiseLinear(), and projectValuesOntoParticle_piecewiseLinear().
void exahype2::fv::internal::projectValuesOntoParticle_piecewiseConstant | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
int | unknownsPerVoxel, | ||
const double *__restrict__ | Q, | ||
Particle & | particle, | ||
int | destinationIndex ) |
Actual realisation of the projection routine.
Has to be in a subnamespace, as we have to permute the template arguments such that the variadic arguments come last. Otherwise, C++ cannot match them.
Definition at line 32 of file Tracer.cpph.
References projectValueOntoParticle_piecewiseConstant(), and projectValuesOntoParticle_piecewiseConstant().
Referenced by exahype2::fv::projectValuesOntoParticle_piecewiseConstant(), and projectValuesOntoParticle_piecewiseConstant().
void exahype2::fv::internal::projectValuesOntoParticle_piecewiseConstant | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
int | unknownsPerVoxel, | ||
const double *__restrict__ | Q, | ||
Particle & | particle, | ||
int | destinationIndex ) |
End-point of variadic templates and therefore nop.
Definition at line 72 of file Tracer.cpph.
void exahype2::fv::internal::projectValuesOntoParticle_piecewiseLinear | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
int | unknownsPerVoxel, | ||
const double *__restrict__ | Q, | ||
Particle & | particle, | ||
int | destinationIndex ) |
Definition at line 52 of file Tracer.cpph.
References projectValueOntoParticle_piecewiseLinear(), and projectValuesOntoParticle_piecewiseLinear().
Referenced by exahype2::fv::projectValuesOntoParticle_piecewiseLinear(), and projectValuesOntoParticle_piecewiseLinear().
void exahype2::fv::internal::projectValuesOntoParticle_piecewiseLinear | ( | const peano4::datamanagement::CellMarker & | marker, |
int | voxelsPerAxis, | ||
int | unknownsPerVoxel, | ||
const double *__restrict__ | Q, | ||
Particle & | particle, | ||
int | destinationIndex ) |
End-point of variadic templates and therefore nop.
Definition at line 82 of file Tracer.cpph.