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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
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
Core Modules
dune-common
Commits
6baa7479
Commit
6baa7479
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
indexNew --> indexIsNew to prevent collision with newIndex.
[[Imported from SVN: r4198]]
parent
ce530163
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grid/common/defaultindexsets.hh
+10
-4
10 additions, 4 deletions
grid/common/defaultindexsets.hh
grid/common/leafindexset.hh
+11
-11
11 additions, 11 deletions
grid/common/leafindexset.hh
with
21 additions
and
15 deletions
grid/common/defaultindexsets.hh
+
10
−
4
View file @
6baa7479
...
...
@@ -89,13 +89,16 @@ namespace Dune {
//! and no compress of date has to be done
bool
compress
()
{
return
false
;
}
//! returns true if index set gernally needs compress after adaptation
bool
needsCompress
()
const
{
return
false
;
}
//! do nothing here, because fathers index should already exist
template
<
class
EntityType
>
void
insertNewIndex
(
const
EntityType
&
en
)
{}
void
insertNewIndex
(
const
EntityType
&
en
)
{}
//! do nothing here, because fathers index should already exist
template
<
class
EntityType
>
void
removeOldIndex
(
const
EntityType
&
en
)
{}
void
removeOldIndex
(
const
EntityType
&
en
)
{}
//! nothing to do here
void
resize
()
{}
...
...
@@ -103,8 +106,11 @@ namespace Dune {
//! no extra memory for restriction is needed
int
additionalSizeEstimate
()
const
{
return
0
;
}
//! all indices are old
bool
indexNew
(
int
num
,
int
codim
)
const
{
return
false
;
}
//! returns true if index idx of codim cd is new, here all indices are old
bool
indexIsNew
(
int
idx
,
int
cd
)
const
{
return
false
;
}
//! returns true if index idx is new, here all indices are old
bool
indexIsNew
(
int
idx
)
const
{
return
false
;
}
//! we have no old size
int
oldSize
(
int
codim
)
const
{
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
grid/common/leafindexset.hh
+
11
−
11
View file @
6baa7479
...
...
@@ -159,7 +159,7 @@ namespace Dune {
}
//! for dof manager, to check whether it has to copy dof or not
bool
indexNew
(
int
num
)
const
bool
index
Is
New
(
int
num
)
const
{
assert
((
num
>=
0
)
&&
(
num
<
state_
.
size
()));
return
state_
[
num
]
==
NEW
;
...
...
@@ -746,8 +746,8 @@ namespace Dune {
}
//! insert new index to set
void
insertNewIndex
(
const
typename
GridType
::
template
Codim
<
0
>
::
Entity
&
en
)
{
void
insertNewIndex
(
const
typename
GridType
::
template
Codim
<
0
>
::
Entity
&
en
)
{
// here we have to add the support of higher codims
resizeVectors
();
...
...
@@ -788,18 +788,17 @@ namespace Dune {
// give all entities that lie below the old entities new numbers
markAllBelowOld
();
//markAllUsed ();
}
//! for dof manager, to check whether it has to copy dof or not
bool
indexNew
(
int
num
,
int
codim
)
const
bool
index
Is
New
(
int
num
,
int
codim
)
const
{
assert
(
codimUsed_
[
codim
]
);
return
codimLeafSet_
[
codim
].
indexNew
(
num
);
return
codimLeafSet_
[
codim
].
index
Is
New
(
num
);
}
//! make to index numbers consecutive
//! return true, if at least one hole
was clos
ed
//! return true, if at least one hole
exist
ed
bool
compress
()
{
// if not marked, mark which indices are still used
...
...
@@ -820,6 +819,9 @@ namespace Dune {
return
haveToCopy
;
}
//! this index set needs compress after adaptation, here true is returned
bool
needsCompress
()
const
{
return
true
;
}
//! memorise index
// --insert
void
insert
(
const
EntityCodim0Type
&
en
)
...
...
@@ -840,8 +842,6 @@ namespace Dune {
void
remove
(
const
EntityCodim0Type
&
en
)
{
// if state is NEW or USED the index of all entities is removed
//std::cout << codimLeafSet_[0].state( hIndexSet_.index(en) ) << " state for en = " << hIndexSet_.index(en) << "\n";
//std::cout << codimLeafSet_[0].index( hIndexSet_.index(en) ) << " leaf index \n";
if
(
codimLeafSet_
[
0
].
exsits
(
hIndexSet_
.
index
(
en
)
)
)
{
codimLeafSet_
[
0
].
remove
(
hIndexSet_
.
index
(
en
)
);
...
...
@@ -1154,9 +1154,9 @@ namespace Dune {
}
//! for dof manager, to check whether it has to copy dof or not
bool
indexNew
(
int
num
,
int
codim
)
bool
index
Is
New
(
int
num
,
int
codim
)
{
return
leafIndexSet_
.
indexNew
(
num
,
codim
);
return
leafIndexSet_
.
index
Is
New
(
num
,
codim
);
}
//! make to index numbers consecutive
...
...
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