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
ffc67701
Commit
ffc67701
authored
Jun 26, 2008
by
Thomas Witkowski
Browse files
* this and that
parent
80f5f335
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AdaptInstationary.cc
View file @
ffc67701
...
...
@@ -205,7 +205,7 @@ namespace AMDiS {
problemTime_
->
initTimestep
(
adaptInfo_
);
/*
#ifdef _OPENMP
#ifdef _OPENMP
#pragma omp parallel sections
{
#pragma omp section
...
...
@@ -214,11 +214,10 @@ namespace AMDiS {
#pragma omp section
oneTimestep
();
}
#else
*/
// problemTime_->startDelayedTimestepCalculation();
#else
problemTime_
->
startDelayedTimestepCalculation
();
oneTimestep
();
//
#endif
#endif
problemTime_
->
closeTimestep
(
adaptInfo_
);
...
...
AMDiS/src/DataCollector.cc
View file @
ffc67701
...
...
@@ -58,21 +58,17 @@ namespace AMDiS {
void
DataCollector
::
fillAllData
()
{
::
std
::
cout
<<
"START1"
<<
::
std
::
endl
;
if
(
!
elementDataCollected_
)
{
startCollectingElementData
();
}
::
std
::
cout
<<
"START2"
<<
::
std
::
endl
;
if
(
!
periodicDataCollected_
)
{
startCollectingPeriodicData
();
}
::
std
::
cout
<<
"START3"
<<
::
std
::
endl
;
if
(
!
valueDataCollected_
)
{
startCollectingValueData
();
}
::
std
::
cout
<<
"START4"
<<
::
std
::
endl
;
}
int
DataCollector
::
startCollectingElementData
()
...
...
@@ -122,6 +118,10 @@ namespace AMDiS {
interpPoints_
.
clear
();
basisFcts_
=
const_cast
<
BasisFunction
*>
(
feSpace_
->
getBasisFcts
());
nBasisFcts_
=
basisFcts_
->
getNumber
();
localDOFs_
=
GET_MEMORY
(
DegreeOfFreedom
,
basisFcts_
->
getNumber
());
TraverseStack
stack
;
// Traverse elements to add value information and to mark
...
...
@@ -131,10 +131,10 @@ namespace AMDiS {
traverseFlag_
|
Mesh
::
FILL_COORDS
);
while
(
elInfo
)
{
if
(
!
writeElem_
||
writeElem_
(
elInfo
))
addValueData
(
elInfo
);
addValueData
(
elInfo
);
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
// Remove all interpolation marks and, instead, set to each
// interpolation point its continous index starting from 0.
int
i
=
0
;
...
...
@@ -152,8 +152,9 @@ namespace AMDiS {
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
FREE_MEMORY
(
localDOFs_
,
DegreeOfFreedom
,
feSpace_
->
getBasisFcts
()
->
getNumber
());
valueDataCollected_
=
true
;
return
(
0
);
}
...
...
@@ -287,29 +288,29 @@ namespace AMDiS {
{
FUNCNAME
(
"DataCollector::addValueData()"
);
const
BasisFunction
*
basisFcts
=
feSpace_
->
getBasisFcts
();
const
DegreeOfFreedom
*
localDOFs
=
basisFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
localAdmin_
,
NULL
);
const
int
nBasisFcts
=
basisFcts
->
getNumber
();
basisFcts_
->
getLocalIndices
(
elInfo
->
getElement
(),
localAdmin_
,
localDOFs_
);
WorldVector
<
double
>
vertexCoords
;
// First, traverse all DOFs at the vertices of the element, determine
// their coordinates and add them to the corresponding entry in dofCoords_.
// their coordinates and add them to the corresponding entry in dofCoords_.
for
(
int
i
=
0
;
i
<
mesh_
->
getGeo
(
VERTEX
);
i
++
)
{
(
*
interpPointInd_
)[
localDOFs
[
i
]]
=
-
2
;
// mark as vertex
DegreeOfFreedom
dofi
=
localDOFs_
[
i
];
(
*
interpPointInd_
)[
dofi
]
=
-
2
;
// mark as vertex
// get coords of this vertex
WorldVector
<
double
>
vertexCoords
=
elInfo
->
getCoord
(
i
);
vertexCoords
=
elInfo
->
getCoord
(
i
);
// search for coords at this dof
::
std
::
list
<
WorldVector
<
double
>
>::
iterator
it
=
find
((
*
dofCoords_
)[
localDOFs
[
i
]
].
begin
(),
(
*
dofCoords_
)[
localDOFs
[
i
]
].
end
(),
find
((
*
dofCoords_
)[
dofi
].
begin
(),
(
*
dofCoords_
)[
dofi
].
end
(),
vertexCoords
);
// coords not yet in list?
if
(
it
==
(
*
dofCoords_
)[
localDOFs
[
i
]
].
end
())
{
if
(
it
==
(
*
dofCoords_
)[
dofi
].
end
())
{
// add new coords to list
(
*
dofCoords_
)[
localDOFs
[
i
]
].
push_back
(
vertexCoords
);
(
*
dofCoords_
)[
dofi
].
push_back
(
vertexCoords
);
}
}
...
...
@@ -318,29 +319,29 @@ namespace AMDiS {
// Then, traverse all interpolation DOFs of the element, determine
// their coordinates and add them to the corresponding entry in
// interpPointCoords_.
for
(
int
i
=
mesh_
->
getGeo
(
VERTEX
);
i
<
nBasisFcts_
;
i
++
)
{
DegreeOfFreedom
dofi
=
localDOFs_
[
i
];
for
(
int
i
=
mesh_
->
getGeo
(
VERTEX
);
i
<
nBasisFcts
;
i
++
)
{
WorldVector
<
double
>
interpolCoords
;
elInfo
->
coordToWorld
(
*
basisFcts
->
getCoords
(
i
),
&
interpolCoords
);
elInfo
->
coordToWorld
(
*
basisFcts_
->
getCoords
(
i
),
&
vertexCoords
);
if
((
*
interpPointInd_
)[
localDOFs
[
i
]
]
==
-
1
)
{
if
((
*
interpPointInd_
)[
dofi
]
==
-
1
)
{
// mark as interpolation point
(
*
interpPointInd_
)[
localDOFs
[
i
]
]
=
-
3
;
(
*
interpPointInd_
)[
dofi
]
=
-
3
;
// search for interpolation point coordinates, and insert them to the
// dof-entry, if not contained in the list
::
std
::
list
<
WorldVector
<
double
>
>::
iterator
it
=
find
((
*
interpPointCoords_
)[
localDOFs
[
i
]
].
begin
(),
(
*
interpPointCoords_
)[
localDOFs
[
i
]
].
end
(),
interpol
Coords
);
find
((
*
interpPointCoords_
)[
dofi
].
begin
(),
(
*
interpPointCoords_
)[
dofi
].
end
(),
vertex
Coords
);
if
(
it
==
(
*
interpPointCoords_
)[
localDOFs
[
i
]
].
end
())
{
(
*
interpPointCoords_
)[
localDOFs
[
i
]
]
.
push_back
(
interpol
Coords
);
if
(
it
==
(
*
interpPointCoords_
)[
dofi
].
end
())
{
(
*
interpPointCoords_
)[
dof
i
].
push_back
(
vertex
Coords
);
nInterpPoints_
++
;
}
}
}
return
(
0
);
}
...
...
@@ -348,15 +349,11 @@ namespace AMDiS {
{
FUNCNAME
(
"DataCollector::addInterpData()"
);
::
std
::
vector
<
int
>
elemInterpPoints
;
elemInterpPoints
.
clear
();
const
BasisFunction
*
basisFcts
=
feSpace_
->
getBasisFcts
();
const
DegreeOfFreedom
*
localDOFs
=
basisFcts
->
getLocalIndices
(
elInfo
->
getElement
(),
localAdmin_
,
NULL
);
const
int
nBasisFcts
=
basisFcts
->
getNumber
();
basisFcts_
->
getLocalIndices
(
elInfo
->
getElement
(),
localAdmin_
,
localDOFs_
);
for
(
int
i
=
mesh_
->
getGeo
(
VERTEX
);
i
<
nBasisFcts
;
i
++
)
{
elemInterpPoints
.
push_back
((
*
interpPointInd_
)[
localDOFs
[
i
]]);
::
std
::
vector
<
int
>
elemInterpPoints
(
nBasisFcts_
);
for
(
int
i
=
mesh_
->
getGeo
(
VERTEX
);
i
<
nBasisFcts_
;
i
++
)
{
elemInterpPoints
[
i
]
=
(
*
interpPointInd_
)[
localDOFs_
[
i
]];
}
interpPoints_
.
push_back
(
elemInterpPoints
);
...
...
AMDiS/src/DataCollector.h
View file @
ffc67701
...
...
@@ -300,6 +300,21 @@ namespace AMDiS {
* Pointer to a function which decides whether an element is considered.
*/
bool
(
*
writeElem_
)(
ElInfo
*
);
/** \brief
* Temporary variable used in functions addValueData() and addInterpData().
*/
DegreeOfFreedom
*
localDOFs_
;
/** \brief
* Temporary variable used in functions addValueData() and addInterpData().
*/
BasisFunction
*
basisFcts_
;
/** \brief
* Temporaru variable used in functions addValueData() and addInterpData().
*/
int
nBasisFcts_
;
};
}
...
...
AMDiS/src/FileWriter.cc
View file @
ffc67701
...
...
@@ -197,19 +197,14 @@ namespace AMDiS {
if
(
delayWriting_
)
{
::
std
::
cout
<<
"REIN!"
<<
::
std
::
endl
;
::
std
::
cout
.
flush
();
if
(
writeTecPlotFormat
||
writeAMDiSFormat
||
writePeriodicFormat
)
{
ERROR_EXIT
(
"Delay writing only supported for ParaView file format!
\n
"
);
}
::
std
::
cout
<<
"DC="
<<
dataCollectors_
.
size
()
<<
::
std
::
endl
;
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
dataCollectors_
.
size
());
i
++
)
{
dataCollectors_
[
i
]
->
fillAllData
();
}
::
std
::
cout
<<
"BIS HIERHIN!"
<<
::
std
::
endl
;
::
std
::
cout
.
flush
();
writingIsDelayed_
=
true
;
delayedFilename_
=
fn
;
return
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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