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
eada5533
Commit
eada5533
authored
20 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
introducing method PFirstNode for iterating through the grids nodes even in a parallel grid
[[Imported from SVN: r1373]]
parent
241a5177
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/uggrid/ugfunctions.hh
+26
-9
26 additions, 9 deletions
grid/uggrid/ugfunctions.hh
grid/uggrid/uggrid.cc
+3
-4
3 additions, 4 deletions
grid/uggrid/uggrid.cc
with
29 additions
and
13 deletions
grid/uggrid/ugfunctions.hh
+
26
−
9
View file @
eada5533
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef
__
DUNE_UG_FUNCTIONS_HH
__
#define
__
DUNE_UG_FUNCTIONS_HH
__
#ifndef DUNE_UG_FUNCTIONS_HH
#define DUNE_UG_FUNCTIONS_HH
/** \file
* \brief Encapsulates some UG macros and functions
...
...
@@ -10,11 +10,33 @@
#include
"ugtypes.hh"
namespace
Dune
{
//! \todo Please doc me!
/** \brief Encapsulates a few UG methods and macros
*
* This class provides a wrapper to several methods and macros from
* UG. There are two reasons for doing this. First, we don't want
* to call UG macros directly from DUNE, because they pollute the
* namespace and therefore we undefine them all. Secondly, UG methods
* appear in the namespaces UG2d and UG3d, but we need the dimension
* as a template parameter.
*/
template
<
int
dim
>
class
UG_NS
{
public:
/** \brief The PFIRSTNODE macros which returns the first node in a
* grid even in a parallel setting.
*/
static
typename
TargetType
<
dim
,
dim
>::
T
*
PFirstNode
(
typename
UGTypes
<
dim
>::
GridType
*
grid
)
{
using
UG
::
PrioHGhost
;
using
UG
::
PrioVGhost
;
using
UG
::
PrioVHGhost
;
using
UG
::
PrioMaster
;
using
UG
::
PrioBorder
;
return
PFIRSTNODE
(
grid
);
}
/** \brief Returns pointers to the coordinate arrays of an UG element */
static
void
Corner_Coordinates
(
typename
TargetType
<
0
,
dim
>::
T
*
theElement
,
double
*
x
[])
{
...
...
@@ -199,12 +221,7 @@ namespace Dune {
};
//! \todo Please doc me!
template
<
int
codim
,
int
dimworld
>
class
UGGridSubEntityFactory
{
// public:
// static TargetType<codim,dimworld>::T* get(TargetType<codim,dimworld>::T* c, int i){
// DUNE_THROW(GridError, "UGGridSubEnt");
// }
};
class
UGGridSubEntityFactory
{};
#ifdef _2
template
<
>
...
...
This diff is collapsed.
Click to expand it.
grid/uggrid/uggrid.cc
+
3
−
4
View file @
eada5533
...
...
@@ -37,7 +37,7 @@ public:
UGGridLevelIterator
<
2
,
2
,
2
,
All_Partition
>
getIterator
(
UGTypes
<
2
>::
GridType
*
theGrid
,
int
level
)
{
UGGridLevelIterator
<
2
,
2
,
2
,
All_Partition
>
it
(
level
);
it
.
setToTarget
(
theGrid
->
firstNode
[
0
]
,
level
);
it
.
setToTarget
(
UG_NS
<
2
>::
PFirstNode
(
theGrid
)
,
level
);
return
it
;
}
...
...
@@ -67,7 +67,7 @@ public:
UGGridLevelIterator
<
2
,
2
,
2
,
PiType
>
getIterator
(
UGTypes
<
2
>::
GridType
*
theGrid
,
int
level
)
{
std
::
cout
<<
"Simulating a parallel LevelIterator using a sequential one!"
<<
std
::
endl
;
UGGridLevelIterator
<
2
,
2
,
2
,
PiType
>
it
(
level
);
it
.
setToTarget
(
theGrid
->
firstNode
[
0
]
,
level
);
it
.
setToTarget
(
UG_NS
<
2
>
(
theGrid
)
,
level
);
return
it
;
}
...
...
@@ -100,8 +100,7 @@ public:
UGGridLevelIterator
<
3
,
3
,
3
,
All_Partition
>
it
(
level
);
UG3d
::
node
*
mytarget
=
theGrid
->
firstNode
[
0
];
it
.
setToTarget
(
mytarget
,
level
);
it
.
setToTarget
(
UG_NS
<
3
>::
PFirstNode
(
theGrid
),
level
);
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