From 582ae8130006935ef55b877149b5b7fa0fb025cc Mon Sep 17 00:00:00 2001 From: ignis Date: Wed, 23 Aug 2017 12:10:41 +0900 Subject: [PATCH] remove unnecessary Math.H and add constness in BetaPDF --- solvers_post/SLFMFoam/BetaPDF.H | 24 +++++++++++------------- solvers_post/SLFMFoam/SLFMFoam.C | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/solvers_post/SLFMFoam/BetaPDF.H b/solvers_post/SLFMFoam/BetaPDF.H index 0879187..127dc25 100644 --- a/solvers_post/SLFMFoam/BetaPDF.H +++ b/solvers_post/SLFMFoam/BetaPDF.H @@ -48,8 +48,6 @@ public: etaPart_(N_.size()) { //Ref. F.Liu et al., INT. J. THERM. SCI. 41 (2002) 763-772. - Info<<"Construct Beta-PDF"<& fx) + scalar simps(const scalar xl, const scalar xh, const label N, const UList& fx) const { scalar evensum(0.0), oddsum(0.0), sum(0.0); @@ -265,7 +263,7 @@ public: } //Amplitude Mapping Closure (from KIVA) //Define exp(-2*(erf^-1(2*eta - 1))^2) - scalarField AMC(scalarField& eta) + scalarField AMC(const scalarField& eta) const { const scalar pi = 3.141592; const scalar spi = Foam::sqrt(pi); @@ -287,11 +285,11 @@ public: return result; } - scalar AMC(scalar eta) + scalar AMC(const scalar eta) const { return interpolateXY(eta, etaSpace_, AMCfine_); } - void C1coeff(scalar mf, scalarField& varValue, scalarField& C1table) + void C1coeff(const scalar mf, const scalarField& varValue, scalarField& C1table) { scalar maxVar = mf*(1.0-mf); scalarField x, fx; diff --git a/solvers_post/SLFMFoam/SLFMFoam.C b/solvers_post/SLFMFoam/SLFMFoam.C index cb505aa..2a293f2 100644 --- a/solvers_post/SLFMFoam/SLFMFoam.C +++ b/solvers_post/SLFMFoam/SLFMFoam.C @@ -47,7 +47,6 @@ Contact #include "simpleControl.H" #include "FlameStructure/FlameStructure.H" #include "interpolateXY.H" -#include "Math.H" //Mathematical functions for CMC (AMC, gammaln, TDMA) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) @@ -69,6 +68,7 @@ int main(int argc, char *argv[]) //SLFM #include "readSLFMlib.H" //read SLFM library + Info<<"Construct Beta-PDF"<