[cig-commits] [commit] master: Create solidus.h (9b92135)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue May 20 12:19:41 PDT 2014


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/a21aaa79d75b89a3d50d5c865e7dc51d309da9b9...b2eaff9e459f8351633e8b4b43c1284c90373873

>---------------------------------------------------------------

commit 9b92135b9bf62e87dbc5fbfa3d2b333180208a7e
Author: SiqiZhang <SiqiZhang at users.noreply.github.com>
Date:   Thu May 15 14:54:54 2014 -0500

    Create solidus.h
    
    Header for solidus initial condition plugin


>---------------------------------------------------------------

9b92135b9bf62e87dbc5fbfa3d2b333180208a7e
 .../initial_conditions/{function.h => solidus.h}   | 54 +++++++++++++++-------
 1 file changed, 37 insertions(+), 17 deletions(-)

diff --git a/include/aspect/initial_conditions/function.h b/include/aspect/initial_conditions/solidus.h
similarity index 59%
copy from include/aspect/initial_conditions/function.h
copy to include/aspect/initial_conditions/solidus.h
index 2841f28..a200bf4 100644
--- a/include/aspect/initial_conditions/function.h
+++ b/include/aspect/initial_conditions/solidus.h
@@ -17,21 +17,19 @@
   along with ASPECT; see the file doc/COPYING.  If not see
   <http://www.gnu.org/licenses/>.
 */
-/*  $Id$  */
+/*  $Id: function.h 1509 2012-12-12 05:50:56Z bangerth $  */
 
 
-#ifndef __aspect__initial_conditions_function_h
-#define __aspect__initial_conditions_function_h
+#ifndef __aspect__initial_conditions_solidus_h
+#define __aspect__initial_conditions_solidus_h
 
 #include <aspect/initial_conditions/interface.h>
-
-#include <deal.II/base/parsed_function.h>
+#include <aspect/simulator.h>
 
 namespace aspect
 {
   namespace InitialConditions
   {
-    using namespace dealii;
 
     /**
      * A class that implements temperature initial conditions based on a
@@ -40,13 +38,13 @@ namespace aspect
      * @ingroup InitialConditionsModels
      */
     template <int dim>
-    class Function : public Interface<dim>
+    class Solidus : public Interface<dim>, public ::aspect::SimulatorAccess<dim>
     {
       public:
         /**
          * Constructor.
          */
-        Function ();
+        Solidus ();
 
         /**
          * Return the initial temperature as a function of position.
@@ -55,20 +53,20 @@ namespace aspect
         double initial_temperature (const Point<dim> &position) const;
 
         /**
-         * Declare the parameters this class takes through input files. The
-         * default implementation of this function does not describe any
-         * parameters. Consequently, derived classes do not have to overload
-         * this function if they do not take any runtime parameters.
+         * Declare the parameters this class takes through input files.
+         * The default implementation of this function does not describe
+         * any parameters. Consequently, derived classes do not have to
+         * overload this function if they do not take any runtime parameters.
          */
         static
         void
         declare_parameters (ParameterHandler &prm);
 
         /**
-         * Read the parameters this class declares from the parameter file.
-         * The default implementation of this function does not read any
-         * parameters. Consequently, derived classes do not have to overload
-         * this function if they do not take any runtime parameters.
+         * Read the parameters this class declares from the parameter
+         * file. The default implementation of this function does not read
+         * any parameters. Consequently, derived classes do not have to
+         * overload this function if they do not take any runtime parameters.
          */
         virtual
         void
@@ -78,9 +76,31 @@ namespace aspect
         /**
          * A function object representing the temperature.
          */
-        Functions::ParsedFunction<dim> function;
+		double       litho_thick;
+		double       Magnitude_T;
+		double       Magnitude_lith;
+		double       deltaT;
+		int          n;
+		std::string  solidus_filename;
     };
   }
+  namespace melting
+  {
+		class Melting_curve
+		{
+  		public:
+   			Melting_curve();
+			void read(const std::string &filename);
+    		double T(const double p, const double radius) const;
+			bool is_radius;
+			unsigned int Num_points;
+  		private:
+    		//unsigned int Num_points;
+    		std::vector<double> T_array;
+    		std::vector<double> P_array;
+    		//bool is_radius;
+		};
+  }
 }
 
 



More information about the CIG-COMMITS mailing list