Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
ce7d5b51
Commit
ce7d5b51
authored
3 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[components][tabulated] Remove debug string that caused ca. 10% performance penalty
parent
49b016bc
No related branches found
No related tags found
1 merge request
!2992
[components][tabulated] Remove debug string that caused ca. 10% performance penalty
Pipeline
#12637
waiting for manual action
Stage: trigger
Stage: downstream modules
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/components/tabulatedcomponent.hh
+13
-14
13 additions, 14 deletions
dumux/material/components/tabulatedcomponent.hh
with
13 additions
and
14 deletions
dumux/material/components/tabulatedcomponent.hh
+
13
−
14
View file @
ce7d5b51
...
...
@@ -238,7 +238,7 @@ public:
static
const
Scalar
gasEnthalpy
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
gasEnthalpy_
,
temperature
,
pressure
,
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
,
"gas"
);
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -265,7 +265,7 @@ public:
static
const
Scalar
liquidEnthalpy
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
liquidEnthalpy_
,
temperature
,
pressure
,
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
,
"liquid"
);
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -292,7 +292,7 @@ public:
static
const
Scalar
gasHeatCapacity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
gasHeatCapacity_
,
temperature
,
pressure
,
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
,
"gas"
);
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -319,7 +319,7 @@ public:
static
const
Scalar
liquidHeatCapacity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
liquidHeatCapacity_
,
temperature
,
pressure
,
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
,
"liquid"
);
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -456,7 +456,7 @@ public:
static
Scalar
gasDensity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
gasDensity_
,
temperature
,
pressure
,
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
,
"gas"
);
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -495,7 +495,7 @@ public:
static
Scalar
liquidDensity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
liquidDensity_
,
temperature
,
pressure
,
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
,
"liquid"
);
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -538,7 +538,7 @@ public:
static
Scalar
gasViscosity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
gasViscosity_
,
temperature
,
pressure
,
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
,
"gas"
);
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -565,7 +565,7 @@ public:
static
Scalar
liquidViscosity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
liquidViscosity_
,
temperature
,
pressure
,
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
,
"liquid"
);
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -592,7 +592,7 @@ public:
static
Scalar
gasThermalConductivity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
gasThermalConductivity_
,
temperature
,
pressure
,
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
,
"gas"
);
pressGasIdx_
,
minGasPressure_
,
maxGasPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -619,7 +619,7 @@ public:
static
Scalar
liquidThermalConductivity
(
Scalar
temperature
,
Scalar
pressure
)
{
Scalar
result
=
interpolateTP_
(
liquidThermalConductivity_
,
temperature
,
pressure
,
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
,
"liquid"
);
pressLiquidIdx_
,
minLiquidPressure_
,
maxLiquidPressure_
);
using
std
::
isnan
;
if
(
isnan
(
result
))
{
...
...
@@ -786,8 +786,7 @@ private:
//! returns an interpolated value depending on temperature and pressure
template
<
class
GetPIdx
,
class
MinPFunc
,
class
MaxPFunc
>
static
Scalar
interpolateTP_
(
const
std
::
vector
<
typename
RawComponent
::
Scalar
>&
values
,
Scalar
T
,
Scalar
p
,
GetPIdx
&&
getPIdx
,
MinPFunc
&&
minP
,
MaxPFunc
&&
maxP
,
const
std
::
string
&
phaseName
)
GetPIdx
&&
getPIdx
,
MinPFunc
&&
minP
,
MaxPFunc
&&
maxP
)
{
Scalar
alphaT
=
tempIdx_
(
T
);
if
(
alphaT
<
0
||
alphaT
>=
nTemp_
-
1
)
{
...
...
@@ -811,10 +810,10 @@ private:
DUNE_THROW(NumericalProblem, "Temperature out of range: "
<< "T=" << T << " range: [" << tempMin_ << ", " << tempMax_ << "]");
if(!(0 <= alphaP1 && alphaP1 <= 1.0))
DUNE_THROW(NumericalProblem, "First
" << phaseName "
pressure out of range: "
DUNE_THROW(NumericalProblem, "First pressure out of range: "
<< "p=" << p << " range: [" << minP(tempIdx_(T)) << ", " << maxP(tempIdx_(T)) << "]");
if(!(0 <= alphaP2 && alphaP2 <= 1.0))
DUNE_THROW(NumericalProblem, "Second
" << phaseName "
pressure out of range: "
DUNE_THROW(NumericalProblem, "Second pressure out of range: "
<< "p=" << p << " range: [" << minP(tempIdx_(T) + 1) << ", " << maxP(tempIdx_(T) + 1) << "]");
#endif
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment