I think the condition should actually be if (model->has_nonzero_additional_convective_flux_terms) would be more appropriate than if(nstate==nstate_baseline_physics); this way we're not eliminating the possibility that the model has additional terms to the existing convective numerical flux in the istate <= nstate_baseline_physics.
The bool has_nonzero_additional_convective_flux_terms should be introduced in the ModelBase class as an input to the contructor; would also be a good idea to similarly do this for the dissipative flux, source term, and physical source term, by similarly introducing bool has_nonzero_additional_[name]_terms. Then use the appropriate flag for the other functions; like convective_eigenvalue etc
The
bool has_nonzero_additional_convective_flux_terms
should be introduced in theModelBase
class as an input to the contructor; would also be a good idea to similarly do this for the dissipative flux, source term, and physical source term, by similarly introducingbool has_nonzero_additional_[name]_terms
. Then use the appropriate flag for the other functions; likeconvective_eigenvalue
etc_Originally posted by @jbrillon in https://github.com/dougshidong/PHiLiP/pull/172#discussion_r977045185_