Commit d5add584 authored by Siqi Ling's avatar Siqi Ling

arh2 2.0 3.0 work together

parent dfa3f029
......@@ -171,9 +171,13 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${SOURCE_DIR}/io/detail/ArhReader.cc
${SOURCE_DIR}/io/Arh2Reader.cc
${SOURCE_DIR}/io/Arh2Writer.cc
${SOURCE_DIR}/io/Arh3Reader.cc
${SOURCE_DIR}/io/Arh3Writer.cc
${SOURCE_DIR}/io/detail/Arh2Reader.cc
${SOURCE_DIR}/io/detail/ArhWriter.cc
${SOURCE_DIR}/io/detail/Arh2Writer.cc
${SOURCE_DIR}/io/detail/Arh3Reader.cc
${SOURCE_DIR}/io/detail/Arh3Writer.cc
${SOURCE_DIR}/io/DofWriter.cc
${SOURCE_DIR}/io/ElementFileWriter.cc
${SOURCE_DIR}/io/FileWriterInterface.cc
......
......@@ -117,8 +117,10 @@
#include "io/ArhReader.h"
#include "io/Arh2Reader.h"
#include "io/Arh3Reader.h"
#include "io/ArhWriter.h"
#include "io/Arh2Writer.h"
#include "io/Arh3Writer.h"
#include "io/DataCollector.h"
#include "io/FileWriter.h"
#include "io/GNUPlotWriter.h"
......
......@@ -145,7 +145,7 @@ namespace AMDiS { namespace io {
uint32_t nValueVectors = 0;
detail::firstRead(file, "sarh", MAJOR, MINOR);
detail::firstRead(file);
long pos = file.tellg();
file.seekg(pos + 16);
file.read(reinterpret_cast<char*>(&nValueVectors), 4);
......@@ -176,7 +176,7 @@ namespace AMDiS { namespace io {
("Cannot open file %s\n", filename.c_str());
uint32_t headerLen = 0;
detail::firstRead(file, "sarh", MAJOR, MINOR);
detail::firstRead(file);
file.read(reinterpret_cast<char*>(&headerLen), 4);
file.close();
......@@ -212,7 +212,7 @@ namespace AMDiS { namespace io {
file.read(reinterpret_cast<char*>(&minor), 1);
file.close();
return (typeId == "sarh" && major == MAJOR && minor <= MINOR) ? true : false;
return (typeId == "arh2" && major == MAJOR && minor <= MINOR) ? true : false;
}
void readMeta(string filename,
......@@ -394,4 +394,4 @@ namespace AMDiS { namespace io {
}
} // end namespace Arh2Reader
} } // end namespace io, AMDiS
} } // end namespace io, AMDiS
\ No newline at end of file
......@@ -23,8 +23,8 @@ namespace AMDiS { namespace io {
**/
namespace Arh2Reader
{
const uint8_t MAJOR = 3;
const uint8_t MINOR = 0;
const uint8_t MAJOR = 2;
const uint8_t MINOR = 1;
/**
* \brief Read MeshStructure, refine the mesh and read dof values to sysVec by order.
......@@ -206,4 +206,4 @@ namespace AMDiS { namespace io {
} } // end namespace io, AMDiS
#endif
#endif
\ No newline at end of file
......@@ -107,4 +107,4 @@ namespace AMDiS { namespace io {
#endif
}
} }
} }
\ No newline at end of file
......@@ -14,7 +14,9 @@ namespace AMDiS { namespace io {
* ARH-files.
**/
namespace Arh2Writer
{
{
const uint8_t MAJOR = 2;
const uint8_t MINOR = 1;
/**
* \brief write the meshstructure and the dof values of DOFVectors in sysVec
......@@ -43,76 +45,65 @@ namespace AMDiS { namespace io {
*/
inline void writeFile(SystemVector *sysVec,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
bool writeParallel = true)
{
std::vector<DOFVector<double>*> vecs;
for (int i = 0; i < sysVec->getSize(); i++)
vecs.push_back(sysVec->getDOFVector(i));
detail::write(filename, NULL, vecs, writeParallel, cps, dataformat);
detail::write(filename, NULL, vecs, writeParallel);
}
inline void writeFile(SystemVector &sysVec,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
bool writeParallel = true)
{
writeFile(&sysVec, filename, writeParallel, cps, dataformat);
writeFile(&sysVec, filename, writeParallel);
}
/// write the meshstructure and the dof values of DOFVectors in vec0
/// the behavior is equal to writeFile(SystemVector* sysVec, string filename).
inline void writeFile(DOFVector<double>* vec0,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
bool writeParallel = true)
{
std::vector<DOFVector<double>*> vecs;
vecs.push_back(vec0);
detail::write(filename, NULL, vecs, writeParallel, cps, dataformat);
detail::write(filename, NULL, vecs, writeParallel);
}
/// write the meshstructure and the dof values of DOFVectors in vec0
/// the behavior is equal to writeFile(SystemVector* sysVec, string filename).
inline void writeFile(DOFVector<double>& vec0,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
bool writeParallel = true)
{
writeFile(&vec0, filename, writeParallel, cps, dataformat);
writeFile(&vec0, filename, writeParallel);
}
/// write the meshstructure and the dof values of DOFVectors in vecs
/// the behavior is equal to writeFile(SystemVector* sysVec, string filename).
inline void writeFile(std::vector<DOFVector<double>*> vecs,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
bool writeParallel = true)
{
detail::write(filename, NULL, vecs, writeParallel, cps, dataformat);
detail::write(filename, NULL, vecs, writeParallel);
}
/// write the meshstructure of the mesh to arh file.
inline void writeFile(Mesh *mesh,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
bool writeParallel = true)
{
std::vector<DOFVector<double>*> vecs;
detail::write(filename, mesh, vecs, writeParallel, cps, dataformat);
detail::write(filename, mesh, vecs, writeParallel);
}
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
void writeMetaData(Mesh *mesh, std::string filename);
#endif
} // end namespace Arh2Writer
} } // end namespace io, AMDiS
#endif
#endif
\ No newline at end of file
This diff is collapsed.
#ifndef AMDIS_ARH_READER3_H
#define AMDIS_ARH_READER3_H
/** \file Arh3Reader.h */
#include "AMDiS_fwd.h"
#include "Global.h"
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#define WRITE_PARALLEL true
#else
#define WRITE_PARALLEL false
#endif
namespace AMDiS { namespace io {
/** \ingroup Input
* \brief Reader for the AMDiS ARH-format - version 3
*
* A collection of methods to read to various container types from
* ARH-files.
**/
namespace Arh3Reader
{
const uint8_t MAJOR = 3;
const uint8_t MINOR = 0;
/**
* \brief Read MeshStructure, refine the mesh and read dof values to sysVec by order.
* When reading dof values, it puts the data into the correspond DOFVector
* (according to their order in the sysVec and in the file, which is the same as the old ArhReader).
* Normally, just use the default value of \ref writeParallel and \ref nProcs.
*
* You should notice these:
* 1. DOFVectors in SystemVector are not allowed to have identical name.
* 2. The length of DOFVectors in SystemVector is less than the length of values in the file.
* 3. NULL of DOFVector is allowed in SystemVector. But all the non-null DOFvector have the same fespace
* (number of Dofs per position) as the correspond value in the file.
*
* \param writeParallel
* the default value in Sequential Model is false.
* the default value in Parallel Model is true.
* if the value is set to false, no matter in sequential or parallel mode, the processor(s) will
* read the file of the same given name, without adding thier process numbers: for example: "-p1-".
* if the value is set to true, in Parallel Model, the behavior depends on \ref nProcs.
* But in Sequential Model, an error will be thrown.
* \param nProcs
* the default value is -1. But it only affects when \ref writeParallel is set to true.
* If nProcs is -1, and it's in Parallel Model, every processor reads their own filename (with processor
* numbers). But in Sequential Model, an error will be thrown.
* And you can also set nProcs to a value which is smaller than the number of Processors. Then every
* processor will read all the files with names from -p0- to -p[nProcs]-.
*/
void readFile(std::string filename,
SystemVector* sysVec,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
inline
void readFile(std::string filename,
SystemVector& sysVec,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1)
{
readFile(filename, &sysVec, writeParallel, nProcs);
}
/// Read MeshStructure, refine the mesh and read dof values to vec0, vec1 and vec2 by order.
/// the behavior is equal to readFile(string filename, SystemVector* sysVec).
void readFile(std::string filename,
DOFVector<double>* vec0 = NULL,
DOFVector<double>* vec1 = NULL,
DOFVector<double>* vec2 = NULL,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
inline
void readFile(std::string filename,
DOFVector<double>& vec0,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1)
{
readFile(filename, &vec0, NULL, NULL, writeParallel, nProcs);
}
/// Read MeshStructure, refine the mesh and read dof values to vecs by order.
/// the behavior is equal to readFile(string filename, SystemVector* sysVec).
void readFile(std::string filename,
std::vector<DOFVector<double>*> vecs,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
/// Read MeshStructure and refine the mesh from arh file.
void readFile(std::string filename,
Mesh* mesh,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
inline
void readFile(std::string filename,
Mesh& mesh,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1)
{
readFile(filename, &mesh, writeParallel, nProcs);
}
/**
* \brief Read MeshStructure, refine the mesh and read dof values to sysVec by name.
* It traverses all the values in the file to get the first matching value with the same name
* and fespace, and then reads the data. If it doesn't find any matching, an error will be thrown.
* Normally, just use the default value of \ref writeParallel and \ref nProcs. See readFile for
* detail information.
*
* You should notice these:
* 1. DOFVectors in SystemVector are not allowed to have identical name.
* 2. The length of SystemVector is less than the length of values in the file.
* 3. There is at least one value in the file has the same name and fespace as the DOFVector in SystemVector.
*/
void readByName(std::string filename,
SystemVector *sysVec,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
/// Read MeshStructure, refine the mesh and read dof values to vecs by name.
/// the behavior is equal to readByName(string filename, SystemVector* sysVec).
void readByName(std::string filename,
std::vector<DOFVector<double>*> vecs,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
/// Read MeshStructure, refine the mesh and read dof values to vec by name.
/// the behavior is equal to readByName(string filename, SystemVector* sysVec).
void readByName(std::string filename,
DOFVector<double>& vec,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
/// Read MeshStructure, refine the mesh and read dof values to vec by name.
/// the behavior is equal to readByName(string filename, SystemVector* sysVec).
void readByName(std::string filename,
DOFVector<double>* vec,
bool writeParallel = WRITE_PARALLEL,
int nProcs = -1);
/// the behavior is equal to readMeta(string filename, vector(DOFvector*) vecs).
void readMeta(std::string filename,
DOFVector<double>* vec0 = NULL,
DOFVector<double>* vec1 = NULL,
DOFVector<double>* vec2 = NULL);
/**
* \brief first read a meta ARH file and get \ref elInRank. And then uses the elInRank map
* to find all the arh files that contains the dof value vecs needs and sets data into vecs by order.
* \param filename the name of meta ARH file.
* \param vecs the vector of DOFVectors which you want to get value.
*/
void readMeta(std::string filename,
std::vector<DOFVector<double>*> vecs);
/**
* \brief Read meta data from a meta ARH file and put the information into \ref elInRank
* and \ref elCodeSize and \ref arhPrefix.
* \param elInRank map of macro index and the rank it belongs to.
* \param elCodeSize map of macro index and the code size of MeshStructure of the macro.
* \param arhPrefix the prefix of arh file which the meta data file comes from.
* \return the number of subdomains a meta ARH file is defined for.
*/
int readMetaData(std::string filename,
std::map<int, int> &elInRank,
std::map<int, int> &elCodeSize,
std::string &arhPrefix);
///Read meta data from a meta ARH file and put the information into \ref elInRank
///and \ref elCodeSize. And return the number of subdomains a meta ARH file is defined for.
inline int readMetaData(std::string filename,
std::map<int, int> &elInRank,
std::map<int, int> &elCodeSize)
{
std::string tmp;
return readMetaData(filename, elInRank, elCodeSize, tmp);
}
/// Same as readMetaData but collects inform^ation from a set of ARH-files
int readMetaFromArh(std::string filename,
std::map<int, int> &elInRank,
std::map<int, int> &elCodeSize);
/// Only returns just the number of subdomains a meta ARH file is defined for.
int readMetaData(std::string filename);
/// Returns the number of value vectors in the file.
int readNumOfValueVectors(std::string filename, bool writeParallel = WRITE_PARALLEL);
/// Returns the Header size of the file.
int readHeaderSize(std::string filename, bool writeParallel = WRITE_PARALLEL);
/// If the current version Arh3Reader can read the file, return true, else false.
bool isReadable(std::string filename, bool writeParallel = WRITE_PARALLEL);
} // end namespace Arh3Reader
} } // end namespace io, AMDiS
#endif
/******************************************************************************
*
* AMDiS - Adaptive multidimensional simulations
*
* Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
* Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
*
* Authors:
* Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*
* This file is part of AMDiS
*
* See also license.opensource.txt in the distribution.
*
******************************************************************************/
#include "Arh3Writer.h"
#include "Mesh.h"
#include "MeshStructure.h"
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
#include "parallel/StdMpi.h"
#endif
namespace AMDiS { namespace io {
namespace Arh3Writer
{
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
void writeMetaData(Mesh *mesh, std::string metaFilename)
{
FUNCNAME("Arh3Writer::writeMetaData()");
using namespace std;
using namespace AMDiS::Parallel;
int mpiSize = MPI::COMM_WORLD.Get_size();
vector<std::set<pair<int, int> > > overallData;
std::set<pair<int, int> > data;
// Calculate local data
MeshStructure elementStructure;
int macroElIndex = -1;
TraverseStack stack;
ElInfo *elInfo = stack.traverseFirst(mesh, -1, Mesh::CALL_EVERY_EL_PREORDER);
while (elInfo) {
if (elInfo->getLevel() == 0) {
if (macroElIndex != -1) {
elementStructure.commit();
data.insert(make_pair(macroElIndex, elementStructure.getNumElements()));
}
elementStructure.clear();
macroElIndex = elInfo->getElement()->getIndex();
}
elementStructure.insertElement(elInfo->getElement()->isLeaf());
elInfo = stack.traverseNext(elInfo);
}
TEST_EXIT_DBG(macroElIndex != -1)("Should not happen!\n");
elementStructure.commit();
data.insert(make_pair(macroElIndex, elementStructure.getNumElements()));
// Collect data from other processors
StdMpi<std::set<pair<int, int> > > stdMpi(MPI::COMM_WORLD);
if(MPI::COMM_WORLD.Get_rank() == 0) {
for(int rank = 1; rank < mpiSize; rank++)
stdMpi.recv(rank);
} else {
stdMpi.send(0, data);
}
stdMpi.startCommunication();
if(MPI::COMM_WORLD.Get_rank() == 0) {
overallData.push_back(data);
for(int rank = 1; rank < mpiSize; rank++) {
std::set<pair<int, int> >& recvData = stdMpi.getRecvData(rank);
overallData.push_back(recvData);
}
// Write to meta file
ofstream file;
file.open(metaFilename.c_str());
file << "METAARH\n";
file << "p" << "\n"; //edit 150420: just write something
file << mpiSize << "\n";
for (int i = 0; i < mpiSize; i++) {
file << i << " " << overallData[i].size() << "\n";
for (std::set<pair<int, int> >::iterator it = overallData[i].begin(); it != overallData[i].end(); ++it)
file << it->first << " " << it->second << "\n";
}
file.close();
}
}
#endif
}
} }
#ifndef AMDIS_ARH_WRITER3_H
#define AMDIS_ARH_WRITER3_H
#include "DOFVector.h"
#include "SystemVector.h"
#include "detail/Arh3Writer.h"
namespace AMDiS { namespace io {
/** \ingroup Output
* \brief Writer for the AMDiS ARH-format - version 3
*
* A collection of methods to write various container types to
* ARH-files.
**/
namespace Arh3Writer
{
/**
* \brief write the meshstructure and the dof values of DOFVectors in sysVec
* to arh files.
*
* The behavior is as follows:
*
* If mesh is given, then all the DOFVectors in vecs must belong to the
* same mesh as the given one.
*
* Else vecs can contain DOFVector belong to different meshes and they
* will be seperated to diff files. If multiple output files generated,
* they are named like "filename.meshname.arh".
*
* Note:
* 1. NULL pointer in vecs is not allowed for writeFile.
* 2. Identical name in DOFVectors is not allowed.
*
* \param writeParallel
* the default value is true.
* In Sequential Model, the value is ignored...
* In Parallel Model, you can set the value to false if you want to write
* arh file without adding the processor number. But if you do so, it might
* highly cause conflict when processors on the same machine try to access
* the identical file.
*/
inline void writeFile(SystemVector *sysVec,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
{
std::vector<DOFVector<double>*> vecs;
for (int i = 0; i < sysVec->getSize(); i++)
vecs.push_back(sysVec->getDOFVector(i));
detail::write(filename, NULL, vecs, writeParallel, cps, dataformat);
}
inline void writeFile(SystemVector &sysVec,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
{
writeFile(&sysVec, filename, writeParallel, cps, dataformat);
}
/// write the meshstructure and the dof values of DOFVectors in vec0
/// the behavior is equal to writeFile(SystemVector* sysVec, string filename).
inline void writeFile(DOFVector<double>* vec0,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
{
std::vector<DOFVector<double>*> vecs;
vecs.push_back(vec0);
detail::write(filename, NULL, vecs, writeParallel, cps, dataformat);
}
/// write the meshstructure and the dof values of DOFVectors in vec0
/// the behavior is equal to writeFile(SystemVector* sysVec, string filename).
inline void writeFile(DOFVector<double>& vec0,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
{
writeFile(&vec0, filename, writeParallel, cps, dataformat);
}
/// write the meshstructure and the dof values of DOFVectors in vecs
/// the behavior is equal to writeFile(SystemVector* sysVec, string filename).
inline void writeFile(std::vector<DOFVector<double>*> vecs,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
{
detail::write(filename, NULL, vecs, writeParallel, cps, dataformat);
}
/// write the meshstructure of the mesh to arh file.
inline void writeFile(Mesh *mesh,
std::string filename,
bool writeParallel = true,
Cpsformat cps = NONE,
std::string dataformat = "SF64")
{
std::vector<DOFVector<double>*> vecs;
detail::write(filename, mesh, vecs, writeParallel, cps, dataformat);
}
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
void writeMetaData(Mesh *mesh, std::string filename);
#endif
} // end namespace Arh3Writer
} } // end namespace io, AMDiS
#endif
......@@ -33,6 +33,7 @@
#include "DofWriter.h"
#include "ArhWriter.h"
#include "Arh2Writer.h"
#include "Arh3Writer.h"
#include "FiniteElemSpace.h"
#include "AdaptInfo.h"
#include "Flag.h"
......@@ -91,7 +92,7 @@ namespace AMDiS
//-----------------by Siqi---------------------//
if (writeAMDiSFormat || writePeriodicFormat || writeParaViewFormat
|| writeParaViewVectorFormat || writeParaViewAnimation
|| writeDofFormat || (writeArhFormat && !writeArh2Format) || writePovrayFormat)
|| writeDofFormat || writeArh1 || writePovrayFormat)
{
for (int i = 0; i < static_cast<int>(solutionVecs.size()); i++)
TEST_EXIT(solutionVecs[0]->getFeSpace() == solutionVecs[i]->getFeSpace())
......@@ -196,10 +197,12 @@ namespace AMDiS
}
// write Arh files
if (!writeArh2Format && writeArhFormat)
ArhWriter::write(fn_ + ".arh", feSpace->getMesh(), solutionVecs);
else if (writeArh2Format)
if (writeArh2)
Arh2Writer::writeFile(solutionVecs, fn_ + ".arh");
else if (writeArh1)
ArhWriter::write(fn_ + ".arh", feSpace->getMesh(), solutionVecs);
else if (writeArh3 || writeArhFormat)
Arh3Writer::writeFile(solutionVecs, fn_ + ".arh");
#ifdef HAVE_PNG
......
......@@ -157,11 +157,17 @@ namespace AMDiS {
/// 0: Don't write DOF files; 1: Write DOF files
int writeDofFormat;
/// 0: Don't write ARH files; 1: Write ARH files
/// if write latest ARH files
int writeArhFormat;
/// 0: Don't write ARH2 files; 1: Write ARH2 files
int writeArh2Format;
/// write Arh2, prior to writeArhFormat
int writeArh1;
/// write Arh2 version 2.1, prior to writeArhFormat
int writeArh2;
/// write Arh2 version 3.0, prior to writeArhFormat
int writeArh3;
/// camera position for povray script files
std::string povrayCameraLocation;
......
......@@ -136,7 +136,9 @@ namespace AMDiS
writePovrayFormat = 0;
writeDofFormat = 0;
writeArhFormat = 0;
writeArh2Format = 0;
writeArh1 = 0;
writeArh2 = 0;
writeArh3 = 0;
pngType = 0;
nTmpSolutions = 0;
paraviewAnimationFrames.resize(0),
......@@ -173,7 +175,9 @@ namespace AMDiS
Parameters::get(name + "->DOF format", writeDofFormat);
Parameters::get(name + "->ARH format", writeArhFormat);
Parameters::get(name + "->ARH2 format", writeArh2Format);
Parameters::get(name + "->ARH1 format", writeArh1);
Parameters::get(name + "->ARH2 format", writeArh2);
Parameters::get(name + "->ARH3 format", writeArh3);
std::string compressionStr = "";
Parameters::get(name + "->compression", compressionStr);
......
......@@ -30,6 +30,7 @@
#include "ArhReader.h"
#include "Arh2Reader.h"
#include "Arh3Reader.h"
#include "MacroReader.h"
#include "ValueReader.h"
#include "XYZReader.h"
......@@ -144,6 +145,8 @@ namespace AMDiS
{
if (Arh2Reader::isReadable(filename))
Arh2Reader::readFile(filename, mesh);
else if (Arh3Reader::isReadable(filename))
Arh3Reader::readFile(filename, mesh);
else
ArhReader::readFile(filename, mesh);
}
......
This diff is collapsed.
......@@ -23,7 +23,7 @@ namespace AMDiS { namespace io {
* 3. the minor version of Arh2Reader is bigger than the one in the file.
* return value: minor version
*/
void firstRead(std::ifstream& file, std::string, uint8_t, uint8_t);
uint8_t firstRead(std::ifstream& file);
void setDofValues(int macroElIndex, Mesh *mesh,