Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
50a0e255
Commit
50a0e255
authored
May 12, 2014
by
Siqi Ling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add one line comment and change the variable name in detail::arh2writer
parent
2497a645
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
9 deletions
+10
-9
AMDiS/src/io/detail/Arh2Writer.cc
AMDiS/src/io/detail/Arh2Writer.cc
+8
-8
AMDiS/src/io/detail/Arh2Writer.h
AMDiS/src/io/detail/Arh2Writer.h
+2
-1
No files found.
AMDiS/src/io/detail/Arh2Writer.cc
View file @
50a0e255
...
...
@@ -238,7 +238,7 @@ namespace AMDiS { namespace io {
map
<
const
FiniteElemSpace
*
,
vector
<
int
>
>
sortedFeSpaces
;
map
<
const
FiniteElemSpace
*
,
vector
<
int
>
>::
iterator
feSpaceIt
;
vector
<
int
>
macro
sPosVec
;
vector
<
int
>
macro
BlockSize
;
DegreeOfFreedom
globalDof
;
size_t
i
=
0
,
j
=
0
;
...
...
@@ -263,7 +263,7 @@ namespace AMDiS { namespace io {
if
(
elInfo
->
getLevel
()
==
0
)
{
if
(
macroElIndex
!=
-
1
)
{
elementStructure
.
commit
();
macro
sPosVec
.
push_back
(
writeMacroElement
(
file
,
elementStructure
,
values
,
sortedFeSpaces
));
macro
BlockSize
.
push_back
(
writeMacroElement
(
file
,
elementStructure
,
values
,
sortedFeSpaces
));
}
elementStructure
.
clear
();
...
...
@@ -371,23 +371,23 @@ namespace AMDiS { namespace io {
// And write the last macro element to file.
TEST_EXIT_DBG
(
macroElIndex
!=
-
1
)(
"Should not happen!
\n
"
);
elementStructure
.
commit
();
macro
sPosVec
.
push_back
(
writeMacroElement
(
file
,
elementStructure
,
values
,
sortedFeSpaces
));
TEST_EXIT
(
macro
sPosVec
.
size
()
==
(
unsigned
)
mesh
->
getNumberOfMacros
())(
"Should not happen.
\n
"
);
macro
BlockSize
.
push_back
(
writeMacroElement
(
file
,
elementStructure
,
values
,
sortedFeSpaces
));
TEST_EXIT
(
macro
BlockSize
.
size
()
==
(
unsigned
)
mesh
->
getNumberOfMacros
())(
"Should not happen.
\n
"
);
//reset the macro positions in file
setMacrosPos
(
file
,
macro
sPosVec
);
setMacrosPos
(
file
,
macro
BlockSize
);
file
.
close
();
MSG
(
"ARH file written to: %s
\n
"
,
filename
.
c_str
());
}
void
setMacrosPos
(
ofstream
&
file
,
vector
<
int
>&
macro
sPosVec
)
vector
<
int
>&
macro
BlockSize
)
{
file
.
seekp
(
34
);
for
(
size_t
i
=
0
;
i
<
macro
sPosVec
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
macro
BlockSize
.
size
();
i
++
)
{
long
pos
=
file
.
tellp
();
file
.
seekp
(
pos
+
4
);
file
.
write
(
reinterpret_cast
<
char
*>
(
&
macro
sPosVec
[
i
]),
4
);
file
.
write
(
reinterpret_cast
<
char
*>
(
&
macro
BlockSize
[
i
]),
4
);
}
}
...
...
AMDiS/src/io/detail/Arh2Writer.h
View file @
50a0e255
...
...
@@ -20,7 +20,7 @@ namespace AMDiS { namespace io {
DOFVector
<
double
>*
vec2
=
nullptr
,
bool
writeParallel
=
true
);
/*
/*
*
* \ingroup Output
*
* \brief
...
...
@@ -49,6 +49,7 @@ namespace AMDiS { namespace io {
std
::
vector
<
DOFVector
<
double
>*>
vecs
,
bool
writeParallel
);
///\return the size of the macro block in file
int
writeMacroElement
(
std
::
ofstream
&
file
,
MeshStructure
&
code
,
std
::
vector
<
std
::
vector
<
double
>
>&
values
,
...
...
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