We ask for a variable 'blah' that doesn't exist. Note that it is not in the {variable}-{state_name} syntax. In this case, MFP::getPlotData() will create an empty box in dat_arrays for this variable name and pass it to all of the states with the State::get_state_values() function.
None of the states will touch this box, as its name does not contain any state names. The empty box gets passed to amrex when writing the plotfile, which tries to calculate the minimum and maximum values in the box. Since the values in the box are all undefined, this function will crash randomly.
I think that we should rework how we handle the parsing of the plot variables. MFP_global should parse the variable names and store them linked to their respective states via an index. This will also allow graceful errors/warning messages when a non-existent variable is requested for plotting.
I've noticed some weirdness when defining
plot['variables']
in an inputs file:We ask for a variable
'blah'
that doesn't exist. Note that it is not in the{variable}-{state_name}
syntax. In this case,MFP::getPlotData()
will create an empty box indat_arrays
for this variable name and pass it to all of the states with theState::get_state_values()
function.None of the states will touch this box, as its name does not contain any state names. The empty box gets passed to amrex when writing the plotfile, which tries to calculate the minimum and maximum values in the box. Since the values in the box are all undefined, this function will crash randomly.
I think that we should rework how we handle the parsing of the plot variables.
MFP_global
should parse the variable names and store them linked to their respective states via an index. This will also allow graceful errors/warning messages when a non-existent variable is requested for plotting.