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
72653236
Commit
72653236
authored
19 years ago
by
Robert Klöfkorn
Browse files
Options
Downloads
Patches
Plain Diff
optimization of IntersectionIterator.
[[Imported from SVN: r1851]]
parent
07a560ca
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/alu3dgrid.hh
+23
-12
23 additions, 12 deletions
grid/alu3dgrid.hh
with
23 additions
and
12 deletions
grid/alu3dgrid.hh
+
23
−
12
View file @
72653236
...
...
@@ -38,6 +38,9 @@ namespace Dune
class
ALU3dGridError
:
public
Exception
{};
//#undef DUNE_THROW
//#define DUNE_THROW(e,m) assert(false);
enum
ALU3dGridElementType
{
tetra
=
4
,
hexa
=
7
};
// i.e. double or float
...
...
@@ -90,6 +93,9 @@ namespace Dune
ALU3dGridMakeableGeometry
(
bool
makeRefelem
=
false
)
:
GeometryType
(
ALU3dGridGeometry
<
mydim
,
coorddim
,
GridImp
>
(
makeRefelem
))
{}
ALU3dGridMakeableGeometry
(
GridImp
&
grid
,
int
level
)
:
GeometryType
(
ALU3dGridGeometry
<
mydim
,
coorddim
,
GridImp
>
(
false
))
{}
//! build geometry out of different ALU3dGrid Geometrys
//! ItemType are HElementType, HFaceType, HEdgeType and VertexType
template
<
class
ItemType
>
...
...
@@ -602,6 +608,9 @@ namespace Dune
ALU3dGridMakeableBoundaryEntity
()
:
GridImp
::
template
codim
<
0
>
::
BoundaryEntity
(
ALU3dGridBoundaryEntity
<
GridImp
>
())
{};
ALU3dGridMakeableBoundaryEntity
(
GridImp
&
grid
,
int
level
)
:
GridImp
::
template
codim
<
0
>
::
BoundaryEntity
(
ALU3dGridBoundaryEntity
<
GridImp
>
())
{};
// set boundary Id, done by IntersectionIterator
void
setId
(
int
id
)
{
...
...
@@ -671,7 +680,6 @@ namespace Dune
typedef
ALU3dGridMakeableGeometry
<
dim
-
1
,
dimworld
,
GridImp
>
GeometryImp
;
typedef
ALU3dGridMakeableGeometry
<
dim
-
1
,
dimworld
,
GridImp
>
LocalGeometryImp
;
//! The default Constructor , level tells on which level we want
//! neighbours
ALU3dGridIntersectionIterator
(
const
GridImp
&
grid
,
ALU3DSPACE
HElementType
*
el
,
...
...
@@ -726,15 +734,15 @@ namespace Dune
//! coordinates for higher order boundary
typedef
FieldVector
<
alu3d_ctype
,
dimworld
>
NormalType
;
const
NormalType
&
unitOuterNormal
(
const
FieldVector
<
alu3d_ctype
,
dim
-
1
>&
local
)
const
;
NormalType
unitOuterNormal
(
const
FieldVector
<
alu3d_ctype
,
dim
-
1
>&
local
)
const
;
//! return outer normal, this should be dependent on local
//! coordinates for higher order boundary
const
NormalType
&
outerNormal
(
const
FieldVector
<
alu3d_ctype
,
dim
-
1
>&
local
)
const
;
NormalType
outerNormal
(
const
FieldVector
<
alu3d_ctype
,
dim
-
1
>&
local
)
const
;
//! return outer normal, this should be dependent on local
//! coordinates for higher order boundary
const
NormalType
&
integrationOuterNormal
(
const
FieldVector
<
alu3d_ctype
,
dim
-
1
>&
local
)
const
;
NormalType
integrationOuterNormal
(
const
FieldVector
<
alu3d_ctype
,
dim
-
1
>&
local
)
const
;
private
:
// if neighbour exists , do setup of new neighbour
...
...
@@ -756,9 +764,7 @@ namespace Dune
const
GridImp
&
grid_
;
int
walkLevel_
;
//ALU3DSPACE MemoryPointer < EntityImp , ALU3DSPACE MemoryProvider<EntityImp> > entity_;
EntityImp
*
entity_
;
//! neighbour entity
//EntityImp fEntity_; //! neighbour entity
// current element from which we started the intersection iterator
mutable
ALU3DSPACE
GEOElementType
*
item_
;
...
...
@@ -779,9 +785,6 @@ namespace Dune
mutable
bool
isBoundary_
;
//! true if intersection is with boundary
mutable
bool
isGhost_
;
//! true if intersection is with internal boundary (only parallel grid)
mutable
FieldVector
<
alu3d_ctype
,
dimworld
>
outNormal_
;
//! outerNormal of current intersection
mutable
FieldVector
<
alu3d_ctype
,
dimworld
>
unitOuterNormal_
;
//! unitOuterNormal of current intersection
mutable
bool
needSetup_
;
//! true if setup is needed
mutable
bool
needNormal_
;
//! true if normal has to be calculated
...
...
@@ -789,9 +792,9 @@ namespace Dune
mutable
ALU3DSPACE
NeighbourFaceType
neighpair_
;
mutable
bool
initInterGl_
;
//! true if interSelfGlobal_ was initialized
mutable
GeometryImp
interSelfGlobal_
;
//! intersection_self_global
GeometryImp
*
interSelfGlobal_
;
//! intersection_self_global
mutable
MakeableBndEntityImp
bndEntity_
;
//! boundaryEntity
MakeableBndEntityImp
*
bndEntity_
;
//! boundaryEntity
};
//**********************************************************************
...
...
@@ -1234,12 +1237,20 @@ namespace Dune
// the entity codim 0
typedef
ALU3dGridMakeableEntity
<
0
,
dim
,
const
MyType
>
EntityImp
;
typedef
ALU3DSPACE
MemoryProvider
<
EntityImp
>
EntityProvider
;
typedef
ALU3DSPACE
ALUMemoryProvider
<
EntityImp
>
EntityProvider
;
typedef
ALU3dGridMakeableGeometry
<
dim
-
1
,
dimworld
,
const
MyType
>
LGeometryImp
;
typedef
ALU3DSPACE
ALUMemoryProvider
<
LGeometryImp
>
GeometryProvider
;
typedef
ALU3dGridMakeableBoundaryEntity
<
const
MyType
>
BndGeometryImp
;
typedef
ALU3DSPACE
ALUMemoryProvider
<
BndGeometryImp
>
BndProvider
;
//typedef ALU3dGridMakeableEntity<3,dim,const MyType> VertexImp;
//typedef ALU3DSPACE MemoryProvider< VertexImp > VertexProvider;
mutable
GeometryProvider
geometryProvider_
;
mutable
EntityProvider
entityProvider_
;
mutable
BndProvider
bndProvider_
;
//mutable VertexProvider vertexProvider_;
};
// end Class ALU3dGridGrid
...
...
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