Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
Backofen, Rainer
amdis
Commits
7475e1b0
Commit
7475e1b0
authored
16 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
* Small bug fix in ElInfo2d.cc
parent
6640e0b5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AMDiS/src/ElInfo2d.cc
+0
-19
0 additions, 19 deletions
AMDiS/src/ElInfo2d.cc
AMDiS/src/VtkWriter.cc
+28
-42
28 additions, 42 deletions
AMDiS/src/VtkWriter.cc
AMDiS/src/VtkWriter.h
+14
-7
14 additions, 7 deletions
AMDiS/src/VtkWriter.h
with
42 additions
and
68 deletions
AMDiS/src/ElInfo2d.cc
+
0
−
19
View file @
7475e1b0
...
...
@@ -329,27 +329,8 @@ namespace AMDiS {
if
(
nb
->
getNewCoord
(
-
1
))
{
oppCoord_
[
1
]
=
*
(
nb
->
getNewCoord
());
}
else
{
WorldVector
<
double
>
d1
;
for
(
int
j
=
0
;
j
<
dow
;
j
++
)
d1
[
j
]
=
0.5
*
(
elinfo_old
->
oppCoord_
[
2
][
j
]
+
elinfo_old
->
coord_
[
1
][
j
]);
oppCoord_
[
1
].
setMidpoint
(
elinfo_old
->
neighbourCoord_
[
2
][
0
],
elinfo_old
->
neighbourCoord_
[
2
][
2
]);
if
(
!
(
d1
==
oppCoord_
[
1
]))
{
if
((
elinfo_old
->
coord_
[
0
][
0
]
==
0.0
)
||
(
elinfo_old
->
coord_
[
1
][
0
]
==
0.0
)
||
(
elinfo_old
->
coord_
[
2
][
0
]
==
0.0
)
||
(
elinfo_old
->
coord_
[
0
][
0
]
==
80.0
)
||
(
elinfo_old
->
coord_
[
1
][
0
]
==
80.0
)
||
(
elinfo_old
->
coord_
[
2
][
0
]
==
80.0
))
{
}
else
{
ERROR_EXIT
(
"ja 4
\n
"
);
}
}
}
neighbourCoord_
[
1
][
0
]
=
elinfo_old
->
neighbourCoord_
[
2
][
0
];
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/VtkWriter.cc
+
28
−
42
View file @
7475e1b0
...
...
@@ -17,12 +17,13 @@ namespace AMDiS {
int
nVertices
=
(
*
dc_
)[
0
]
->
getNumberVertices
();
int
nElements
=
(
*
dc_
)[
0
]
->
getNumberElements
();
int
vertices
=
(
*
dc_
)[
0
]
->
getMesh
()
->
getGeo
(
VERTEX
);
int
degree
=
(
*
dc_
)[
0
]
->
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
int
dim
=
(
*
dc_
)[
0
]
->
getMesh
()
->
getDim
();
if
((
dim
==
2
)
&&
(
degree
==
2
))
{
if
((
dim
_
==
2
)
&&
(
degree
_
==
2
))
{
nVertices
+=
(
*
dc_
)[
0
]
->
getNumberInterpPoints
();
nElements
*=
4
;
}
else
if
((
dim_
==
2
)
&&
(
degree_
==
3
))
{
nVertices
+=
(
*
dc_
)[
0
]
->
getNumberInterpPoints
();
nElements
*=
9
;
}
::
std
::
ofstream
file
;
...
...
@@ -36,11 +37,7 @@ namespace AMDiS {
file
<<
" <Points>"
<<
::
std
::
endl
;
file
<<
" <DataArray type=
\"
Float32
\"
NumberOfComponents=
\"
3
\"
format=
\"
ascii
\"
>"
<<
::
std
::
endl
;
if
((
dim
==
2
)
&&
(
degree
==
2
))
{
writeVertexCoords_dim2_degree2
(
file
);
}
else
{
writeVertexCoords
(
file
);
}
writeVertexCoords
(
file
);
file
<<
" </DataArray>"
<<
::
std
::
endl
;
file
<<
" </Points>"
<<
::
std
::
endl
;
...
...
@@ -73,7 +70,7 @@ namespace AMDiS {
file
<<
" </DataArray>"
<<
::
std
::
endl
;
file
<<
" <DataArray type=
\"
Int32
\"
Name=
\"
connectivity
\"
>"
<<
::
std
::
endl
;
if
((
dim
==
2
)
&&
(
degree
==
2
))
{
if
((
dim
_
==
2
)
&&
(
degree
_
==
2
))
{
writeConnectivity_dim2_degree2
(
file
);
}
else
{
writeConnectivity
(
file
);
...
...
@@ -87,7 +84,7 @@ namespace AMDiS {
file
<<
" <DataArray type=
\"
Float32
\"
Name=
\"
value"
<<
i
<<
"
\"
format=
\"
ascii
\"
>"
<<
::
std
::
endl
;
if
((
dim
==
2
)
&&
(
degree
==
2
))
{
if
((
dim
_
==
2
)
&&
(
degree
_
==
2
))
{
writeVertexValues_dim2_degree2
(
file
,
i
);
}
else
{
writeVertexValues
(
file
,
i
);
...
...
@@ -110,7 +107,6 @@ namespace AMDiS {
void
VtkWriter
::
writeVertexCoords
(
::
std
::
ofstream
&
file
)
{
DOFVector
<
::
std
::
list
<
VertexInfo
>
>
*
vertexInfos
=
(
*
dc_
)[
0
]
->
getVertexInfos
();
DOFVector
<
::
std
::
list
<
VertexInfo
>
>::
Iterator
it
(
vertexInfos
,
USED_DOFS
);
int
counter
=
0
;
...
...
@@ -123,20 +119,16 @@ namespace AMDiS {
writeCoord
(
file
,
it2
->
coords
);
}
}
}
void
VtkWriter
::
writeVertexCoords_dim2_degree2
(
::
std
::
ofstream
&
file
)
{
writeVertexCoords
(
file
);
DOFVector
<
::
std
::
list
<
WorldVector
<
double
>
>
>
*
interpPointCoords
=
(
*
dc_
)[
0
]
->
getInterpPointCoords
();
DOFVector
<
::
std
::
list
<
WorldVector
<
double
>
>
>::
Iterator
it
(
interpPointCoords
,
USED_DOFS
);
for
(
it
.
reset
();
!
it
.
end
();
++
it
)
{
::
std
::
list
<
WorldVector
<
double
>
>::
iterator
it2
;
for
(
it2
=
it
->
begin
();
it2
!=
it
->
end
();
++
it2
)
{
writeCoord
(
file
,
*
it2
);
if
((
dim_
==
2
)
&&
(
degree_
>
1
))
{
DOFVector
<
::
std
::
list
<
WorldVector
<
double
>
>
>
*
interpPointCoords
=
(
*
dc_
)[
0
]
->
getInterpPointCoords
();
DOFVector
<
::
std
::
list
<
WorldVector
<
double
>
>
>::
Iterator
pointIt
(
interpPointCoords
,
USED_DOFS
);
for
(
pointIt
.
reset
();
!
pointIt
.
end
();
++
pointIt
)
{
::
std
::
list
<
WorldVector
<
double
>
>::
iterator
it2
;
for
(
it2
=
pointIt
->
begin
();
it2
!=
pointIt
->
end
();
++
it2
)
{
writeCoord
(
file
,
*
it2
);
}
}
}
}
...
...
@@ -162,25 +154,19 @@ namespace AMDiS {
}
}
}
}
void
VtkWriter
::
writeVertexValues_dim2_degree2
(
::
std
::
ofstream
&
file
,
int
componentNo
)
{
writeVertexValues
(
file
,
componentNo
);
DOFVector
<
int
>::
Iterator
intPointIt
((
*
dc_
)[
componentNo
]
->
getInterpPointInd
(),
USED_DOFS
);
DOFVector
<
double
>::
Iterator
valueIt
((
*
dc_
)[
componentNo
]
->
getValues
(),
USED_DOFS
);
DOFVector
<
::
std
::
list
<
WorldVector
<
double
>
>
>::
Iterator
coordIt
((
*
dc_
)[
componentNo
]
->
getInterpPointCoords
(),
USED_DOFS
);
for
(
intPointIt
.
reset
(),
valueIt
.
reset
(),
coordIt
.
reset
();
!
intPointIt
.
end
();
++
intPointIt
,
++
valueIt
,
++
coordIt
)
{
if
(
*
intPointIt
>=
0
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
coordIt
->
size
());
i
++
)
{
file
<<
" "
<<
(
fabs
(
*
valueIt
)
<
1e-40
?
0.0
:
*
valueIt
)
<<
::
std
::
endl
;
if
((
dim_
==
2
)
&&
(
degree_
>
1
))
{
DOFVector
<
::
std
::
list
<
WorldVector
<
double
>
>
>::
Iterator
interpCoordIt
((
*
dc_
)[
componentNo
]
->
getInterpPointCoords
(),
USED_DOFS
);
for
(
intPointIt
.
reset
(),
valueIt
.
reset
(),
interpCoordIt
.
reset
();
!
intPointIt
.
end
();
++
intPointIt
,
++
valueIt
,
++
interpCoordIt
)
{
if
(
*
intPointIt
>=
0
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
interpCoordIt
->
size
());
i
++
)
{
file
<<
" "
<<
(
fabs
(
*
valueIt
)
<
1e-40
?
0.0
:
*
valueIt
)
<<
::
std
::
endl
;
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/VtkWriter.h
+
14
−
7
View file @
7475e1b0
...
...
@@ -24,6 +24,7 @@
#include
<fstream>
#include
"BasisFunction.h"
#include
"DataCollector.h"
namespace
AMDiS
{
...
...
@@ -38,6 +39,8 @@ namespace AMDiS {
level_
(
level
),
traverseFlag_
(
traverseFlag
)
{
degree_
=
(
*
dc_
)[
0
]
->
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
dim_
=
(
*
dc_
)[
0
]
->
getMesh
()
->
getDim
();
};
...
...
@@ -60,12 +63,6 @@ namespace AMDiS {
void
writeVertexCoords
(
::
std
::
ofstream
&
file
);
/** \brief
*
*/
void
writeVertexCoords_dim2_degree2
(
::
std
::
ofstream
&
file
);
/** \brief
*
*/
...
...
@@ -120,7 +117,17 @@ namespace AMDiS {
*/
Flag
traverseFlag_
;
/** \brief
*
*/
int
degree_
;
/** \brief
*
*/
int
dim_
;
};
}
...
...
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