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
5fb3baff
Commit
5fb3baff
authored
Mar 17, 2015
by
Praetorius, Simon
Browse files
some minor correction to eliminate warnings and pedantic errors
parent
af1268e7
Changes
48
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/Config.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config.h */
#pragma once
/** \brief current AMDiS version */
...
...
@@ -35,4 +59,4 @@
error
:
not
supported
compiler
#endif
#include "config/Config_defaults.h"
\ No newline at end of file
#include "config/Config_defaults.h"
AMDiS/src/CreatorInterface.h
View file @
5fb3baff
...
...
@@ -84,7 +84,7 @@ namespace AMDiS {
virtual
~
NullCreator
()
{}
/// Implementation of \ref CreatorInterface::isNullCreator()
bool
isNullCreator
()
override
virtual
bool
isNullCreator
()
override
{
return
true
;
}
...
...
AMDiS/src/config/Config_clang.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config_clang.h */
#pragma once
#define CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#define COMPILER_VERSION "Clang: CLANG_VERSION"
#define COMPILER_NAME "clang"
#define COMPILER_VERSION CLANG_VERSION
// alignement specification
// ------------------------
...
...
@@ -21,6 +47,7 @@ typedef size_t aligned_size_t __attribute__ ((aligned(CACHE_LINE)));
// --------------
#if __cplusplus > 199711L
// __has_feature(cxx_rvalue_references)
#if CLANG_VERSION >= 20900
#define HAS_VARIADIC_TEMPLATES 1
#endif
...
...
@@ -57,4 +84,4 @@ typedef size_t aligned_size_t __attribute__ ((aligned(CACHE_LINE)));
#define HAS_TYPED_ENUMS 1
#endif
#endif
\ No newline at end of file
#endif
AMDiS/src/config/Config_defaults.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config_defaults.h */
#pragma once
#ifndef COMPILER_NAME
...
...
@@ -66,4 +90,4 @@ typedef size_t aligned_size_t;
#ifndef HAS_TYPED_ENUMS
#define HAS_TYPED_ENUMS 0
#endif
\ No newline at end of file
#endif
AMDiS/src/config/Config_gcc.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config_gcc.h */
#pragma once
#define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
#define COMPIER_NAME "gcc"
#define COMPI
L
ER_NAME "gcc"
#define COMPILER_VERSION GCC_VERSION
// alignement specification
...
...
@@ -31,7 +55,7 @@ typedef size_t aligned_size_t __attribute__ ((aligned(CACHE_LINE)));
#define HAS_ALIAS_TEMPLATES 1
#endif
#if
__cpp_decltype >= 200707
#if
GCC_VERSION >= 40300
#define HAS_DECLTYPE 1
#endif
...
...
@@ -59,4 +83,4 @@ typedef size_t aligned_size_t __attribute__ ((aligned(CACHE_LINE)));
#define HAS_TYPED_ENUMS 1
#endif
#endif
\ No newline at end of file
#endif
AMDiS/src/config/Config_intel.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config_intel.h */
#pragma once
// MMmm (M...major, m...minor)
#define INTEL_VERSION __INTEL_COMPILER
#define COMPIER_NAME "icc"
#define COMPI
L
ER_NAME "icc"
#define COMPILER_VERSION INTEL_VERSION
// alignement specification
...
...
@@ -60,4 +84,4 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
#define HAS_TYPED_ENUMS 1
#endif
#endif
\ No newline at end of file
#endif
AMDiS/src/config/Config_msc.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config_msc.h */
#pragma once
#define MSC_VERSION _MSV_VER
...
...
@@ -6,7 +30,7 @@
// MSC_VERSION == 1600 (Visual Studio 2010)
// MSC_VERSION == 1500 (Visual Studio 2008)
#define COMPIER_NAME "msc"
#define COMPI
L
ER_NAME "msc"
#define COMPILER_VERSION MSC_VERSION
// alignement specification
...
...
@@ -63,4 +87,4 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
#define HAS_TYPED_ENUMS 1
#endif
#endif
\ No newline at end of file
#endif
AMDiS/src/config/Config_pgi.h
View file @
5fb3baff
/******************************************************************************
*
* 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.
*
******************************************************************************/
/** \file Config_pgi.h */
#pragma once
#define PGI_VERSION (__PGIC__ * 10000 + __PGIC_MINOR * 100 + __PGIC_PATCHLEVEL__)
#define COMPIER_NAME "pgi"
#define COMPILER_VERSION PGI_VERSION
\ No newline at end of file
#define COMPILER_NAME "pgi"
#define COMPILER_VERSION PGI_VERSION
AMDiS/src/expressions/functorN_expr.hpp
View file @
5fb3baff
...
...
@@ -66,7 +66,7 @@ namespace AMDiS
};
template
<
typename
F
>
struct
functor_degree
<
F
,
typename
std
::
enable_if
<
boost
::
is_base_of
<
FunctorBase
,
F
>
::
value
>::
type
>
struct
functor_degree
<
F
,
typename
enable_if
<
boost
::
is_base_of
<
FunctorBase
,
F
>
>::
type
>
{
template
<
typename
...
Int
>
static
int
eval
(
F
f
,
Int
...
d
)
{
return
f
.
getDegree
(
d
...);
}
...
...
@@ -217,9 +217,9 @@ namespace AMDiS
{
// result of generator-functions (used for enable_if constructs)
template
<
typename
F
,
typename
...
Terms
>
struct
FunctionN
:
boost
::
enable_if
struct
FunctionN
:
enable_if
<
typename
boost
::
mpl
::
and_
<
typename
traits
::
is_valid_arg
<
Terms
>::
type
...
>::
type
,
typename
and_
<
typename
traits
::
is_valid_arg
<
Terms
>::
type
...
>::
type
,
expressions
::
FunctionN
<
F
,
typename
traits
::
to_expr
<
Terms
>::
type
...
>
>
{};
...
...
AMDiS/src/expressions/value_expr.hpp
View file @
5fb3baff
...
...
@@ -187,7 +187,7 @@ namespace AMDiS
Eye
()
{
M
=
0
;
for
(
size_t
i
=
0
;
i
<
Global
::
getGeo
(
WORLD
);
++
i
)
for
(
size_t
i
=
0
;
i
<
(
size_t
)
Global
::
getGeo
(
WORLD
);
++
i
)
M
[
i
][
i
]
=
1
;
}
...
...
AMDiS/src/expressions/vec_functors.hpp
View file @
5fb3baff
...
...
@@ -134,14 +134,15 @@ namespace AMDiS
inline
typename
result_of
::
UnaryExpr
<
Functor
,
Term
>::
type
unary_expr
(
const
Term
&
t
)
{
return
function_
<
Functor
<
typename
Term
::
value_type
>
>
(
t
);
typedef
Functor
<
typename
Term
::
value_type
>
F
;
return
function_
(
F
(),
t
);
}
template
<
class
F
unctor
,
typename
Term
>
inline
typename
result_of
::
UnaryExprFull
<
F
unctor
,
Term
>::
type
template
<
class
F
,
typename
Term
>
inline
typename
result_of
::
UnaryExprFull
<
F
,
Term
>::
type
unary_expr_full
(
const
Term
&
t
)
{
return
function_
<
Functor
>
(
t
);
return
function_
(
F
(),
t
);
}
...
...
@@ -152,9 +153,8 @@ namespace AMDiS
{
typedef
typename
traits
::
to_expr
<
Term1
>::
to
Expr1
;
typedef
typename
traits
::
to_expr
<
Term2
>::
to
Expr2
;
return
function_
<
Functor
<
typename
Expr1
::
type
::
value_type
,
typename
Expr2
::
type
::
value_type
>
>
(
Expr1
::
get
(
t1
),
Expr2
::
get
(
t2
));
typedef
Functor
<
typename
Expr1
::
type
::
value_type
,
typename
Expr2
::
type
::
value_type
>
F
;
return
function_
(
F
(),
Expr1
::
get
(
t1
),
Expr2
::
get
(
t2
));
}
...
...
AMDiS/src/io/Arh2Writer.cc
View file @
5fb3baff
...
...
@@ -107,4 +107,4 @@ namespace AMDiS { namespace io {
#endif
}
}
}
\ No newline at end of file
}
}
AMDiS/src/io/detail/VtkWriter.cc
View file @
5fb3baff
...
...
@@ -204,7 +204,7 @@ namespace AMDiS { namespace io {
void
writeParallelFile
(
string
name
,
int
nRanks
,
string
fnPrefix
,
string
fnPostfix
,
vector
<
string
>
&
componentNames
,
const
vector
<
string
>
&
componentNames
,
::
AMDiS
::
io
::
VtkWriter
::
Vtuformat
format
,
bool
highPrecision
,
bool
writeAsVector
...
...
AMDiS/src/solver/BlockMTLMatrix.h
View file @
5fb3baff
...
...
@@ -176,4 +176,4 @@ namespace mtl
}
// end namespace mtl
#endif // AMDIS_BLOCK_MTL_MATRIX_H
\ No newline at end of file
#endif // AMDIS_BLOCK_MTL_MATRIX_H
AMDiS/src/solver/ITL_Preconditioner.h
View file @
5fb3baff
...
...
@@ -103,7 +103,7 @@ namespace AMDiS {
}
/// Implementation of \ref ITL_PreconditionerBase::init()
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix
)
override
virtual
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix
)
override
{
if
(
precon
)
delete
precon
;
...
...
@@ -111,7 +111,7 @@ namespace AMDiS {
}
/// Implementation of \ref PreconditionerInterface::exit()
void
exit
()
override
virtual
void
exit
()
override
{
if
(
precon
)
{
delete
precon
;
...
...
@@ -120,14 +120,14 @@ namespace AMDiS {
}
/// Implementation of \ref ITL_PreconditionerBase::solve()
void
solve
(
const
VectorType
&
vin
,
VectorType
&
vout
)
const
override
virtual
void
solve
(
const
VectorType
&
vin
,
VectorType
&
vout
)
const
override
{
assert
(
precon
!=
NULL
);
precon
->
solve
(
vin
,
vout
);
}
/// Implementation of \ref ITL_PreconditionerBase::adjoint_solve()
void
adjoint_solve
(
const
VectorType
&
vin
,
VectorType
&
vout
)
const
override
virtual
void
adjoint_solve
(
const
VectorType
&
vin
,
VectorType
&
vout
)
const
override
{
assert
(
precon
!=
NULL
);
precon
->
adjoint_solve
(
vin
,
vout
);
...
...
AMDiS/src/solver/ITL_Runner.h
View file @
5fb3baff
...
...
@@ -83,7 +83,7 @@ namespace AMDiS {
/// Implementation of \ref RunnerBase::init()
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix
)
override
virtual
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix
)
override
{
preconPair
.
l
->
init
(
A
,
fullMatrix
);
preconPair
.
r
->
init
(
A
,
fullMatrix
);
...
...
@@ -91,7 +91,7 @@ namespace AMDiS {
/// Implementation of \ref RunnerBase::solve()
int
solve
(
const
MatrixType
&
A
,
VectorType
&
x
,
const
VectorType
&
b
)
override
virtual
int
solve
(
const
MatrixType
&
A
,
VectorType
&
x
,
const
VectorType
&
b
)
override
{
FUNCNAME
(
"ITL_Runner::solve()"
);
TEST_EXIT
(
preconPair
.
l
!=
NULL
)(
"there is no left preconditioner
\n
"
);
...
...
@@ -133,7 +133,7 @@ namespace AMDiS {
/// Implementation of \ref RunnerBase::adjoint_solve()
int
adjoint_solve
(
const
MatrixType
&
A
,
VectorType
&
x
,
const
VectorType
&
b
)
override
virtual
int
adjoint_solve
(
const
MatrixType
&
A
,
VectorType
&
x
,
const
VectorType
&
b
)
override
{
FUNCNAME
(
"ITL_Runner::adjoint_solve()"
);
TEST_EXIT
(
preconPair
.
l
!=
NULL
)(
"there is no left preconditioner
\n
"
);
...
...
@@ -170,7 +170,7 @@ namespace AMDiS {
/// Implementation of \ref RunnerInterface::exit()
void
exit
()
override
virtual
void
exit
()
override
{
preconPair
.
l
->
exit
();
preconPair
.
r
->
exit
();
...
...
@@ -178,14 +178,14 @@ namespace AMDiS {
/// Implementation of \ref RunnerInterface::getLeftPrecon()
PreconditionerInterface
*
getLeftPrecon
()
override
virtual
PreconditionerInterface
*
getLeftPrecon
()
override
{
return
preconPair
.
l
;
}
/// Implementation of \ref RunnerInterface::getRightPrecon()
PreconditionerInterface
*
getRightPrecon
()
override
virtual
PreconditionerInterface
*
getRightPrecon
()
override
{
return
preconPair
.
r
;
}
...
...
AMDiS/src/solver/KrylovPreconditioner.h
View file @
5fb3baff
...
...
@@ -108,27 +108,27 @@ namespace AMDiS {
}
/// Implementation of \ref ITL_PreconditionerBase::init()
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix_
)
override
virtual
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix_
)
override
{
fullMatrix
=
&
fullMatrix_
;
runner
->
init
(
A
,
fullMatrix_
);
}
/// Implementation of \ref PreconditionerInterface::init()
void
exit
()
override
virtual
void
exit
()
override
{
runner
->
exit
();
}
/// Implementation of \ref ITL_PreconditionerBase::solve()
void
solve
(
const
VectorType
&
b
,
VectorType
&
x
)
const
override
virtual
void
solve
(
const
VectorType
&
b
,
VectorType
&
x
)
const
override
{
initVector
(
x
);
runner
->
solve
(
*
fullMatrix
,
x
,
b
);
}
/// Implementation of \ref ITL_PreconditionerBase::adjoint_solve()
void
adjoint_solve
(
const
VectorType
&
b
,
VectorType
&
x
)
const
override
virtual
void
adjoint_solve
(
const
VectorType
&
b
,
VectorType
&
x
)
const
override
{
initVector
(
x
);
runner
->
adjoint_solve
(
*
fullMatrix
,
x
,
b
);
...
...
AMDiS/src/solver/LinearSolver.h
View file @
5fb3baff
...
...
@@ -173,11 +173,11 @@ namespace AMDiS {
protected:
/// Implementation of \ref LinearSolverInterface::solveLinearSystem()
int
solveLinearSystem
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
SystemVector
&
x
,
SystemVector
&
b
,
bool
createMatrixData
,
bool
storeMatrixData
)
override
virtual
int
solveLinearSystem
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
SystemVector
&
x
,
SystemVector
&
b
,
bool
createMatrixData
,
bool
storeMatrixData
)
override
{
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
MPI
::
COMM_WORLD
.
Barrier
();
...
...
AMDiS/src/solver/UmfPackSolver.h
View file @
5fb3baff
...
...
@@ -52,7 +52,7 @@ namespace AMDiS {
}
/// Implementation of \ref RunnerBase::init()
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix
)
override
virtual
void
init
(
const
SolverMatrix
<
Matrix
<
DOFMatrix
*>
>&
A
,
const
MatrixType
&
fullMatrix
)
override
{
if
(
solver
!=
NULL
)
{
delete
solver
;
...
...
@@ -67,7 +67,7 @@ namespace AMDiS {
}
/// Implementation of \ref RunnerBase::solve()
int
solve
(
const
MatrixType
&
A
,
VectorType
&
x
,
const
VectorType
&
b
)
override
virtual
int
solve
(
const
MatrixType
&
A
,
VectorType
&
x
,
const
VectorType
&
b
)
override
{
FUNCNAME
(
"Umfpack_Runner::solve()"
);
TEST_EXIT
(
solver
!=
NULL
)(
"The umfpack solver was not initialized
\n
"
);
...
...
@@ -89,7 +89,7 @@ namespace AMDiS {
}
/// Implementation of \ref RunnerInterface::adjoint_solve()
void
exit
()
override
{}
virtual
void
exit
()
override
{}
~
Umfpack_Runner
()
{
...
...
extensions/ExtendedProblemStat.h
View file @
5fb3baff
...
...
@@ -156,7 +156,9 @@ public:
if
(
applyDirichletBC
(
singularDirichletBC
[
k
],
asmMatrix
,
asmVector
))
++
num_dbc
;
}
MSG_DBG
(
"DBC applied at %d DOFs
\n
"
,
num_dbc
);
#if DEBUG
MSG
(
"DBC applied at %d DOFs
\n
"
,
num_dbc
);
#endif
// update solverMatrix
if
(
asmMatrix
&&
(
singularDirichletBC
.
size
()
>
0
||
manualPeriodicBC
.
size
()
>
0
))
{
...
...
@@ -199,7 +201,6 @@ public:
void
addDirichletBC
(
BoundaryType
type
,
int
row
,
int
col
,
ValueContainer
*
values
)
{
MSG
(
"addDirichletBC(%d, %d)
\n
"
,
row
,
col
);
BoundaryTypeContainer
*
bound
=
new
BoundaryTypeContainer
(
type
);
DirichletBcDataList
.
push_back
(
new
DirichletBcData
<
BoundaryTypeContainer
,
ValueContainer
>
(
...
...
Prev
1
2
3
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