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
f4edafde
Commit
f4edafde
authored
9 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[test][generalproblem] Use epsilons for float comparisons!
parent
4cf6576c
No related branches found
No related tags found
2 merge requests
!31
Feature/colebrookwhiteboundarylayer
,
!19
Fix/generallensproblem
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/common/generalproblem/generallensproblem.hh
+1
-1
1 addition, 1 deletion
test/common/generalproblem/generallensproblem.hh
test/common/generalproblem/generallensspatialparams.hh
+6
-4
6 additions, 4 deletions
test/common/generalproblem/generallensspatialparams.hh
with
7 additions
and
5 deletions
test/common/generalproblem/generallensproblem.hh
+
1
−
1
View file @
f4edafde
...
...
@@ -412,7 +412,7 @@ private:
{
Scalar
width
=
this
->
bBoxMax
()[
0
]
-
this
->
bBoxMin
()[
0
];
Scalar
lambda
=
(
this
->
bBoxMax
()[
0
]
-
globalPos
[
0
])
/
width
;
return
onUpperBoundary_
(
globalPos
)
&&
0.5
<
lambda
&&
lambda
<
2.0
/
3.0
;
return
onUpperBoundary_
(
globalPos
)
&&
0.5
<
lambda
+
eps_
&&
lambda
<
2.0
/
3.0
+
eps_
;
}
Scalar
temperature_
;
...
...
This diff is collapsed.
Click to expand it.
test/common/generalproblem/generallensspatialparams.hh
+
6
−
4
View file @
f4edafde
...
...
@@ -89,7 +89,7 @@ public:
typedef
typename
MaterialLaw
::
Params
MaterialLawParams
;
GeneralLensSpatialParams
(
const
GridView
&
gridView
)
:
ParentType
(
gridView
)
:
ParentType
(
gridView
)
,
eps_
(
3e-6
)
{
lensLowerLeft_
[
0
]
=
GET_RUNTIME_PARAM
(
TypeTag
,
Scalar
,
SpatialParams
.
LensLowerLeftX
);
lensLowerLeft_
[
1
]
=
GET_RUNTIME_PARAM
(
TypeTag
,
Scalar
,
SpatialParams
.
LensLowerLeftY
);
...
...
@@ -155,10 +155,10 @@ public:
private
:
bool
isInLens_
(
const
GlobalPosition
&
globalPos
)
const
{
for
(
int
i
=
0
;
i
<
dim
;
++
i
)
{
if
(
globalPos
[
i
]
<
lensLowerLeft_
[
i
]
||
globalPos
[
i
]
>
lensUpperRight_
[
i
])
for
(
int
i
=
0
;
i
<
dim
;
++
i
)
if
(
globalPos
[
i
]
<
lensLowerLeft_
[
i
]
+
eps_
||
globalPos
[
i
]
>
lensUpperRight_
[
i
])
return
false
;
}
return
true
;
}
...
...
@@ -170,6 +170,8 @@ private:
MaterialLawParams
lensMaterialParams_
;
MaterialLawParams
outerMaterialParams_
;
const
Scalar
eps_
;
};
}
// end namespace
...
...
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