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
08f87122
Commit
08f87122
authored
Dec 01, 2009
by
Thomas Witkowski
Browse files
First work on parallel domain decomposition for 3d.
parent
bcaf907b
Changes
11
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/ElInfo.cc
View file @
08f87122
...
@@ -27,7 +27,7 @@ namespace AMDiS {
...
@@ -27,7 +27,7 @@ namespace AMDiS {
oppCoord_
(
mesh_
->
getDim
(),
NO_INIT
),
oppCoord_
(
mesh_
->
getDim
(),
NO_INIT
),
neighbour_
(
mesh_
->
getDim
(),
NO_INIT
),
neighbour_
(
mesh_
->
getDim
(),
NO_INIT
),
neighbourCoord_
(
mesh_
->
getDim
(),
NO_INIT
),
neighbourCoord_
(
mesh_
->
getDim
(),
NO_INIT
),
oppVertex
_
(
mesh_
->
getDim
(),
NO_INIT
),
oppVertex
(
mesh_
->
getDim
(),
NO_INIT
),
grdLambda
(
mesh_
->
getDim
(),
NO_INIT
),
grdLambda
(
mesh_
->
getDim
(),
NO_INIT
),
refinementPath
(
0
),
refinementPath
(
0
),
refinementPathLength
(
0
)
refinementPathLength
(
0
)
...
...
AMDiS/src/ElInfo.h
View file @
08f87122
...
@@ -78,7 +78,7 @@ namespace AMDiS {
...
@@ -78,7 +78,7 @@ namespace AMDiS {
oppCoord_
=
rhs
.
oppCoord_
;
oppCoord_
=
rhs
.
oppCoord_
;
neighbour_
=
rhs
.
neighbour_
;
neighbour_
=
rhs
.
neighbour_
;
neighbourCoord_
=
rhs
.
neighbourCoord_
;
neighbourCoord_
=
rhs
.
neighbourCoord_
;
oppVertex
_
=
rhs
.
oppVertex
_
;
oppVertex
=
rhs
.
oppVertex
;
return
*
this
;
return
*
this
;
}
}
...
@@ -192,15 +192,15 @@ namespace AMDiS {
...
@@ -192,15 +192,15 @@ namespace AMDiS {
return
neighbourCoord_
[
i
];
return
neighbourCoord_
[
i
];
}
}
/// Get ElInfo's \ref oppVertex
_
[i]
/// Get ElInfo's \ref oppVertex[i]
inline
unsigned
char
getOppVertex
(
int
i
)
const
inline
unsigned
char
getOppVertex
(
int
i
)
const
{
{
return
oppVertex
_
[
i
];
return
oppVertex
[
i
];
}
}
virtual
int
getSideOfNeighbour
(
int
i
)
virtual
int
getSideOfNeighbour
(
int
i
)
{
{
return
oppVertex
_
[
i
];
return
oppVertex
[
i
];
}
}
/// Get ElInfo's \ref det_
/// Get ElInfo's \ref det_
...
@@ -221,10 +221,10 @@ namespace AMDiS {
...
@@ -221,10 +221,10 @@ namespace AMDiS {
return
projection_
[
i
];
return
projection_
[
i
];
}
}
/// Returns \ref parametric
_
/// Returns \ref parametric
inline
bool
getParametric
()
inline
bool
getParametric
()
{
{
return
parametric
_
;
return
parametric
;
}
}
virtual
void
getSubElemCoordsMat
(
mtl
::
dense2D
<
double
>&
mat
,
virtual
void
getSubElemCoordsMat
(
mtl
::
dense2D
<
double
>&
mat
,
...
@@ -305,10 +305,10 @@ namespace AMDiS {
...
@@ -305,10 +305,10 @@ namespace AMDiS {
det_
=
d
;
det_
=
d
;
}
}
/// Set \ref parametric
_
= param
/// Set \ref parametric = param
inline
void
setParametric
(
bool
param
)
inline
void
setParametric
(
bool
param
)
{
{
parametric
_
=
param
;
parametric
=
param
;
}
}
/// Set \ref refinementPath
/// Set \ref refinementPath
...
@@ -481,11 +481,11 @@ namespace AMDiS {
...
@@ -481,11 +481,11 @@ namespace AMDiS {
FixVec
<
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
,
NEIGH
>
neighbourCoord_
;
FixVec
<
FixVec
<
WorldVector
<
double
>
,
VERTEX
>
,
NEIGH
>
neighbourCoord_
;
/** \brief
/** \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
* Otherwise it is the local index of the neighbour's vertex opposite the
* common edge/face.
* common edge/face.
*/
*/
FixVec
<
unsigned
char
,
NEIGH
>
oppVertex
_
;
FixVec
<
unsigned
char
,
NEIGH
>
oppVertex
;
/// Elements determinant.
/// Elements determinant.
double
det_
;
double
det_
;
...
@@ -494,7 +494,7 @@ namespace AMDiS {
...
@@ -494,7 +494,7 @@ namespace AMDiS {
DimVec
<
WorldVector
<
double
>
>
grdLambda
;
DimVec
<
WorldVector
<
double
>
>
grdLambda
;
/// True, if this elInfo stores parametrized information. False, otherwise.
/// True, if this elInfo stores parametrized information. False, otherwise.
bool
parametric
_
;
bool
parametric
;
/// Stores the world dimension.
/// Stores the world dimension.
int
dimOfWorld
;
int
dimOfWorld
;
...
...
AMDiS/src/ElInfo1d.cc
View file @
08f87122
...
@@ -95,7 +95,7 @@ namespace AMDiS {
...
@@ -95,7 +95,7 @@ namespace AMDiS {
}
}
}
}
neighbour_
[
i
]
=
nb
;
neighbour_
[
i
]
=
nb
;
oppVertex
_
[
i
]
=
nb
?
i
:
-
1
;
oppVertex
[
i
]
=
nb
?
i
:
-
1
;
}
}
}
}
...
@@ -240,11 +240,10 @@ namespace AMDiS {
...
@@ -240,11 +240,10 @@ namespace AMDiS {
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
())
{
if
(
elem
->
isNewCoordSet
())
coord_
[
1
-
ichild
]
=
*
(
elem
->
getNewCoord
());
coord_
[
1
-
ichild
]
=
*
(
elem
->
getNewCoord
());
}
else
{
else
coord_
[
1
-
ichild
]
=
((
*
old_coord
)[
0
]
+
(
*
old_coord
)[
1
])
*
0.5
;
coord_
[
1
-
ichild
]
=
((
*
old_coord
)[
0
]
+
(
*
old_coord
)[
1
])
*
0.5
;
}
}
}
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_NEIGH
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_NEIGH
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
...
@@ -255,36 +254,32 @@ namespace AMDiS {
...
@@ -255,36 +254,32 @@ namespace AMDiS {
for
(
int
i
=
0
;
i
<
neighbours
;
i
++
)
{
for
(
int
i
=
0
;
i
<
neighbours
;
i
++
)
{
if
(
i
!=
ichild
)
{
if
(
i
!=
ichild
)
{
nb
=
const_cast
<
Element
*>
(
elem
->
getChild
(
1
-
ichild
));
nb
=
const_cast
<
Element
*>
(
elem
->
getChild
(
1
-
ichild
));
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
oppC
=
elInfoOld
->
coord_
[
i
];
oppC
=
elInfoOld
->
coord_
[
i
];
}
}
else
{
}
else
{
nb
=
const_cast
<
Element
*>
(
elInfoOld
->
getNeighbour
(
i
));
nb
=
const_cast
<
Element
*>
(
elInfoOld
->
getNeighbour
(
i
));
if
(
nb
&&
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
nb
&&
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
oppC
=
elInfoOld
->
oppCoord_
[
i
];
oppC
=
elInfoOld
->
oppCoord_
[
i
];
}
}
}
if
(
nb
)
{
if
(
nb
)
{
while
(
nb
->
getChild
(
0
))
{
// make nb nearest element
while
(
nb
->
getChild
(
0
))
{
// make nb nearest element
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
nb
->
isNewCoordSet
())
{
if
(
nb
->
isNewCoordSet
())
oppC
=
*
(
nb
->
getNewCoord
());
oppC
=
*
(
nb
->
getNewCoord
());
}
else
{
else
oppC
=
(
coord_
[
i
]
+
oppC
)
*
0.5
;
oppC
=
(
coord_
[
i
]
+
oppC
)
*
0.5
;
}
}
}
nb
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
-
i
));
nb
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
-
i
));
}
}
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
{
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_OPP_COORDS
))
oppCoord_
[
i
]
=
oppC
;
oppCoord_
[
i
]
=
oppC
;
}
}
}
neighbour_
[
i
]
=
nb
;
neighbour_
[
i
]
=
nb
;
oppVertex
_
[
i
]
=
nb
?
i
:
-
1
;
oppVertex
[
i
]
=
nb
?
i
:
-
1
;
}
}
}
}
...
@@ -299,7 +294,8 @@ namespace AMDiS {
...
@@ -299,7 +294,8 @@ namespace AMDiS {
}
}
}
}
void
ElInfo1d
::
getSubElemCoordsMat
(
mtl
::
dense2D
<
double
>&
mat
,
int
basisFctsDegree
)
const
void
ElInfo1d
::
getSubElemCoordsMat
(
mtl
::
dense2D
<
double
>&
mat
,
int
basisFctsDegree
)
const
{
{
switch
(
basisFctsDegree
)
{
switch
(
basisFctsDegree
)
{
case
1
:
case
1
:
...
...
AMDiS/src/ElInfo2d.cc
View file @
08f87122
...
@@ -76,7 +76,7 @@ namespace AMDiS {
...
@@ -76,7 +76,7 @@ namespace AMDiS {
neighbour_
[
i
]
=
macroNeighbour
->
getElement
();
neighbour_
[
i
]
=
macroNeighbour
->
getElement
();
Element
*
nb
=
const_cast
<
Element
*>
(
neighbour_
[
i
]);
Element
*
nb
=
const_cast
<
Element
*>
(
neighbour_
[
i
]);
int
edgeNo
=
oppVertex
_
[
i
]
=
mel
->
getOppVertex
(
i
);
int
edgeNo
=
oppVertex
[
i
]
=
mel
->
getOppVertex
(
i
);
if
(
nb
->
getFirstChild
()
&&
edgeNo
!=
2
)
{
if
(
nb
->
getFirstChild
()
&&
edgeNo
!=
2
)
{
...
@@ -127,7 +127,7 @@ namespace AMDiS {
...
@@ -127,7 +127,7 @@ namespace AMDiS {
// In both cases the opp vertex number is 2, as one can see in the
// In both cases the opp vertex number is 2, as one can see in the
// pictures above.
// pictures above.
oppVertex
_
[
i
]
=
2
;
oppVertex
[
i
]
=
2
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
if
(
nb
->
isNewCoordSet
())
{
if
(
nb
->
isNewCoordSet
())
{
...
@@ -298,7 +298,7 @@ namespace AMDiS {
...
@@ -298,7 +298,7 @@ namespace AMDiS {
// cooresponding oppVertex.
// cooresponding oppVertex.
neighbour_
[
2
]
=
elInfoOld
->
neighbour_
[
1
];
neighbour_
[
2
]
=
elInfoOld
->
neighbour_
[
1
];
oppVertex
_
[
2
]
=
elInfoOld
->
oppVertex
_
[
1
];
oppVertex
[
2
]
=
elInfoOld
->
oppVertex
[
1
];
if
(
neighbour_
[
2
]
&&
fill_opp_coords
)
{
if
(
neighbour_
[
2
]
&&
fill_opp_coords
)
{
oppCoord_
[
2
]
=
elInfoOld
->
oppCoord_
[
1
];
oppCoord_
[
2
]
=
elInfoOld
->
oppCoord_
[
1
];
...
@@ -314,7 +314,7 @@ namespace AMDiS {
...
@@ -314,7 +314,7 @@ namespace AMDiS {
elem
->
getSecondChild
()
->
getFirstChild
())
{
elem
->
getSecondChild
()
->
getFirstChild
())
{
neighbour_
[
1
]
=
elem
->
getSecondChild
()
->
getSecondChild
();
neighbour_
[
1
]
=
elem
->
getSecondChild
()
->
getSecondChild
();
oppVertex
_
[
1
]
=
2
;
oppVertex
[
1
]
=
2
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
if
(
elem
->
getSecondChild
()
->
isNewCoordSet
())
{
if
(
elem
->
getSecondChild
()
->
isNewCoordSet
())
{
...
@@ -330,7 +330,7 @@ namespace AMDiS {
...
@@ -330,7 +330,7 @@ namespace AMDiS {
}
}
}
else
{
}
else
{
neighbour_
[
1
]
=
elem
->
getSecondChild
();
neighbour_
[
1
]
=
elem
->
getSecondChild
();
oppVertex
_
[
1
]
=
0
;
oppVertex
[
1
]
=
0
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
oppCoord_
[
1
]
=
elInfoOld
->
coord_
[
1
];
oppCoord_
[
1
]
=
elInfoOld
->
coord_
[
1
];
...
@@ -347,14 +347,14 @@ namespace AMDiS {
...
@@ -347,14 +347,14 @@ namespace AMDiS {
nb
=
elInfoOld
->
neighbour_
[
2
];
nb
=
elInfoOld
->
neighbour_
[
2
];
if
(
nb
)
{
if
(
nb
)
{
TEST
(
elInfoOld
->
oppVertex
_
[
2
]
==
2
)(
"invalid neighbour
\n
"
);
TEST
(
elInfoOld
->
oppVertex
[
2
]
==
2
)(
"invalid neighbour
\n
"
);
TEST_EXIT_DBG
(
nb
->
getFirstChild
())(
"missing first child?
\n
"
);
TEST_EXIT_DBG
(
nb
->
getFirstChild
())(
"missing first child?
\n
"
);
TEST_EXIT_DBG
(
nb
->
getSecondChild
())(
"missing second child?
\n
"
);
TEST_EXIT_DBG
(
nb
->
getSecondChild
())(
"missing second child?
\n
"
);
nb
=
nb
->
getSecondChild
();
nb
=
nb
->
getSecondChild
();
if
(
nb
->
getFirstChild
())
{
if
(
nb
->
getFirstChild
())
{
oppVertex
_
[
0
]
=
2
;
oppVertex
[
0
]
=
2
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
if
(
nb
->
isNewCoordSet
())
{
if
(
nb
->
isNewCoordSet
())
{
...
@@ -372,7 +372,7 @@ namespace AMDiS {
...
@@ -372,7 +372,7 @@ namespace AMDiS {
nb
=
nb
->
getFirstChild
();
nb
=
nb
->
getFirstChild
();
}
else
{
}
else
{
oppVertex
_
[
0
]
=
1
;
oppVertex
[
0
]
=
1
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
oppCoord_
[
0
]
=
elInfoOld
->
oppCoord_
[
2
];
oppCoord_
[
0
]
=
elInfoOld
->
oppCoord_
[
2
];
...
@@ -391,7 +391,7 @@ namespace AMDiS {
...
@@ -391,7 +391,7 @@ namespace AMDiS {
// cooresponding oppVertex.
// cooresponding oppVertex.
neighbour_
[
2
]
=
elInfoOld
->
neighbour_
[
0
];
neighbour_
[
2
]
=
elInfoOld
->
neighbour_
[
0
];
oppVertex
_
[
2
]
=
elInfoOld
->
oppVertex
_
[
0
];
oppVertex
[
2
]
=
elInfoOld
->
oppVertex
[
0
];
if
(
neighbour_
[
2
]
&&
fill_opp_coords
)
{
if
(
neighbour_
[
2
]
&&
fill_opp_coords
)
{
oppCoord_
[
2
]
=
elInfoOld
->
oppCoord_
[
0
];
oppCoord_
[
2
]
=
elInfoOld
->
oppCoord_
[
0
];
...
@@ -404,7 +404,7 @@ namespace AMDiS {
...
@@ -404,7 +404,7 @@ namespace AMDiS {
if
(
elem
->
getFirstChild
()
->
getFirstChild
())
{
if
(
elem
->
getFirstChild
()
->
getFirstChild
())
{
neighbour_
[
0
]
=
elem
->
getFirstChild
()
->
getFirstChild
();
neighbour_
[
0
]
=
elem
->
getFirstChild
()
->
getFirstChild
();
oppVertex
_
[
0
]
=
2
;
oppVertex
[
0
]
=
2
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
if
(
elem
->
getFirstChild
()
->
isNewCoordSet
())
{
if
(
elem
->
getFirstChild
()
->
isNewCoordSet
())
{
...
@@ -420,7 +420,7 @@ namespace AMDiS {
...
@@ -420,7 +420,7 @@ namespace AMDiS {
}
}
}
else
{
}
else
{
neighbour_
[
0
]
=
elem
->
getFirstChild
();
neighbour_
[
0
]
=
elem
->
getFirstChild
();
oppVertex
_
[
0
]
=
1
;
oppVertex
[
0
]
=
1
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
oppCoord_
[
0
]
=
elInfoOld
->
coord_
[
0
];
oppCoord_
[
0
]
=
elInfoOld
->
coord_
[
0
];
...
@@ -436,11 +436,11 @@ namespace AMDiS {
...
@@ -436,11 +436,11 @@ namespace AMDiS {
nb
=
elInfoOld
->
neighbour_
[
2
];
nb
=
elInfoOld
->
neighbour_
[
2
];
if
(
nb
)
{
if
(
nb
)
{
TEST
(
elInfoOld
->
oppVertex
_
[
2
]
==
2
)(
"invalid neighbour
\n
"
);
TEST
(
elInfoOld
->
oppVertex
[
2
]
==
2
)(
"invalid neighbour
\n
"
);
TEST
((
nb
=
nb
->
getFirstChild
()))(
"missing child?
\n
"
);
TEST
((
nb
=
nb
->
getFirstChild
()))(
"missing child?
\n
"
);
if
(
nb
->
getFirstChild
())
{
if
(
nb
->
getFirstChild
())
{
oppVertex
_
[
1
]
=
2
;
oppVertex
[
1
]
=
2
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
if
(
nb
->
isNewCoordSet
())
{
if
(
nb
->
isNewCoordSet
())
{
...
@@ -458,7 +458,7 @@ namespace AMDiS {
...
@@ -458,7 +458,7 @@ namespace AMDiS {
nb
=
nb
->
getSecondChild
();
nb
=
nb
->
getSecondChild
();
}
else
{
}
else
{
oppVertex
_
[
1
]
=
0
;
oppVertex
[
1
]
=
0
;
if
(
fill_opp_coords
)
{
if
(
fill_opp_coords
)
{
oppCoord_
[
1
]
=
elInfoOld
->
oppCoord_
[
2
];
oppCoord_
[
1
]
=
elInfoOld
->
oppCoord_
[
2
];
...
@@ -476,11 +476,10 @@ namespace AMDiS {
...
@@ -476,11 +476,10 @@ namespace AMDiS {
if
(
fill_flag
.
isSet
(
Mesh
::
FILL_BOUND
))
{
if
(
fill_flag
.
isSet
(
Mesh
::
FILL_BOUND
))
{
if
(
elInfoOld
->
getBoundary
(
2
))
{
if
(
elInfoOld
->
getBoundary
(
2
))
boundary_
[
5
]
=
elInfoOld
->
getBoundary
(
2
);
boundary_
[
5
]
=
elInfoOld
->
getBoundary
(
2
);
}
else
{
else
boundary_
[
5
]
=
INTERIOR
;
boundary_
[
5
]
=
INTERIOR
;
}
if
(
ichild
==
0
)
{
if
(
ichild
==
0
)
{
boundary_
[
3
]
=
elInfoOld
->
getBoundary
(
5
);
boundary_
[
3
]
=
elInfoOld
->
getBoundary
(
5
);
...
...
AMDiS/src/ElInfo3d.cc
View file @
08f87122
...
@@ -32,9 +32,8 @@ namespace AMDiS {
...
@@ -32,9 +32,8 @@ namespace AMDiS {
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_COORDS
)
||
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_COORDS
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
fillFlag_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
for
(
int
i
=
0
;
i
<
vertices
;
i
++
)
{
for
(
int
i
=
0
;
i
<
vertices
;
i
++
)
coord_
[
i
]
=
mel
->
coord
[
i
];
coord_
[
i
]
=
mel
->
coord
[
i
];
}
}
}
int
neighbours
=
mesh_
->
getGeo
(
NEIGH
);
int
neighbours
=
mesh_
->
getGeo
(
NEIGH
);
...
@@ -48,7 +47,7 @@ namespace AMDiS {
...
@@ -48,7 +47,7 @@ namespace AMDiS {
neighbour_
[
i
]
=
const_cast
<
Element
*>
(
mel
->
getNeighbour
(
i
)
->
getElement
());
neighbour_
[
i
]
=
const_cast
<
Element
*>
(
mel
->
getNeighbour
(
i
)
->
getElement
());
nb
=
const_cast
<
Element
*>
(
neighbour_
[
i
]);
nb
=
const_cast
<
Element
*>
(
neighbour_
[
i
]);
int
k
;
int
k
;
k
=
oppVertex
_
[
i
]
=
mel
->
getOppVertex
(
i
);
k
=
oppVertex
[
i
]
=
mel
->
getOppVertex
(
i
);
if
(
nb
->
getChild
(
0
)
&&
(
k
<
2
))
{
/*make nb nearest element.*/
if
(
nb
->
getChild
(
0
)
&&
(
k
<
2
))
{
/*make nb nearest element.*/
if
(
k
==
1
)
{
if
(
k
==
1
)
{
...
@@ -58,7 +57,7 @@ namespace AMDiS {
...
@@ -58,7 +57,7 @@ namespace AMDiS {
neighbour_
[
i
]
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
));
neighbour_
[
i
]
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
));
nb
=
const_cast
<
Element
*>
(
neighbour_
[
i
]);
nb
=
const_cast
<
Element
*>
(
neighbour_
[
i
]);
}
}
k
=
oppVertex
_
[
i
]
=
3
;
k
=
oppVertex
[
i
]
=
3
;
if
(
fill_opp_coords
.
isAnySet
())
{
if
(
fill_opp_coords
.
isAnySet
())
{
/* always edge between vertices 0 and 1 is bisected! */
/* always edge between vertices 0 and 1 is bisected! */
if
(
mnb
->
getElement
()
->
isNewCoordSet
())
if
(
mnb
->
getElement
()
->
isNewCoordSet
())
...
@@ -78,13 +77,11 @@ namespace AMDiS {
...
@@ -78,13 +77,11 @@ namespace AMDiS {
}
}
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_BOUND
))
{
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_BOUND
))
{
for
(
int
i
=
0
;
i
<
element_
->
getGeo
(
BOUNDARY
);
i
++
)
{
for
(
int
i
=
0
;
i
<
element_
->
getGeo
(
BOUNDARY
);
i
++
)
boundary_
[
i
]
=
mel
->
getBoundary
(
i
);
boundary_
[
i
]
=
mel
->
getBoundary
(
i
);
}
for
(
int
i
=
0
;
i
<
element_
->
getGeo
(
PROJECTION
);
i
++
)
for
(
int
i
=
0
;
i
<
element_
->
getGeo
(
PROJECTION
);
i
++
)
{
projection_
[
i
]
=
mel
->
getProjection
(
i
);
projection_
[
i
]
=
mel
->
getProjection
(
i
);
}
}
}
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_ORIENTATION
))
{
if
(
fillFlag_
.
isSet
(
Mesh
::
FILL_ORIENTATION
))
{
...
@@ -231,9 +228,8 @@ namespace AMDiS {
...
@@ -231,9 +228,8 @@ namespace AMDiS {
if
(
abs
(
det
)
<
DBL_TOL
)
{
if
(
abs
(
det
)
<
DBL_TOL
)
{
ERROR
(
"det = %le; abort
\n
"
,
det
);
ERROR
(
"det = %le; abort
\n
"
,
det
);
for
(
int
i
=
0
;
i
<=
dim
;
i
++
)
{
for
(
int
i
=
0
;
i
<=
dim
;
i
++
)
(
*
lambda
)[
i
]
=
1.0
/
dim
;
(
*
lambda
)[
i
]
=
1.0
/
dim
;
}
return
0
;
return
0
;
}
}
...
@@ -276,7 +272,7 @@ namespace AMDiS {
...
@@ -276,7 +272,7 @@ namespace AMDiS {
for
(
int
ineigh
=
0
;
ineigh
<
neighbours
;
ineigh
++
)
{
for
(
int
ineigh
=
0
;
ineigh
<
neighbours
;
ineigh
++
)
{
if
((
nb
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
neighbour_
[
ineigh
]))))
{
if
((
nb
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
neighbour_
[
ineigh
]))))
{
int
ov
=
oppVertex
_
[
ineigh
];
int
ov
=
oppVertex
[
ineigh
];
if
(
ov
<
2
&&
nb
->
getFirstChild
())
{
if
(
ov
<
2
&&
nb
->
getFirstChild
())
{
if
(
fill_opp_coords
!=
Flag
(
0
))
{
if
(
fill_opp_coords
!=
Flag
(
0
))
{
int
k
=
-
1
;
int
k
=
-
1
;
...
@@ -285,11 +281,9 @@ namespace AMDiS {
...
@@ -285,11 +281,9 @@ namespace AMDiS {
k
=
j
;
k
=
j
;
if
(
k
==
-
1
)
{
if
(
k
==
-
1
)
{
for
(
int
j
=
0
;
j
<
vertices
;
j
++
)
{
for
(
int
j
=
0
;
j
<
vertices
;
j
++
)
if
(
mesh_
->
associated
(
element_
->
getDOF
(
j
,
0
),
nb
->
getDOF
(
1
-
ov
,
0
)))
{
if
(
mesh_
->
associated
(
element_
->
getDOF
(
j
,
0
),
nb
->
getDOF
(
1
-
ov
,
0
)))
k
=
j
;
k
=
j
;
}
}
}
}
TEST_EXIT_DBG
(
k
>=
0
)(
"neighbour dof not found
\n
"
);
TEST_EXIT_DBG
(
k
>=
0
)(
"neighbour dof not found
\n
"
);
...
@@ -300,7 +294,7 @@ namespace AMDiS {
...
@@ -300,7 +294,7 @@ namespace AMDiS {
oppCoord_
[
ineigh
][
j
]
=
(
oppCoord_
[
ineigh
][
j
]
+
coord_
[
k
][
j
])
/
2
;
oppCoord_
[
ineigh
][
j
]
=
(
oppCoord_
[
ineigh
][
j
]
+
coord_
[
k
][
j
])
/
2
;
}
}
neighbour_
[
ineigh
]
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
nb
->
getChild
(
1
-
ov
)));
neighbour_
[
ineigh
]
=
dynamic_cast
<
Tetrahedron
*>
(
const_cast
<
Element
*>
(
nb
->
getChild
(
1
-
ov
)));
oppVertex
_
[
ineigh
]
=
3
;
oppVertex
[
ineigh
]
=
3
;
}
}
}
}
}
}
...
@@ -389,16 +383,14 @@ namespace AMDiS {
...
@@ -389,16 +383,14 @@ namespace AMDiS {
fillFlag_
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_DET
)
||
fillFlag_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
fillFlag_
.
isSet
(
Mesh
::
FILL_GRD_LAMBDA
))
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
3
;
i
++
)
{
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
{
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
coord_
[
i
][
j
]
=
elInfoOld
->
coord_
[
cv
[
i
]][
j
];
coord_
[
i
][
j
]
=
elInfoOld
->
coord_
[
cv
[
i
]][
j
];
}
}
}
if
(
el_old
->
getNewCoord
())
{
if
(
el_old
->
getNewCoord
())
{
coord_
[
3
]
=
*
(
el_old
->
getNewCoord
());
coord_
[
3
]
=
*
(
el_old
->
getNewCoord
());
}
else
{
}
else
{
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
{
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
coord_
[
3
][
j
]
=
(
elInfoOld
->
coord_
[
0
][
j
]
+
elInfoOld
->
coord_
[
1
][
j
])
/
2
;
coord_
[
3
][
j
]
=
(
elInfoOld
->
coord_
[
0
][
j
]
+
elInfoOld
->
coord_
[
1
][
j
])
/
2
;
}
}
}
}
}
...
@@ -423,21 +415,19 @@ namespace AMDiS {
...
@@ -423,21 +415,19 @@ namespace AMDiS {
oppCoord_
[
0
]
=
*
(
nb
->
getNewCoord
());
oppCoord_
[
0
]
=
*
(
nb
->
getNewCoord
());
}
else
{
}
else
{
int
k
=
cvg
[
ochild
][
1
];
int
k
=
cvg
[
ochild
][
1
];
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
{
for
(
int
j
=
0
;
j
<
dimOfWorld
;
j
++
)
oppCoord_
[
0
][
j
]
=
(
elInfoOld
->
coord_
[
ochild
][
j
]
+
elInfoOld
->
coord_
[
k
][
j
])
/
2
;
oppCoord_
[
0
][
j
]
=
(
elInfoOld
->
coord_
[
ochild
][
j
]
+
elInfoOld
->
coord_
[
k
][
j
])
/
2
;
}
}
}
}
}
(
*
neigh_local
)[
0
]
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
));
(
*
neigh_local
)[
0
]
=
const_cast
<
Element
*>
(
nb
->
getChild
(
1
));
oppVertex
_
[
0
]
=
3
;
oppVertex
[
0
]
=
3
;
<