Skip to content
Snippets Groups Projects
Commit f56ae420 authored by Robert K's avatar Robert K
Browse files

[feature][ModelWrapper] also call advection and diffusion model's

setTime method.
parent f82a4041
No related branches found
No related tags found
No related merge requests found
......@@ -163,6 +163,9 @@ namespace Fem
void setTime (const double t)
{
BaseType::setTime(t);
// update model times (only if time method is available on these models)
advection_.setTime(t);
diffusion_.setTime(t);
}
double gamma () const { return problem_.gamma(); }
......
......@@ -101,7 +101,9 @@ def femDGSolver(Model, space,
v = TestFunction(space)
n = FacetNormal(space.cell())
x = SpatialCoordinate(space.cell())
t = Constant(initialTime,"t")
# this variable needs to be called time in order
# to work with the implementation in DiffusionModel
t = Constant(initialTime,"time")
predefined = {}
spatial = Variable('const auto', 'y')
predefined.update( {x: UnformattedExpression('auto', 'entity.geometry().global( Dune::Fem::coordinate( x ) )') })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment