Skip to content
Snippets Groups Projects
Commit e9d3530c authored by Elias Pipping's avatar Elias Pipping Committed by Elias Pipping
Browse files

Make dirichlet values time independent

parent 5874311f
No related branches found
No related tags found
No related merge requests found
......@@ -249,8 +249,10 @@ int main(int argc, char *argv[]) {
stiffnessMatrix.mmv(u, rhs);
// Apply Dirichlet condition
for (size_t i = 0; i < finestSize; ++i)
if (ignoreNodes[i].count() == dim)
if (ignoreNodes[i].count() == dim) {
dirichletFunction.evaluate(time, u_diff[i][0]);
u_diff[i][0] /= timesteps;
}
auto const state_fpi_max =
parset.get<size_t>("solver.tnnmg.fixed_point_iterations");
......
......@@ -11,14 +11,13 @@ class neumannCondition:
else:
return trd * (x - 2.0/3) + (fst + snd) * 1.0/3
## FIXME: If we change time discretisation, we currently change the problem
class dirichletCondition:
def __call__(self, x):
return 2e-3
return 2
# return 0
fst = 3e-4
snd = 5e-4
trd = 3e-4
fst = 3e-1
snd = 5e-1
trd = 3e-1
if x < 1.0/5:
return fst
elif x < 3.0/5:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment