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
d97b4dc9
Commit
d97b4dc9
authored
20 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
changes to make onedgrid "g++-4.0 ready" ;-)
[[Imported from SVN: r1209]]
parent
97957165
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
grid/onedgrid.hh
+31
-2
31 additions, 2 deletions
grid/onedgrid.hh
grid/onedgrid/onedgrid.cc
+6
-31
6 additions, 31 deletions
grid/onedgrid/onedgrid.cc
grid/onedgrid/onedgridleveliterator.hh
+1
-0
1 addition, 0 deletions
grid/onedgrid/onedgridleveliterator.hh
with
38 additions
and
33 deletions
grid/onedgrid.hh
+
31
−
2
View file @
d97b4dc9
...
...
@@ -34,6 +34,8 @@ namespace Dune
template
<
int
dim
,
int
dimworld
>
class
OneDGridIntersectionIterator
;
template
<
int
dim
,
int
dimworld
>
class
OneDGrid
;
template
<
int
codim
>
class
OneDGridHelper
;
// singleton holding reference elements
//template<int dim> struct UGGridReferenceElement;
...
...
@@ -164,6 +166,21 @@ namespace Dune {
//
//**********************************************************************
template
<
int
codim
>
struct
OneDGridHelper
{};
template
<
>
struct
OneDGridHelper
<
1
>
{
static
OneDGridLevelIterator
<
1
,
1
,
1
,
All_Partition
>
lbegin
(
const
OneDGrid
<
1
,
1
>
*
g
,
int
level
);
};
template
<
>
struct
OneDGridHelper
<
0
>
{
static
OneDGridLevelIterator
<
0
,
1
,
1
,
All_Partition
>
lbegin
(
const
OneDGrid
<
1
,
1
>
*
g
,
int
level
);
};
/** \brief The 1D-Grid class
* \ingroup OneDGrid
*
...
...
@@ -179,6 +196,8 @@ namespace Dune {
OneDGridLevelIterator
,
OneDGridEntity
>
{
friend
class
OneDGridHelper
<
0
>
;
friend
class
OneDGridHelper
<
1
>
;
friend
class
OneDGridEntity
<
0
,
dim
,
dimworld
>
;
friend
class
OneDGridEntity
<
dim
,
dim
,
dimworld
>
;
friend
class
OneDGridHierarchicIterator
<
dim
,
dimworld
>
;
...
...
@@ -217,11 +236,21 @@ namespace Dune {
//! Iterator to first entity of given codim on level
template
<
int
codim
>
OneDGridLevelIterator
<
codim
,
dim
,
dimworld
,
All_Partition
>
lbegin
(
int
level
)
const
;
OneDGridLevelIterator
<
codim
,
dim
,
dimworld
,
All_Partition
>
lbegin
(
int
level
)
const
{
return
OneDGridHelper
<
codim
>::
lbegin
(
this
,
level
);
}
//! one past the end on this level
template
<
int
codim
>
OneDGridLevelIterator
<
codim
,
dim
,
dimworld
,
All_Partition
>
lend
(
int
level
)
const
;
OneDGridLevelIterator
<
codim
,
dim
,
dimworld
,
All_Partition
>
lend
(
int
level
)
const
{
if
(
level
<
0
||
level
>
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
OneDGridLevelIterator
<
codim
,
dim
,
dimworld
,
All_Partition
>
it
(
0
);
return
it
;
}
#if 0
//! Iterator to first entity of given codim on level
...
...
This diff is collapsed.
Click to expand it.
grid/onedgrid/onedgrid.cc
+
6
−
31
View file @
d97b4dc9
...
...
@@ -102,48 +102,23 @@ OneDGrid<dim,dimworld>::~OneDGrid()
}
template
<
>
inline
OneDGridLevelIterator
<
1
,
1
,
1
,
All_Partition
>
OneDGrid
<
1
,
1
>::
lbegin
<
1
>
(
int
level
)
const
{
if
(
level
<
0
||
level
>
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
OneDGridLevelIterator
<
1
,
1
,
1
,
All_Partition
>
it
(
vertices
[
level
].
begin
);
return
it
;
}
template
<
>
inline
OneDGridLevelIterator
<
0
,
1
,
1
,
All_Partition
>
OneDGrid
<
1
,
1
>::
lbegin
<
0
>
(
int
level
)
const
{
if
(
level
<
0
||
level
>
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
OneDGridLevelIterator
<
0
,
1
,
1
,
All_Partition
>
it
(
elements
[
level
].
begin
);
return
it
;
}
template
<
>
inline
OneDGridLevelIterator
<
1
,
1
,
1
,
All_Partition
>
OneDGrid
<
1
,
1
>::
lend
<
1
>
(
int
level
)
const
OneDGrid
Helper
<
1
>::
lbegin
(
const
OneDGrid
<
1
,
1
>
*
g
,
int
level
)
{
if
(
level
<
0
||
level
>
maxlevel
())
if
(
level
<
0
||
level
>
g
->
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
OneDGridLevelIterator
<
1
,
1
,
1
,
All_Partition
>
it
(
0
);
OneDGridLevelIterator
<
1
,
1
,
1
,
All_Partition
>
it
(
g
->
vertices
[
level
].
begin
);
return
it
;
}
template
<
>
inline
OneDGridLevelIterator
<
0
,
1
,
1
,
All_Partition
>
OneDGrid
<
1
,
1
>::
lend
<
0
>
(
int
level
)
const
OneDGrid
Helper
<
0
>::
lbegin
(
const
OneDGrid
<
1
,
1
>
*
g
,
int
level
)
{
if
(
level
<
0
||
level
>
maxlevel
())
if
(
level
<
0
||
level
>
g
->
maxlevel
())
DUNE_THROW
(
GridError
,
"LevelIterator in nonexisting level "
<<
level
<<
" requested!"
);
OneDGridLevelIterator
<
0
,
1
,
1
,
All_Partition
>
it
(
0
);
OneDGridLevelIterator
<
0
,
1
,
1
,
All_Partition
>
it
(
g
->
elements
[
level
].
begin
);
return
it
;
}
...
...
This diff is collapsed.
Click to expand it.
grid/onedgrid/onedgridleveliterator.hh
+
1
−
0
View file @
d97b4dc9
...
...
@@ -27,6 +27,7 @@ namespace Dune {
public
LevelIteratorDefault
<
codim
,
dim
,
dimworld
,
pitype
,
OneDCType
,
OneDGridLevelIterator
,
OneDGridEntity
>
{
friend
class
OneDGridHelper
<
codim
>
;
friend
class
OneDGrid
<
dim
,
dimworld
>
;
friend
class
OneDGridEntity
<
codim
,
dim
,
dimworld
>
;
friend
class
OneDGridEntity
<
0
,
dim
,
dimworld
>
;
...
...
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