[cig-commits] [commit] master: Code refactoring. (9b7ecc4)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Tue May 20 13:45:09 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/4f4b96e0569b8be211d2d72b283391b5d08b4e1d...0586ab6f9cf6ec525c331a8c0113ca155a3f1f87
>---------------------------------------------------------------
commit 9b7ecc4dcbe4f1be69e83f7ce8ceb0d677861bc1
Author: Rene Gassmoeller <R.Gassmoeller at mailbox.org>
Date: Tue May 20 15:32:11 2014 -0500
Code refactoring.
>---------------------------------------------------------------
9b7ecc4dcbe4f1be69e83f7ce8ceb0d677861bc1
source/material_model/simple_compressible.cc | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/source/material_model/simple_compressible.cc b/source/material_model/simple_compressible.cc
index 3a525cf..9f40d09 100644
--- a/source/material_model/simple_compressible.cc
+++ b/source/material_model/simple_compressible.cc
@@ -162,14 +162,10 @@ namespace aspect
{
// compare this with the implementation of the density() function
// to see the dependencies
- if (((dependence & NonlinearDependence::temperature) != NonlinearDependence::none)
- &&
- (thermal_alpha != 0))
- return true;
- else if (((dependence & NonlinearDependence::pressure) != NonlinearDependence::none)
- &&
- (reference_compressibility != 0))
- return true;
+ if ((dependence & NonlinearDependence::temperature) != NonlinearDependence::none)
+ return (thermal_alpha != 0);
+ else if ((dependence & NonlinearDependence::pressure) != NonlinearDependence::none)
+ return (reference_compressibility != 0);
else
return false;
}
@@ -204,10 +200,7 @@ namespace aspect
SimpleCompressible<dim>::
is_compressible () const
{
- if (reference_compressibility)
- return true;
- else
- return false;
+ return (reference_compressibility != 0);
}
@@ -288,8 +281,9 @@ namespace aspect
"\n\n"
"This model uses the following equations for the density: "
"\\begin{align}"
- " \\rho(p,T) &= \\left(1-\\alpha (T-T_0)\\right) "
- " &= * \\left(1+\\kappa (P-P_0)\\right) \\rho_0"
+ " \\rho(p,T) = &rho_0"
+ " * &\\left(1-\\alpha (T-T_a)\\right) "
+ " * &\\exp{\\beta (P-P_0))}"
"\\end{align}")
}
}
More information about the CIG-COMMITS
mailing list