[cig-commits] commit 2388 by bangerth to /var/svn/dealii/aspect
dealii.demon at gmail.com
dealii.demon at gmail.com
Mon Mar 31 11:55:40 PDT 2014
Revision 2388
Minor modifications to the gplates models.
U trunk/aspect/cookbooks/gplates_2d.prm
U trunk/aspect/source/velocity_boundary_conditions/gplates.cc
http://www.dealii.org/websvn/revision.php?repname=Aspect+Repository&path=%2F&rev=2388&peg=2388
Diff:
Modified: trunk/aspect/cookbooks/gplates_2d.prm
===================================================================
--- trunk/aspect/cookbooks/gplates_2d.prm 2014-03-31 18:54:18 UTC (rev 2387)
+++ trunk/aspect/cookbooks/gplates_2d.prm 2014-03-31 18:55:37 UTC (rev 2388)
@@ -4,7 +4,7 @@
set Dimension = 2
set End time = 3e16
set Use years in output instead of seconds = false
-set Output directory = gplates-2d
+set Output directory = output
subsection Geometry model
set Model name = spherical shell
Modified: trunk/aspect/source/velocity_boundary_conditions/gplates.cc
===================================================================
--- trunk/aspect/source/velocity_boundary_conditions/gplates.cc 2014-03-31 18:54:18 UTC (rev 2387)
+++ trunk/aspect/source/velocity_boundary_conditions/gplates.cc 2014-03-31 18:55:37 UTC (rev 2388)
@@ -675,7 +675,14 @@
{
prm.declare_entry ("Data directory",
"data/velocity-boundary-conditions/gplates/",
- Patterns::DirectoryName (), "The path to the model data.");
+ Patterns::DirectoryName (),
+ "The name of a directory that contains the model data. This path "
+ "may either be absolute (if starting with a '/') or relative to "
+ "the current directory. The path may also include the special "
+ "text '$ASPECT_SOURCE_DIR' which will be interpreted as the path "
+ "in which the ASPECT source files were located when ASPECT was "
+ "compiled. This interpretation allows, for example, to reference "
+ "files located in the 'data/' subdirectory of ASPECT.");
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.");
@@ -713,7 +720,19 @@
{
prm.enter_subsection("GPlates model");
{
+ // Get the path to the data files. If it contains a reference
+ // to $ASPECT_SOURCE_DIR, replace it by what CMake has given us
+ // as a #define
data_directory = prm.get ("Data directory");
+ {
+ const std::string subst_text = "$ASPECT_SOURCE_DIR";
+ std::string::size_type position;
+ while (position = data_directory.find (subst_text), position!=std::string::npos)
+ data_directory.replace (data_directory.begin()+position,
+ data_directory.begin()+position+subst_text.size(),
+ ASPECT_SOURCE_DIR);
+ }
+
velocity_file_name = prm.get ("Velocity file name");
time_step = prm.get_double ("Time step");
interpolation_width = prm.get_double ("Interpolation width");
More information about the CIG-COMMITS
mailing list