Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Timo Koch
dune-common
Commits
6d2c1ac6
Commit
6d2c1ac6
authored
20 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
factorEpsilon = 10 instead 10 in the code and subIndexCheck modified.
[[Imported from SVN: r1630]]
parent
6ba29915
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grid/test/gridcheck.cc
+9
-3
9 additions, 3 deletions
grid/test/gridcheck.cc
with
9 additions
and
3 deletions
grid/test/gridcheck.cc
+
9
−
3
View file @
6d2c1ac6
...
...
@@ -18,6 +18,9 @@
#include
<limits>
// machine epsilon is multiplied by this factor
static
double
factorEpsilon
=
10.0
;
class
CheckError
:
public
Dune
::
Exception
{};
// --- compile-time check of element-interface
...
...
@@ -401,7 +404,10 @@ struct subIndexCheck
const
int
imax
=
e
.
template
count
<
cd
>();
for
(
int
i
=
0
;
i
<
imax
;
++
i
)
{
assert
(
e
.
template
entity
<
cd
>(
i
)
->
index
()
==
e
.
template
subIndex
<
cd
>(
i
)
);
if
(
(
e
.
template
entity
<
cd
>(
i
)
->
index
()
!=
e
.
template
subIndex
<
cd
>(
i
)
)
&&
(
e
.
template
entity
<
cd
>(
i
)
->
globalIndex
()
!=
e
.
template
subIndex
<
cd
>(
i
))
)
DUNE_THROW
(
CheckError
,
"e.template entity<cd>(i)->index() == e.template subIndex<cd>(i) && "
<<
"e.template entity<cd>(i)->globalIndex() != e.template subIndex<cd>(i) faild!"
);
}
typedef
typename
Grid
::
template
codim
<
cd
>
::
Entity
SubEntity
;
subIndexCheck
<
cd
-
1
,
Grid
,
Entity
,
...
...
@@ -518,7 +524,7 @@ void iterate(Grid &g)
{
result
=
it
->
geometry
().
local
(
it
->
geometry
().
global
(
origin
));
typename
Grid
::
ctype
error
=
(
result
-
origin
).
two_norm
();
if
(
error
>=
10
*
std
::
numeric_limits
<
typename
Grid
::
ctype
>::
epsilon
())
if
(
error
>=
factorEpsilon
*
std
::
numeric_limits
<
typename
Grid
::
ctype
>::
epsilon
())
{
DUNE_THROW
(
CheckError
,
"|| geom.local(geom.global("
<<
origin
<<
")) - origin || != 0 ( || "
<<
result
<<
" - origin || ) = "
<<
error
);
...
...
@@ -540,7 +546,7 @@ void iterate(Grid &g)
{
result
=
lit
->
geometry
().
local
(
lit
->
geometry
().
global
(
origin
));
typename
Grid
::
ctype
error
=
(
result
-
origin
).
two_norm
();
if
(
error
>=
10
*
std
::
numeric_limits
<
typename
Grid
::
ctype
>::
epsilon
())
if
(
error
>=
factorEpsilon
*
std
::
numeric_limits
<
typename
Grid
::
ctype
>::
epsilon
())
{
DUNE_THROW
(
CheckError
,
"|| geom.local(geom.global("
<<
origin
<<
")) - origin || != 0 ( || "
<<
result
<<
" - origin || ) = "
<<
error
);
...
...
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