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
c8731368
Commit
c8731368
authored
19 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
implemented subIndex, entity, and subLocalId for codim==0
[[Imported from SVN: r2900]]
parent
805e669f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
grid/uggrid/uggridentity.cc
+22
-13
22 additions, 13 deletions
grid/uggrid/uggridentity.cc
with
22 additions
and
13 deletions
grid/uggrid/uggridentity.cc
+
22
−
13
View file @
c8731368
...
...
@@ -144,10 +144,12 @@ inline int UGGridEntity<0, dim, GridImp>::subIndex(int i) const
{
assert
(
i
>=
0
&&
i
<
count
<
cc
>
());
if
(
cc
!=
dim
)
DUNE_THROW
(
GridError
,
"UGGrid::subIndex isn't implemented for cc != dim"
);
return
UG_NS
<
dim
>::
levelIndex
(
UG_NS
<
dim
>::
Corner
(
target_
,
renumberVertex
(
i
)));
if
(
cc
==
dim
)
return
UG_NS
<
dim
>::
levelIndex
(
UG_NS
<
dim
>::
Corner
(
target_
,
renumberVertex
(
i
)));
else
if
(
cc
==
0
)
return
UG_NS
<
dim
>::
levelIndex
(
target_
);
else
DUNE_THROW
(
GridError
,
"UGGrid<"
<<
dim
<<
","
<<
dim
<<
">::subIndex isn't implemented for cc=="
<<
cc
);
}
template
<
int
dim
,
class
GridImp
>
...
...
@@ -184,10 +186,12 @@ inline int UGGridEntity<0, dim, GridImp>::subLocalId(int i) const
{
assert
(
i
>=
0
&&
i
<
count
<
cc
>
());
if
(
cc
!=
dim
)
DUNE_THROW
(
GridError
,
"UGGrid::subLocalId isn't implemented for cc != dim"
);
return
UG_NS
<
dim
>::
id
(
UG_NS
<
dim
>::
Corner
(
target_
,
renumberVertex
(
i
)));
if
(
cc
==
dim
)
return
UG_NS
<
dim
>::
id
(
UG_NS
<
dim
>::
Corner
(
target_
,
renumberVertex
(
i
)));
else
if
(
cc
==
0
)
return
UG_NS
<
dim
>::
id
(
target_
);
else
DUNE_THROW
(
GridError
,
"UGGrid<"
<<
dim
<<
","
<<
dim
<<
">::subLocalId isn't implemented for cc=="
<<
cc
);
}
...
...
@@ -198,11 +202,16 @@ UGGridEntity<0,dim,GridImp>::entity ( int i ) const
{
assert
(
i
>=
0
&&
i
<
count
<
cc
>
());
if
(
cc
!=
dim
)
DUNE_THROW
(
GridError
,
"UGGrid::entity isn't implemented for cc != dim"
);
typename
TargetType
<
cc
,
dim
>::
T
*
subEntity
=
UGGridSubEntityFactory
<
cc
,
dim
>::
get
(
target_
,
renumberVertex
(
i
));
return
UGGridLevelIterator
<
cc
,
All_Partition
,
GridImp
>
(
subEntity
,
level_
);
if
(
cc
==
dim
)
{
typename
TargetType
<
cc
,
dim
>::
T
*
subEntity
=
UGGridSubEntityFactory
<
cc
,
dim
>::
get
(
target_
,
renumberVertex
(
i
));
return
UGGridLevelIterator
<
cc
,
All_Partition
,
GridImp
>
(
subEntity
,
level_
);
}
else
if
(
cc
==
0
)
{
// The following cast is here to make the code compile for all cc.
// When it gets actually called, cc==0, and the cast is nonexisting.
typename
TargetType
<
cc
,
dim
>::
T
*
myself
=
(
typename
TargetType
<
cc
,
dim
>::
T
*
)
target_
;
return
UGGridLevelIterator
<
cc
,
All_Partition
,
GridImp
>
(
myself
,
level_
);
}
else
DUNE_THROW
(
GridError
,
"UGGrid<"
<<
dim
<<
","
<<
dim
<<
">::entity isn't implemented for cc=="
<<
cc
);
}
template
<
int
dim
,
class
GridImp
>
...
...
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