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
06dbb89c
Commit
06dbb89c
authored
19 years ago
by
Thimo Neubauer
Browse files
Options
Downloads
Patches
Plain Diff
quickly introduced EntityPointer to get libdune compiling again
[[Imported from SVN: r1826]]
parent
59f533fb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
grid/onedgrid.hh
+2
-1
2 additions, 1 deletion
grid/onedgrid.hh
grid/onedgrid/onedgridleveliterator.hh
+41
-25
41 additions, 25 deletions
grid/onedgrid/onedgridleveliterator.hh
with
43 additions
and
26 deletions
grid/onedgrid.hh
+
2
−
1
View file @
06dbb89c
...
...
@@ -28,6 +28,7 @@ namespace Dune
// forward declarations
template
<
int
codim
,
int
dim
,
class
GridImp
>
class
OneDGridEntity
;
template
<
int
codim
,
class
GridImp
>
class
OneDGridEntityPointer
;
template
<
int
codim
,
PartitionIteratorType
pitype
,
class
GridImp
>
class
OneDGridLevelIterator
;
template
<
int
mydim
,
int
coordworld
,
class
GridImp
>
class
OneDGridGeometry
;
...
...
@@ -200,7 +201,7 @@ namespace Dune {
OneDGridGeometry
,
OneDGridEntity
,
OneDGridBoundaryEntity
,
OneDGrid
LevelIterator
,
// to be replaced by
EntityPointer
OneDGridEntityPointer
,
OneDGridLevelIterator
,
OneDGridIntersectionIterator
,
OneDGridHierarchicIterator
>
Traits
;
...
...
This diff is collapsed.
Click to expand it.
grid/onedgrid/onedgridleveliterator.hh
+
41
−
25
View file @
06dbb89c
...
...
@@ -11,6 +11,41 @@
namespace
Dune
{
template
<
int
codim
,
class
GridImp
>
class
OneDGridEntityPointer
:
public
EntityPointerDefault
<
codim
,
GridImp
,
Dune
::
OneDGridEntityPointer
<
codim
,
GridImp
>
>
{
enum
{
dim
=
GridImp
::
dimension
};
public
:
typedef
typename
GridImp
::
template
codim
<
codim
>
::
Entity
Entity
;
//! equality
bool
equals
(
const
OneDGridEntityPointer
<
codim
,
GridImp
>&
other
)
const
{
return
other
.
target_
==
target_
;
}
//! dereferencing
Entity
&
dereference
()
const
{
return
virtualEntity_
;}
//! ask for level of entity
int
level
()
const
{
return
target_
->
level
();}
protected
:
/** \brief Constructor from a given iterator */
OneDGridEntityPointer
(
OneDEntityImp
<
dim
-
codim
>*
it
)
/*: virtualEntity_()*/
{
target_
=
it
;
virtualEntity_
.
setToTarget
(
it
);
};
protected
:
mutable
OneDEntityWrapper
<
codim
,
GridImp
::
dimension
,
GridImp
>
virtualEntity_
;
OneDEntityImp
<
dim
-
codim
>*
target_
;
};
//**********************************************************************
//
// --OneDGridLevelIterator
...
...
@@ -20,9 +55,10 @@ namespace Dune {
*/
template
<
int
codim
,
PartitionIteratorType
pitype
,
class
GridImp
>
class
OneDGridLevelIterator
:
public
OneDGridEntityPointer
<
codim
,
GridImp
>
,
public
LevelIteratorDefault
<
codim
,
pitype
,
GridImp
,
OneDGridLevelIterator
>
{
public:
enum
{
dim
=
GridImp
::
dimension
};
friend
class
OneDGridLevelIteratorFactory
<
codim
>
;
friend
class
OneDGrid
<
dim
,
GridImp
::
dimensionworld
>
;
...
...
@@ -35,36 +71,16 @@ namespace Dune {
/** \brief Constructor from a given iterator */
OneDGridLevelIterator
<
codim
,
pitype
,
GridImp
>
(
OneDEntityImp
<
dim
-
codim
>*
it
)
/*: virtualEntity_()*/
{
target_
=
it
;
virtualEntity_
.
setToTarget
(
it
);
}
:
OneDGridEntityPointer
<
codim
,
GridImp
>
(
it
)
{}
public
:
//! prefix increment
void
increment
()
{
target_
=
target_
->
succ_
;
virtualEntity_
.
setToTarget
(
target_
);
}
//! equality
bool
equals
(
const
OneDGridLevelIterator
<
codim
,
pitype
,
GridImp
>&
other
)
const
{
return
other
.
target_
==
target_
;
this
->
target_
=
this
->
target_
->
succ_
;
this
->
virtualEntity_
.
setToTarget
(
this
->
target_
);
}
//! dereferencing
Entity
&
dereference
()
const
{
return
virtualEntity_
;}
//! ask for level of entity
int
level
()
const
{
return
target_
->
level
();}
private
:
mutable
OneDEntityWrapper
<
codim
,
GridImp
::
dimension
,
GridImp
>
virtualEntity_
;
OneDEntityImp
<
dim
-
codim
>*
target_
;
};
}
// namespace Dune
...
...
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