pub struct FoamCase {
pub root: PathBuf,
pub system: Vec<(String, FoamFile)>,
pub poly_mesh: Option<PolyMesh>,
pub mesh: Option<Arc<FvMesh>>,
pub time_dir: String,
pub fields: Vec<CaseField>,
pub skipped_fields: Vec<(String, String)>,
}Expand description
An in-memory OpenFOAM case.
Fields§
§root: PathBufThe case root directory.
system: Vec<(String, FoamFile)>system/ dictionaries, keyed by file name (controlDict, …).
poly_mesh: Option<PolyMesh>The connectivity-carrying mesh from constant/polyMesh, if present.
mesh: Option<Arc<FvMesh>>The geometry-carrying FV mesh derived from poly_mesh, if present.
time_dir: StringThe time directory that was read (e.g. "0").
fields: Vec<CaseField>Fields loaded from the time directory.
skipped_fields: Vec<(String, String)>Field files skipped because their class is not a scalar/vector volume
field ((file_name, class)).
Implementations§
Source§impl FoamCase
impl FoamCase
Sourcepub fn read(root: impl AsRef<Path>) -> Result<Self, IoError>
pub fn read(root: impl AsRef<Path>) -> Result<Self, IoError>
Read a case from root, using time directory "0".
Sourcepub fn read_time(
root: impl AsRef<Path>,
time_dir: &str,
) -> Result<Self, IoError>
pub fn read_time( root: impl AsRef<Path>, time_dir: &str, ) -> Result<Self, IoError>
Read a case from root, using the given time_dir (e.g. "0").
Sourcepub fn system_dict(&self, name: &str) -> Option<&FoamFile>
pub fn system_dict(&self, name: &str) -> Option<&FoamFile>
Look up a system/ dictionary by file name.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FoamCase
impl RefUnwindSafe for FoamCase
impl Send for FoamCase
impl Sync for FoamCase
impl Unpin for FoamCase
impl UnsafeUnpin for FoamCase
impl UnwindSafe for FoamCase
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