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
fb999a5f
Commit
fb999a5f
authored
19 years ago
by
Peter Bastian
Browse files
Options
Downloads
Patches
Plain Diff
adapted to updated index set
[[Imported from SVN: r2907]]
parent
ea1f34e5
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/scsgmapper.hh
+10
-9
10 additions, 9 deletions
grid/common/scsgmapper.hh
with
10 additions
and
9 deletions
grid/common/scsgmapper.hh
+
10
−
9
View file @
fb999a5f
...
...
@@ -22,7 +22,7 @@ namespace Dune
* @{
*/
/** @brief Implementation
base
class for a single codim and single geometry type mapper.
/** @brief Implementation class for a single codim and single geometry type mapper.
*
* In this implementation of a mapper the entity set used as domain for the map consists
* of the entities of a given codimension c for all entities in the given index set. The index
...
...
@@ -56,8 +56,8 @@ namespace Dune
\param e Reference to codim cc entity, where cc is the template parameter of the function.
\return An index in the range 0 ... Max number of entities in set - 1.
*/
template
<
int
cc
>
// this is necessary for multiple codim mappers
int
map
(
const
typename
G
::
Traits
::
template
Codim
<
cc
>
::
Entity
&
e
)
const
;
template
<
class
EntityType
>
int
map
(
const
Entity
Type
&
e
)
const
;
/** @brief Map subentity of codim 0 entity to array index.
...
...
@@ -65,7 +65,7 @@ namespace Dune
\param i Number of codim cc subentity of e, where cc is the template parameter of the function.
\return An index in the range 0 ... Max number of entities in set - 1.
*/
template
<
int
cc
>
// this is now the subentity's codim
template
<
int
cc
>
int
submap
(
const
typename
G
::
Traits
::
template
Codim
<
0
>
::
Entity
&
e
,
int
i
)
const
;
/** @brief Return total number of entities in the entity set managed by the mapper.
...
...
@@ -90,14 +90,15 @@ namespace Dune
:
g
(
grid
),
is
(
indexset
)
{
// check that grid has only a single geometry type
if
(
is
.
geomTypes
().
size
()
!=
1
)
if
(
is
.
geomTypes
(
c
).
size
()
!=
1
)
DUNE_THROW
(
GridError
,
"mapper treats only a single codim and a single geometry type"
);
}
template
<
typename
G
,
typename
IS
,
int
c
>
template
<
int
cc
>
int
SingleCodimSingleGeomTypeMapper
<
G
,
IS
,
c
>::
map
(
const
typename
G
::
Traits
::
template
Codim
<
cc
>
::
Entity
&
e
)
const
template
<
class
EntityType
>
int
SingleCodimSingleGeomTypeMapper
<
G
,
IS
,
c
>::
map
(
const
Entity
Type
&
e
)
const
{
enum
{
cc
=
EntityType
::
codimension
};
IsTrue
<
cc
==
c
>::
yes
();
return
is
.
template
index
<
cc
>(
e
);
}
...
...
@@ -107,13 +108,13 @@ namespace Dune
int
SingleCodimSingleGeomTypeMapper
<
G
,
IS
,
c
>::
submap
(
const
typename
G
::
Traits
::
template
Codim
<
0
>
::
Entity
&
e
,
int
i
)
const
{
IsTrue
<
cc
==
c
>::
yes
();
return
is
.
template
sub
i
ndex
<
cc
>(
e
,
i
);
return
is
.
template
sub
I
ndex
<
cc
>(
e
,
i
);
}
template
<
typename
G
,
typename
IS
,
int
c
>
int
SingleCodimSingleGeomTypeMapper
<
G
,
IS
,
c
>::
size
()
const
{
return
is
.
size
(
c
,
is
.
geomTypes
()[
0
]);
return
is
.
size
(
c
,
is
.
geomTypes
(
c
)[
0
]);
}
...
...
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