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
ec1c52e6
Commit
ec1c52e6
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
more bug fixes.
[[Imported from SVN: r3277]]
parent
35076fe8
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/common/leafindexset.hh
+18
-4
18 additions, 4 deletions
grid/common/leafindexset.hh
with
18 additions
and
4 deletions
grid/common/leafindexset.hh
+
18
−
4
View file @
ec1c52e6
...
...
@@ -125,6 +125,12 @@ namespace Dune {
myCodim_
=
codim
;
}
// set codim, because we can't use constructor
int
myCodim
()
const
{
return
myCodim_
;
}
//! reallocate the vector for new size
void
resize
(
int
newSize
)
{
...
...
@@ -466,7 +472,10 @@ namespace Dune {
const
EntityType
&
en
,
int
num
,
bool
(
&
cdUsed
)[
ncodim
]
)
{
enum
{
codim
=
2
};
assert
(
cls
[
codim
].
myCodim
()
==
codim
);
if
(
!
cdUsed
[
codim
])
ls
.
template
setUpCodimSet
<
codim
>
();
assert
(
cdUsed
[
codim
]
);
assert
(
cls
[
codim
].
index
(
hset
.
template
subIndex
<
codim
>(
en
,
num
)
)
>=
0
);
return
cls
[
codim
].
index
(
hset
.
template
subIndex
<
codim
>(
en
,
num
)
);
}
...
...
@@ -599,12 +608,14 @@ namespace Dune {
AdaptiveLeafIndexSet
(
const
GridType
&
grid
)
:
DefaultGridIndexSetBase
<
GridType
>
(
grid
)
,
hIndexSet_
(
grid
.
hierarchicIndexSet
()
)
,
marked_
(
false
)
,
markAllU_
(
false
)
,
higherCodims_
(
false
)
//marked_ (false) , markAllU_ (false) , higherCodims_ (false)
marked_
(
false
)
,
markAllU_
(
false
)
,
higherCodims_
(
true
)
{
// codim 0 is used by default
codimUsed_
[
0
]
=
true
;
// all higher codims are not used by default
for
(
int
i
=
1
;
i
<
ncodim
;
i
++
)
codimUsed_
[
i
]
=
false
;
//for(int i=1; i<ncodim; i++) codimUsed_[i] = false;
for
(
int
i
=
1
;
i
<
ncodim
;
i
++
)
codimUsed_
[
i
]
=
true
;
// set the codim of each Codim Set.
for
(
int
i
=
0
;
i
<
ncodim
;
i
++
)
codimLeafSet_
[
i
].
setCodim
(
i
);
...
...
@@ -646,8 +657,8 @@ namespace Dune {
{
// this IndexWrapper provides specialisations for each codim
// see this class above
return
IndexWrapper
<
MyType
,
HIndexSetType
,
CodimLeafIndexSet
,
EntityCodim0Type
,
EntityCodim0Type
::
codimension
,
cd
>::
enum
{
enCodim
=
0
};
// codim of entity is 0
return
IndexWrapper
<
MyType
,
HIndexSetType
,
CodimLeafIndexSet
,
EntityCodim0Type
,
enCodim
,
cd
>::
index
(
*
this
,
hIndexSet_
,
codimLeafSet_
,
en
,
num
,
codimUsed_
);
}
...
...
@@ -900,6 +911,7 @@ namespace Dune {
template
<
int
codim
>
void
setUpCodimSet
()
const
{
//std::cout << "Setting up codim " << codim << "\n";
// resize if necessary
codimLeafSet_
[
codim
].
resize
(
hIndexSet_
.
size
(
codim
)
);
...
...
@@ -911,6 +923,8 @@ namespace Dune {
{
codimLeafSet_
[
codim
].
insert
(
hIndexSet_
.
index
(
*
it
)
);
}
//codimLeafSet_[codim].print("setup codim");
codimUsed_
[
codim
]
=
true
;
higherCodims_
=
true
;
}
...
...
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