pub struct VolField<T: Clone> {
pub name: String,
pub mesh: Arc<FvMesh>,
pub internal: Field<T>,
pub boundary: Vec<PatchField<T>>,
}Expand description
A volume field: one value per cell in the internal field, plus one
PatchField per boundary patch.
Mirrors Foam::volScalarField / Foam::VolumeField<Type>.
The internal field has length mesh.n_cells.
Fields§
§name: StringField name (diagnostic label, e.g. "p", "U", "T").
mesh: Arc<FvMesh>Mesh this field is defined on.
internal: Field<T>Cell-centred values; length == mesh.n_cells.
boundary: Vec<PatchField<T>>One entry per boundary patch; boundary[i].values has length
mesh.patches[i].size.
Implementations§
Source§impl<T: Clone + Default> VolField<T>
impl<T: Clone + Default> VolField<T>
Sourcepub fn new(
name: impl Into<String>,
mesh: Arc<FvMesh>,
internal: Field<T>,
boundary: Vec<PatchField<T>>,
) -> Self
pub fn new( name: impl Into<String>, mesh: Arc<FvMesh>, internal: Field<T>, boundary: Vec<PatchField<T>>, ) -> Self
Assemble a volume field from its cell-centred values and per-patch
boundary fields. In debug builds, asserts that internal has length
mesh.n_cells and that boundary has one entry per patch.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for VolField<T>
impl<T> RefUnwindSafe for VolField<T>where
T: RefUnwindSafe,
impl<T> Send for VolField<T>where
T: Send,
impl<T> Sync for VolField<T>where
T: Sync,
impl<T> Unpin for VolField<T>where
T: Unpin,
impl<T> UnsafeUnpin for VolField<T>
impl<T> UnwindSafe for VolField<T>where
T: UnwindSafe,
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