Commit dbdff287 authored by Thomas Witkowski's avatar Thomas Witkowski

Fixed compilation problem on atlas with gcc.

parent 42629dbe
...@@ -89,6 +89,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc ...@@ -89,6 +89,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${SOURCE_DIR}/Element.cc ${SOURCE_DIR}/Element.cc
${SOURCE_DIR}/ElementData.cc ${SOURCE_DIR}/ElementData.cc
${SOURCE_DIR}/ElementDofIterator.cc ${SOURCE_DIR}/ElementDofIterator.cc
${SOURCE_DIR}/ElementRegion_ED.cc
${SOURCE_DIR}/FiniteElemSpace.cc ${SOURCE_DIR}/FiniteElemSpace.cc
${SOURCE_DIR}/FirstOrderAssembler.cc ${SOURCE_DIR}/FirstOrderAssembler.cc
${SOURCE_DIR}/FirstOrderTerm.cc ${SOURCE_DIR}/FirstOrderTerm.cc
...@@ -134,6 +135,8 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc ...@@ -134,6 +135,8 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${SOURCE_DIR}/SubElInfo.cc ${SOURCE_DIR}/SubElInfo.cc
${SOURCE_DIR}/SubQuadrature.cc ${SOURCE_DIR}/SubQuadrature.cc
${SOURCE_DIR}/SurfaceQuadrature.cc ${SOURCE_DIR}/SurfaceQuadrature.cc
${SOURCE_DIR}/SurfaceRegion_ED.cc
${SOURCE_DIR}/SystemVector.cc
${SOURCE_DIR}/Tetrahedron.cc ${SOURCE_DIR}/Tetrahedron.cc
${SOURCE_DIR}/Timer.cc ${SOURCE_DIR}/Timer.cc
${SOURCE_DIR}/Traverse.cc ${SOURCE_DIR}/Traverse.cc
......
...@@ -116,6 +116,7 @@ ...@@ -116,6 +116,7 @@
#include "io/ArhReader.h" #include "io/ArhReader.h"
#include "io/ArhWriter.h" #include "io/ArhWriter.h"
#include "io/DataCollector.h"
#include "io/FileWriter.h" #include "io/FileWriter.h"
#include "io/GNUPlotWriter.h" #include "io/GNUPlotWriter.h"
#include "io/GridWriter.h" #include "io/GridWriter.h"
...@@ -128,10 +129,6 @@ ...@@ -128,10 +129,6 @@
#include "io/VtkWriter.h" #include "io/VtkWriter.h"
#include "io/VtkVectorWriter.h" #include "io/VtkVectorWriter.h"
#include "io/DataCollector.hh"
#include "io/FileWriter.hh"
#include "io/VtkVectorWriter.hh"
#include "nonlin/ProblemNonLin.h" #include "nonlin/ProblemNonLin.h"
#include "nonlin/NonLinSolver.h" #include "nonlin/NonLinSolver.h"
......
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.
#include "ElementRegion_ED.h"
#include "Serializer.h"
namespace AMDiS {
bool ElementRegion_ED::refineElementData(Element* parent,
Element* child1,
Element* child2,
int elType)
{
ElementData::refineElementData(parent, child1, child2, elType);
ElementRegion_ED *ep;
ep = new ElementRegion_ED(child1->getElementData());
ep->region = region;
child1->setElementData(ep);
ep = new ElementRegion_ED(child2->getElementData());
ep->region = region;
child2->setElementData(ep);
return false;
}
ElementData *ElementRegion_ED::clone() const
{
ElementRegion_ED *newObj = new ElementRegion_ED;
newObj->region = region;
newObj->decorated = ElementData::clone();
return newObj;
}
void ElementRegion_ED::serialize(std::ostream& out)
{
ElementData::serialize(out);
SerUtil::serialize(out, region);
}
void ElementRegion_ED::deserialize(std::istream& in)
{
ElementData::deserialize(in);
SerUtil::deserialize(in, region);
}
}
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "ElementData.h" #include "ElementData.h"
#include "FixVec.h" #include "FixVec.h"
#include "Serializer.h"
namespace AMDiS { namespace AMDiS {
...@@ -56,30 +55,9 @@ namespace AMDiS { ...@@ -56,30 +55,9 @@ namespace AMDiS {
bool refineElementData(Element* parent, bool refineElementData(Element* parent,
Element* child1, Element* child1,
Element* child2, Element* child2,
int elType) int elType);
{
ElementData::refineElementData(parent, child1, child2, elType);
ElementRegion_ED *ep;
ep = new ElementRegion_ED(child1->getElementData()); ElementData *clone() const;
ep->region = region;
child1->setElementData(ep);
ep = new ElementRegion_ED(child2->getElementData());
ep->region = region;
child2->setElementData(ep);
return false;
}
ElementData *clone() const
{
ElementRegion_ED *newObj = new ElementRegion_ED;
newObj->region = region;
newObj->decorated = ElementData::clone();
return newObj;
}
inline std::string getTypeName() const inline std::string getTypeName() const
{ {
...@@ -91,17 +69,9 @@ namespace AMDiS { ...@@ -91,17 +69,9 @@ namespace AMDiS {
return ELEMENT_REGION; return ELEMENT_REGION;
} }
void serialize(std::ostream& out) void serialize(std::ostream& out);
{
ElementData::serialize(out);
SerUtil::serialize(out, region);
}
void deserialize(std::istream& in) void deserialize(std::istream& in);
{
ElementData::deserialize(in);
SerUtil::deserialize(in, region);
}
inline void setRegion(int r) inline void setRegion(int r)
{ {
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#include "StandardProblemIteration.h" #include "StandardProblemIteration.h"
#include "est/Estimator.h" #include "est/Estimator.h"
#include "io/FileWriter.h" #include "io/FileWriter.h"
#include "io/FileWriter.hh"
namespace AMDiS { namespace AMDiS {
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "Marker.h" #include "Marker.h"
#include "AdaptInfo.h" #include "AdaptInfo.h"
#include "io/FileWriter.h" #include "io/FileWriter.h"
#include "io/FileWriter.hh"
#include "CoarseningManager.h" #include "CoarseningManager.h"
#include "RefinementManager.h" #include "RefinementManager.h"
#include "DualTraverse.h" #include "DualTraverse.h"
......
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.
#include "SurfaceRegion_ED.h"
#include "Serializer.h"
namespace AMDiS {
bool SurfaceRegion_ED::refineElementData(Element* parent,
Element* child1,
Element* child2,
int elType)
{
ElementData::refineElementData(parent, child1, child2, elType);
int sideOfChild;
SurfaceRegion_ED *surfaceRegion;
sideOfChild = parent->getSideOfChild(0, side, elType);
if (sideOfChild >= 0) {
surfaceRegion = new SurfaceRegion_ED(child1->getElementData());
surfaceRegion->setSide(sideOfChild);
surfaceRegion->setRegion(region);
child1->setElementData(surfaceRegion);
}
sideOfChild = parent->getSideOfChild(1, side, elType);
if (sideOfChild >= 0) {
surfaceRegion = new SurfaceRegion_ED(child2->getElementData());
surfaceRegion->side = sideOfChild;
surfaceRegion->region = region;
child2->setElementData(surfaceRegion);
}
return false;
}
ElementData *SurfaceRegion_ED::clone() const
{
SurfaceRegion_ED *newObj = new SurfaceRegion_ED;
newObj->side = side;
newObj->region = region;
newObj->decorated = ElementData::clone();
return newObj;
}
void SurfaceRegion_ED::serialize(std::ostream& out)
{
ElementData::serialize(out);
SerUtil::serialize(out, side);
SerUtil::serialize(out, region);
}
void SurfaceRegion_ED::deserialize(std::istream& in)
{
ElementData::deserialize(in);
SerUtil::deserialize(in, side);
SerUtil::deserialize(in, region);
}
}
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "ElementData.h" #include "ElementData.h"
#include "FixVec.h" #include "FixVec.h"
#include "Serializer.h"
namespace AMDiS { namespace AMDiS {
...@@ -57,40 +56,9 @@ namespace AMDiS { ...@@ -57,40 +56,9 @@ namespace AMDiS {
bool refineElementData(Element* parent, bool refineElementData(Element* parent,
Element* child1, Element* child1,
Element* child2, Element* child2,
int elType) int elType);
{
ElementData::refineElementData(parent, child1, child2, elType);
int sideOfChild;
SurfaceRegion_ED *surfaceRegion;
sideOfChild = parent->getSideOfChild(0, side, elType);
if (sideOfChild >= 0) {
surfaceRegion = new SurfaceRegion_ED(child1->getElementData());
surfaceRegion->setSide(sideOfChild);
surfaceRegion->setRegion(region);
child1->setElementData(surfaceRegion);
}
sideOfChild = parent->getSideOfChild(1, side, elType);
if (sideOfChild >= 0) {
surfaceRegion = new SurfaceRegion_ED(child2->getElementData());
surfaceRegion->side = sideOfChild;
surfaceRegion->region = region;
child2->setElementData(surfaceRegion);
}
return false; ElementData *clone() const ;
}
ElementData *clone() const
{
SurfaceRegion_ED *newObj = new SurfaceRegion_ED;
newObj->side = side;
newObj->region = region;
newObj->decorated = ElementData::clone();
return newObj;
}
inline std::string getTypeName() const inline std::string getTypeName() const
{ {
...@@ -102,19 +70,9 @@ namespace AMDiS { ...@@ -102,19 +70,9 @@ namespace AMDiS {
return SURFACE_REGION; return SURFACE_REGION;
} }
void serialize(std::ostream& out) void serialize(std::ostream& out);
{
ElementData::serialize(out);
SerUtil::serialize(out, side);
SerUtil::serialize(out, region);
}
void deserialize(std::istream& in) void deserialize(std::istream& in);
{
ElementData::deserialize(in);
SerUtil::deserialize(in, side);
SerUtil::deserialize(in, region);
}
inline void setSide(int s) inline void setSide(int s)
{ {
......
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.
#include "SystemVector.h"
#include "Serializer.h"
namespace AMDiS {
void SystemVector::serialize(std::ostream &out)
{
int size = vectors.getSize();
SerUtil::serialize(out, size);
for (int i = 0; i < size; i++)
vectors[i]->serialize(out);
}
void SystemVector::deserialize(std::istream &in)
{
int size, oldSize = vectors.getSize();
SerUtil::deserialize(in, size);
vectors.resize(size);
for (int i = oldSize; i < size; i++)
vectors[i] = new DOFVector<double>(feSpace[i], "");
for (int i = 0; i < size; i++)
vectors[i]->deserialize(in);
}
}
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "DOFVector.h" #include "DOFVector.h"
#include "CreatorInterface.h" #include "CreatorInterface.h"
#include "Serializable.h" #include "Serializable.h"
#include "Serializer.h"
namespace AMDiS { namespace AMDiS {
...@@ -193,24 +192,9 @@ namespace AMDiS { ...@@ -193,24 +192,9 @@ namespace AMDiS {
return *this; return *this;
} }
void serialize(std::ostream &out) void serialize(std::ostream &out);
{
int size = vectors.getSize();
SerUtil::serialize(out, size);
for (int i = 0; i < size; i++)
vectors[i]->serialize(out);
}
void deserialize(std::istream &in) void deserialize(std::istream &in);
{
int size, oldSize = vectors.getSize();
SerUtil::deserialize(in, size);
vectors.resize(size);
for (int i = oldSize; i < size; i++)
vectors[i] = new DOFVector<double>(feSpace[i], "");
for (int i = 0; i < size; i++)
vectors[i]->deserialize(in);
}
void copy(const SystemVector& rhs) void copy(const SystemVector& rhs)
{ {
......
...@@ -231,5 +231,7 @@ namespace AMDiS { ...@@ -231,5 +231,7 @@ namespace AMDiS {
}; };
} }
#include "DataCollector.hh"
#endif #endif
...@@ -23,13 +23,12 @@ ...@@ -23,13 +23,12 @@
namespace AMDiS { namespace AMDiS {
template<typename T> template<typename T>
DataCollector<T>::DataCollector(const FiniteElemSpace *fe, DataCollector<T>::DataCollector(const FiniteElemSpace *fe,
DOFVector<T> *val, DOFVector<T> *val,
int l, int l,
Flag flag, Flag flag,
bool (*writeElemFct)(ElInfo*)) bool (*writeElemFct)(ElInfo*))
: values(val), : values(val),
level(l), level(l),
traverseFlag(flag), traverseFlag(flag),
......
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// == http://www.amdis-fem.org ==
// == ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.
#ifndef AMDIS_FILE_COMPRESSION_H
#define AMDIS_FILE_COMPRESSION_H
namespace AMDiS {
typedef enum {
NONE = 0,
GZIP = 1,
BZIP2 = 2
} FileCompression;
}
#endif
...@@ -12,13 +12,11 @@ ...@@ -12,13 +12,11 @@
#include "boost/lexical_cast.hpp" #include "boost/lexical_cast.hpp"
#include "FileWriter.h" #include "FileWriter.h"
#include "FileWriter.hh"
#include "Initfile.h" #include "Initfile.h"
#include "ValueWriter.h" #include "ValueWriter.h"
#include "MacroWriter.h" #include "MacroWriter.h"
#include "VtkWriter.h" #include "VtkWriter.h"
#include "VtkVectorWriter.h" #include "VtkVectorWriter.h"
#include "VtkVectorWriter.hh"
#include "PngWriter.h" #include "PngWriter.h"
#include "PovrayWriter.h" #include "PovrayWriter.h"
#include "DofWriter.h" #include "DofWriter.h"
...@@ -28,7 +26,7 @@ ...@@ -28,7 +26,7 @@
#include "Flag.h" #include "Flag.h"
#include "ElInfo.h" #include "ElInfo.h"
#include "Mesh.h" #include "Mesh.h"
#include "DataCollector.hh" #include "DataCollector.h"
#if HAVE_PARALLEL_DOMAIN_AMDIS #if HAVE_PARALLEL_DOMAIN_AMDIS
#include <mpi.h> #include <mpi.h>
......
...@@ -32,18 +32,12 @@ ...@@ -32,18 +32,12 @@
#include "AMDiS_fwd.h" #include "AMDiS_fwd.h"
#include "Mesh.h" #include "Mesh.h"
#include "DataCollector.h" #include "DataCollector.h"
#include "FileCompression.h"
namespace AMDiS { namespace AMDiS {
using namespace std; using namespace std;
typedef enum {
NONE = 0,
GZIP = 1,
BZIP2 = 2
} FileCompression;
class FileWriterInterface class FileWriterInterface
{ {
public: public:
...@@ -100,8 +94,8 @@ namespace AMDiS { ...@@ -100,8 +94,8 @@ namespace AMDiS {
* \ingroup Output * \ingroup Output
* *
* \brief * \brief
* Base class of FileWriterScal and FileWriterVec. Manages the file output * Base class of FileWriterScal and FileWriterVec. Manages the file
* of solution vectors. * output of solution vectors.
*/ */
template<typename T> template<typename T>
class FileWriterTemplated : public FileWriterInterface class FileWriterTemplated : public FileWriterInterface
...@@ -112,14 +106,14 @@ namespace AMDiS { ...@@ -112,14 +106,14 @@ namespace AMDiS {
/// Constructor for a filewriter with more than one data component. /// Constructor for a filewriter with more than one data component.
FileWriterTemplated(string name, FileWriterTemplated(string name,
Mesh *mesh, Mesh *mesh,
vector< DOFVector<T>* > vecs); vector< DOFVector<T>* > vecs);