Skip to content
GitLab
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
f9b3cffd
Commit
f9b3cffd
authored
Mar 17, 2011
by
Thomas Witkowski
Browse files
And moved Reinit library to src and updated makefiles.
parent
1829f405
Changes
33
Hide whitespace changes
Inline
Side-by-side
AMDiS/
R
einit/
src/
ElementUpdate_3d.cc
→
AMDiS/
src/r
einit/ElementUpdate_3d.cc
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
ElementUpdate_3d.h
→
AMDiS/
src/r
einit/ElementUpdate_3d.h
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
HL_SignedDist.cc
→
AMDiS/
src/r
einit/HL_SignedDist.cc
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
HL_SignedDist.h
→
AMDiS/
src/r
einit/HL_SignedDist.h
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
HL_SignedDistBornemann.h
→
AMDiS/
src/r
einit/HL_SignedDistBornemann.h
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
HL_SignedDistTraverse.cc
→
AMDiS/
src/r
einit/HL_SignedDistTraverse.cc
View file @
f9b3cffd
...
...
@@ -26,7 +26,7 @@ void HL_SignedDistTraverse::initializeBoundary()
int
elStatus
;
const
int
nBasFcts
=
feSpace
->
getBasisFcts
()
->
getNumber
();
if
(
locInd
.
size
()
<
nBasFcts
)
if
(
static_cast
<
int
>
(
locInd
.
size
()
)
<
nBasFcts
)
locInd
.
resize
(
nBasFcts
);
ElInfo
*
elInfo
;
...
...
@@ -101,6 +101,7 @@ void HL_SignedDistTraverse::initializeBoundary()
}
// end of: mesh traverse
}
void
HL_SignedDistTraverse
::
HL_updateIteration
()
{
// ===== Create DOF vector for the last iteration step. =====
...
...
@@ -150,13 +151,14 @@ void HL_SignedDistTraverse::HL_updateIteration()
cout
<<
"
\t
number of iterations needed: "
<<
itCntr
<<
"
\n\n
"
;
}
void
HL_SignedDistTraverse
::
HL_elementUpdate
(
ElInfo
*
elInfo
)
{
FUNCNAME
(
"HL_SignedDistTraverse::HL_elementUpdate()"
);
// ===== Get global indices of vertices of element. =====
const
int
nBasFcts
=
feSpace
->
getBasisFcts
()
->
getNumber
();
if
(
locInd
.
size
()
<
nBasFcts
)
if
(
static_cast
<
int
>
(
locInd
.
size
()
)
<
nBasFcts
)
locInd
.
resize
(
nBasFcts
);
feSpace
->
getBasisFcts
()
->
getLocalIndices
(
...
...
@@ -195,6 +197,7 @@ void HL_SignedDistTraverse::HL_elementUpdate(ElInfo *elInfo)
}
}
double
HL_SignedDistTraverse
::
calcElementUpdate
(
ElInfo
*
elInfo
,
int
nXh
,
const
DegreeOfFreedom
*
locInd
)
...
...
@@ -241,6 +244,7 @@ double HL_SignedDistTraverse::calcElementUpdate(ElInfo *elInfo,
return
elUpdate
->
calcElementUpdate
(
elVert
,
uhVal
);
}
bool
HL_SignedDistTraverse
::
checkTol
()
{
DOFVector
<
double
>::
Iterator
it_sD
(
sD_DOF
,
USED_DOFS
);
...
...
AMDiS/
R
einit/
src/
HL_SignedDistTraverse.h
→
AMDiS/
src/r
einit/HL_SignedDistTraverse.h
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
NormEps.cc
→
AMDiS/
src/r
einit/NormEps.cc
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
NormEps.h
→
AMDiS/
src/r
einit/NormEps.h
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
VelocityExt.cc
→
AMDiS/
src/r
einit/VelocityExt.cc
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
VelocityExt.h
→
AMDiS/
src/r
einit/VelocityExt.h
View file @
f9b3cffd
...
...
@@ -50,7 +50,7 @@ public:
{
FUNCNAME
(
"VelocityExt::printVelDOF()"
);
TEST_EXIT
(
i
<
velDOF
.
size
())(
"
i
llegal index
!
\n
"
);
TEST_EXIT
(
i
<
static_cast
<
int
>
(
velDOF
.
size
())
)
(
"
I
llegal index!
\n
"
);
FileWriter
*
fileWriter
=
new
FileWriter
(
"VelocityExt->velocity output"
,
...
...
@@ -66,7 +66,7 @@ public:
{
FUNCNAME
(
"VelocityExt::printOrigVelDOF()"
);
TEST_EXIT
(
i
<
origVelDOF
.
size
())(
"
i
llegal index
!
\n
"
);
TEST_EXIT
(
i
<
static_cast
<
int
>
(
origVelDOF
.
size
())
)
(
"
I
llegal index!
\n
"
);
FileWriter
*
fileWriter
=
new
FileWriter
(
"VelocityExt->interface velocity output"
,
...
...
@@ -75,11 +75,9 @@ public:
fileWriter
->
writeFiles
(
adaptInfo
,
false
);
delete
fileWriter
;
}
;
}
/**
* Set velocity (one velocity vector).
*/
/// Set velocity (one velocity vector).
void
setVelocity
(
DOFVector
<
double
>
*
origVelDOF_
,
DOFVector
<
double
>
*
velDOF_
)
{
...
...
@@ -97,11 +95,9 @@ public:
origVelDOF
.
push_back
(
origVelDOF_
);
velDOF
.
push_back
(
velDOF_
);
}
;
}
/**
* Set velocity (multiple velocity vectors).
*/
/// Set velocity (multiple velocity vectors).
void
setVelocity
(
std
::
vector
<
DOFVector
<
double
>
*>
&
origVelDOF_
,
std
::
vector
<
DOFVector
<
double
>
*>
&
velDOF_
)
{
...
...
@@ -109,8 +105,8 @@ public:
nVelDOFs
=
origVelDOF_
.
size
();
TEST_EXIT
(
nVelDOFs
>
0
)(
"
i
llegal number of velocity vectors
!
\n
"
);
TEST_EXIT
(
nVelDOFs
==
velDOF_
.
size
())(
"
d
ifferent sizes
!
\n
"
);
TEST_EXIT
(
nVelDOFs
>
0
)(
"
I
llegal number of velocity vectors!
\n
"
);
TEST_EXIT
(
nVelDOFs
==
static_cast
<
int
>
(
velDOF_
.
size
())
)
(
"
D
ifferent sizes!
\n
"
);
for
(
int
i
=
0
;
i
<
nVelDOFs
;
++
i
)
{
TEST_EXIT
(
origVelDOF_
[
i
])(
"illegal velocity vector origVelDOF !
\n
"
);
...
...
@@ -146,18 +142,27 @@ public:
* indexV is the index of the vertex(with respect to the numeration on the element),
* for that the coordinates shall be stored.
*/
void
setBarycentricCoords_2D_boundary
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
,
const
int
indexV
);
void
setBarycentricCoords_2D_boundary
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
,
const
int
indexV
);
/**
* Sets barycentric coordinates for 2D for a vertex on a non-boundary element.
* l_0. l_1, l_2 are the coordinates.
*/
void
setBarycentricCoords_2D
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
);
void
setBarycentricCoords_2D
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
);
/**
* Calculates the barycentric coordinates for 2D for a vertex on a non-boundary element.
* Calculates the barycentric coordinates for 2D for a vertex on a
* non-boundary element.
*/
void
calcBarycentricCoords_2D
(
const
double
&
c_delta
,
const
double
&
c_alpha
,
const
double
&
norm_zhminusyh
,
const
double
&
norm_xhminusyh
);
void
calcBarycentricCoords_2D
(
const
double
&
c_delta
,
const
double
&
c_alpha
,
const
double
&
norm_zhminusyh
,
const
double
&
norm_xhminusyh
);
/**
* Sets barycentric coordinates for 3D for a vertex on a boundary element
...
...
@@ -166,24 +171,33 @@ public:
* indexV is the index of the vertex(with respect to the numeration on the element),
* for that the coordinates shall be stored.
*/
void
setBarycentricCoords_3D_boundary
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
,
const
double
&
l_3
,
const
int
indexV
);
void
setBarycentricCoords_3D_boundary
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
,
const
double
&
l_3
,
const
int
indexV
);
/// Calculates the barycentric coordinates for 3D for a boundary vertex.
void
calcBarycentricCoords_3D_boundary
(
const
DimVec
<
double
>
sp1
,
const
DimVec
<
double
>
sp2
,
const
double
lambda
,
int
i
);
/**
* Calculates the barycentric coordinates for 3D for a boundary vertex.
* Expands 3 coordinates from a face update to 4 coordinates and stores them in
* lamVec[index]. vertNum is the index of the element face the coordinates
* belong to (0, 1 or 2).
*/
void
c
alcBarycentricCoords_3D_boundary
(
const
DimVec
<
double
>
sp1
,
const
DimVec
<
double
>
sp2
,
const
double
lambda
,
int
i
);
void
c
opyAndExpandFaceCoords_3D
(
int
vertNum
,
int
i
ndex
);
/**
* Expands 3 coordinates from a face update to 4 coordinates and stores them in lamVec[index].
* vertNum is the index of the element face the coordinates belong to(0,1,or 2).
*/
void
copyAndExpandFaceCoords_3D
(
int
vertNum
,
int
index
);
/**
* Sets barycentric coordinates for 3D for a vertex on a non-boundary element.
* l_0, l_1, l-2, l_3 are the coordinates.
*/
void
setBarycentricCoords_3D
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
,
const
double
&
l_3
);
void
setBarycentricCoords_3D
(
const
double
&
l_0
,
const
double
&
l_1
,
const
double
&
l_2
,
const
double
&
l_3
);
/**
* Stores the index of element face with the shortest distance to the interface so far.
...
...
@@ -201,45 +215,29 @@ public:
*/
void
setPermutation
(
int
vertNum
,
int
mTrav
);
/**
* Sets the permutation.
*/
/// Sets the permutation.
void
setPermutation
(
int
vertNum
);
/**
* Sets the permutation of the vertices in 2D.
*/
/// Sets the permutation of the vertices in 2D.
void
setPermutation_2D
(
int
i_0
,
int
i_1
,
int
i_2
);
/**
* Sets the permutation of the vertices in 3D.
*/
/// Sets the permutation of the vertices in 3D.
void
setPermutation_3D
(
int
i_0
,
int
i_1
,
int
i_2
,
int
i_3
);
/**
* Swaps two vertices in the permutation.
*/
/// Swaps two vertices in the permutation.
void
swapVertices
(
int
i1
,
int
i2
);
protected:
/**
* Original velocity vector.
*/
/// Original velocity vector.
std
::
vector
<
DOFVector
<
double
>
*>
origVelDOF
;
/**
* Dimension of mesh.
*/
/// Dimension of mesh.
int
dim
;
/**
* Dof vector with extended velocity.
*/
/// DOF vector with extended velocity.
std
::
vector
<
DOFVector
<
double
>
*>
velDOF
;
/**
* Number of velocity vectors to be extended.
*/
/// Number of velocity vectors to be extended.
int
nVelDOFs
;
/**
...
...
@@ -257,9 +255,7 @@ public:
*/
int
indexFace
;
/**
* List with the permutation of the vertices.
*/
/// List with the permutation of the vertices.
DimVec
<
int
>
permutation
;
};
...
...
AMDiS/
R
einit/
src/
VelocityExtFromVelocityField.cc
→
AMDiS/
src/r
einit/VelocityExtFromVelocityField.cc
View file @
f9b3cffd
File moved
AMDiS/
R
einit/
src/
VelocityExtFromVelocityField.h
→
AMDiS/
src/r
einit/VelocityExtFromVelocityField.h
View file @
f9b3cffd
File moved
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment