Solves the oxidant diffusion step of the Suvorov et al. (10.1007/s10825-006-0003-z) oxidation model on the Cartesian grid carrying two level sets.
More...
|
| | OxidationDiffusion ()=default |
| | OxidationDiffusion (SmartPointer< Domain< T, D > > passedReactionInterface, SmartPointer< Domain< T, D > > passedAmbientInterface, OxidationParameters passedParameters={}) |
| void | markGeometryChanged () |
| | Call after any in-place modification of the level sets (e.g. after ls::Advect) so that the next apply() rebuilds the Cartesian node grid.
|
| void | setReactionInterface (SmartPointer< Domain< T, D > > passedInterface) |
| void | setAmbientInterface (SmartPointer< Domain< T, D > > passedInterface) |
| void | setMaskInterface (SmartPointer< Domain< T, D > > passedInterface, int passedMaskSign=1) |
| void | clearMaskInterface () |
| void | setParameters (OxidationParameters passedParameters) |
| OxidationParameters | getParameters () const |
| T | getEffectiveReactionRate (const Vec3D< T > &coordinate) const |
| void | clearPressureField () |
| void | setStress (const IndexType &index, const std::array< T, 9 > &stress) |
| | Oxide Cauchy stress (Pa, tension positive, row-major 3x3) at a node, for the normal-stress reaction law.
|
| void | getFeedback (const IndexType &index, T &pressure, std::array< T, 9 > &stress) const |
| | The pressure and stress the last solve used at a node (reference pressure / zero stress where nothing was fed back).
|
| const PressureLookup & | getPressureCache () const |
| | Pressure and stress feedback carried from one solve to the next, like the concentration cache: lsOxidation builds a new OxidationDiffusion for every coupled solve, and without the carry-over every solve began its stress coupling from zero stress (~7 coupling iterations per solve on a Kao cylinder, residual 1.0 at the first).
|
| const StressLookup & | getStressCache () const |
| void | setFeedbackCache (PressureLookup pressures, StressLookup stresses) |
| const std::vector< T > & | getInterfaceNormalStress () const |
| | The interface normal stress the reaction law used in the last solve (per node; NaN where the law falls back to the unstressed rate).
|
| std::vector< T > | interfaceNormalStressFor (const StressLookup &lookup) const |
| | The interface normal stress the reaction law would use with lookup: the median sample at every node with a REACTION face, smoothed along the interface (see updateInterfaceNormalStress for why). Non-mutating, so the coupling loop can measure convergence without changing the state.
|
| void | setStress (const Vec3D< T > &coordinate, const std::array< T, 9 > &stress) |
| void | setPressure (const IndexType &index, T pressure) |
| void | setPressure (const Vec3D< T > &coordinate, T pressure) |
| void | setOxideSigns (int passedReactionSign, int passedAmbientSign) |
| | Set signs defining the oxide band. A node is inside oxide if reactionSign * reactionPhi >= 0 and ambientSign * ambientPhi >= 0.
|
| void | setSolveBounds (const IndexType &passedMinIndex, const IndexType &passedMaxIndex) |
| | Restrict the dense Cartesian diffusion solve to a finite index box. This is useful for level sets with infinite boundary conditions.
|
| void | clearSolveBounds () |
| void | apply () |
| T | getScalarVelocity (const Vec3D< T > &coordinate, int material, const Vec3D< T > &normalVector, unsigned long) final |
| | Should return a scalar value for the velocity at coordinate for a point of material with the given normalVector.
|
| FrontVelocity | frontVelocityAt (const Vec3D< T > &coordinate) const |
| T | getDissipationAlpha (int, int material, const Vec3D< T > &) final |
| | If lsLocalLaxFriedrichsAnalytical is used as the spatial discretization scheme, this is called to provide the analytical solution for the alpha values, needed for numerical stability.
|
| T | getConcentration (const Vec3D< T > &coordinate) const |
| T | getConcentration (const IndexType &index) const |
| T | getReactionBoundaryConcentration (const Vec3D< T > &coordinate) const |
| T | getReactionBoundaryConcentration (const IndexType &index) const |
| unsigned | getIterations () const |
| T | getResidual () const |
| T | getNormalizedResidual () const |
| bool | lastSolveConverged () const |
| std::size_t | getNumberOfSolutionNodes () const |
| bool | hasFiniteConcentrationField () const |
| const std::unordered_map< std::size_t, T > & | getConcentrationCache () const |
| void | setConcentrationCache (std::unordered_map< std::size_t, T > cache) |
| void | setGpuMode (GpuMode mode) |
| | Set the GPU solver selection mode (see GpuMode). On CPU-only builds (VIENNALS_GPU_BICGSTAB not defined) Gpu is an error and Auto the CPU.
|
| void | markSolved () |
| | Mark the current solution as valid without re-solving. Call this before any parallel advection (lsAdvect) that uses this field as a velocity source to prevent concurrent apply() calls inside getScalarVelocity().
|
| void | writeConcentrationToLevelSet () |
| | Write per-node concentration into ambientInterface->getPointData() so that lsInterior + lsAdvect can carry it across timestep boundaries. Safe to call regardless of the solved flag; uses the most recent nodes.
|
| void | writePressureToLevelSet () |
| | Write per-node pressure into ambientInterface->getPointData() so that it survives advection and can warm-start the coupling loop next step.
|
| void | writePersistentFields () |
| | Convenience wrapper: persist both concentration and pressure in one call.
|
| ReactionBoundarySample | getReactionBoundarySample (const Vec3D< T > &coordinate) const |
| | Return the reaction boundary sample for the grid node nearest to coordinate. Used by the deformation solver to get both the sub-grid concentration and the crossing edge so it can compute a sub-grid normal.
|
| T | getScalarVelocityFromSample (const ReactionBoundarySample &sample) const |
| | Absolute scalar velocity derived from an already-computed boundary sample, avoiding a second call to reactionBoundarySample inside getScalarVelocity.
|
| virtual Vec3D< T > | getVectorVelocity (const Vec3D< T > &, int, const Vec3D< T > &, unsigned long) |
| | Like getScalarVelocity, but returns a velocity value for each cartesian direction.
|
|
| template<class GridType> |
| void | setMirrorSides (const GridType &grid) |
| int | stencilOffset (const IndexType &index, unsigned direction, int offset) const |
| bool | crosses (T a, T b) const |
| T | valueAt (ConstSparseIterator &it, const IndexType &index) const |
| template<class OnGrid> |
| Vec3D< T > | definedLevelSetGradient (ConstSparseIterator &it, const IndexType &index, OnGrid onGrid) const |
| bool | inBounds (const IndexType &index) const |
| void | initNodeLookup () |
| std::size_t | lookupNode (const IndexType &index) const |
| std::size_t | linearIndex (const IndexType &index) const |
| bool | increment (IndexType &index) const |
| std::size_t | findNearbyNode (const IndexType &index) const |
| template<class Accept> |
| std::vector< std::size_t > | findNearbyNodes (const IndexType &index, Accept accept) const |
| bool | initializeGridFromInterfaces (SmartPointer< Domain< T, D > > reactionInterface, SmartPointer< Domain< T, D > > ambientInterface, SmartPointer< Domain< T, D > > maskInterface, bool useRequestedBounds, const IndexType &requestedMinIndex, const IndexType &requestedMaxIndex, std::size_t maxGridPoints, const std::string &solverName) |
| bool | initializeGridFromMask (SmartPointer< Domain< T, D > > maskInterface, bool useRequestedBounds, const IndexType &requestedMinIndex, const IndexType &requestedMaxIndex, std::size_t maxGridPoints, const std::string &solverName) |
template<class
T, int D>
class viennals::OxidationDiffusion< T, D >
Solves the oxidant diffusion step of the Suvorov et al. (10.1007/s10825-006-0003-z) oxidation model on the Cartesian grid carrying two level sets.
The oxide is assumed to lie between the Si/SiO2 reaction interface and the SiO2/O2 ambient interface. Regular Cartesian grid nodes inside this band are solved with finite differences. Whenever an axis-aligned grid edge leaves the oxide, a cross-point is inserted at the zero of the crossed level-set function and a Robin boundary condition is applied there. The diffusion update uses the resulting sub-grid distances in a nonuniform three-point stencil along each Cartesian axis.
The default sign convention matches the multilayer convention described in the paper: oxide is above the reaction interface and below the ambient interface, i.e. reactionPhi >= 0 and ambientPhi <= 0.