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
504905b3
Commit
504905b3
authored
20 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
BSGrid renamed to ALU3dGrid.
[[Imported from SVN: r1750]]
parent
4f92f780
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
grid/alu3dgrid.hh
+155
-155
155 additions, 155 deletions
grid/alu3dgrid.hh
grid/alu3dgrid/alu3dgrid.cc
+227
-227
227 additions, 227 deletions
grid/alu3dgrid/alu3dgrid.cc
grid/alu3dgrid/alu3dinclude.hh
+19
-19
19 additions, 19 deletions
grid/alu3dgrid/alu3dinclude.hh
with
401 additions
and
401 deletions
grid/alu3dgrid.hh
+
155
−
155
View file @
504905b3
...
...
@@ -12,14 +12,14 @@
#include
"common/grid.hh"
#include
"common/defaultindexsets.hh"
#include
"
bsgrid/bs
include.hh"
#include
"
alu3dgrid/alu3d
include.hh"
#include
<dune/common/exceptions.hh>
namespace
Dune
{
/** @defgroup
BSGrid BS
Grid
/** @defgroup
ALU3dGrid ALU3d
Grid
@ingroup GridCommon
Adaptive parallel grid supporting dynamic load balancing, written by
Bernard Schupp. This grid supports hexahedrons and tetrahedrons.
...
...
@@ -36,32 +36,32 @@ namespace Dune
@{
*/
class
BS
GridError
:
public
Exception
{};
class
ALU3d
GridError
:
public
Exception
{};
enum
BS
GridElementType
{
tetra
=
4
,
hexa
=
7
};
enum
ALU3d
GridElementType
{
tetra
=
4
,
hexa
=
7
};
// i.e. double or float
typedef
double
bs_ctype
;
template
<
int
cd
,
int
dim
,
class
GridImp
>
class
BS
GridEntity
;
template
<
int
cd
,
PartitionIteratorType
pitype
,
class
GridImp
>
class
BS
GridLevelIterator
;
template
<
int
cd
,
int
dim
,
class
GridImp
>
class
ALU3d
GridEntity
;
template
<
int
cd
,
PartitionIteratorType
pitype
,
class
GridImp
>
class
ALU3d
GridLevelIterator
;
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
class
BS
GridGeometry
;
template
<
class
GridImp
>
class
BS
GridBoundaryEntity
;
template
<
class
GridImp
>
class
BS
GridHierarchicIterator
;
template
<
class
GridImp
>
class
BS
GridIntersectionIterator
;
template
<
class
GridImp
>
class
BS
GridLeafIterator
;
template
<
int
dim
,
int
dimworld
>
class
BS
Grid
;
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
class
ALU3d
GridGeometry
;
template
<
class
GridImp
>
class
ALU3d
GridBoundaryEntity
;
template
<
class
GridImp
>
class
ALU3d
GridHierarchicIterator
;
template
<
class
GridImp
>
class
ALU3d
GridIntersectionIterator
;
template
<
class
GridImp
>
class
ALU3d
GridLeafIterator
;
template
<
int
dim
,
int
dimworld
>
class
ALU3d
Grid
;
// the hierarhic index set
template
<
int
dim
,
int
dimworld
>
class
BS
GridHierarchicIndexSet
;
template
<
int
dim
,
int
dimworld
>
class
ALU3d
GridHierarchicIndexSet
;
// singleton holding reference elements
template
<
int
dim
,
class
GridImp
>
struct
BS
GridReferenceGeometry
;
template
<
int
dim
,
class
GridImp
>
struct
ALU3d
GridReferenceGeometry
;
//**********************************************************************
//
// --
BS
GridGeometry
// --
ALU3d
GridGeometry
// --Geometry
/*!
Defines the geometry part of a mesh entity. Works for all dimensions, element types and dime
...
...
@@ -81,15 +81,15 @@ namespace Dune
//! MakeableGeometry
template
<
int
mydim
,
int
coorddim
,
class
GridImp
>
class
BS
GridMakeableGeometry
:
public
Geometry
<
mydim
,
coorddim
,
GridImp
,
BS
GridGeometry
>
class
ALU3d
GridMakeableGeometry
:
public
Geometry
<
mydim
,
coorddim
,
GridImp
,
ALU3d
GridGeometry
>
{
typedef
Geometry
<
mydim
,
coorddim
,
GridImp
,
BS
GridGeometry
>
GeometryType
;
typedef
Geometry
<
mydim
,
coorddim
,
GridImp
,
ALU3d
GridGeometry
>
GeometryType
;
public:
BS
GridMakeableGeometry
(
bool
makeRefelem
=
false
)
:
GeometryType
(
BS
GridGeometry
<
mydim
,
coorddim
,
GridImp
>
(
makeRefelem
))
{}
ALU3d
GridMakeableGeometry
(
bool
makeRefelem
=
false
)
:
GeometryType
(
ALU3d
GridGeometry
<
mydim
,
coorddim
,
GridImp
>
(
makeRefelem
))
{}
//! build geometry out of different
BS
Grid Geometrys
//! build geometry out of different
ALU3d
Grid Geometrys
//! ItemType are HElementType, HFaceType, HEdgeType and VertexType
template
<
class
ItemType
>
bool
buildGeom
(
const
ItemType
&
item
)
...
...
@@ -117,19 +117,19 @@ namespace Dune
};
//!
BS
GridGeometry
//!
ALU3d
GridGeometry
template
<
int
mydim
,
int
cdim
,
class
GridImp
>
class
BS
GridGeometry
:
public
GeometryDefault
<
mydim
,
cdim
,
GridImp
,
BS
GridGeometry
>
class
ALU3d
GridGeometry
:
public
GeometryDefault
<
mydim
,
cdim
,
GridImp
,
ALU3d
GridGeometry
>
{
friend
class
BS
GridBoundaryEntity
<
GridImp
>
;
friend
class
ALU3d
GridBoundaryEntity
<
GridImp
>
;
//! know dimension of barycentric coordinates
enum
{
dimbary
=
mydim
+
1
};
public
:
//! for makeRefGeometry == true a Geometry with the coordinates of the
//! reference element is made
BS
GridGeometry
(
bool
makeRefGeometry
=
false
);
ALU3d
GridGeometry
(
bool
makeRefGeometry
=
false
);
//! return the element type identifier
//! line , triangle or tetrahedron, depends on dim
...
...
@@ -144,7 +144,7 @@ namespace Dune
/*! return reference element corresponding to this element. If this is
a reference element then self is returned.
*/
static
const
Dune
::
Geometry
<
mydim
,
mydim
,
GridImp
,
Dune
::
BS
GridGeometry
>
&
refelem
();
static
const
Dune
::
Geometry
<
mydim
,
mydim
,
GridImp
,
Dune
::
ALU3d
GridGeometry
>
&
refelem
();
//! maps a local coordinate within reference element to
//! global coordinate in element
...
...
@@ -166,7 +166,7 @@ namespace Dune
//***********************************************************************
//! Methods that not belong to the Interface, but have to be public
//***********************************************************************
//! generate the geometry for out of given
BS
GridElement
//! generate the geometry for out of given
ALU3d
GridElement
bool
buildGeom
(
const
BSSPACE
IMPLElementType
&
item
);
bool
buildGeom
(
const
BSSPACE
HFaceType
&
item
);
bool
buildGeom
(
const
BSSPACE
HEdgeType
&
item
);
...
...
@@ -212,22 +212,22 @@ namespace Dune
//**********************************************************************
//
// --
BS
GridEntity
// --
ALU3d
GridEntity
// --Entity
//
//**********************************************************************
template
<
int
codim
,
int
dim
,
class
GridImp
>
class
BS
GridMakeableEntity
:
class
ALU3d
GridMakeableEntity
:
public
GridImp
::
template
codim
<
codim
>
::
Entity
{
// typedef typename GridImp::template codim<codim>::Entity EntityType;
friend
class
BS
GridEntity
<
codim
,
dim
,
GridImp
>
;
friend
class
ALU3d
GridEntity
<
codim
,
dim
,
GridImp
>
;
public:
// Constructor creating the realEntity
BS
GridMakeableEntity
(
const
GridImp
&
grid
,
int
level
)
:
ALU3d
GridMakeableEntity
(
const
GridImp
&
grid
,
int
level
)
:
GridImp
::
template
codim
<
codim
>
::
Entity
(
BS
GridEntity
<
codim
,
dim
,
GridImp
>
(
grid
,
level
))
{}
Entity
(
ALU3d
GridEntity
<
codim
,
dim
,
GridImp
>
(
grid
,
level
))
{}
//! set element as normal entity
//! ItemTypes are HElementType, HFaceType, HEdgeType and VertexType
...
...
@@ -257,16 +257,16 @@ namespace Dune
Here: the general template
*/
template
<
int
cd
,
int
dim
,
class
GridImp
>
class
BS
GridEntity
:
public
EntityDefault
<
cd
,
dim
,
GridImp
,
BS
GridEntity
>
class
ALU3d
GridEntity
:
public
EntityDefault
<
cd
,
dim
,
GridImp
,
ALU3d
GridEntity
>
{
enum
{
dimworld
=
GridImp
::
dimensionworld
};
friend
class
BS
Grid
<
dim
,
dimworld
>
;
friend
class
BS
GridEntity
<
0
,
dim
,
GridImp
>
;
friend
class
BS
GridLevelIterator
<
cd
,
All_Partition
,
GridImp
>
;
friend
class
ALU3d
Grid
<
dim
,
dimworld
>
;
friend
class
ALU3d
GridEntity
<
0
,
dim
,
GridImp
>
;
friend
class
ALU3d
GridLevelIterator
<
cd
,
All_Partition
,
GridImp
>
;
friend
class
BS
GridHierarchicIndexSet
<
dim
,
dimworld
>
;
friend
class
ALU3d
GridHierarchicIndexSet
<
dim
,
dimworld
>
;
public
:
typedef
typename
BSSPACE
BSHElementType
<
cd
>::
ElementType
BSElementType
;
...
...
@@ -274,7 +274,7 @@ namespace Dune
typedef
typename
GridImp
::
template
codim
<
cd
>
::
Entity
Entity
;
typedef
typename
GridImp
::
template
codim
<
cd
>
::
Geometry
Geometry
;
typedef
BS
GridMakeableGeometry
<
dim
-
cd
,
GridImp
::
dimensionworld
,
GridImp
>
GeometryImp
;
typedef
ALU3d
GridMakeableGeometry
<
dim
-
cd
,
GridImp
::
dimensionworld
,
GridImp
>
GeometryImp
;
typedef
typename
GridImp
::
template
codim
<
0
>
::
EntityPointer
EntityPointer
;
//! level of this element
...
...
@@ -288,7 +288,7 @@ namespace Dune
int
globalIndex
()
const
;
//! Constructor
BS
GridEntity
(
const
GridImp
&
grid
,
int
level
);
ALU3d
GridEntity
(
const
GridImp
&
grid
,
int
level
);
//! geometry of this entity
const
Geometry
&
geometry
()
const
;
...
...
@@ -315,7 +315,7 @@ namespace Dune
int
gIndex_
;
//! hierarchic index
// corresponding
BS
GridElement
// corresponding
ALU3d
GridElement
const
BSIMPLElementType
*
item_
;
const
BSSPACE
HElementType
*
father_
;
...
...
@@ -342,26 +342,26 @@ namespace Dune
*/
//***********************
//
// --
BS
GridEntity
// --
ALU3d
GridEntity
// --0Entity
//
//***********************
template
<
int
dim
,
class
GridImp
>
class
BS
GridEntity
<
0
,
dim
,
GridImp
>
:
public
EntityDefault
<
0
,
dim
,
GridImp
,
BS
GridEntity
>
class
ALU3d
GridEntity
<
0
,
dim
,
GridImp
>
:
public
EntityDefault
<
0
,
dim
,
GridImp
,
ALU3d
GridEntity
>
{
enum
{
dimworld
=
GridImp
::
dimensionworld
};
friend
class
BS
Grid
<
dim
,
dimworld
>
;
friend
class
BS
GridIntersectionIterator
<
GridImp
>
;
friend
class
BS
GridHierarchicIterator
<
GridImp
>
;
friend
class
BS
GridLevelIterator
<
0
,
All_Partition
,
GridImp
>
;
friend
class
BS
GridLevelIterator
<
1
,
All_Partition
,
GridImp
>
;
friend
class
BS
GridLevelIterator
<
2
,
All_Partition
,
GridImp
>
;
friend
class
BS
GridLevelIterator
<
3
,
All_Partition
,
GridImp
>
;
friend
class
BS
GridLeafIterator
<
GridImp
>
;
friend
class
ALU3d
Grid
<
dim
,
dimworld
>
;
friend
class
ALU3d
GridIntersectionIterator
<
GridImp
>
;
friend
class
ALU3d
GridHierarchicIterator
<
GridImp
>
;
friend
class
ALU3d
GridLevelIterator
<
0
,
All_Partition
,
GridImp
>
;
friend
class
ALU3d
GridLevelIterator
<
1
,
All_Partition
,
GridImp
>
;
friend
class
ALU3d
GridLevelIterator
<
2
,
All_Partition
,
GridImp
>
;
friend
class
ALU3d
GridLevelIterator
<
3
,
All_Partition
,
GridImp
>
;
friend
class
ALU3d
GridLeafIterator
<
GridImp
>
;
friend
class
BS
GridHierarchicIndexSet
<
dim
,
dimworld
>
;
friend
class
ALU3d
GridHierarchicIndexSet
<
dim
,
dimworld
>
;
// partial specialisation of subIndex
template
<
int
codim
>
...
...
@@ -387,7 +387,7 @@ namespace Dune
public
:
typedef
typename
GridImp
::
template
codim
<
0
>
::
Geometry
Geometry
;
typedef
BS
GridMakeableGeometry
<
dim
,
dimworld
,
GridImp
>
GeometryImp
;
typedef
ALU3d
GridMakeableGeometry
<
dim
,
dimworld
,
GridImp
>
GeometryImp
;
typedef
typename
GridImp
::
template
codim
<
0
>
::
Entity
Entity
;
typedef
typename
GridImp
::
template
codim
<
0
>
::
EntityPointer
EntityPointer
;
...
...
@@ -399,7 +399,7 @@ namespace Dune
};
//! Constructor creating empty Entity
BS
GridEntity
(
const
GridImp
&
grid
,
int
level
);
ALU3d
GridEntity
(
const
GridImp
&
grid
,
int
level
);
//! level of this element
int
level
()
const
;
...
...
@@ -435,10 +435,10 @@ namespace Dune
which has an entity of codimension 1 in commen with this entity. Access to neighbors
is provided using iterators. This allows meshes to be nonmatching. Returns iterator
referencing the first neighbor. */
BS
GridIntersectionIterator
<
GridImp
>
ibegin
()
const
;
ALU3d
GridIntersectionIterator
<
GridImp
>
ibegin
()
const
;
//! Reference to one past the last intersection with neighbor
BS
GridIntersectionIterator
<
GridImp
>
iend
()
const
;
ALU3d
GridIntersectionIterator
<
GridImp
>
iend
()
const
;
//! returns true if Entity is leaf (i.e. has no children)
bool
isLeaf
()
const
;
...
...
@@ -462,10 +462,10 @@ namespace Dune
This is provided for sparsely stored nested unstructured meshes.
Returns iterator to first son.
*/
BS
GridHierarchicIterator
<
GridImp
>
hbegin
(
int
maxlevel
)
const
;
ALU3d
GridHierarchicIterator
<
GridImp
>
hbegin
(
int
maxlevel
)
const
;
//! Returns iterator to one past the last son
BS
GridHierarchicIterator
<
GridImp
>
hend
(
int
maxlevel
)
const
;
ALU3d
GridHierarchicIterator
<
GridImp
>
hend
(
int
maxlevel
)
const
;
//***************************************************************
// Interface for Adaptation
...
...
@@ -521,11 +521,11 @@ namespace Dune
int
level_
;
//!< level of element
mutable
GeometryImp
geoInFather_
;
};
// end of
BS
GridEntity codim = 0
};
// end of
ALU3d
GridEntity codim = 0
//**********************************************************************
//
// --
BS
GridHierarchicIterator
// --
ALU3d
GridHierarchicIterator
// --HierarchicIterator
/*!
Mesh entities of codimension 0 ("elements") allow to visit all entities of
...
...
@@ -537,24 +537,24 @@ namespace Dune
*/
template
<
class
GridImp
>
class
BS
GridHierarchicIterator
:
public
HierarchicIteratorDefault
<
GridImp
,
BS
GridHierarchicIterator
>
class
ALU3d
GridHierarchicIterator
:
public
HierarchicIteratorDefault
<
GridImp
,
ALU3d
GridHierarchicIterator
>
{
enum
{
dim
=
GridImp
::
dimension
};
public
:
typedef
typename
GridImp
::
template
codim
<
0
>
::
Entity
Entity
;
typedef
typename
GridImp
::
ctype
ctype
;
typedef
BS
GridMakeableEntity
<
0
,
dim
,
GridImp
>
EntityImp
;
typedef
ALU3d
GridMakeableEntity
<
0
,
dim
,
GridImp
>
EntityImp
;
//! the normal Constructor
BS
GridHierarchicIterator
(
const
GridImp
&
grid
,
const
BSSPACE
HElementType
&
elem
,
int
maxlevel
,
bool
end
=
false
);
ALU3d
GridHierarchicIterator
(
const
GridImp
&
grid
,
const
BSSPACE
HElementType
&
elem
,
int
maxlevel
,
bool
end
=
false
);
//! increment
void
increment
();
//! equality
bool
equals
(
const
BS
GridHierarchicIterator
<
GridImp
>&
i
)
const
;
bool
equals
(
const
ALU3d
GridHierarchicIterator
<
GridImp
>&
i
)
const
;
//! dereferencing
Entity
&
dereference
()
const
;
...
...
@@ -563,7 +563,7 @@ namespace Dune
// go to next valid element
BSSPACE
HElementType
*
goNextElement
(
BSSPACE
HElementType
*
oldEl
);
const
GridImp
&
grid_
;
//!< the corresponding
BS
Grid
const
GridImp
&
grid_
;
//!< the corresponding
ALU3d
Grid
const
BSSPACE
HElementType
&
elem_
;
//!< the start element of this iterator
BSSPACE
HElementType
*
item_
;
//!< the actual element of this iterator
int
maxlevel_
;
//!< maxlevel
...
...
@@ -574,17 +574,17 @@ namespace Dune
//*******************************************************************
//
// --
BS
GridBoundaryEntity
// --
ALU3d
GridBoundaryEntity
// --BoundaryEntity
//
//*******************************************************************
template
<
class
GridImp
>
class
BS
GridMakeableBoundaryEntity
:
class
ALU3d
GridMakeableBoundaryEntity
:
public
GridImp
::
template
codim
<
0
>
::
BoundaryEntity
{
public:
BS
GridMakeableBoundaryEntity
()
:
GridImp
::
template
codim
<
0
>
::
BoundaryEntity
(
BS
GridBoundaryEntity
<
GridImp
>
())
{};
ALU3d
GridMakeableBoundaryEntity
()
:
GridImp
::
template
codim
<
0
>
::
BoundaryEntity
(
ALU3d
GridBoundaryEntity
<
GridImp
>
())
{};
// set boundary Id, done by IntersectionIterator
void
setId
(
int
id
)
...
...
@@ -593,20 +593,20 @@ namespace Dune
}
};
/** BoundaryEntity of the
BS
Grid module */
/** BoundaryEntity of the
ALU3d
Grid module */
template
<
class
GridImp
>
class
BS
GridBoundaryEntity
:
public
BoundaryEntityDefault
<
GridImp
,
BS
GridBoundaryEntity
>
class
ALU3d
GridBoundaryEntity
:
public
BoundaryEntityDefault
<
GridImp
,
ALU3d
GridBoundaryEntity
>
{
enum
{
dim
=
GridImp
::
dimension
};
friend
class
BS
GridIntersectionIterator
<
GridImp
>
;
friend
class
BS
GridIntersectionIterator
<
const
GridImp
>
;
friend
class
ALU3d
GridIntersectionIterator
<
GridImp
>
;
friend
class
ALU3d
GridIntersectionIterator
<
const
GridImp
>
;
public
:
typedef
typename
GridImp
::
template
codim
<
0
>
::
Geometry
Geometry
;
typedef
BS
GridMakeableGeometry
<
dim
,
dim
,
GridImp
>
GeometryImp
;
typedef
ALU3d
GridMakeableGeometry
<
dim
,
dim
,
GridImp
>
GeometryImp
;
//! Constructor
BS
GridBoundaryEntity
();
ALU3d
GridBoundaryEntity
();
/*! \brief return identifier of boundary segment which is an
abitrary integer not zero */
...
...
@@ -627,7 +627,7 @@ namespace Dune
//**********************************************************************
//
// --
BS
GridIntersectionIterator
// --
ALU3d
GridIntersectionIterator
// --IntersectionIterator
/*!
Mesh entities of codimension 0 ("elements") allow to visit all neighbors, wh
...
...
@@ -637,38 +637,38 @@ namespace Dune
of an element!
*/
template
<
class
GridImp
>
class
BS
GridIntersectionIterator
:
public
IntersectionIteratorDefault
<
GridImp
,
BS
GridIntersectionIterator
>
class
ALU3d
GridIntersectionIterator
:
public
IntersectionIteratorDefault
<
GridImp
,
ALU3d
GridIntersectionIterator
>
{
enum
{
dim
=
GridImp
::
dimension
};
enum
{
dimworld
=
GridImp
::
dimensionworld
};
friend
class
BS
GridEntity
<
0
,
dim
,
GridImp
>
;
friend
class
ALU3d
GridEntity
<
0
,
dim
,
GridImp
>
;
public
:
typedef
typename
GridImp
::
template
codim
<
0
>
::
Entity
Entity
;
typedef
typename
GridImp
::
template
codim
<
0
>
::
BoundaryEntity
BoundaryEntity
;
typedef
BS
GridMakeableBoundaryEntity
<
GridImp
>
MakeableBndEntityImp
;
typedef
ALU3d
GridMakeableBoundaryEntity
<
GridImp
>
MakeableBndEntityImp
;
typedef
typename
GridImp
::
template
codim
<
1
>
::
Geometry
Geometry
;
typedef
typename
GridImp
::
template
codim
<
1
>
::
LocalGeometry
LocalGeometry
;
typedef
BS
GridMakeableEntity
<
0
,
dim
,
GridImp
>
EntityImp
;
typedef
BS
GridMakeableGeometry
<
dim
-
1
,
dimworld
,
GridImp
>
GeometryImp
;
typedef
BS
GridMakeableGeometry
<
dim
-
1
,
dimworld
,
GridImp
>
LocalGeometryImp
;
typedef
ALU3d
GridMakeableEntity
<
0
,
dim
,
GridImp
>
EntityImp
;
typedef
ALU3d
GridMakeableGeometry
<
dim
-
1
,
dimworld
,
GridImp
>
GeometryImp
;
typedef
ALU3d
GridMakeableGeometry
<
dim
-
1
,
dimworld
,
GridImp
>
LocalGeometryImp
;
//! The default Constructor , level tells on which level we want
//! neighbours
BS
GridIntersectionIterator
(
const
GridImp
&
grid
,
BSSPACE
HElementType
*
el
,
int
wLevel
,
bool
end
=
false
);
ALU3d
GridIntersectionIterator
(
const
GridImp
&
grid
,
BSSPACE
HElementType
*
el
,
int
wLevel
,
bool
end
=
false
);
//! The Destructor
~
BS
GridIntersectionIterator
();
~
ALU3d
GridIntersectionIterator
();
//! increment iterator
void
increment
();
//! equality
bool
equals
(
const
BS
GridIntersectionIterator
<
GridImp
>
&
i
)
const
;
bool
equals
(
const
ALU3d
GridIntersectionIterator
<
GridImp
>
&
i
)
const
;
//! access neighbor, dereferencing
Entity
&
dereference
()
const
;
...
...
@@ -771,43 +771,43 @@ namespace Dune
//**********************************************************************
//
// --
BS
GridLevelIterator
// --
ALU3d
GridLevelIterator
// --LevelIterator
/*!
Enables iteration over all entities of a given codimension and level of a grid.
*/
template
<
int
cd
,
PartitionIteratorType
pitype
,
class
GridImp
>
class
BS
GridLevelIterator
:
public
LevelIteratorDefault
<
cd
,
pitype
,
GridImp
,
BS
GridLevelIterator
>
class
ALU3d
GridLevelIterator
:
public
LevelIteratorDefault
<
cd
,
pitype
,
GridImp
,
ALU3d
GridLevelIterator
>
{
enum
{
dim
=
GridImp
::
dimension
};
enum
{
dimworld
=
GridImp
::
dimensionworld
};
friend
class
BS
GridEntity
<
3
,
dim
,
GridImp
>
;
friend
class
BS
GridEntity
<
2
,
dim
,
GridImp
>
;
friend
class
BS
GridEntity
<
1
,
dim
,
GridImp
>
;
friend
class
BS
GridEntity
<
0
,
dim
,
GridImp
>
;
friend
class
BS
Grid
<
dim
,
dimworld
>
;
friend
class
ALU3d
GridEntity
<
3
,
dim
,
GridImp
>
;
friend
class
ALU3d
GridEntity
<
2
,
dim
,
GridImp
>
;
friend
class
ALU3d
GridEntity
<
1
,
dim
,
GridImp
>
;
friend
class
ALU3d
GridEntity
<
0
,
dim
,
GridImp
>
;
friend
class
ALU3d
Grid
<
dim
,
dimworld
>
;
public
:
typedef
typename
GridImp
::
template
codim
<
cd
>
::
Entity
Entity
;
typedef
BS
GridMakeableEntity
<
cd
,
dim
,
GridImp
>
EntityImp
;
typedef
ALU3d
GridMakeableEntity
<
cd
,
dim
,
GridImp
>
EntityImp
;
//! typedef of my type
typedef
BS
GridLevelIterator
<
cd
,
pitype
,
GridImp
>
BS
GridLevelIteratorType
;
typedef
ALU3d
GridLevelIterator
<
cd
,
pitype
,
GridImp
>
ALU3d
GridLevelIteratorType
;
//! Constructor
BS
GridLevelIterator
(
const
GridImp
&
grid
,
int
level
,
bool
end
=
false
);
ALU3d
GridLevelIterator
(
const
GridImp
&
grid
,
int
level
,
bool
end
=
false
);
//! Constructor for father
BS
GridLevelIterator
(
const
GridImp
&
grid
,
const
BSSPACE
HElementType
&
item
);
ALU3d
GridLevelIterator
(
const
GridImp
&
grid
,
const
BSSPACE
HElementType
&
item
);
//! prefix increment
void
increment
();
//! equality
bool
equals
(
const
BS
GridLevelIteratorType
&
i
)
const
;
bool
equals
(
const
ALU3d
GridLevelIteratorType
&
i
)
const
;
//! dereferencing
Entity
&
dereference
()
const
;
...
...
@@ -825,8 +825,8 @@ namespace Dune
// actual level
int
level_
;
// the wrapper for the original iterator of the
BS
Grid
typedef
typename
BSSPACE
BS
GridLevelIteratorWrapper
<
cd
>
IteratorType
;
// the wrapper for the original iterator of the
ALU3d
Grid
typedef
typename
BSSPACE
ALU3d
GridLevelIteratorWrapper
<
cd
>
IteratorType
;
BSSPACE
AutoPointer
<
IteratorType
>
iter_
;
// holds the entity, copy pointer and delete if no refcount is left
...
...
@@ -835,34 +835,34 @@ namespace Dune
//********************************************************************
//
// --
BS
GridLeafIterator
// --
ALU3d
GridLeafIterator
// --LeafIterator
//
//********************************************************************
template
<
class
GridImp
>
class
BS
GridLeafIterator
class
ALU3d
GridLeafIterator
{
enum
{
dim
=
GridImp
::
dimension
};
friend
class
BS
GridEntity
<
0
,
dim
,
GridImp
>
;
//friend class
BS
Grid < dim , dimworld >;
friend
class
ALU3d
GridEntity
<
0
,
dim
,
GridImp
>
;
//friend class
ALU3d
Grid < dim , dimworld >;
enum
{
codim
=
0
};
public
:
typedef
typename
GridImp
::
template
codim
<
0
>
::
Entity
Entity
;
typedef
BS
GridMakeableEntity
<
0
,
dim
,
GridImp
>
EntityImp
;
typedef
ALU3d
GridMakeableEntity
<
0
,
dim
,
GridImp
>
EntityImp
;
typedef
BS
GridLeafIterator
<
GridImp
>
BS
GridLeafIteratorType
;
typedef
ALU3d
GridLeafIterator
<
GridImp
>
ALU3d
GridLeafIteratorType
;
//! Constructor
BS
GridLeafIterator
(
const
GridImp
&
grid
,
int
level
,
bool
end
,
PartitionIteratorType
pitype
);
ALU3d
GridLeafIterator
(
const
GridImp
&
grid
,
int
level
,
bool
end
,
PartitionIteratorType
pitype
);
//! prefix increment
void
increment
();
//! equality
bool
equals
(
const
BS
GridLeafIteratorType
&
i
)
const
;
bool
equals
(
const
ALU3d
GridLeafIteratorType
&
i
)
const
;
//! dereferencing
Entity
&
dereference
()
const
;
...
...
@@ -880,8 +880,8 @@ namespace Dune
// actual level
int
level_
;
// the wrapper for the original iterator of the
BS
Grid
typedef
typename
BSSPACE
BS
GridLeafIteratorWrapper
<
codim
>
IteratorType
;
// the wrapper for the original iterator of the
ALU3d
Grid
typedef
typename
BSSPACE
ALU3d
GridLeafIteratorWrapper
<
codim
>
IteratorType
;
BSSPACE
AutoPointer
<
IteratorType
>
iter_
;
// holds the entity, copy pointer and delete if no refcount is left
...
...
@@ -894,7 +894,7 @@ namespace Dune
//**********************************************************************
//
// --
BS
Grid
// --
ALU3d
Grid
// --Grid
//
//**********************************************************************
...
...
@@ -904,16 +904,16 @@ namespace Dune
* \todo Please doc me!
*/
template
<
int
dim
,
int
dimworld
>
class
BS
Grid
:
public
GridDefault
<
dim
,
dimworld
,
bs_ctype
,
BS
Grid
<
dim
,
dimworld
>
>
class
ALU3d
Grid
:
public
GridDefault
<
dim
,
dimworld
,
bs_ctype
,
ALU3d
Grid
<
dim
,
dimworld
>
>
{
//CompileTimeChecker<dim == 3>
BS
Grid_only_implemented_for_3dp;
//CompileTimeChecker<dimworld == 3>
BS
Grid_only_implemented_for_3dw;
//CompileTimeChecker< (eltype == BSSPACE tetra_t) || (eltype == BSSPACE hexa_t ) >
BS
Grid_only_implemented_for_tetra_or_hexa;
//CompileTimeChecker<dim == 3>
ALU3d
Grid_only_implemented_for_3dp;
//CompileTimeChecker<dimworld == 3>
ALU3d
Grid_only_implemented_for_3dw;
//CompileTimeChecker< (eltype == BSSPACE tetra_t) || (eltype == BSSPACE hexa_t ) >
ALU3d
Grid_only_implemented_for_tetra_or_hexa;
typedef
BS
Grid
<
dim
,
dimworld
>
MyType
;
friend
class
BS
GridEntity
<
0
,
dim
,
MyType
>
;
friend
class
BS
GridEntity
<
0
,
dim
,
const
MyType
>
;
friend
class
BS
GridIntersectionIterator
<
MyType
>
;
typedef
ALU3d
Grid
<
dim
,
dimworld
>
MyType
;
friend
class
ALU3d
GridEntity
<
0
,
dim
,
MyType
>
;
friend
class
ALU3d
GridEntity
<
0
,
dim
,
const
MyType
>
;
friend
class
ALU3d
GridIntersectionIterator
<
MyType
>
;
//**********************************************************
...
...
@@ -922,24 +922,24 @@ namespace Dune
public:
enum
{
myElementType
=
tetra
};
typedef
GridTraits
<
dim
,
dimworld
,
MyType
,
BS
GridGeometry
,
BS
GridEntity
,
BS
GridBoundaryEntity
,
BS
GridLevelIterator
,
BS
GridIntersectionIterator
,
BS
GridHierarchicIterator
,
BS
GridLeafIterator
>
Traits
;
ALU3d
GridGeometry
,
ALU3d
GridEntity
,
ALU3d
GridBoundaryEntity
,
ALU3d
GridLevelIterator
,
ALU3d
GridIntersectionIterator
,
ALU3d
GridHierarchicIterator
,
ALU3d
GridLeafIterator
>
Traits
;
typedef
BS
GridLeafIterator
<
MyType
>
LeafIteratorImp
;
typedef
BS
GridHierarchicIterator
<
MyType
>
HierarchicIteratorImp
;
typedef
ALU3d
GridLeafIterator
<
MyType
>
LeafIteratorImp
;
typedef
ALU3d
GridHierarchicIterator
<
MyType
>
HierarchicIteratorImp
;
typedef
typename
Traits
::
LeafIterator
LeafIteratorType
;
//typedef
BS
GridReferenceGeometry<dim> ReferenceGeometry;
//typedef
ALU3d
GridReferenceGeometry<dim> ReferenceGeometry;
typedef
BSSPACE
ObjectStream
ObjectStreamType
;
//typedef typename std::pair < ObjectStreamType * ,
BS
GridEntity<0,dim,dimworld> * >
//typedef typename std::pair < ObjectStreamType * ,
ALU3d
GridEntity<0,dim,dimworld> * >
// DataCollectorParamType;
typedef
BS
GridHierarchicIndexSet
<
dim
,
dimworld
>
HierarchicIndexSetType
;
typedef
ALU3d
GridHierarchicIndexSet
<
dim
,
dimworld
>
HierarchicIndexSetType
;
typedef
DefaultLevelIndexSet
<
MyType
>
LevelIndexSetType
;
typedef
typename
Traits
::
LeafIterator
LeafIterator
;
...
...
@@ -949,19 +949,19 @@ namespace Dune
//! maximal number of levels
enum
{
MAXL
=
64
};
//! Constructor which reads an
BS
Grid Macro Triang file
//! Constructor which reads an
ALU3d
Grid Macro Triang file
//! or given GridFile
#ifdef _BSGRID_PARALLEL_
BS
Grid
(
const
char
*
macroTriangFilename
,
MPI_Comm
mpiComm
);
BS
Grid
(
MPI_Comm
mpiComm
);
ALU3d
Grid
(
const
char
*
macroTriangFilename
,
MPI_Comm
mpiComm
);
ALU3d
Grid
(
MPI_Comm
mpiComm
);
#else
BS
Grid
(
const
char
*
macroTriangFilename
);
ALU3d
Grid
(
const
char
*
macroTriangFilename
);
//! empty Constructor
BS
Grid
(
int
myrank
=
-
1
);
ALU3d
Grid
(
int
myrank
=
-
1
);
#endif
//! Desctructor
~
BS
Grid
();
~
ALU3d
Grid
();
//! for type identification
GridIdentifier
type
()
const
;
...
...
@@ -1052,7 +1052,7 @@ namespace Dune
template
<
FileFormatType
ftype
>
bool
readGrid
(
const
char
*
filename
,
bs_ctype
&
time
);
//! return pointer to org
BS
Grid
//! return pointer to org
ALU3d
Grid
//! private method, but otherwise we have to friend class all possible
//! types of LevelIterator ==> later
BSSPACE
BSGitterType
&
myGrid
();
...
...
@@ -1074,7 +1074,7 @@ namespace Dune
bool
mark
(
int
refCount
,
const
typename
Traits
::
template
codim
<
0
>
::
Entity
&
en
)
const
;
template
<
int
cd
>
BS
GridEntity
<
cd
,
dim
,
const
BS
Grid
<
dim
,
dimworld
>
>&
ALU3d
GridEntity
<
cd
,
dim
,
const
ALU3d
Grid
<
dim
,
dimworld
>
>&
getRealEntity
(
typename
Traits
::
template
codim
<
cd
>
::
Entity
&
entity
)
{
return
entity
.
realEntity
;
...
...
@@ -1082,7 +1082,7 @@ namespace Dune
//private:
template
<
int
cd
>
const
BS
GridEntity
<
cd
,
dim
,
const
BS
Grid
<
dim
,
dimworld
>
>&
const
ALU3d
GridEntity
<
cd
,
dim
,
const
ALU3d
Grid
<
dim
,
dimworld
>
>&
getRealEntity
(
const
typename
Traits
::
template
codim
<
cd
>
::
Entity
&
entity
)
const
{
return
entity
.
realEntity
;
...
...
@@ -1090,10 +1090,10 @@ namespace Dune
private
:
//! Copy constructor should not be used
BS
Grid
(
const
BS
Grid
<
dim
,
dimworld
>
&
g
);
ALU3d
Grid
(
const
ALU3d
Grid
<
dim
,
dimworld
>
&
g
);
//! assignment operator should not be used
BS
Grid
<
dim
,
dimworld
>
&
operator
=
(
const
BS
Grid
<
dim
,
dimworld
>
&
g
);
ALU3d
Grid
<
dim
,
dimworld
>
&
operator
=
(
const
ALU3d
Grid
<
dim
,
dimworld
>
&
g
);
// reset size and global size
void
calcExtras
();
...
...
@@ -1129,19 +1129,19 @@ namespace Dune
// the level index set ( default type )
mutable
LevelIndexSetType
*
levelIndexSet_
;
};
// end Class
BS
GridGrid
};
// end Class
ALU3d
GridGrid
//! hierarchic index set of
BS
Grid
//! hierarchic index set of
ALU3d
Grid
template
<
int
dim
,
int
dimworld
>
class
BS
GridHierarchicIndexSet
class
ALU3d
GridHierarchicIndexSet
{
typedef
BS
Grid
<
dim
,
dimworld
>
GridType
;
typedef
ALU3d
Grid
<
dim
,
dimworld
>
GridType
;
enum
{
numCodim
=
4
};
public
:
typedef
typename
GridType
::
Traits
::
template
codim
<
0
>
::
Entity
EntityCodim0Type
;
BS
GridHierarchicIndexSet
(
const
GridType
&
grid
,
const
int
(
&
s
)[
numCodim
])
:
grid_
(
grid
)
,
size_
(
s
)
{}
ALU3d
GridHierarchicIndexSet
(
const
GridType
&
grid
,
const
int
(
&
s
)[
numCodim
])
:
grid_
(
grid
)
,
size_
(
s
)
{}
//! return hierarchic index of given entity
template
<
class
EntityType
>
...
...
@@ -1156,7 +1156,7 @@ namespace Dune
int
subIndex
(
const
EntityCodim0Type
&
ep
,
int
i
)
const
{
assert
(
cd
==
dim
);
const
BS
GridEntity
<
0
,
dim
,
const
GridType
>
&
en
=
(
grid_
.
template
getRealEntity
<
0
>(
ep
));
const
ALU3d
GridEntity
<
0
,
dim
,
const
GridType
>
&
en
=
(
grid_
.
template
getRealEntity
<
0
>(
ep
));
int
idx
=
en
.
template
getSubIndex
<
cd
>(
i
);
std
::
cout
<<
idx
<<
" index
\n
"
;
return
idx
;
...
...
@@ -1180,7 +1180,7 @@ namespace Dune
};
// namespace Dune
#include
"
bs
grid/datahandle.hh"
#include
"
bsgrid/bs
grid.cc"
#include
"
alu3d
grid/datahandle.hh"
#include
"
alu3dgrid/alu3d
grid.cc"
#endif
This diff is collapsed.
Click to expand it.
grid/alu3dgrid/alu3dgrid.cc
+
227
−
227
View file @
504905b3
This diff is collapsed.
Click to expand it.
grid/alu3dgrid/alu3dinclude.hh
+
19
−
19
View file @
504905b3
...
...
@@ -87,7 +87,7 @@ namespace BernhardSchuppGrid {
typedef
pair
<
PLLBndFaceType
*
,
int
>
GhostPairType
;
//*************************************************************
// definition of original LeafIterators of
BS
Grid
// definition of original LeafIterators of
ALU3d
Grid
//
// default is element (codim = 0)
template
<
int
codim
>
...
...
@@ -140,9 +140,9 @@ namespace BernhardSchuppGrid {
//*********************************************************
// LevelIterator Wrapper
//*********************************************************
template
<
int
codim
>
class
BS
GridLevelIteratorWrapper
;
template
<
int
codim
>
class
ALU3d
GridLevelIteratorWrapper
;
template
<
>
class
BS
GridLevelIteratorWrapper
<
0
>
class
ALU3d
GridLevelIteratorWrapper
<
0
>
{
typedef
BSHElementType
<
0
>::
ElementType
ElType
;
typedef
Insert
<
AccessIterator
<
ElType
>::
Handle
,
...
...
@@ -152,7 +152,7 @@ namespace BernhardSchuppGrid {
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
().
container
(),
level
)
{}
int
size
()
{
return
it_
.
size
();
}
...
...
@@ -164,7 +164,7 @@ namespace BernhardSchuppGrid {
};
template
<
>
class
BS
GridLevelIteratorWrapper
<
1
>
class
ALU3d
GridLevelIteratorWrapper
<
1
>
{
typedef
BSHElementType
<
1
>::
ElementType
ElType
;
typedef
Insert
<
AccessIterator
<
ElType
>::
Handle
,
...
...
@@ -174,7 +174,7 @@ namespace BernhardSchuppGrid {
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
().
container
(),
level
)
{}
int
size
()
{
return
it_
.
size
();
}
...
...
@@ -186,7 +186,7 @@ namespace BernhardSchuppGrid {
};
template
<
>
class
BS
GridLevelIteratorWrapper
<
2
>
class
ALU3d
GridLevelIteratorWrapper
<
2
>
{
typedef
BSHElementType
<
2
>::
ElementType
ElType
;
typedef
Insert
<
AccessIterator
<
ElType
>::
Handle
,
...
...
@@ -196,7 +196,7 @@ namespace BernhardSchuppGrid {
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
().
container
(),
level
)
{}
int
size
()
{
return
it_
.
size
();
}
...
...
@@ -208,7 +208,7 @@ namespace BernhardSchuppGrid {
};
template
<
>
class
BS
GridLevelIteratorWrapper
<
3
>
class
ALU3d
GridLevelIteratorWrapper
<
3
>
{
typedef
LeafIterator
<
GitterType
::
vertex_STI
>
IteratorType
;
...
...
@@ -219,7 +219,7 @@ namespace BernhardSchuppGrid {
int
level_
;
public:
template
<
class
GridImp
>
BS
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLevelIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
()),
level_
(
level
)
{}
...
...
@@ -239,12 +239,12 @@ namespace BernhardSchuppGrid {
};
template
<
int
codim
>
class
BS
GridLeafIteratorWrapper
;
template
<
int
codim
>
class
ALU3d
GridLeafIteratorWrapper
;
//**********************************************************
// LeafIterator Wrapper
//**********************************************************
template
<
>
class
BS
GridLeafIteratorWrapper
<
0
>
class
ALU3d
GridLeafIteratorWrapper
<
0
>
{
typedef
BSHElementType
<
0
>::
ElementType
ElType
;
typedef
Insert
<
AccessIterator
<
ElType
>::
Handle
,
...
...
@@ -254,7 +254,7 @@ namespace BernhardSchuppGrid {
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
().
container
(),
level
)
{}
int
size
()
{
return
it_
.
size
();
}
...
...
@@ -266,7 +266,7 @@ namespace BernhardSchuppGrid {
};
template
<
>
class
BS
GridLeafIteratorWrapper
<
1
>
class
ALU3d
GridLeafIteratorWrapper
<
1
>
{
typedef
BSHElementType
<
1
>::
ElementType
ElType
;
typedef
Insert
<
AccessIterator
<
ElType
>::
Handle
,
...
...
@@ -276,7 +276,7 @@ namespace BernhardSchuppGrid {
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
().
container
(),
level
)
{}
int
size
()
{
return
it_
.
size
();
}
...
...
@@ -288,7 +288,7 @@ namespace BernhardSchuppGrid {
};
template
<
>
class
BS
GridLeafIteratorWrapper
<
2
>
class
ALU3d
GridLeafIteratorWrapper
<
2
>
{
typedef
BSHElementType
<
2
>::
ElementType
ElType
;
typedef
Insert
<
AccessIterator
<
ElType
>::
Handle
,
...
...
@@ -298,7 +298,7 @@ namespace BernhardSchuppGrid {
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
().
container
(),
level
)
{}
int
size
()
{
return
it_
.
size
();
}
...
...
@@ -310,14 +310,14 @@ namespace BernhardSchuppGrid {
};
template
<
>
class
BS
GridLeafIteratorWrapper
<
3
>
class
ALU3d
GridLeafIteratorWrapper
<
3
>
{
typedef
LeafIterator
<
GitterType
::
vertex_STI
>
IteratorType
;
IteratorType
it_
;
typedef
IteratorType
::
val_t
val_t
;
public:
template
<
class
GridImp
>
BS
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
ALU3d
GridLeafIteratorWrapper
(
const
GridImp
&
grid
,
int
level
)
:
it_
(
const_cast
<
GridImp
&>
(
grid
).
myGrid
())
{}
int
size
()
{
return
it_
->
size
();
}
...
...
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