Struct P1HarmonicCoordinateRelation
pub struct P1HarmonicCoordinateRelation<const D: usize> { /* private fields */ }Description
The P1 Laplace relation defining one fixed-topology harmonic coordinate field.
The relation is sealed to an immutable reference mesh and an exact
two-region cell partition. Solid/interface vertices are driven by the
supplied solid displacement, fluid-only exterior vertices are fixed, and
the remaining fluid vertices satisfy K_II u_I + K_ID u_D = 0 component by
component. Construction assembles that relation but performs no solve.
Implementations§
§impl<const D: usize> P1HarmonicCoordinateRelation<D>
impl<const D: usize> P1HarmonicCoordinateRelation<D>
pub fn new(
reference_mesh: &SimplicialMesh,
fluid_cells: Vec<CellId>,
solid_cells: Vec<CellId>,
interface_facets: Vec<FacetId>,
) -> Result<P1HarmonicCoordinateRelation<D>, Diagnostic>
pub fn new( reference_mesh: &SimplicialMesh, fluid_cells: Vec<CellId>, solid_cells: Vec<CellId>, interface_facets: Vec<FacetId>, ) -> Result<P1HarmonicCoordinateRelation<D>, Diagnostic>
Seal the solver-independent coordinate relation on one reference mesh.
Cell and facet inventories must be strictly increasing. Fluid and
solid cells must cover every cell exactly once, and interface_facets
must equal the complete set of cross-region facets. Solver tolerances
and admission policy are intentionally absent from this geometry-level
relation.
§Errors
Returns EQ0803 unless the mesh is intrinsic 2D/3D, the partition and
complete Dirichlet closure are exact and the bounded dense relation can
be assembled from positive affine simplices.
pub const fn reference_mesh(&self) -> &SimplicialMesh
pub const fn reference_mesh(&self) -> &SimplicialMesh
Immutable mesh revision defining topology, reference coordinates, and coefficients.
pub fn fluid_cells(&self) -> &[CellId]
pub fn fluid_cells(&self) -> &[CellId]
Fluid cells in canonical mesh order.
pub fn solid_cells(&self) -> &[CellId]
pub fn solid_cells(&self) -> &[CellId]
Solid cells in canonical mesh order.
pub fn interface_facets(&self) -> &[FacetId]
pub fn interface_facets(&self) -> &[FacetId]
Complete cross-region interface in canonical mesh-facet order.
pub fn solid_vertices(&self) -> &[VertexId]
pub fn solid_vertices(&self) -> &[VertexId]
Vertices driven exactly by the mesh-wide solid-displacement field.
pub fn driver_vertices(&self) -> &[VertexId]
pub fn driver_vertices(&self) -> &[VertexId]
Interface vertices supplying the fluid harmonic Dirichlet trace.
pub fn fixed_exterior_vertices(&self) -> &[VertexId]
pub fn fixed_exterior_vertices(&self) -> &[VertexId]
Fluid-only physical-exterior vertices fixed to reference coordinates.
pub fn fluid_interior_vertices(&self) -> &[VertexId]
pub fn fluid_interior_vertices(&self) -> &[VertexId]
Fluid vertices governed by the assembled interior Laplace relation.
pub fn interior_stiffness(&self) -> &[f64]
pub fn interior_stiffness(&self) -> &[f64]
Row-major K_II in Self::fluid_interior_vertices order.
This solver-neutral lowered operator is exposed read-only so numerical realizations can solve the same relation later certified here.
pub fn driver_stiffness(&self) -> &[f64]
pub fn driver_stiffness(&self) -> &[f64]
Row-major K_ID with interior rows and Self::driver_vertices columns.
pub fn driver_rhs_norms(&self) -> &[f64]
pub fn driver_rhs_norms(&self) -> &[f64]
Euclidean norm of each unit-driver right-hand side in driver-vertex order.
A solver-owning layer can combine these geometry-derived norms with its
exact linear plan to derive the residual targets later supplied to
Self::validate_current_coordinates.
pub fn validate_current_coordinates(
&self,
solid_displacement: &[[f64; D]],
current_coordinates: &[Vec<f64>],
driver_residual_targets: &[f64],
) -> Result<(), Diagnostic>
pub fn validate_current_coordinates( &self, solid_displacement: &[[f64; D]], current_coordinates: &[Vec<f64>], driver_residual_targets: &[f64], ) -> Result<(), Diagnostic>
Certify candidate coordinates as the admitted harmonic extension.
solid_displacement is mesh-wide and must be exact zero outside the
solid closure. Candidate solid coordinates must equal reference + displacement exactly, fixed fluid-exterior coordinates must equal the
reference exactly, and fluid-interior coordinates must satisfy the P1
Laplace relation. The residual allowance is the triangle-inequality
combination of the supplied per-driver solver targets plus a binary64
reduction roundoff term; no solver-produced coordinate or
caller-authored residual is trusted. Targets are an external admission
policy, not geometry state: artifact/numerics callers must derive and
bind them from the exact realization plan or accepted solve reports.
§Errors
Returns EQ0803 for incompatible/non-finite fields or targets, altered
Dirichlet coordinates, overflow, or a harmonic residual outside the
supplied solver bound.
Trait Implementations§
§impl<const D: usize> Clone for P1HarmonicCoordinateRelation<D>
impl<const D: usize> Clone for P1HarmonicCoordinateRelation<D>
§impl<const D: usize> Debug for P1HarmonicCoordinateRelation<D>
impl<const D: usize> Debug for P1HarmonicCoordinateRelation<D>
§impl<const D: usize> PartialEq for P1HarmonicCoordinateRelation<D>
impl<const D: usize> PartialEq for P1HarmonicCoordinateRelation<D>
§fn eq(&self, other: &P1HarmonicCoordinateRelation<D>) -> bool
fn eq(&self, other: &P1HarmonicCoordinateRelation<D>) -> bool
self and other values to be equal, and is used by ==.impl<const D: usize> StructuralPartialEq for P1HarmonicCoordinateRelation<D>
Auto Trait Implementations§
impl<const D: usize> Freeze for P1HarmonicCoordinateRelation<D>
impl<const D: usize> RefUnwindSafe for P1HarmonicCoordinateRelation<D>
impl<const D: usize> Send for P1HarmonicCoordinateRelation<D>
impl<const D: usize> Sync for P1HarmonicCoordinateRelation<D>
impl<const D: usize> Unpin for P1HarmonicCoordinateRelation<D>
impl<const D: usize> UnsafeUnpin for P1HarmonicCoordinateRelation<D>
impl<const D: usize> UnwindSafe for P1HarmonicCoordinateRelation<D>
Blanket Implementations§
Source§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Source§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
§fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§impl<T> ConvUtil for T
impl<T> ConvUtil for T
§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
§fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
fn into_as<Dst>(self) -> Dstwhere
Self: Sized + Into<Dst>,
§fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + TryInto<Dst>,
§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
fn rand<T>(&self, rng: &mut (impl Rng + ?Sized)) -> Twhere
Self: Distribution<T>,
Source§impl<T> From<T> for T
impl<T> From<T> for T
Source§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>where
F: FnOnce(&Self) -> bool,
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> Same for T
impl<T> Same for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.