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
81146d61
Commit
81146d61
authored
Jan 31, 2014
by
Siqi Ling
Browse files
back to version 2855
parent
2a48e331
Changes
4
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/io/Arh2Reader.h
View file @
81146d61
...
...
@@ -24,7 +24,7 @@ namespace AMDiS { namespace io {
namespace
Arh2Reader
{
const
uint8_t
MAJOR
=
2
;
const
uint8_t
MINOR
=
1
;
const
uint8_t
MINOR
=
0
;
/**
* \brief Read MeshStructure, refine the mesh and read dof values to sysVec by order.
...
...
AMDiS/src/io/Arh2Writer.h
View file @
81146d61
...
...
@@ -16,7 +16,7 @@ namespace AMDiS { namespace io {
namespace
Arh2Writer
{
const
uint8_t
MAJOR
=
2
;
const
uint8_t
MINOR
=
1
;
const
uint8_t
MINOR
=
0
;
/**
* \brief write the meshstructure and the dof values of DOFVectors in sysVec
...
...
AMDiS/src/io/detail/Arh2Reader.cc
View file @
81146d61
...
...
@@ -22,7 +22,7 @@ namespace AMDiS { namespace io {
namespace
detail
{
uint8_t
firstRead
(
ifstream
&
file
)
void
firstRead
(
ifstream
&
file
)
{
FUNCNAME
(
"Arh2Reader::detail::firstRead"
);
...
...
@@ -42,7 +42,6 @@ namespace AMDiS { namespace io {
TEST_EXIT
(
minor
<=
AMDiS
::
io
::
Arh2Reader
::
MINOR
)
(
"Cannot read Arh2 format: Arh2Reader minor version is %i is smaller than the file minor version %i.
\n
"
,
AMDiS
::
io
::
Arh2Reader
::
MINOR
,
minor
);
return
minor
;
}
void
setDofValues
(
int
macroElIndex
,
Mesh
*
mesh
,
...
...
@@ -225,7 +224,7 @@ namespace AMDiS { namespace io {
uint32_t
dim
=
0
,
dow
=
0
;
// Read fixed header
uint8_t
minor
=
firstRead
(
file
);
firstRead
(
file
);
file
.
read
(
reinterpret_cast
<
char
*>
(
&
headerLen
),
4
);
file
.
read
(
reinterpret_cast
<
char
*>
(
&
dow
),
4
);
...
...
@@ -233,16 +232,7 @@ namespace AMDiS { namespace io {
file
.
read
(
reinterpret_cast
<
char
*>
(
&
nFeSpaces
),
4
);
file
.
read
(
reinterpret_cast
<
char
*>
(
&
nValueVectors
),
4
);
file
.
read
(
reinterpret_cast
<
char
*>
(
&
nMacroElements
),
4
);
switch
(
minor
)
{
case
0
:
cps
=
"null"
;
break
;
case
1
:
file
.
read
(
const_cast
<
char
*>
(
cps
.
data
()),
4
);
break
;
default:
ERROR_EXIT
(
"Should not happen.
\n
"
);
break
;
}
file
.
read
(
const_cast
<
char
*>
(
cps
.
data
()),
4
);
#ifdef HAVE_COMPRESSION
TEST_EXIT
(
cps
==
"null"
||
cps
==
"zlib"
)
...
...
AMDiS/src/io/detail/Arh2Reader.h
View file @
81146d61
...
...
@@ -21,9 +21,8 @@ namespace AMDiS { namespace io {
* 1. the type of file is equal to "arh2".
* 2. the major version of Arh2Reader is equal to the one in the file.
* 3. the minor version of Arh2Reader is bigger than the one in the file.
* return: minor version
*/
uint8_t
firstRead
(
std
::
ifstream
&
file
);
void
firstRead
(
std
::
ifstream
&
file
);
void
setDofValues
(
int
macroElIndex
,
Mesh
*
mesh
,
std
::
vector
<
std
::
vector
<
double
>
>&
values
,
...
...
@@ -71,4 +70,4 @@ namespace AMDiS { namespace io {
}
// end namespace Arh2Reader
}
}
// end namespace io, AMDiS
#endif
#endif
\ No newline at end of file
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