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
1c9e69c7
Commit
1c9e69c7
authored
19 years ago
by
Adrian Burri
Browse files
Options
Downloads
Patches
Plain Diff
Removed refelem
[[Imported from SVN: r2448]]
parent
561d28c4
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
grid/alu3dgrid/entity_imp.cc
+4
-4
4 additions, 4 deletions
grid/alu3dgrid/entity_imp.cc
grid/alu3dgrid/geometry.hh
+5
-24
5 additions, 24 deletions
grid/alu3dgrid/geometry.hh
grid/alu3dgrid/geometry_imp.cc
+10
-96
10 additions, 96 deletions
grid/alu3dgrid/geometry_imp.cc
with
19 additions
and
124 deletions
grid/alu3dgrid/entity_imp.cc
+
4
−
4
View file @
1c9e69c7
...
...
@@ -11,7 +11,7 @@ namespace Dune {
ALU3dGridEntity
(
const
GridImp
&
grid
,
int
level
)
:
grid_
(
grid
),
level_
(
0
)
,
gIndex_
(
-
1
)
,
item_
(
0
)
,
father_
(
0
)
,
geo_
(
false
)
,
builtgeometry_
(
false
)
,
geo_
()
,
builtgeometry_
(
false
)
,
localFCoordCalced_
(
false
)
{}
...
...
@@ -146,10 +146,10 @@ namespace Dune {
ALU3dGridEntity
(
const
GridImp
&
grid
,
int
wLevel
)
:
grid_
(
grid
)
,
item_
(
0
)
,
ghost_
(
0
),
isGhost_
(
false
),
geo_
(
false
)
,
builtgeometry_
(
false
)
,
ghost_
(
0
),
isGhost_
(
false
),
geo_
()
,
builtgeometry_
(
false
)
,
walkLevel_
(
wLevel
)
,
glIndex_
(
-
1
),
level_
(
-
1
)
,
geoInFather_
(
false
)
,
geoInFather_
()
,
isLeaf_
(
false
)
{}
...
...
@@ -652,7 +652,7 @@ namespace Dune {
//************************************************************************
template
<
class
GridImp
>
inline
ALU3dGridBoundaryEntity
<
GridImp
>::
ALU3dGridBoundaryEntity
()
:
_geom
(
false
)
,
_id
(
-
1
)
{}
_geom
()
,
_id
(
-
1
)
{}
template
<
class
GridImp
>
inline
int
ALU3dGridBoundaryEntity
<
GridImp
>::
id
()
const
...
...
This diff is collapsed.
Click to expand it.
grid/alu3dgrid/geometry.hh
+
5
−
24
View file @
1c9e69c7
...
...
@@ -23,8 +23,6 @@ namespace Dune {
class
ALU3dGridGeometry
;
template
<
int
dim
,
int
dimworld
,
ALU3dGridElementType
elType
>
class
ALU3dGrid
;
template
<
int
dim
,
class
GridImp
>
struct
ALU3dGridReferenceGeometry
;
class
BilinearSurfaceMapping
;
class
TrilinearMapping
;
...
...
@@ -58,11 +56,11 @@ namespace Dune {
EntityCount
<
GridImp
::
elementType
>::
numVerticesPerFace
,
3
>
FaceCoordinatesType
;
ALU3dGridMakeableGeometry
(
bool
makeRefelem
=
false
)
:
GeometryType
(
ALU3dGridGeometry
<
mydim
,
coorddim
,
GridImp
>
(
makeRefelem
))
{}
ALU3dGridMakeableGeometry
()
:
GeometryType
(
ALU3dGridGeometry
<
mydim
,
coorddim
,
GridImp
>
())
{}
ALU3dGridMakeableGeometry
(
GridImp
&
grid
,
int
level
)
:
GeometryType
(
ALU3dGridGeometry
<
mydim
,
coorddim
,
GridImp
>
(
false
))
{}
GeometryType
(
ALU3dGridGeometry
<
mydim
,
coorddim
,
GridImp
>
())
{}
//! build geometry out of different ALU3dGrid Geometrys
//! ItemType are HElementType, HFaceType, HEdgeType and VertexType
...
...
@@ -132,7 +130,7 @@ namespace Dune {
typedef
FieldMatrix
<
alu3d_ctype
,
3
,
3
>
FaceCoordinatesType
;
//! for makeRefGeometry == true a Geometry with the coordinates of the
//! reference element is made
explicit
ALU3dGridGeometry
(
bool
makeRefGeometry
=
false
);
ALU3dGridGeometry
();
//! return the element type identifier
//! line , triangle or tetrahedron, depends on dim
...
...
@@ -144,11 +142,6 @@ namespace Dune {
//! access to coordinates of corners. Index is the number of the corner
const
FieldVector
<
alu3d_ctype
,
cdim
>&
operator
[]
(
int
i
)
const
;
/*! 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
::
ALU3dGridGeometry
>
&
refelem
();
//! maps a local coordinate within reference element to
//! global coordinate in element
FieldVector
<
alu3d_ctype
,
cdim
>
global
(
const
FieldVector
<
alu3d_ctype
,
mydim
>&
local
)
const
;
...
...
@@ -240,7 +233,7 @@ namespace Dune {
//! for makeRefGeometry == true a Geometry with the coordinates of the
//! reference element is made
explicit
ALU3dGridGeometry
(
bool
makeRefGeometry
=
false
);
ALU3dGridGeometry
();
//! Destructor
~
ALU3dGridGeometry
();
...
...
@@ -255,10 +248,6 @@ namespace Dune {
//! access to coordinates of corners. Index is the number of the corner
const
FieldVector
<
alu3d_ctype
,
cdim
>&
operator
[]
(
int
i
)
const
;
//! 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
::
ALU3dGridGeometry
>
&
refelem
();
//! maps a local coordinate within reference element to
//! global coordinate in element
FieldVector
<
alu3d_ctype
,
cdim
>
global
(
const
FieldVector
<
alu3d_ctype
,
mydim
>&
local
)
const
;
...
...
@@ -312,14 +301,6 @@ namespace Dune {
};
// singleton holding reference elements
template
<
int
dim
,
class
GridImp
>
struct
ALU3dGridReferenceGeometry
{
ALU3dGridMakeableGeometry
<
dim
,
dim
,
GridImp
>
refelem
;
ALU3dGridReferenceGeometry
()
:
refelem
(
true
)
{};
};
}
// end namespace Dune
#include
"geometry_imp.cc"
...
...
This diff is collapsed.
Click to expand it.
grid/alu3dgrid/geometry_imp.cc
+
10
−
96
View file @
1c9e69c7
...
...
@@ -8,17 +8,9 @@ namespace Dune {
//- Tetra specialization
template
<
int
mydim
,
int
cdim
>
inline
ALU3dGridGeometry
<
mydim
,
cdim
,
const
ALU3dGrid
<
3
,
3
,
tetra
>
>::
ALU3dGridGeometry
(
bool
makeRefElement
)
ALU3dGridGeometry
()
:
builtinverse_
(
false
)
,
builtA_
(
false
)
,
builtDetDF_
(
false
)
{
// create reference element
if
(
makeRefElement
)
{
coord_
=
0.0
;
for
(
int
i
=
1
;
i
<
mydim
+
1
;
i
++
)
coord_
[
i
][
i
-
1
]
=
1.0
;
}
}
{}
// B U I L T G E O M - - -
...
...
@@ -417,82 +409,38 @@ namespace Dune {
ss
<<
"}
\n
"
;
}
template
<
class
GridImp
,
int
dim
>
struct
ALU3dGridRefElem
;
template
<
int
mydim
,
int
cdim
>
inline
const
Dune
::
Geometry
<
mydim
,
mydim
,
const
ALU3dGrid
<
3
,
3
,
tetra
>
,
Dune
::
ALU3dGridGeometry
>
&
ALU3dGridGeometry
<
mydim
,
cdim
,
const
ALU3dGrid
<
3
,
3
,
tetra
>
>::
refelem
()
{
return
ALU3dGridRefElem
<
const
ALU3dGrid
<
3
,
3
,
tetra
>
,
mydim
>::
refelem
();
}
//- Hexahedron specialization
template
<
int
mydim
,
int
cdim
>
inline
ALU3dGridGeometry
<
mydim
,
cdim
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
>::
ALU3dGridGeometry
(
bool
makeRefElement
)
:
ALU3dGridGeometry
()
:
coord_
(
0.0
),
triMap_
(
0
),
biMap_
(
0
)
{
assert
(
false
);
if
(
makeRefElement
)
{
for
(
int
i
=
1
;
i
<
mydim
+
1
;
++
i
)
{
coord_
[
i
][
i
-
1
]
=
1.0
;
}
}
}
{}
template
<
>
inline
ALU3dGridGeometry
<
3
,
3
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
>::
ALU3dGridGeometry
(
bool
makeRefElement
)
:
ALU3dGridGeometry
()
:
coord_
(
0.0
),
triMap_
(
0
),
biMap_
(
0
)
{
// Dune reference element - hardwired
if
(
makeRefElement
)
{
coord_
[
1
][
0
]
=
1.0
;
coord_
[
2
][
1
]
=
1.0
;
coord_
[
3
][
0
]
=
1.0
;
coord_
[
3
][
1
]
=
1.0
;
coord_
[
4
][
2
]
=
1.0
;
coord_
[
5
][
0
]
=
1.0
;
coord_
[
5
][
2
]
=
1.0
;
coord_
[
6
][
1
]
=
1.0
;
coord_
[
6
][
2
]
=
1.0
;
coord_
[
7
][
0
]
=
1.0
;
coord_
[
7
][
1
]
=
1.0
;
coord_
[
7
][
2
]
=
1.0
;
}
}
{}
template
<
>
inline
ALU3dGridGeometry
<
2
,
3
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
>::
ALU3dGridGeometry
(
bool
makeRefElement
)
ALU3dGridGeometry
()
:
coord_
(
0.0
),
triMap_
(
0
),
biMap_
(
0
)
{
if
(
makeRefElement
)
{
coord_
[
1
][
0
]
=
1.0
;
coord_
[
2
][
1
]
=
1.0
;
coord_
[
3
][
0
]
=
1.0
;
coord_
[
3
][
1
]
=
1.0
;
}
}
{}
template
<
>
inline
ALU3dGridGeometry
<
2
,
2
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
>::
ALU3dGridGeometry
(
bool
makeRefElement
)
ALU3dGridGeometry
()
:
coord_
(
0.0
),
triMap_
(
0
),
biMap_
(
0
)
{
if
(
makeRefElement
)
{
coord_
[
1
][
0
]
=
1.0
;
coord_
[
2
][
1
]
=
1.0
;
coord_
[
3
][
0
]
=
1.0
;
coord_
[
3
][
1
]
=
1.0
;
}
}
{}
template
<
int
mydim
,
int
cdim
>
...
...
@@ -522,14 +470,6 @@ namespace Dune {
return
coord_
[
i
];
}
template
<
int
mydim
,
int
cdim
>
const
Dune
::
Geometry
<
mydim
,
mydim
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
,
Dune
::
ALU3dGridGeometry
>&
ALU3dGridGeometry
<
mydim
,
cdim
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
>::
refelem
()
{
return
ALU3dGridRefElem
<
const
ALU3dGrid
<
3
,
3
,
hexa
>
,
mydim
>::
refelem
();
}
template
<
>
inline
FieldVector
<
alu3d_ctype
,
3
>
ALU3dGridGeometry
<
3
,
3
,
const
ALU3dGrid
<
3
,
3
,
hexa
>
>::
...
...
@@ -768,31 +708,5 @@ namespace Dune {
return
true
;
}
//**********************************************************
// Reference Element
//**********************************************************
template
<
class
GridImp
>
struct
ALU3dGridRefElem
<
GridImp
,
1
>
{
static
const
Dune
::
Geometry
<
1
,
1
,
GridImp
,
Dune
::
ALU3dGridGeometry
>
&
refelem
()
{
static
ALU3dGridReferenceGeometry
<
1
,
GridImp
>
ref
;
return
ref
.
refelem
;
}
};
template
<
class
GridImp
>
struct
ALU3dGridRefElem
<
GridImp
,
2
>
{
static
const
Dune
::
Geometry
<
2
,
2
,
GridImp
,
Dune
::
ALU3dGridGeometry
>
&
refelem
()
{
static
ALU3dGridReferenceGeometry
<
2
,
GridImp
>
ref
;
return
ref
.
refelem
;
}
};
template
<
class
GridImp
>
struct
ALU3dGridRefElem
<
GridImp
,
3
>
{
static
const
Dune
::
Geometry
<
3
,
3
,
GridImp
,
Dune
::
ALU3dGridGeometry
>
&
refelem
()
{
static
ALU3dGridReferenceGeometry
<
3
,
GridImp
>
ref
;
return
ref
.
refelem
;
}
};
}
// end 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