Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aland, Sebastian
amdis
Commits
d34c8857
Commit
d34c8857
authored
Dec 03, 2009
by
Thomas Witkowski
Browse files
Code refactoring.
parent
85f42967
Changes
10
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/ElInfo.cc
View file @
d34c8857
...
...
@@ -15,28 +15,28 @@
namespace
AMDiS
{
ElInfo
::
ElInfo
(
Mesh
*
aMesh
)
:
mesh
_
(
aMesh
),
element
_
(
NULL
),
parent
_
(
NULL
),
macroElement
_
(
NULL
),
:
mesh
(
aMesh
),
element
(
NULL
),
parent
(
NULL
),
macroElement
(
NULL
),
level
(
0
),
elType
(
0
),
iChild
(
0
),
coord
_
(
mesh
_
->
getDim
(),
NO_INIT
),
boundary
_
(
mesh
_
->
getDim
(),
DEFAULT_VALUE
,
INTERIOR
),
projection
_
(
mesh
_
->
getDim
(),
NO_INIT
),
oppCoord
_
(
mesh
_
->
getDim
(),
NO_INIT
),
neighbour
_
(
mesh
_
->
getDim
(),
NO_INIT
),
neighbourCoord
(
mesh
_
->
getDim
(),
NO_INIT
),
oppVertex
(
mesh
_
->
getDim
(),
NO_INIT
),
grdLambda
(
mesh
_
->
getDim
(),
NO_INIT
),
coord
(
mesh
->
getDim
(),
NO_INIT
),
boundary
(
mesh
->
getDim
(),
DEFAULT_VALUE
,
INTERIOR
),
projection
(
mesh
->
getDim
(),
NO_INIT
),
oppCoord
(
mesh
->
getDim
(),
NO_INIT
),
neighbour
(
mesh
->
getDim
(),
NO_INIT
),
neighbourCoord
(
mesh
->
getDim
(),
NO_INIT
),
oppVertex
(
mesh
->
getDim
(),
NO_INIT
),
grdLambda
(
mesh
->
getDim
(),
NO_INIT
),
refinementPath
(
0
),
refinementPathLength
(
0
)
{
projection
_
.
set
(
NULL
);
projection
.
set
(
NULL
);
for
(
int
i
=
0
;
i
<
neighbourCoord
.
getSize
();
i
++
)
neighbourCoord
[
i
].
init
(
mesh
_
->
getDim
());
neighbourCoord
[
i
].
init
(
mesh
->
getDim
());
dimOfWorld
=
Global
::
getGeo
(
WORLD
);
}
...
...
@@ -53,21 +53,21 @@ namespace AMDiS {
double
c
=
l
[
0
];
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
w
[
j
]
=
c
*
coord
_
[
0
][
j
];
w
[
j
]
=
c
*
coord
[
0
][
j
];
int
vertices
=
Global
::
getGeo
(
VERTEX
,
l
.
getSize
()
-
1
);
for
(
int
i
=
1
;
i
<
vertices
;
i
++
)
{
c
=
l
[
i
];
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
w
[
j
]
+=
c
*
coord
_
[
i
][
j
];
w
[
j
]
+=
c
*
coord
[
i
][
j
];
}
}
double
ElInfo
::
calcDet
()
const
{
testFlag
(
Mesh
::
FILL_COORDS
);
return
calcDet
(
coord
_
);
return
calcDet
(
coord
);
}
double
ElInfo
::
calcDet
(
const
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
&
coords
)
const
...
...
@@ -147,11 +147,11 @@ namespace AMDiS {
void
ElInfo
::
fillDetGrdLambda
()
{
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
det
_
=
calcGrdLambda
(
grdLambda
);
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
det
=
calcGrdLambda
(
grdLambda
);
}
else
{
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_DET
))
det
_
=
calcDet
();
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_DET
))
det
=
calcDet
();
}
}
...
...
@@ -163,11 +163,11 @@ namespace AMDiS {
{
10
,
4
,
0
}
};
int
dim
=
mesh
_
->
getDim
();
int
dim
=
mesh
->
getDim
();
int
posIndex
=
DIM_OF_INDEX
(
pos
,
dim
);
int
offset
=
indexOffset
[
dim
-
1
][
posIndex
];
return
boundary
_
[
offset
+
i
];
return
boundary
[
offset
+
i
];
}
}
AMDiS/src/ElInfo.h
View file @
d34c8857
...
...
@@ -66,17 +66,17 @@ namespace AMDiS {
*/
ElInfo
&
operator
=
(
const
ElInfo
&
rhs
)
{
mesh
_
=
rhs
.
mesh
_
;
element
_
=
rhs
.
element
_
;
parent
_
=
rhs
.
parent
_
;
macroElement
_
=
rhs
.
macroElement
_
;
fillFlag
_
=
rhs
.
fillFlag
_
;
mesh
=
rhs
.
mesh
;
element
=
rhs
.
element
;
parent
=
rhs
.
parent
;
macroElement
=
rhs
.
macroElement
;
fillFlag
=
rhs
.
fillFlag
;
level
=
rhs
.
level
;
iChild
=
rhs
.
iChild
;
coord
_
=
rhs
.
coord
_
;
boundary
_
=
rhs
.
boundary
_
;
oppCoord
_
=
rhs
.
oppCoord
_
;
neighbour
_
=
rhs
.
neighbour
_
;
coord
=
rhs
.
coord
;
boundary
=
rhs
.
boundary
;
oppCoord
=
rhs
.
oppCoord
;
neighbour
=
rhs
.
neighbour
;
neighbourCoord
=
rhs
.
neighbourCoord
;
oppVertex
=
rhs
.
oppVertex
;
return
*
this
;
...
...
@@ -87,34 +87,34 @@ namespace AMDiS {
* \{
*/
/// Get ElInfo's \ref mesh
_
/// Get ElInfo's \ref mesh
inline
Mesh
*
getMesh
()
const
{
return
mesh
_
;
return
mesh
;
}
/// Get ElInfo's \ref macroElement
_
/// Get ElInfo's \ref macroElement
inline
MacroElement
*
getMacroElement
()
const
{
return
macroElement
_
;
return
macroElement
;
}
/// Get ElInfo's \ref element
inline
Element
*
getElement
()
const
{
return
element
_
;
return
element
;
}
/// Get ElInfo's \ref parent
_
/// Get ElInfo's \ref parent
inline
Element
*
getParent
()
const
{
return
parent
_
;
return
parent
;
}
/// Get ElInfo's \ref fillFlag
_
/// Get ElInfo's \ref fillFlag
inline
Flag
getFillFlag
()
const
{
return
fillFlag
_
;
return
fillFlag
;
}
/// Get ElInfo's \ref level
...
...
@@ -130,60 +130,60 @@ namespace AMDiS {
}
/** \brief
* Get ElInfo's \ref coord
_
[i]. This is a WorldVector<double> filled with the
* Get ElInfo's \ref coord[i]. This is a WorldVector<double> filled with the
* coordinates of the i-th vertex of element \ref el.
*/
inline
WorldVector
<
double
>&
getCoord
(
int
i
)
{
return
coord
_
[
i
];
return
coord
[
i
];
}
/** \brief
* Get ElInfo's \ref coord
_
[i]. This is a WorldVector<double> filled with the
* Get ElInfo's \ref coord[i]. This is a WorldVector<double> filled with the
* coordinates of the i-th vertex of element \ref el.
*/
inline
const
WorldVector
<
double
>&
getCoord
(
int
i
)
const
{
return
coord
_
[
i
];
return
coord
[
i
];
}
/** \brief
* Get ElInfo's \ref coord
_
. This is a FixVec<WorldVector<double> > filled with the
* Get ElInfo's \ref coord. This is a FixVec<WorldVector<double> > filled with the
* coordinates of the all vertice of element \ref el.
*/
inline
FixVec
<
WorldVector
<
double
>
,
VERTEX
>&
getCoords
()
{
return
coord
_
;
return
coord
;
}
/** \brief
* Get ElInfo's \ref coord
_
. This is a FixVec<WorldVector<double> > filled with the
* Get ElInfo's \ref coord. This is a FixVec<WorldVector<double> > filled with the
* coordinates of the all vertice of element \ref el.
*/
inline
const
FixVec
<
WorldVector
<
double
>
,
VERTEX
>&
getCoords
()
const
{
return
coord
_
;
return
coord
;
}
/// Get ElInfo's \ref oppCoord
_
[i]
/// Get ElInfo's \ref oppCoord[i]
inline
WorldVector
<
double
>&
getOppCoord
(
int
i
)
{
return
oppCoord
_
[
i
];
return
oppCoord
[
i
];
}
/// Get ElInfo's \ref boundary
_
[i]
/// Get ElInfo's \ref boundary[i]
inline
BoundaryType
getBoundary
(
int
i
)
const
{
return
boundary
_
[
i
];
return
boundary
[
i
];
}
/// Get boundary type of i-th vertex/edge/face (pos).
BoundaryType
getBoundary
(
GeoIndex
pos
,
int
i
);
/// Get ElInfo's \ref neighbour
_
[i]
/// Get ElInfo's \ref neighbour[i]
inline
Element
*
getNeighbour
(
int
i
)
const
{
return
neighbour
_
[
i
];
return
neighbour
[
i
];
}
/// Get ElInfo's \ref neighbourCoord[i]
...
...
@@ -203,10 +203,10 @@ namespace AMDiS {
return
oppVertex
[
i
];
}
/// Get ElInfo's \ref det
_
/// Get ElInfo's \ref det
inline
double
getDet
()
const
{
return
det
_
;
return
det
;
}
/// Returns \ref grdLambda
...
...
@@ -215,10 +215,10 @@ namespace AMDiS {
return
grdLambda
;
}
/// Returns \ref projection
_
[i]
/// Returns \ref projection[i]
inline
Projection
*
getProjection
(
int
i
)
const
{
return
projection
_
[
i
];
return
projection
[
i
];
}
/// Returns \ref parametric
...
...
@@ -239,46 +239,46 @@ namespace AMDiS {
* \{
*/
/// Set ElInfo's \ref mesh
_
/// Set ElInfo's \ref mesh
inline
void
setMesh
(
Mesh
*
aMesh
)
{
mesh
_
=
aMesh
;
mesh
=
aMesh
;
}
/// Set ElInfo's \ref macroElement
_
/// Set ElInfo's \ref macroElement
inline
void
setMacroElement
(
MacroElement
*
mel
)
{
macroElement
_
=
mel
;
macroElement
=
mel
;
}
/// Set ElInfo's \ref element
inline
void
setElement
(
Element
*
elem
)
{
element
_
=
elem
;
element
=
elem
;
}
/// Set ElInfo's \ref parent
_
/// Set ElInfo's \ref parent
inline
void
setParent
(
Element
*
elem
)
{
parent
_
=
elem
;
parent
=
elem
;
}
/// Set ElInfo's \ref fillFlag
_
/// Set ElInfo's \ref fillFlag
inline
void
setFillFlag
(
Flag
flag
)
{
fillFlag
_
=
flag
;
fillFlag
=
flag
;
}
/// Sets ElInfo's \ref coord
_
[i].
inline
void
setCoord
(
int
i
,
WorldVector
<
double
>&
c
oord
)
/// Sets ElInfo's \ref coord[i].
inline
void
setCoord
(
int
i
,
WorldVector
<
double
>&
c
)
{
coord
_
[
i
]
=
c
oord
;
coord
[
i
]
=
c
;
}
/// Sets ElInfo's \ref coord.
inline
void
setCoords
(
FixVec
<
WorldVector
<
double
>
,
VERTEX
>&
c
oords
)
inline
void
setCoords
(
FixVec
<
WorldVector
<
double
>
,
VERTEX
>&
c
)
{
coord
_
=
c
oords
;
coord
=
c
;
}
/// Set ElInfo's \ref level
...
...
@@ -287,22 +287,22 @@ namespace AMDiS {
level
=
l
;
}
/// Set ElInfo's \ref boundary
_
[i]
/// Set ElInfo's \ref boundary[i]
inline
void
setBoundary
(
int
i
,
BoundaryType
t
)
{
boundary
_
[
i
]
=
newBound
(
boundary
_
[
i
],
t
);
boundary
[
i
]
=
newBound
(
boundary
[
i
],
t
);
}
/// Set \ref projection
_
[i] = p
/// Set \ref projection[i] = p
inline
void
setProjection
(
int
i
,
Projection
*
p
)
{
projection
_
[
i
]
=
p
;
projection
[
i
]
=
p
;
}
/// Set \ref det
_
= d
/// Set \ref det = d
inline
void
setDet
(
double
d
)
{
det
_
=
d
;
det
=
d
;
}
/// Set \ref parametric = param
...
...
@@ -345,7 +345,7 @@ namespace AMDiS {
double
calcDet
(
const
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
&
coords
)
const
;
/** \brief
* Checks whether flag is set in ElInfo's \ref fillFlag
_
. If not, the program
* Checks whether flag is set in ElInfo's \ref fillFlag. If not, the program
* exits.
*/
void
testFlag
(
const
Flag
&
flag
)
const
;
...
...
@@ -357,7 +357,7 @@ namespace AMDiS {
void
coordToWorld
(
const
DimVec
<
double
>&
lambda
,
WorldVector
<
double
>&
world
)
const
;
/// Fills ElInfo's \ref det
_
and \ref grdLambda entries.
/// Fills ElInfo's \ref det and \ref grdLambda entries.
virtual
void
fillDetGrdLambda
();
/** \brief
...
...
@@ -422,25 +422,25 @@ namespace AMDiS {
protected:
/// Pointer to the current mesh
Mesh
*
mesh
_
;
Mesh
*
mesh
;
/// Pointer to the current element
Element
*
element
_
;
Element
*
element
;
/// \ref element is child of element parent
_
Element
*
parent
_
;
/// \ref element is child of element parent
Element
*
parent
;
/** \brief
* \ref element is an element of the binary tree located at MacroElement
* macroElement
_
* macroElement
*/
MacroElement
*
macroElement
_
;
MacroElement
*
macroElement
;
/** \brief
* Indicates wich elements will be called and wich information should be
* present while mesh traversal.
*/
Flag
fillFlag
_
;
Flag
fillFlag
;
/** \brief
* Level of the element. The level is zero for macro elements and the level
...
...
@@ -462,36 +462,36 @@ namespace AMDiS {
int
iChild
;
/** \brief
* \ref coord
_
[i] is a WorldVector<double> storing the world coordinates of the
* \ref coord[i] is a WorldVector<double> storing the world coordinates of the
* i-th vertex of element \ref element.
*/
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
coord
_
;
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
coord
;
/** \brief
* boundary
_
[i] is the BoundaryType of the i-th edge/face
* boundary[i] is the BoundaryType of the i-th edge/face
* for i=0,...,N_NEIGH - 1. In 3d
* (*boundary
_
)[N_FACES + i] is a pointer to the Boundary
* (*boundary)[N_FACES + i] is a pointer to the Boundary
* object of the i-th edge, for i=0,..,N_EDGES - 1. It is
* a pointer to NULL for an interior edge/face.
*/
FixVec
<
BoundaryType
,
BOUNDARY
>
boundary
_
;
FixVec
<
BoundaryType
,
BOUNDARY
>
boundary
;
/** \brief
* Vector storing pointers to projections for each face, edge, vertex.
*/
FixVec
<
Projection
*
,
PROJECTION
>
projection
_
;
FixVec
<
Projection
*
,
PROJECTION
>
projection
;
/** \brief
* oppCoord
_
[i] coordinates of the i-th neighbour vertex opposite the
* oppCoord[i] coordinates of the i-th neighbour vertex opposite the
* common edge/face.
*/
FixVec
<
WorldVector
<
double
>
,
NEIGH
>
oppCoord
_
;
FixVec
<
WorldVector
<
double
>
,
NEIGH
>
oppCoord
;
/** \brief
* neighbour
_
[i] pointer to the element at the edge/face with local index i.
* neighbour[i] pointer to the element at the edge/face with local index i.
* It is a pointer to NULL for boundary edges/faces.
*/
FixVec
<
Element
*
,
NEIGH
>
neighbour
_
;
FixVec
<
Element
*
,
NEIGH
>
neighbour
;
/** \brief
* neighbourCoord[i][j] are the coordinate of the j-th vertex of the i-th
...
...
@@ -500,14 +500,14 @@ namespace AMDiS {
FixVec
<
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
,
NEIGH
>
neighbourCoord
;
/** \brief
* oppVertex[i] is undefined if neighbour
_
[i] is a pointer to NULL.
* oppVertex[i] is undefined if neighbour[i] is a pointer to NULL.
* Otherwise it is the local index of the neighbour's vertex opposite the
* common edge/face.
*/
FixVec
<
unsigned
char
,
NEIGH
>
oppVertex
;
/// Elements determinant.
double
det
_
;
double
det
;
/// Gradient of lambda.
DimVec
<
WorldVector
<
double
>
>
grdLambda
;
...
...
AMDiS/src/ElInfo1d.cc
View file @
d34c8857
...
...
@@ -52,35 +52,35 @@ namespace AMDiS {
Element
*
nb
;
MacroElement
*
mnb
;
macroElement
_
=
const_cast
<
MacroElement
*>
(
mel
);
element
_
=
const_cast
<
Element
*>
(
mel
->
getElement
());
parent
_
=
NULL
;
macroElement
=
const_cast
<
MacroElement
*>
(
mel
);
element
=
const_cast
<
Element
*>
(
mel
->
getElement
());
parent
=
NULL
;
level
=
0
;
int
vertices
=
mesh
_
->
getGeo
(
VERTEX
);
int
vertices
=
mesh
->
getGeo
(
VERTEX
);
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_COORDS
)
||
fillFlag
_
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag
_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_COORDS
)
||
fillFlag
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
for
(
int
i
=
0
;
i
<
vertices
;
i
++
)
coord
_
[
i
]
=
mel
->
coord
[
i
];
coord
[
i
]
=
mel
->
coord
[
i
];
}
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_NEIGH
)
||
fillFlag
_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_NEIGH
)
||
fillFlag
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
WorldVector
<
double
>
oppC
;
int
neighbours
=
mesh
_
->
getGeo
(
NEIGH
);
int
neighbours
=
mesh
->
getGeo
(
NEIGH
);
for
(
int
i
=
0
;
i
<
neighbours
;
i
++
)
{
nb
=
NULL
;
if
((
mnb
=
const_cast
<
MacroElement
*>
(
mel
->
getNeighbour
(
i
))))
{
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
oppC
=
mnb
->
coord
[
i
];
}
nb
=
const_cast
<
Element
*>
(
mnb
->
getElement
());
while
(
!
(
nb
->
isLeaf
()))
{
// make nb nearest element
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
nb
->
isNewCoordSet
())
{
oppC
=
*
(
nb
->
getNewCoord
());
}
else
{
...
...
@@ -90,21 +90,21 @@ namespace AMDiS {
nb
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
-
i
));
}
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
oppCoord
_
[
i
]
=
oppC
;
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
oppCoord
[
i
]
=
oppC
;
}
}
neighbour
_
[
i
]
=
nb
;
neighbour
[
i
]
=
nb
;
oppVertex
[
i
]
=
nb
?
i
:
-
1
;
}
}
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_BOUND
)
)
{
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_BOUND
)
)
{
for
(
int
i
=
0
;
i
<
vertices
;
i
++
)
boundary
_
[
i
]
=
mel
->
getBoundary
(
i
);
boundary
[
i
]
=
mel
->
getBoundary
(
i
);
for
(
int
i
=
0
;
i
<
element
_
->
getGeo
(
PROJECTION
);
i
++
)
projection
_
[
i
]
=
mel
->
getProjection
(
i
);
for
(
int
i
=
0
;
i
<
element
->
getGeo
(
PROJECTION
);
i
++
)
projection
[
i
]
=
mel
->
getProjection
(
i
);
}
}
...
...
@@ -120,8 +120,8 @@ namespace AMDiS {
testFlag
(
Mesh
::
FILL_COORDS
);
WorldVector
<
double
>
e
;
e
=
coord
_
[
1
];
e
-=
coord
_
[
0
];
e
=
coord
[
1
];
e
-=
coord
[
0
];
double
adet2
=
e
*
e
;
if
(
adet2
<
1.0E-15
)
{
...
...
@@ -141,9 +141,9 @@ namespace AMDiS {
FUNCNAME
(
"ElInfo1d::worldToCoord()"
);
double
lmin
;
double
a
=
coord
_
[
0
][
0
];
double
length
=
(
coord
_
[
1
][
0
]
-
a
);
int
dim
=
mesh
_
->
getDim
();
double
a
=
coord
[
0
][
0
];
double
length
=
(
coord
[
1
][
0
]
-
a
);
int
dim
=
mesh
->
getDim
();
static
DimVec
<
double
>
vec
(
dim
,
NO_INIT
);
...
...
@@ -180,7 +180,7 @@ namespace AMDiS {
/****************************************************************************/
double
ElInfo1d
::
getNormal
(
int
side
,
WorldVector
<
double
>
&
normal
)
{
normal
=
coord
_
[
side
]
-
coord
_
[(
side
+
1
)
%
2
];
normal
=
coord
[
side
]
-
coord
[(
side
+
1
)
%
2
];
double
det
=
norm
(
&
normal
);
TEST_EXIT_DBG
(
det
>
1.e-30
)(
"det = 0 on side %d
\n
"
,
side
);
normal
*=
1.0
/
det
;
...
...
@@ -201,8 +201,8 @@ namespace AMDiS {
TEST_EXIT_DBG
(
dimOfWorld
==
2
)
(
" element normal only well defined for DIM_OF_WORLD = DIM + 1 !!"
);
elementNormal
[
0
]
=
coord
_
[
1
][
1
]
-
coord
_
[
0
][
1
];
elementNormal
[
1
]
=
coord
_
[
0
][
0
]
-
coord
_
[
1
][
0
];
elementNormal
[
0
]
=
coord
[
1
][
1
]
-
coord
[
0
][
1
];
elementNormal
[
1
]
=
coord
[
0
][
0
]
-
coord
[
1
][
0
];
double
det
=
norm
(
&
elementNormal
);
...
...
@@ -219,77 +219,77 @@ namespace AMDiS {
FUNCNAME
(
"ElInfo1d::fillElInfo()"
);
Element
*
nb
;
Element
*
elem
=
elInfoOld
->
element
_
;
Element
*
elem
=
elInfoOld
->
element
;
TEST_EXIT_DBG
(
elem
->
getChild
(
0
))(
"no children?
\n
"
);
element
_
=
const_cast
<
Element
*>
(
elem
->
getChild
(
ichild
));
element
=
const_cast
<
Element
*>
(
elem
->
getChild
(
ichild
));
TEST_EXIT_DBG
(
element
_
)(
"missing child %d?
\n
"
,
ichild
);
TEST_EXIT_DBG
(
element
)(
"missing child %d?
\n
"
,
ichild
);
macroElement
_
=
elInfoOld
->
macroElement
_
;
fillFlag
_
=
elInfoOld
->
fillFlag
_
;
parent
_
=
elem
;
macroElement
=
elInfoOld
->
macroElement
;
fillFlag
=
elInfoOld
->
fillFlag
;
parent
=
elem
;
level
=
elInfoOld
->
level
+
1
;
iChild
=
ichild
;
int
neighbours
=
mesh
_
->
getGeo
(
NEIGH
);
int
neighbours
=
mesh
->
getGeo
(
NEIGH
);
if
(
fillFlag
_
.
isSet
(
Mesh
::
FILL_COORDS
)
||
fillFlag
_
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag
_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
if
(
fillFlag
.
isSet
(
Mesh
::
FILL_COORDS
)
||
fillFlag
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
const
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
*
old_coord
=
&
(
elInfoOld
->
coord
_
);
const
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
*
old_coord
=
&
(
elInfoOld
->
coord
);
coord
_
[
ichild
]
=
(
*
old_coord
)[
ichild
];
coord
[
ichild
]
=
(
*
old_coord
)[
ichild
];
if
(
elem
->
isNewCoordSet
())
coord
_
[
1
-
ichild
]
=
*
(
elem
->
getNewCoord
());
coord
[
1
-
ichild
]
=
*
(
elem
->
getNewCoord
());