Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Resolves #687, provides extensibility for additional read-in options as derived classes of
FieldReaderBase.Checklist
FieldReaderBaseand factory functioncreate_readerVTKUnstructuredGridreader to derived classReadBinaryderived classMiscellaneous items that may need to be done when making a PR: