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
98415c15
Commit
98415c15
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
ALUGrid id sets now inherit from IdSet.
[[Imported from SVN: r2866]]
parent
2656a252
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grid/alu3dgrid/grid.hh
+13
-5
13 additions, 5 deletions
grid/alu3dgrid/grid.hh
grid/alu3dgrid/indexsets.hh
+26
-2
26 additions, 2 deletions
grid/alu3dgrid/indexsets.hh
with
39 additions
and
7 deletions
grid/alu3dgrid/grid.hh
+
13
−
5
View file @
98415c15
...
...
@@ -194,21 +194,29 @@ namespace Dune {
friend
class
Conversion
<
ALU3dGrid
<
dim
,
dimworld
,
elementType
>
,
HasObjectStream
>
;
friend
class
Conversion
<
const
ALU3dGrid
<
dim
,
dimworld
,
elementType
>
,
HasObjectStream
>
;
//! my Traits class
typedef
typename
ALU3dGridFamily
<
dim
,
dimworld
,
elType
>
::
Traits
Traits
;
//! Type of the hierarchic index set
typedef
ALU3dGridHierarchicIndexSet
<
dim
,
dimworld
,
elType
>
HierarchicIndexSet
;
//! Type of the global id set
typedef
ALU3dGridGlobalIdSet
<
dim
,
dimworld
,
elType
>
GlobalIdSet
;
typedef
ALU3dGridGlobalIdSet
<
dim
,
dimworld
,
elType
>
GlobalIdSet
Imp
;
//! Type of the local id set
typedef
ALU3dGridLocalIdSet
<
dim
,
dimworld
,
elType
>
LocalIdSet
;
typedef
ALU3dGridLocalIdSet
<
dim
,
dimworld
,
elType
>
LocalIdSetImp
;
//! Type of the global id set
typedef
typename
Traits
::
GlobalIdSet
GlobalIdSet
;
//! Type of the local id set
typedef
typename
Traits
::
LocalIdSet
LocalIdSet
;
//! Type of the level index set
typedef
DefaultLevelIndexSet
<
MyType
>
LevelIndexSetImp
;
//! Type of the leaf index set
typedef
AdaptiveLeafIndexSet
<
MyType
>
LeafIndexSetImp
;
typedef
typename
ALU3dGridFamily
<
dim
,
dimworld
,
elType
>
::
Traits
Traits
;
//! a standard leaf iterator
typedef
ALU3dGridLeafIterator
<
0
,
All_Partition
,
MyType
>
LeafIteratorImp
;
...
...
@@ -470,10 +478,10 @@ namespace Dune {
HierarchicIndexSet
hIndexSet_
;
// out global id set
GlobalIdSet
globalIdSet_
;
GlobalIdSet
Imp
globalIdSet_
;
// out global id set
LocalIdSet
localIdSet_
;
LocalIdSet
Imp
localIdSet_
;
// the level index set ( default type )
mutable
std
::
vector
<
LevelIndexSetImp
*
>
levelIndexVec_
;
...
...
This diff is collapsed.
Click to expand it.
grid/alu3dgrid/indexsets.hh
+
26
−
2
View file @
98415c15
...
...
@@ -71,7 +71,10 @@ namespace Dune {
//! hierarchic index set of ALU3dGrid
template
<
int
dim
,
int
dimworld
,
ALU3dGridElementType
elType
>
class
ALU3dGridGlobalIdSet
class
ALU3dGridGlobalIdSet
:
public
IdSet
<
ALU3dGrid
<
dim
,
dimworld
,
elType
>
,
ALU3dGridGlobalIdSet
<
dim
,
dimworld
,
elType
>
,
int
>
{
typedef
ALU3dGrid
<
dim
,
dimworld
,
elType
>
GridType
;
typedef
typename
GridType
::
HierarchicIndexSet
HierarchicIndexSetType
;
...
...
@@ -102,6 +105,15 @@ namespace Dune {
return
codimStart_
[
cd
]
+
hset_
.
index
(
ep
);
}
//! return global id of given entity
template
<
int
codim
>
int
id
(
const
typename
GridType
::
template
Codim
<
codim
>
::
Entity
&
ep
)
const
{
//enum { cd = EntityType :: codimension };
assert
(
hset_
.
size
(
codim
)
<
codimMultiplier
);
return
codimStart_
[
codim
]
+
hset_
.
index
(
ep
);
}
//! return subId of given entity
template
<
int
cd
>
int
subId
(
const
EntityCodim0Type
&
ep
,
int
i
)
const
...
...
@@ -121,7 +133,10 @@ namespace Dune {
//! hierarchic index set of ALU3dGrid
template
<
int
dim
,
int
dimworld
,
ALU3dGridElementType
elType
>
class
ALU3dGridLocalIdSet
class
ALU3dGridLocalIdSet
:
public
IdSet
<
ALU3dGrid
<
dim
,
dimworld
,
elType
>
,
ALU3dGridLocalIdSet
<
dim
,
dimworld
,
elType
>
,
int
>
{
typedef
ALU3dGrid
<
dim
,
dimworld
,
elType
>
GridType
;
typedef
typename
GridType
::
HierarchicIndexSet
HierarchicIndexSetType
;
...
...
@@ -151,6 +166,15 @@ namespace Dune {
return
codimStart_
[
cd
]
+
hset_
.
index
(
ep
);
}
//! return global id of given entity
template
<
int
codim
>
int
id
(
const
typename
GridType
::
template
Codim
<
codim
>
::
Entity
&
ep
)
const
{
//enum { cd = EntityType :: codimension };
assert
(
hset_
.
size
(
codim
)
<
codimMultiplier
);
return
codimStart_
[
codim
]
+
hset_
.
index
(
ep
);
}
//! return subId of given entity
template
<
int
cd
>
int
subId
(
const
EntityCodim0Type
&
ep
,
int
i
)
const
...
...
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