Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
dbdff287
Commit
dbdff287
authored
May 08, 2012
by
Thomas Witkowski
Browse files
Fixed compilation problem on atlas with gcc.
parent
42629dbe
Changes
25
Hide whitespace changes
Inline
Side-by-side
AMDiS/CMakeLists.txt
View file @
dbdff287
...
...
@@ -89,6 +89,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${
SOURCE_DIR
}
/Element.cc
${
SOURCE_DIR
}
/ElementData.cc
${
SOURCE_DIR
}
/ElementDofIterator.cc
${
SOURCE_DIR
}
/ElementRegion_ED.cc
${
SOURCE_DIR
}
/FiniteElemSpace.cc
${
SOURCE_DIR
}
/FirstOrderAssembler.cc
${
SOURCE_DIR
}
/FirstOrderTerm.cc
...
...
@@ -134,6 +135,8 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${
SOURCE_DIR
}
/SubElInfo.cc
${
SOURCE_DIR
}
/SubQuadrature.cc
${
SOURCE_DIR
}
/SurfaceQuadrature.cc
${
SOURCE_DIR
}
/SurfaceRegion_ED.cc
${
SOURCE_DIR
}
/SystemVector.cc
${
SOURCE_DIR
}
/Tetrahedron.cc
${
SOURCE_DIR
}
/Timer.cc
${
SOURCE_DIR
}
/Traverse.cc
...
...
AMDiS/src/AMDiS.h
View file @
dbdff287
...
...
@@ -116,6 +116,7 @@
#include "io/ArhReader.h"
#include "io/ArhWriter.h"
#include "io/DataCollector.h"
#include "io/FileWriter.h"
#include "io/GNUPlotWriter.h"
#include "io/GridWriter.h"
...
...
@@ -128,10 +129,6 @@
#include "io/VtkWriter.h"
#include "io/VtkVectorWriter.h"
#include "io/DataCollector.hh"
#include "io/FileWriter.hh"
#include "io/VtkVectorWriter.hh"
#include "nonlin/ProblemNonLin.h"
#include "nonlin/NonLinSolver.h"
...
...
AMDiS/src/ElementRegion_ED.cc
0 → 100644
View file @
dbdff287
//
// 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
);
}
}
AMDiS/src/ElementRegion_ED.h
View file @
dbdff287
...
...
@@ -25,7 +25,6 @@
#include "ElementData.h"
#include "FixVec.h"
#include "Serializer.h"
namespace
AMDiS
{
...
...
@@ -56,30 +55,9 @@ namespace AMDiS {
bool
refineElementData
(
Element
*
parent
,
Element
*
child1
,
Element
*
child2
,
int
elType
)
{
ElementData
::
refineElementData
(
parent
,
child1
,
child2
,
elType
);
ElementRegion_ED
*
ep
;
int
elType
);
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
*
clone
()
const
{
ElementRegion_ED
*
newObj
=
new
ElementRegion_ED
;
newObj
->
region
=
region
;
newObj
->
decorated
=
ElementData
::
clone
();
return
newObj
;
}
ElementData
*
clone
()
const
;
inline
std
::
string
getTypeName
()
const
{
...
...
@@ -91,17 +69,9 @@ namespace AMDiS {
return
ELEMENT_REGION
;
}
void
serialize
(
std
::
ostream
&
out
)
{
ElementData
::
serialize
(
out
);
SerUtil
::
serialize
(
out
,
region
);
}
void
serialize
(
std
::
ostream
&
out
);
void
deserialize
(
std
::
istream
&
in
)
{
ElementData
::
deserialize
(
in
);
SerUtil
::
deserialize
(
in
,
region
);
}
void
deserialize
(
std
::
istream
&
in
);
inline
void
setRegion
(
int
r
)
{
...
...
AMDiS/src/ProblemInstat.cc
View file @
dbdff287
...
...
@@ -19,7 +19,6 @@
#include "StandardProblemIteration.h"
#include "est/Estimator.h"
#include "io/FileWriter.h"
#include "io/FileWriter.hh"
namespace
AMDiS
{
...
...
AMDiS/src/ProblemStat.cc
View file @
dbdff287
...
...
@@ -23,7 +23,6 @@
#include "Marker.h"
#include "AdaptInfo.h"
#include "io/FileWriter.h"
#include "io/FileWriter.hh"
#include "CoarseningManager.h"
#include "RefinementManager.h"
#include "DualTraverse.h"
...
...
AMDiS/src/SurfaceRegion_ED.cc
0 → 100644
View file @
dbdff287
//
// 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
);
}
}
AMDiS/src/SurfaceRegion_ED.h
View file @
dbdff287
...
...
@@ -25,7 +25,6 @@
#include "ElementData.h"
#include "FixVec.h"
#include "Serializer.h"
namespace
AMDiS
{
...
...
@@ -57,40 +56,9 @@ namespace AMDiS {
bool
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
);
}
int
elType
);
return
false
;
}
ElementData
*
clone
()
const
{
SurfaceRegion_ED
*
newObj
=
new
SurfaceRegion_ED
;
newObj
->
side
=
side
;
newObj
->
region
=
region
;
newObj
->
decorated
=
ElementData
::
clone
();
return
newObj
;
}
ElementData
*
clone
()
const
;
inline
std
::
string
getTypeName
()
const
{
...
...
@@ -102,19 +70,9 @@ namespace AMDiS {
return
SURFACE_REGION
;
}
void
serialize
(
std
::
ostream
&
out
)
{
ElementData
::
serialize
(
out
);
SerUtil
::
serialize
(
out
,
side
);
SerUtil
::
serialize
(
out
,
region
);
}
void
serialize
(
std
::
ostream
&
out
);
void
deserialize
(
std
::
istream
&
in
)
{
ElementData
::
deserialize
(
in
);
SerUtil
::
deserialize
(
in
,
side
);
SerUtil
::
deserialize
(
in
,
region
);
}
void
deserialize
(
std
::
istream
&
in
);
inline
void
setSide
(
int
s
)
{
...
...
AMDiS/src/SystemVector.cc
0 → 100644
View file @
dbdff287
//
// 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
);
}
}
AMDiS/src/SystemVector.h
View file @
dbdff287
...
...
@@ -27,7 +27,6 @@
#include "DOFVector.h"
#include "CreatorInterface.h"
#include "Serializable.h"
#include "Serializer.h"
namespace
AMDiS
{
...
...
@@ -193,24 +192,9 @@ namespace AMDiS {
return
*
this
;
}
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
serialize
(
std
::
ostream
&
out
);
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
deserialize
(
std
::
istream
&
in
);
void
copy
(
const
SystemVector
&
rhs
)
{
...
...
AMDiS/src/io/DataCollector.h
View file @
dbdff287
...
...
@@ -231,5 +231,7 @@ namespace AMDiS {
};
}
#include "DataCollector.hh"
#endif
AMDiS/src/io/DataCollector.hh
View file @
dbdff287
...
...
@@ -23,13 +23,12 @@
namespace
AMDiS
{
template
<
typename
T
>
DataCollector
<
T
>::
DataCollector
(
const
FiniteElemSpace
*
fe
,
DOFVector
<
T
>
*
val
,
int
l
,
Flag
flag
,
bool
(
*
writeElemFct
)(
ElInfo
*
))
DOFVector
<
T
>
*
val
,
int
l
,
Flag
flag
,
bool
(
*
writeElemFct
)(
ElInfo
*
))
:
values
(
val
),
level
(
l
),
traverseFlag
(
flag
),
...
...
AMDiS/src/io/FileCompression.h
0 → 100644
View file @
dbdff287
// ============================================================================
// == ==
// == 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
AMDiS/src/io/FileWriter.cc
View file @
dbdff287
...
...
@@ -12,13 +12,11 @@
#include "boost/lexical_cast.hpp"
#include "FileWriter.h"
#include "FileWriter.hh"
#include "Initfile.h"
#include "ValueWriter.h"
#include "MacroWriter.h"
#include "VtkWriter.h"
#include "VtkVectorWriter.h"
#include "VtkVectorWriter.hh"
#include "PngWriter.h"
#include "PovrayWriter.h"
#include "DofWriter.h"
...
...
@@ -28,7 +26,7 @@
#include "Flag.h"
#include "ElInfo.h"
#include "Mesh.h"
#include "DataCollector.h
h
"
#include "DataCollector.h"
#if HAVE_PARALLEL_DOMAIN_AMDIS
#include <mpi.h>
...
...
AMDiS/src/io/FileWriter.h
View file @
dbdff287
...
...
@@ -32,18 +32,12 @@
#include "AMDiS_fwd.h"
#include "Mesh.h"
#include "DataCollector.h"
#include "FileCompression.h"
namespace
AMDiS
{
using
namespace
std
;
typedef
enum
{
NONE
=
0
,
GZIP
=
1
,
BZIP2
=
2
}
FileCompression
;
class
FileWriterInterface
{
public:
...
...
@@ -100,8 +94,8 @@ namespace AMDiS {
* \ingroup Output
*
* \brief
* Base class of FileWriterScal and FileWriterVec. Manages the file
output
* of solution vectors.
* Base class of FileWriterScal and FileWriterVec. Manages the file
*
output
of solution vectors.
*/
template
<
typename
T
>
class
FileWriterTemplated
:
public
FileWriterInterface
...
...
@@ -112,14 +106,14 @@ namespace AMDiS {
/// Constructor for a filewriter with more than one data component.
FileWriterTemplated
(
string
name
,
Mesh
*
mesh
,
vector
<
DOFVector
<
T
>*
>
vecs
);
Mesh
*
mesh
,
vector
<
DOFVector
<
T
>*
>
vecs
);
/// Constructor for a filewriter with more than one data component.
FileWriterTemplated
(
std
::
string
name
,
Mesh
*
mesh
,
SystemVector
*
vecs
);
Mesh
*
mesh
,
SystemVector
*
vecs
);
/// Destructor
virtual
~
FileWriterTemplated
();
...
...
@@ -253,7 +247,8 @@ namespace AMDiS {
typedef
FileWriterTemplated
<
double
>
FileWriter
;
typedef
FileWriterTemplated
<
WorldVector
<
double
>
>
FileVectorWriter
;
}
#include "FileWriter.hh"
#endif // AMDIS_FILEWRITER_H
AMDiS/src/io/FileWriter.hh
View file @
dbdff287
...
...
@@ -21,7 +21,6 @@
#include "MacroWriter.h"
#include "VtkWriter.h"
#include "VtkVectorWriter.h"
#include "VtkVectorWriter.hh"
#include "PngWriter.h"
#include "PovrayWriter.h"
#include "DofWriter.h"
...
...
@@ -32,7 +31,7 @@
#include "ElInfo.h"
#include "Mesh.h"
#include "SystemVector.h"
#include "DataCollector.h
h
"
#include "DataCollector.h"
#if HAVE_PARALLEL_DOMAIN_AMDIS
#include <mpi.h>
...
...
AMDiS/src/io/MacroWriter.cc
View file @
dbdff287
...
...
@@ -24,7 +24,6 @@
#include "ElementRegion_ED.h"
#include <string>
#include "Traverse.h"
#include "DataCollector.hh"
namespace
AMDiS
{
...
...
AMDiS/src/io/PngWriter.cc
View file @
dbdff287
...
...
@@ -18,7 +18,7 @@
#include "PngWriter.h"
#include "Traverse.h"
#include "DOFVector.h"
#include "DataCollector.h
h
"
#include "DataCollector.h"
namespace
AMDiS
{
int
PngWriter
::
writeFile
(
std
::
string
filename
,
int
imageType
)
...
...
AMDiS/src/io/PovrayWriter.cc
View file @
dbdff287
...
...
@@ -19,7 +19,7 @@
#include <map>
#include <algorithm>
#include "Traverse.h"
#include "DataCollector.h
h
"
#include "DataCollector.h"
using
namespace
std
;
...
...
AMDiS/src/io/ValueWriter.cc
View file @
dbdff287
...
...
@@ -18,7 +18,7 @@
#include "DOFAdmin.h"
#include "ElInfo.h"
#include "BasisFunction.h"
#include "DataCollector.h
h
"
#include "DataCollector.h"
namespace
AMDiS
{
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
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