Function openfoamparser_rust::parse_internal_field[][src]

pub fn parse_internal_field<T, P, F>(
    filename: P,
    parse_fn: F
) -> Result<Vec<T>, Error> where
    P: AsRef<Path>,
    F: Fn(&str) -> Option<T>, 

Parse an internal field such as a cell centers file.

Expects a closure parse_fn to parse a single value to the desired type (e.g., “(0.1 0 3.3)” to a Vector3).

If the internal field is declared ‘nonuniform’, this function will only read the first section (for some reason), such as to be compatible with the reference Python implementation for now.

Similarly, if the internal field is declared ‘uniform’, only the first data line will be read.