13#ifndef CD_MIRRORDEPOSITION_H
14#define CD_MIRRORDEPOSITION_H
22#include <CD_NamespaceHeader.H>
154shapeIndex(
const int a_i,
const int a_j)
noexcept;
164shapeEntry(
const Real* a_shape,
const int a_i,
const int a_j)
noexcept;
208jacobian(
const Real a_twoH,
const Real a_K,
const Real a_d, Real& a_denominator)
noexcept;
242 const Real* a_surfaceData,
243 const Real a_maxJacobian,
244 const Real a_minDenominator,
247 Real& a_signedDistance,
252#include <CD_NamespaceFooter.H>
Implementation of CD_MirrorDeposition.H.
Geometry for mirrored cut-cell deposition, i.e. the even extension of the density about an embedded b...
Definition CD_MirrorDeposition.H:38
constexpr int compCentroid
First of the SpaceDim components holding the boundary centroid, as a PHYSICAL position.
Definition CD_MirrorDeposition.H:58
Status
What a band cell's surface data is good for.
Definition CD_MirrorDeposition.H:83
@ None
No surface data. The band cell found no cut cell whose data was actually delivered to this level.
@ Planar
Centroid and normal, but the curvature fit was refused, so the shape operator is zero.
@ Fitted
Full quadratic patch: centroid, normal, and a fitted shape operator.
constexpr int numTangents
Number of tangent directions on the surface. One in 2-D, two in 3-D.
Definition CD_MirrorDeposition.H:43
int shapeIndex(const int a_i, const int a_j) noexcept
Index into the stored upper triangle of a symmetric SpaceDim x SpaceDim tensor.
Definition CD_MirrorDepositionImplem.H:26
constexpr int compStatus
Component holding the band cell's status. See MirrorDeposition::Status.
Definition CD_MirrorDeposition.H:53
Refusal
Why reflect() refused to trust its Jacobian.
Definition CD_MirrorDeposition.H:108
@ NonPositiveJacobian
The Jacobian came out non-positive, i.e. the reflection is past the surface's centre of curvature.
@ SmallDenominator
The Jacobian's denominator came too close to zero.
@ LargeJacobian
The Jacobian exceeded the permitted magnitude.
constexpr int compShape
First of the numShapeComp components holding the world-frame shape operator's upper triangle.
Definition CD_MirrorDeposition.H:68
Real shapeEntry(const Real *a_shape, const int a_i, const int a_j) noexcept
Read one entry of a world-frame shape operator stored as an upper triangle.
Definition CD_MirrorDepositionImplem.H:59
constexpr int compNormal
First of the SpaceDim components holding the unit normal, pointing INTO the fluid.
Definition CD_MirrorDeposition.H:63
constexpr int numShapeComp
Number of independent entries in a symmetric SpaceDim x SpaceDim tensor. Three in 2-D,...
Definition CD_MirrorDeposition.H:48
Real meanCurvatureTimesTwo(const Real *a_shape) noexcept
Twice the mean curvature, i.e. the first invariant of the shape operator.
Definition CD_MirrorDepositionImplem.H:83
bool reflect(const RealVect &a_pos, const Real *a_surfaceData, const Real a_maxJacobian, const Real a_minDenominator, RealVect &a_image, Real &a_jacobian, Real &a_signedDistance, Refusal &a_refusal) noexcept
Reflect a position across the quadratic surface patch stored for its cell, and weight the image.
Definition CD_MirrorDepositionImplem.H:124
Real jacobian(const Real a_twoH, const Real a_K, const Real a_d, Real &a_denominator) noexcept
The exact area/volume Jacobian of the reflection across a curved surface.
Definition CD_MirrorDepositionImplem.H:114
RealVect applyShapeOperator(const Real *a_shape, const RealVect &a_vec) noexcept
Apply a world-frame shape operator to a vector.
Definition CD_MirrorDepositionImplem.H:65
Real gaussianCurvature(const Real *a_shape) noexcept
Gaussian curvature, i.e. the second invariant of the shape operator.
Definition CD_MirrorDepositionImplem.H:95
void liftShapeOperator(const RealVect(&a_tangents)[numTangents], const Real(&a_S)[numTangents][numTangents], Real(&a_shape)[numShapeComp]) noexcept
Lift a shape operator from the tangent frame into world coordinates.
Definition CD_MirrorDepositionImplem.H:37
constexpr int numComp
Total number of components in the surface-data holder. Eight in 2-D, thirteen in 3-D.
Definition CD_MirrorDeposition.H:73