#1359: add "read from file" option ot HydroBase's initial_data options -----------------------------------+---------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Keywords: HydroBase | -----------------------------------+---------------------------------------- the attached patch adds a value "read from file" to HydroBase's initial_XXX options. This makes it possible to use IOUtils file reader with hydro data.
This is somewhat similar to IDFileADM's extension of ADMBase's options, only we do not have to set any grid scalars.
Needed to be able to reproduce the MHD paper's collapse test since Whisky_RNSID is not public.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: new => review
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by knarf):
Shouldn't the thorn providing the capability to read data from a file extend these keywords, instead of HydroBase defining them, but not doing anything with them? Imagine what happens when "read_from_file" is specified, but no thorn feels responsible... Also: when a thorn extends it the keyword should be a little more specific than 'read_from_file'. There could be multiple readers.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: invalid | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by knarf):
* status: review => closed * resolution: => invalid
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reopened Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: closed => reopened * resolution: invalid =>
Comment:
The thorn reading the data is IOUtil. It should not know anything about HydroBase or ADMBase.
Currently, it is not possible to use IOUtil's file reader with HydroBase, because HydroBase insists on setting up some kind of initial data, always overwriting what one may have read in with the file reader. This patch prevents this overwriting, allowing the file reader to work.
The file reader API may not be ideal, but it is the standard in Cactus. HydroBase should support it.
The proposed patch is equivalent to what ADMBase does.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: reopened => review
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by eschnett):
* status: review => reviewed_ok
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by knarf):
Oh, I didn't think of that. Yes, this is delicate - both thorns don't know of another, but in this case in theory should. Could we add the patch as proposed, but also add a runtime check that looks for an active IOUtils thorn, and checks at least that filereader_ID_vars isn't empty - to avoid both abusing the parameter and accidental usage?
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by knarf):
Maybe the new keyword could be called IOUtil, so that it's clear where the data is supposed to be coming from.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by rhaas):
I took a closer look at IDFileADM to see what extra checking it provides.
The text "read from file" is taken from EinsteinInitial/IDFileADM's parameter initial_shift. That one has some longer text explaining the parameter:
{{{ Read the initial shift using the file reader. Note that this only allows you to read the shift from a file, it does not actually do it. You still have to programme the file reader accordingly. }}}
To avoid users to run with the wrong data, then I wrote a very simple thorn IDFileHydro that extends the parameters and provides some errror checking in ParamCheck the way IDFileADM does. I put the thorn into incoming: https://svn.einsteintoolkit.org/incoming/IDFileHydro/ .
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by rhaas):
Come to think of it, one could also simply include the ParamCheck routine in https://svn.einsteintoolkit.org/incoming/IDFileHydro/src/IDFileHydro_ParamCh... (only piece of code) in IDFileHydro in HydroBase which would mean that the "read from file" option is documented in HydroBase and not some obscure helper thorn that people don't know about.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: fixed | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Applied the initial patch as rev 62 and 63 of trunk and ET_2013_05 respectively. Will propose larger patch again after the release.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reopened Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: closed => reopened * resolution: fixed =>
Comment:
patch to check consistency of parameters. Also '''adds''' the "read from file" option to initial_hydro where it was missing before.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: reopened => review
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by knarf):
The patch misses the file ParamCheck.c
Also, please include a comment in the parameters that thorn IOUtil is the one a user should look for.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by rhaas):
updated the patch. added "IOUtil" just before "file reader". Ok to apply?
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by knarf):
* status: review => reviewed_ok
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: fixed | Keywords: HydroBase ------------------------------------+--------------------------------------- Changes (by rhaas):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Applied as rev 64 of trunk and rev 65 of ET_2013_05.
#1359: add "read from file" option ot HydroBase's initial_data options ------------------------------------+--------------------------------------- Reporter: rhaas | Owner: Type: enhancement | Status: closed Priority: minor | Milestone: Component: EinsteinToolkit thorn | Version: Resolution: fixed | Keywords: HydroBase ------------------------------------+---------------------------------------
Comment (by rhaas):
Fixed a type in the variable name for 'HydroBase::Y_e" in rev 72 of HydroBase.
trac@lists.einsteintoolkit.org