[cig-commits] commit 2391 by bangerth to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Tue Apr 1 07:13:57 PDT 2014
Revision 2391
Honor 'Use years in output instead of seconds' in the GPlates plugin.
U trunk/aspect/doc/modules/changes.h
U trunk/aspect/source/velocity_boundary_conditions/gplates.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2391&peg=2391
Diff:
Modified: trunk/aspect/doc/modules/changes.h
===================================================================
--- trunk/aspect/doc/modules/changes.h 2014-04-01 14:04:10 UTC (rev 2390)
+++ trunk/aspect/doc/modules/changes.h 2014-04-01 14:13:55 UTC (rev 2391)
@@ -8,6 +8,13 @@
</p>
<ol>
+ <li>Changed: The GPlates plugin for surface velocities always
+ interpreted the start time of the model and the time increment
+ between individual input files in seconds. It now honors the
+ 'Use years in output instead of seconds' flag in the input file.
+ <br>
+ (Wolfgang Bangerth, Rene Gassmoeller, 2014/04/1)
+
<li>New: CMake now passes down a preprocessor defined string constant
called <code>ASPECT_SOURCE_DIR</code> that is set to the (top level)
directory in which the ASPECT sources are located. This can be used
Modified: trunk/aspect/source/velocity_boundary_conditions/gplates.cc
===================================================================
--- trunk/aspect/source/velocity_boundary_conditions/gplates.cc 2014-04-01 14:04:10 UTC (rev 2390)
+++ trunk/aspect/source/velocity_boundary_conditions/gplates.cc 2014-04-01 14:13:55 UTC (rev 2391)
@@ -686,13 +686,18 @@
prm.declare_entry ("Velocity file name", "phi.%d",
Patterns::Anything (),
"The file name of the material data. Provide file in format: (Velocity file name).%d.gpml where %d is any sprintf integer qualifier, specifying the format of the current file number.");
- prm.declare_entry ("Time step", "3.1558e13",
+ prm.declare_entry ("Time step", "1e6",
Patterns::Double (0),
- "Time step between following velocity files. Default is one million "
- "years expressed in SI units, which equates to 3.1558e13 seconds.");
+ "Time step between following velocity files. "
+ "Depending on the setting of the global 'Use years in output instead of seconds' flag "
+ "in the input file, this number is either interpreted as seconds or as years. "
+ "The default is one million, i.e., either one million seconds or one million years.");
prm.declare_entry ("Velocity file start time", "0.0",
Patterns::Double (0),
- "Time at which the velocity file with number 0 shall be loaded. Previous to this time, a no-slip boundary condition is assumed.");
+ "Time at which the velocity file with number 0 shall be loaded. Previous to this "
+ "time, a no-slip boundary condition is assumed. "
+ "Depending on the setting of the global 'Use years in output instead of seconds' flag "
+ "in the input file, this number is either interpreted as seconds or as years.");
prm.declare_entry ("Point one", "1.570796,0.0",
Patterns::Anything (),
"Point that determines the plane in which a 2D model lies in. Has to be in the format 'a,b' where a and b are theta (polar angle) and phi in radians.");
@@ -712,6 +717,7 @@
prm.leave_subsection();
}
+
template <int dim>
void
GPlates<dim>::parse_parameters (ParameterHandler &prm)
@@ -734,11 +740,17 @@
}
velocity_file_name = prm.get ("Velocity file name");
- time_step = prm.get_double ("Time step");
interpolation_width = prm.get_double ("Interpolation width");
- velocity_file_start_time = prm.get_double ("Velocity file start time");
point1 = prm.get ("Point one");
point2 = prm.get ("Point two");
+
+ time_step = prm.get_double ("Time step");
+ velocity_file_start_time = prm.get_double ("Velocity file start time");
+ if (this->convert_output_to_years())
+ {
+ time_step *= year_in_seconds;
+ velocity_file_start_time *= year_in_seconds;
+ }
}
prm.leave_subsection();
}
More information about the CIG-COMMITS
mailing list