[cig-commits] [commit] master: fix c2e7beaf (dbf4ed6)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri May 16 20:29:02 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/c2e7beafea960e933cc8cf6b81891aaaf1d696b0...dbf4ed6520be2feab76d1e2fe07d556730d9f561
>---------------------------------------------------------------
commit dbf4ed6520be2feab76d1e2fe07d556730d9f561
Author: Timo Heister <timo.heister at gmail.com>
Date: Fri May 16 23:28:46 2014 -0400
fix c2e7beaf
I turns out the commit that c2e7beaf caused the code to always refine
after the first timestep because 0%n==0. Now we only output after
timestep 0 if adaptive_refinement_interval == 1.
>---------------------------------------------------------------
dbf4ed6520be2feab76d1e2fe07d556730d9f561
source/simulator/core.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/source/simulator/core.cc b/source/simulator/core.cc
index 13b0bd1..e94a84b 100644
--- a/source/simulator/core.cc
+++ b/source/simulator/core.cc
@@ -1420,9 +1420,15 @@ namespace aspect
else
// see if this is a time step where regular refinement is necessary, but only
// if the previous rule wasn't triggered
- if ((parameters.adaptive_refinement_interval > 0)
+ if (
+ (timestep_number > 0
+ &&
+ (parameters.adaptive_refinement_interval > 0)
&&
(timestep_number % parameters.adaptive_refinement_interval == 0))
+ ||
+ (timestep_number==0 && parameters.adaptive_refinement_interval == 1)
+ )
refine_mesh (max_refinement_level);
// every n time steps output a summary of the current
More information about the CIG-COMMITS
mailing list