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
03d2ad4a
Commit
03d2ad4a
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
Enabled check for grid with entities of different element types.
[[Imported from SVN: r3563]]
parent
b6b2066d
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/checkindexset.cc
+12
-9
12 additions, 9 deletions
grid/test/checkindexset.cc
with
12 additions
and
9 deletions
grid/test/checkindexset.cc
+
12
−
9
View file @
03d2ad4a
...
...
@@ -64,10 +64,11 @@ namespace Dune {
}
for
(
int
subEntity
=
0
;
subEntity
<
refElem
.
size
(
0
,
0
,
codim
);
subEntity
++
)
{
typedef
std
::
pair
<
int
,
GeometryType
>
SubEntityKeyType
;
{
int
numSubEntities
=
refElem
.
size
(
subEntity
,
codim
,
dim
);
// every entity have at least one vertex
assert
(
numSubEntities
>
0
);
//
assert( numSubEntities > 0 );
// create vectors of number of vertices on sub entity
std
::
vector
<
int
>
local
(
numSubEntities
,
-
1
);
...
...
@@ -88,9 +89,11 @@ namespace Dune {
global
[
j
]
=
lset
.
template
subIndex
<
dim
>
(
en
,
local
[
j
]);
}
int
globalSubEntity
=
lset
.
template
subIndex
<
codim
>(
en
,
subEntity
);
assert
(
globalSubEntity
>=
0
);
sout
<<
"local subentity "
<<
subEntity
<<
" consider subentity with global index "
<<
globalSubEntity
<<
" on en = "
<<
lset
.
index
(
en
)
<<
"
\n
"
;
SubEntityKeyType
globalSubEntity
=
SubEntityKeyType
(
lset
.
template
subIndex
<
codim
>(
en
,
subEntity
),
(
en
.
template
entity
<
codim
>
(
subEntity
))
->
geometry
().
type
());
assert
(
globalSubEntity
.
first
>=
0
);
sout
<<
"local subentity "
<<
subEntity
<<
" consider subentity with global key ("
<<
globalSubEntity
.
first
<<
","
<<
globalSubEntity
.
second
<<
") on en = "
<<
lset
.
index
(
en
)
<<
"
\n
"
;
sout
<<
"Found global numbers of entity [ "
;
for
(
int
j
=
0
;
j
<
numSubEntities
;
j
++
)
...
...
@@ -145,8 +148,7 @@ namespace Dune {
}
else
{
int
otherSubEntity
=
vertices
[
global
];
// ??? WTF ???
SubEntityKeyType
otherSubEntity
=
vertices
[
global
];
assert
(
globalSubEntity
==
otherSubEntity
);
}
...
...
@@ -160,7 +162,7 @@ namespace Dune {
std
::
vector
<
int
>
globalcheck
=
subEntities
[
globalSubEntity
];
if
(
!
(
global
==
globalcheck
))
{
std
::
cerr
<<
"For subEntity "
<<
globalSubEntity
<<
"
\n
"
;
std
::
cerr
<<
"For subEntity
key (
"
<<
globalSubEntity
.
first
<<
","
<<
globalSubEntity
.
second
<<
")
\n
"
;
std
::
cerr
<<
"Got "
;
for
(
int
j
=
0
;
j
<
numSubEntities
;
j
++
)
{
...
...
@@ -253,9 +255,10 @@ namespace Dune {
//******************************************************************
typedef
std
::
pair
<
int
,
GeometryType
>
SubEntityKeyType
;
typedef
std
::
map
<
int
,
std
::
pair
<
int
,
int
>
>
subEntitymapType
;
std
::
map
<
int
,
std
::
vector
<
int
>
>
subEntities
;
std
::
map
<
std
::
vector
<
int
>
,
int
>
vertices
;
std
::
map
<
SubEntityKeyType
,
std
::
vector
<
int
>
>
subEntities
;
std
::
map
<
std
::
vector
<
int
>
,
SubEntityKeyType
>
vertices
;
std
::
map
<
int
,
FieldVector
<
coordType
,
dim
>
>
vertexCoordsMap
;
// setup vertex map , store vertex coords for vertex number
...
...
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