pub struct XdmfFieldDescriptor {
pub name: String,
pub attribute_type: String,
pub center: String,
pub data: Vec<f64>,
pub n_components: usize,
}Expand description
Describes a single data field to embed inline in XDMF XML.
Fields§
§name: StringName of the field (e.g. "pressure", "velocity").
attribute_type: StringAttribute type: "Scalar", "Vector", or "Tensor".
center: StringCenter: "Node", "Cell", or "Grid".
data: Vec<f64>Flat data values (row-major).
n_components: usizeNumber of components per entry (1 for scalar, 3 for vector, 9 for tensor).
Implementations§
Source§impl XdmfFieldDescriptor
impl XdmfFieldDescriptor
Sourcepub fn vector(name: &str, data: Vec<f64>) -> Self
pub fn vector(name: &str, data: Vec<f64>) -> Self
Create a new vector field descriptor (3 components per node).
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Number of logical entries (nodes/cells) this field covers.
Sourcepub fn data_lp_norm(&self, p: f64) -> f64
pub fn data_lp_norm(&self, p: f64) -> f64
Compute the Lp-norm of all data values.
Trait Implementations§
Source§impl Clone for XdmfFieldDescriptor
impl Clone for XdmfFieldDescriptor
Source§fn clone(&self) -> XdmfFieldDescriptor
fn clone(&self) -> XdmfFieldDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for XdmfFieldDescriptor
impl RefUnwindSafe for XdmfFieldDescriptor
impl Send for XdmfFieldDescriptor
impl Sync for XdmfFieldDescriptor
impl Unpin for XdmfFieldDescriptor
impl UnsafeUnpin for XdmfFieldDescriptor
impl UnwindSafe for XdmfFieldDescriptor
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.