[cig-commits] [commit] master: Added a constant scale factor to the GPlates plugin. (913e5ea)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon Jun 16 10:45:25 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/40944f3a0c6a71132cbdf1d431046b3c444f459e...cbc3b2ab6317c0e8dd95a2f58111ede8beadf8d7
>---------------------------------------------------------------
commit 913e5ea03571d7b29d8cdc601ad85d97131760a9
Author: Rene Gassmoeller <R.Gassmoeller at mailbox.org>
Date: Sun Jun 1 14:45:56 2014 +0200
Added a constant scale factor to the GPlates plugin.
>---------------------------------------------------------------
913e5ea03571d7b29d8cdc601ad85d97131760a9
include/aspect/velocity_boundary_conditions/gplates.h | 5 +++++
source/velocity_boundary_conditions/gplates.cc | 6 +++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/aspect/velocity_boundary_conditions/gplates.h b/include/aspect/velocity_boundary_conditions/gplates.h
index 192548d..51c6379 100644
--- a/include/aspect/velocity_boundary_conditions/gplates.h
+++ b/include/aspect/velocity_boundary_conditions/gplates.h
@@ -359,6 +359,11 @@ namespace aspect
bool time_dependent;
/**
+ * Scale the velocity boundary condition by a scalar factor.
+ */
+ double scale_factor;
+
+ /**
* Two user defined points that prescribe the plane from which the 2D
* model takes the velocity boundary condition. One can think of this,
* as if the model is lying in this plane although no actual model
diff --git a/source/velocity_boundary_conditions/gplates.cc b/source/velocity_boundary_conditions/gplates.cc
index ea57f2c..37e71bd 100644
--- a/source/velocity_boundary_conditions/gplates.cc
+++ b/source/velocity_boundary_conditions/gplates.cc
@@ -714,7 +714,7 @@ namespace aspect
boundary_velocity (const Point<dim> &position) const
{
if (time_relative_to_vel_file_start_time >= 0.0)
- return lookup->surface_velocity(position,time_weight);
+ return scale_factor * lookup->surface_velocity(position,time_weight);
else
return Tensor<1,dim> ();
}
@@ -752,6 +752,9 @@ namespace aspect
"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 ("Scale factor", "1",
+ Patterns::Double (0),
+ "Scalar factor, which is applied to the boundary velocity.");
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.");
@@ -803,6 +806,7 @@ namespace aspect
velocity_file_name = prm.get ("Velocity file name");
interpolation_width = prm.get_double ("Interpolation width");
+ scale_factor = prm.get_double ("Scale factor");
point1 = prm.get ("Point one");
point2 = prm.get ("Point two");
More information about the CIG-COMMITS
mailing list