[cig-commits] commit 1920 by bangerth to /var/svn/dealii/aspect

dealii.demon at gmail.com dealii.demon at gmail.com
Wed Sep 25 08:38:23 PDT 2013


Revision 1920

Always select end time stopping criterion, even if not explicitly specified in the input file.

U   trunk/aspire/source/termination_criteria/interface.cc


http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=1920&peg=1920

Diff:
Modified: trunk/aspire/source/termination_criteria/interface.cc
===================================================================
--- trunk/aspire/source/termination_criteria/interface.cc	2013-09-25 15:25:40 UTC (rev 1919)
+++ trunk/aspire/source/termination_criteria/interface.cc	2013-09-25 15:38:06 UTC (rev 1920)
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2012 by the authors of the ASPECT code.
+  Copyright (C) 2012, 2013 by the authors of the ASPECT code.
 
   This file is part of ASPECT.
 
@@ -73,9 +73,9 @@
       bool terminate_simulation = false;
       // call the execute() functions of all plugins we have
       // here in turns.
-      
+
       std::list<std::string>::const_iterator itn = termination_obj_names.begin();
-      
+
       for (typename std::list<std_cxx1x::shared_ptr<Interface<dim> > >::const_iterator
            p = termination_objects.begin();
            p != termination_objects.end(); ++p,++itn)
@@ -142,7 +142,7 @@
               MPI_Abort (MPI_COMM_WORLD, 1);
             }
         }
-      
+
       return std::make_pair (terminate_simulation,
                              do_checkpoint_on_terminate);
     }
@@ -211,6 +211,11 @@
         do_checkpoint_on_terminate = prm.get_bool("Checkpoint on termination");
 
         plugin_names = Utilities::split_string_list(prm.get("Termination criteria"));
+
+        // as described, the end time plugin is always active
+        if (std::find (plugin_names.begin(), plugin_names.end(), "end time")
+            == plugin_names.end())
+          plugin_names.push_back ("end time");
       }
       prm.leave_subsection();
 


More information about the CIG-COMMITS mailing list