Skip to content

ENH: Data input#691

Merged
landinjm merged 13 commits intoprisms-center:masterfrom
wband:data_input
Sep 11, 2025
Merged

ENH: Data input#691
landinjm merged 13 commits intoprisms-center:masterfrom
wband:data_input

Conversation

@wband
Copy link
Copy Markdown
Contributor

@wband wband commented Sep 4, 2025

Description

Resolves #687, provides extensibility for additional read-in options as derived classes of FieldReaderBase.

Checklist

  • abstracted interface to reader objects via base class FieldReaderBase and factory function create_reader
  • transferred existing VTKUnstructuredGrid reader to derived class
  • wrote new ReadBinary derived class
  • updated associated code for reading in parameters, type enums, etc.

Miscellaneous items that may need to be done when making a PR:

  • Documentation related to this PR is up to date (Doxygen format)
  • Unit test(s)
  • Code is properly formatted
  • Application update script is up to date
  • PR labels are applied
  • Issues are linked

wband and others added 13 commits August 25, 2025 15:32
This commit changes how simulation parameters are read and thus needs more explanation.
1. "grid type" renamed to "dataset format" for precision and generality. The default parameter was changed to "vtk_unstructured_grid" from "unstructured".
2. "file extension" was removed. File extension can be parsed from the file name if needed (it isn't currently).
Itemized:

1. Removed redundant functions from read_vtk and read_binary. Only needed for base classes.

2. TODO: there are const refs to the discretization and ic file as members to the file reader base class. This is generally bad design. It's not a huge deal here because the assignment copy and move operators are deleted. But we'll probably switch to using pointers.

3. TODO: Rename InitialConditionFile to something less misleading.

4. TODO: In postprocess and validate in load_initial_condition_parameters.h, that assertion is only applicable for files where the fields are named (vtk)

5. TODO: similar to prisms-center#4, either pecialize print_parameter_summary() for each file type, or print all parameters, even if unused. (i think that might be how we standardized it)

6. axis_labels can be a static string array.

7. The dataset format should be a selector pattern. Also, was the vtk extension stuff lost, or replaced?

8. TODO: in read_binary, indices is unsigned, but you do an assertion that it is >0, which will always return true. Either remove the assertion, or use a signed int.

9. Made check_size make sense

10. added inline to definitions

11. made the index flattener general,

12. TODO: I don't think you know what a dealii::Vector is. some stuff needs to be templated to give a rank 1 tensor or scalar, or it can be done outside as it is now. deallii::Vector is not the most sensible container here.

13. Changed some names (n_pt_values -> n_components, indices -> index)

14. made weights and indices std:array<x,2>

15. .inst.in

16. sleep
@landinjm landinjm merged commit e18767d into prisms-center:master Sep 11, 2025
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read initial conditions from flat binary or similarly simple file type

3 participants