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
1e05cb9d
Commit
1e05cb9d
authored
19 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
minor cleanup
[[Imported from SVN: r2934]]
parent
9a3f8247
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/onedgrid/onedgrid.cc
+16
-25
16 additions, 25 deletions
grid/onedgrid/onedgrid.cc
with
16 additions
and
25 deletions
grid/onedgrid/onedgrid.cc
+
16
−
25
View file @
1e05cb9d
...
...
@@ -10,6 +10,7 @@
// specialization of member templates
//
// ///////////////////////////////////////////////////////////////
namespace
Dune
{
template
<
int
codim
>
...
...
@@ -18,41 +19,31 @@ namespace Dune {
template
<
>
struct
OneDGridLevelIteratorFactory
<
1
>
{
template
<
PartitionIteratorType
PiType
>
template
<
Dune
::
PartitionIteratorType
PiType
>
static
Dune
::
OneDGridLevelIterator
<
1
,
PiType
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
lbegin
(
const
Dune
::
OneDGrid
<
1
,
1
>
*
g
,
int
level
);
lbegin
(
const
Dune
::
OneDGrid
<
1
,
1
>
*
g
,
int
level
)
{
if
(
level
<
0
||
level
>
g
->
maxlevel
())
DUNE_THROW
(
Dune
::
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
return
Dune
::
OneDGridLevelIterator
<
1
,
Dune
::
All_Partition
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
(
g
->
vertices
[
level
].
begin
);
}
};
template
<
>
struct
OneDGridLevelIteratorFactory
<
0
>
{
template
<
PartitionIteratorType
PiType
>
template
<
Dune
::
PartitionIteratorType
PiType
>
static
Dune
::
OneDGridLevelIterator
<
0
,
PiType
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
lbegin
(
const
Dune
::
OneDGrid
<
1
,
1
>
*
g
,
int
level
);
};
lbegin
(
const
Dune
::
OneDGrid
<
1
,
1
>
*
g
,
int
level
)
{
if
(
level
<
0
||
level
>
g
->
maxlevel
())
DUNE_THROW
(
Dune
::
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
}
template
<
Dune
::
PartitionIteratorType
PiType
>
inline
Dune
::
OneDGridLevelIterator
<
1
,
PiType
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
Dune
::
OneDGridLevelIteratorFactory
<
1
>::
lbegin
(
const
OneDGrid
<
1
,
1
>
*
g
,
int
level
)
{
if
(
level
<
0
||
level
>
g
->
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
OneDGridLevelIterator
<
1
,
All_Partition
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
it
(
g
->
vertices
[
level
].
begin
);
return
it
;
}
return
Dune
::
OneDGridLevelIterator
<
0
,
PiType
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
(
g
->
elements
[
level
].
begin
);
}
template
<
Dune
::
PartitionIteratorType
PiType
>
inline
Dune
::
OneDGridLevelIterator
<
0
,
PiType
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
Dune
::
OneDGridLevelIteratorFactory
<
0
>::
lbegin
(
const
OneDGrid
<
1
,
1
>
*
g
,
int
level
)
{
if
(
level
<
0
||
level
>
g
->
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
};
OneDGridLevelIterator
<
0
,
PiType
,
const
Dune
::
OneDGrid
<
1
,
1
>
>
it
(
g
->
elements
[
level
].
begin
);
return
it
;
}
...
...
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