Merge lp:~asc/fluidity/regularisespatialaspect into lp:fluidity
Status: | Work in progress |
---|---|
Proposed branch: | lp:~asc/fluidity/regularisespatialaspect |
Merge into: | lp:fluidity |
Diff against target: |
76 lines (+37/-0) 3 files modified
femtools/VTK_interfaces.F90 (+19/-0) schemas/fluidity_options.rnc (+8/-0) schemas/fluidity_options.rng (+10/-0) |
To merge this branch: | bzr merge lp:~asc/fluidity/regularisespatialaspect |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Adam Candy | Needs Fixing | ||
Stephan Kramer | Pending | ||
Review via email:
|
Description of the change
Added an option '/io/regularise
spatial extent of output position mesh so all spatial extents are of the same length (the smallest of the spatial extents), i.e. scale so
the domain has an aspect ratio of 1:1, or 1:1:1. Note this option should not be used in conjunction with checkpointing (at present).
I certainly find this useful for testing purposes when working with large-aspect ratio domains. It modifies the spatial properties of the
mesh, so is strictly for visualisation and test simulations.
Is this the best place to put the option in the schema?
(now with VTK_interfaces.F90 properly commited)
Unmerged revisions
- 3530. By Adam Candy
-
This (quite important) line got skipped in the previous commits to the domain regularisation option.
- 3529. By Adam Candy
-
Improved schema commet for new option /io/regularise_
spatial_ aspect. - 3528. By Adam Candy
-
Added an option '/io/regularise
_spatial_ aspect' , which when enabled will regularise the spatial aspect of the output mesh.
This rescales spatial extent of output position mesh so all spatial extents are of the same length (the smallest of the spatial extents), i.e. scale so the domain has an aspect ratio of 1:1, or 1:1:1.
Note this option should not be used in conjunction with checkpointing (at present).
Hm, I feel this option shouldn't be implemented inside vtk_write_fields(). vtk_write_fields is a low level routine that should just do what it's told to in the code, dump the fields that it's passed and not be dependent on options tree behaviour. Why don't you put this in vtk_write_ state_new_ option( ) and pass down the rescaled coordinate to vtk_write_fields() from there? That would also fix the checkpointing issue (which is a definite no-go for me).
I'm pondering how to make this option a bit more generally applicable:
- in general if I rescale my output for viewing (this is actually fairly trivial in paraview), I actually like to control the exact aspect ratio myself. Blowing it up to an exact 1:1 aspect ratio typically heavily distorts the features/mesh elements.
- it should also be made to work on the sphere, in which case it's hard to work out the rescaling parameter automatically
- if you have a free surface with mesh movement, automatically rescaling will cause the rescaling to be different every dump, which is probably not desired
Maybe have this option with a user specified rescaling? Or alternatively, just have a script that rescales the vtus afterwards. I'd like to hear other people's opinion on this...