loganoz / horses3d

HORSES3D: A high-order discontinuous Galerkin solver for flow simulations and multi-physics applications
https://loganoz.github.io/horses3d/
MIT License
112 stars 24 forks source link

ProblemFile and source term #138

Closed loganoz closed 1 year ago

loganoz commented 1 year ago

Can someone take a look to what happens when we use the standard ProblemFile without adding any source term? S is defined in the problem file as an input-output variable. However, it does not seem to be defined anywhere in the code. What's the initial value of S? I think it is compiler dependent and a source of possible errors.

oscarmarino commented 1 year ago

S_NS is allocated and set to 0 at the begging of the simulation in the storage construction. Also in SpatialDiscretization is set to 0 before calling the problem file each time Qdot is computed. In the problem file is inout so that if nothing is done it remains 0 (that is the standard ProblemFile or one that only changes other thing, as IC or BC).

stecolumbus commented 1 year ago

I think that the source term is also used in multi grid. I agree with Oscar regarding what he said.

loganoz commented 1 year ago

Good. It only gives problems in the truncation error estimation then. Thanks!