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
791c064a
Commit
791c064a
authored
19 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
static checks for the four index sets when WITH_INDEX_SETS is set
[[Imported from SVN: r2457]]
parent
10980bd1
Branches
Branches containing commit
Tags
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
+41
-2
41 additions, 2 deletions
grid/test/gridcheck.cc
with
41 additions
and
2 deletions
grid/test/gridcheck.cc
+
41
−
2
View file @
791c064a
...
...
@@ -430,6 +430,41 @@ struct GridInterface
LeafInterface
<
Grid
,
Dune
::
Capabilities
::
hasLeafIterator
<
Grid
>::
v
>
();
// Check for index sets
#ifdef WITH_INDEX_SETS
typedef
typename
Grid
::
LevelIndexSet
LevelIndexSet
;
typedef
typename
Grid
::
LeafIndexSet
LeafIndexSet
;
typedef
typename
Grid
::
LocalIdSet
LocalIdSet
;
typedef
typename
Grid
::
GlobalIdSet
GlobalIdSet
;
g
.
levelindexset
(
0
);
// Instantiate all methods of LevelIndexSet
g
.
levelindexset
(
0
).
template
index
<
0
>(
*
g
.
template
lbegin
<
0
>(
0
));
/** \todo Test for subindex is missing, because I don't know yet
how to test for the existence of certain codims */
g
.
levelindexset
(
0
).
size
(
0
,
Dune
::
simplex
);
g
.
levelindexset
(
0
).
geomtypes
();
// Instantiate all methods of LeafIndexSet
g
.
leafindexset
().
template
index
<
0
>(
*
g
.
template
lbegin
<
0
>(
0
));
/** \todo Test for subindex is missing, because I don't know yet
how to test for the existence of certain codims */
g
.
leafindexset
().
size
(
0
,
Dune
::
simplex
);
g
.
leafindexset
().
geomtypes
();
// Instantiate all methods of LocalIdSet
/** \todo Test for subindex is missing, because I don't know yet
how to test for the existence of certain codims */
g
.
localidset
().
template
id
<
0
>(
*
g
.
template
lbegin
<
0
>(
0
));
// Instantiate all methods of GlobalIdSet
/** \todo Test for subindex is missing, because I don't know yet
how to test for the existence of certain codims */
g
.
globalidset
().
template
id
<
0
>(
*
g
.
template
lbegin
<
0
>(
0
));
#endif
// recursively check entity-interface
// ... we only allow grids with codim 0 zero entites
IsTrue
<
Dune
::
Capabilities
::
hasEntity
<
Grid
,
0
>::
v
>::
yes
();
...
...
@@ -461,10 +496,14 @@ struct subIndexCheck
const
int
imax
=
e
.
template
count
<
cd
>();
for
(
int
i
=
0
;
i
<
imax
;
++
i
)
{
if
(
(
e
.
template
entity
<
cd
>(
i
)
->
index
()
!=
e
.
template
subIndex
<
cd
>(
i
)
)
&&
#ifndef WITH_INDEX_SETS
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!"
);
"e.template entity<cd>(i)->globalIndex() != e.template subIndex<cd>(i) failed!"
);
#else
#warning subIndexCheck for index sets not implemented yet!
#endif
}
subIndexCheck
<
cd
-
1
,
Grid
,
Entity
,
Dune
::
Capabilities
::
hasEntity
<
Grid
,
cd
-
1
>::
v
>
sick
(
e
);
...
...
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