[cig-commits] [commit] master: Move declaration into the .cc file. (08953d2)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue Sep 2 06:25:11 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/873dd16d28505a844f0bd2fbf0739b4f0af46bf9...1f5a0f8d775c6f634a16eb9599891cc7d60571e5
>---------------------------------------------------------------
commit 08953d292f0bcdb350826525c75b91df6a3aa74e
Author: Wolfgang Bangerth <bangerth at math.tamu.edu>
Date: Sun Aug 31 19:23:48 2014 -0500
Move declaration into the .cc file.
>---------------------------------------------------------------
08953d292f0bcdb350826525c75b91df6a3aa74e
.../free_surface_with_crust/plugin/simplerwc.cc | 82 +++++++++++++++-
.../free_surface_with_crust/plugin/simplerwc.h | 109 ---------------------
2 files changed, 77 insertions(+), 114 deletions(-)
diff --git a/cookbooks/free_surface_with_crust/plugin/simplerwc.cc b/cookbooks/free_surface_with_crust/plugin/simplerwc.cc
index 3f05335..5dda051 100644
--- a/cookbooks/free_surface_with_crust/plugin/simplerwc.cc
+++ b/cookbooks/free_surface_with_crust/plugin/simplerwc.cc
@@ -19,20 +19,92 @@
*/
-#include "./simplerwc.h"
+#include <aspect/material_model/interface.h>
+#include <aspect/simulator_access.h>
+
#include <deal.II/base/parameter_handler.h>
+
#include <iostream>
#include <cmath>
-using namespace dealii;
namespace aspect
{
namespace MaterialModel
{
-
-
-
+ using namespace dealii;
+
+ /**
+ * A material model that consists of globally constant values for all
+ * material parameters except the density, which depends linearly on the
+ * temperature. The model is considered incompressible.
+ *
+ * This material model implements what the "Simple" model was originally
+ * intended to do, before it got too complicated.
+ *
+ * @ingroup MaterialModels
+ */
+ template <int dim>
+ class Simplerwc : public Interface<dim>
+ {
+ public:
+
+ virtual bool
+ viscosity_depends_on (const NonlinearDependence::Dependence dependence) const;
+
+ virtual bool
+ density_depends_on (const NonlinearDependence::Dependence dependence) const;
+
+ virtual bool
+ compressibility_depends_on (const NonlinearDependence::Dependence dependence) const;
+
+ virtual bool
+ specific_heat_depends_on (const NonlinearDependence::Dependence dependence) const;
+
+ virtual bool
+ thermal_conductivity_depends_on (const NonlinearDependence::Dependence dependence) const;
+
+ virtual bool is_compressible () const;
+
+ virtual double reference_viscosity () const;
+
+ virtual double reference_density () const;
+
+ virtual void evaluate(const typename Interface<dim>::MaterialModelInputs &in,
+ typename Interface<dim>::MaterialModelOutputs &out) const;
+
+
+ /**
+ * @name Functions used in dealing with run-time parameters
+ * @{
+ */
+ /**
+ * Declare the parameters this class takes through input files.
+ */
+ static
+ void
+ declare_parameters (ParameterHandler &prm);
+
+ /**
+ * Read the parameters this class declares from the parameter file.
+ */
+ virtual
+ void
+ parse_parameters (ParameterHandler &prm);
+ /**
+ * @}
+ */
+
+ private:
+ double reference_rho;
+ double reference_T;
+ double eta_L;
+ double eta_U;
+ double jump_height;
+ double thermal_alpha;
+ double reference_specific_heat;
+ double k_value;
+ };
template <int dim>
diff --git a/cookbooks/free_surface_with_crust/plugin/simplerwc.h b/cookbooks/free_surface_with_crust/plugin/simplerwc.h
deleted file mode 100644
index 53a214b..0000000
--- a/cookbooks/free_surface_with_crust/plugin/simplerwc.h
+++ /dev/null
@@ -1,109 +0,0 @@
- /*
- Copyright (C) 2011, 2012 by the authors of the ASPECT code.
-
- This file is part of ASPECT.
-
- ASPECT is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- ASPECT is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with ASPECT; see the file doc/COPYING. If not see
- <http://www.gnu.org/licenses/>.
- */
-
-
-#ifndef __aspect__model_simplerwc_h
-#define __aspect__model_simplerwc_h
-
-#include <aspect/material_model/interface.h>
-#include <aspect/simulator_access.h>
-
-namespace aspect
-{
- namespace MaterialModel
- {
- using namespace dealii;
-
- /**
- * A material model that consists of globally constant values for all
- * material parameters except the density, which depends linearly on the
- * temperature. The model is considered incompressible.
- *
- * This material model implements what the "Simple" model was originally
- * intended to do, before it got too complicated.
- *
- * @ingroup MaterialModels
- */
- template <int dim>
- class Simplerwc : public Interface<dim>
- {
- public:
-
- virtual bool
- viscosity_depends_on (const NonlinearDependence::Dependence dependence) const;
-
- virtual bool
- density_depends_on (const NonlinearDependence::Dependence dependence) const;
-
- virtual bool
- compressibility_depends_on (const NonlinearDependence::Dependence dependence) const;
-
- virtual bool
- specific_heat_depends_on (const NonlinearDependence::Dependence dependence) const;
-
- virtual bool
- thermal_conductivity_depends_on (const NonlinearDependence::Dependence dependence) const;
-
- virtual bool is_compressible () const;
-
- virtual double reference_viscosity () const;
-
- virtual double reference_density () const;
-
- virtual void evaluate(const typename Interface<dim>::MaterialModelInputs &in,
- typename Interface<dim>::MaterialModelOutputs &out) const;
-
-
- /**
- * @name Functions used in dealing with run-time parameters
- * @{
- */
- /**
- * Declare the parameters this class takes through input files.
- */
- static
- void
- declare_parameters (ParameterHandler &prm);
-
- /**
- * Read the parameters this class declares from the parameter file.
- */
- virtual
- void
- parse_parameters (ParameterHandler &prm);
- /**
- * @}
- */
-
- private:
- double reference_rho;
- double reference_T;
- double eta_L;
- double eta_U;
- double jump_height;
- double thermal_alpha;
- double reference_specific_heat;
- double k_value;
- };
-
- }
-}
-
-#endif
More information about the CIG-COMMITS
mailing list