Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
4ede6d7a
Commit
4ede6d7a
authored
Mar 02, 2020
by
gsell
Browse files
cleanup: fix GCC 9.2 warnings and some cleanup
parent
269b7b0d
Changes
33
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
116 additions
and
156 deletions
+116
-156
CMakeLists.txt
CMakeLists.txt
+2
-4
ippl/src/Field/Assign.hpp
ippl/src/Field/Assign.hpp
+8
-26
ippl/src/Field/BCond.hpp
ippl/src/Field/BCond.hpp
+0
-3
ippl/src/Field/BrickExpression.hpp
ippl/src/Field/BrickExpression.hpp
+8
-24
ippl/src/Field/Field.h
ippl/src/Field/Field.h
+9
-10
ippl/src/Field/GuardCellSizes.h
ippl/src/Field/GuardCellSizes.h
+1
-1
ippl/src/Field/IndexedBareField.h
ippl/src/Field/IndexedBareField.h
+8
-9
ippl/src/FieldLayout/CMakeLists.txt
ippl/src/FieldLayout/CMakeLists.txt
+0
-1
ippl/src/FieldLayout/FieldLayoutUser.h
ippl/src/FieldLayout/FieldLayoutUser.h
+9
-10
ippl/src/Message/TagMaker.h
ippl/src/Message/TagMaker.h
+8
-4
ippl/src/Particle/ParticleAttrib.h
ippl/src/Particle/ParticleAttrib.h
+3
-0
ippl/src/SubField/SubBareField.h
ippl/src/SubField/SubBareField.h
+10
-10
ippl/src/SubField/SubFieldAssign.h
ippl/src/SubField/SubFieldAssign.h
+7
-9
ippl/src/Utility/PAssert.h
ippl/src/Utility/PAssert.h
+11
-19
ippl/test/particle/p3m3dMicrobunching.cpp
ippl/test/particle/p3m3dMicrobunching.cpp
+11
-8
ippl/test/sindex/TestSIndex.cpp
ippl/test/sindex/TestSIndex.cpp
+0
-1
src/AbstractObjects/Expressions.h
src/AbstractObjects/Expressions.h
+18
-16
src/Algorithms/bet/math/rk.cpp
src/Algorithms/bet/math/rk.cpp
+1
-1
src/Classic/Algorithms/CoordinateSystemTrafo.h
src/Classic/Algorithms/CoordinateSystemTrafo.h
+1
-0
src/Classic/Algorithms/Quaternion.h
src/Classic/Algorithms/Quaternion.h
+1
-0
No files found.
CMakeLists.txt
View file @
4ede6d7a
...
...
@@ -46,7 +46,7 @@ add_definitions (-DNOCTAssert)
add_compile_options
(
-Wall
)
add_compile_options
(
-Wunused
)
add_compile_options
(
-Wextra
)
#
add_compile_options (-Werror)
add_compile_options
(
-Werror
)
add_compile_options
(
-funroll-loops
)
add_compile_options
(
-fstrict-aliasing
)
...
...
@@ -67,9 +67,7 @@ if ( ${CMAKE_CXX_COMPILER_ID} STREQUAL "Intel" )
endif
()
elseif
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
add_compile_options
(
-Wsign-compare
)
add_compile_options
(
-Wunused-variable
)
add_compile_options
(
-Warray-bounds
)
add_compile_options
(
-Warray-bounds-pointer-arithmetic
)
# Increase template depth for boost
add_compile_options
(
-ftemplate-depth=1024
)
# get rid of linking warning with boost. Looks like that boost
...
...
ippl/src/Field/Assign.hpp
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
* This program was prepared by PSI.
* All rights in the program are reserved by PSI.
* Neither PSI nor the author(s)
* makes any warranty, express or implied, or assumes any liability or
* responsibility for the use of this software
*
* Visit www.amas.web.psi for more details
*
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
...
...
@@ -113,7 +94,7 @@ TryCompressLHS(LField<T,Dim>& lf, A& rhs, Op op, const NDIndex<Dim>& domain)
// is for assignment.
if
(
c1
&&
c3
&&
c4
)
{
T
tmpval
;
T
tmpval
=
T
(
0
)
;
PETE_apply
(
op
,
tmpval
,
for_each
(
rhs
,
EvalFunctor_0
()));
if
(
*
lf
.
begin
()
==
tmpval
)
{
...
...
@@ -676,9 +657,10 @@ assign(const BareField<T1,Dim>& ca, RHS b, OP op, ExprTag<true>)
//INCIPPLSTAT(incBFEqualsExpression);
}
/***************************************************************************
* $RCSfile: Assign.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
* IPPL_VERSION_ID: $Id: Assign.cpp,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/Field/BCond.hpp
View file @
4ede6d7a
...
...
@@ -2795,8 +2795,6 @@ void ExtrapolateFace<T,D,M,C>::apply( Field<T,D,M,C>& A )
}
//#pragma GCC push_options
//#pragma GCC optimize "no-tree-vrp"
template
<
class
T
,
unsigned
D
,
class
M
,
class
C
>
inline
void
ExtrapolateFaceBCApply2
(
const
NDIndex
<
D
>
&
dest
,
const
NDIndex
<
D
>
&
src
,
...
...
@@ -2862,7 +2860,6 @@ ExtrapolateFaceBCApply2(const NDIndex<D> &dest, const NDIndex<D> &src,
(
ef
.
getOffset
(),
ef
.
getSlope
(),
ef
.
getComponent
())).
apply
();
}
}
//#pragma GCC pop_options
//-----------------------------------------------------------------------------
...
...
ippl/src/Field/BrickExpression.hpp
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
...
...
@@ -9,18 +8,6 @@
* makes any warranty, express or implied, or assumes any liability or
* responsibility for the use of this software
*
* Visit www.amas.web.psi for more details
*
***************************************************************************/
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
// include files
...
...
@@ -54,12 +41,10 @@ public:
for
(
d
=
3
;
d
<
Dim
;
++
d
)
{
Lhs
.
step
(
d
);
// #pragma inline here
for_each
(
Rhs
,
StepFunctor
(
d
),
PETE_NullCombiner
());
if
(
!
Lhs
.
done
(
d
)
)
break
;
Lhs
.
rewind
(
d
);
// #pragma inline here
for_each
(
Rhs
,
RewindFunctor
(
d
),
PETE_NullCombiner
());
}
}
while
(
d
<
Dim
);
...
...
@@ -128,15 +113,14 @@ public:
template
<
unsigned
Dim
,
class
LHS
,
class
RHS
,
class
OP
>
void
BrickExpression
<
Dim
,
LHS
,
RHS
,
OP
>::
apply
()
{
// #pragma inline here
BrickExpLoop
<
LHS
,
RHS
,
OP
,
Dim
>::
apply
(
Lhs
,
Rhs
,
Op
);
}
/***************************************************************************
* $RCSfile: BrickExpression.cpp,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
* IPPL_VERSION_ID: $Id: BrickExpression.cpp,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/Field/Field.h
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
...
...
@@ -67,6 +63,7 @@ public:
Field
(
Layout_t
&
,
const
GuardCellSizes
<
Dim
>&
,
const
BConds
<
T
,
Dim
,
M
,
C
>&
);
Field
(
Layout_t
&
,
const
BConds
<
T
,
Dim
,
M
,
C
>&
,
const
GuardCellSizes
<
Dim
>&
);
Field
(
FieldSpec
<
T
,
Dim
,
M
,
C
>&
);
constexpr
Field
(
Field
<
T
,
Dim
,
M
,
C
>&
)
=
default
;
// Constructors including a Mesh object as argument:
Field
(
Mesh_t
&
,
Layout_t
&
);
...
...
@@ -187,10 +184,12 @@ private:
#include "Field/Field.hpp"
#endif
// FIELD_H
#endif
/***************************************************************************
* $RCSfile: Field.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
* IPPL_VERSION_ID: $Id: Field.h,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/Field/GuardCellSizes.h
View file @
4ede6d7a
...
...
@@ -31,7 +31,7 @@ public:
GuardCellSizes
(
unsigned
*
s
);
GuardCellSizes
(
unsigned
l
,
unsigned
r
);
GuardCellSizes
(
unsigned
*
l
,
unsigned
*
r
);
constexpr
GuardCellSizes
<
Dim
>
(
const
GuardCellSizes
<
Dim
>&
)
=
default
;
GuardCellSizes
<
Dim
>&
operator
=
(
const
GuardCellSizes
<
Dim
>&
gc
)
{
for
(
unsigned
d
=
0
;
d
<
Dim
;
++
d
)
{
...
...
ippl/src/Field/IndexedBareField.h
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
...
...
@@ -207,6 +203,7 @@ public:
enum
{
Dim_u
=
Dim
};
typedef
IndexedBareFieldIterator
<
T
,
Dim
>
iterator
;
constexpr
IndexedBareField
(
const
IndexedBareField
<
T
,
Dim
,
Brackets
>&
)
=
default
;
IndexedBareField
<
T
,
Dim
,
Brackets
+
1
>
operator
[](
const
Index
&
idx
)
{
CTAssert
(
Brackets
<
Dim
);
...
...
@@ -340,8 +337,10 @@ std::ostream& operator<<(std::ostream& out, const IndexedBareField<T,Dim,Bracket
#endif // INDEXED_BARE_FIELD_H
/***************************************************************************
* $RCSfile: IndexedBareField.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:26 $
* IPPL_VERSION_ID: $Id: IndexedBareField.h,v 1.1.1.1 2003/01/23 07:40:26 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/FieldLayout/CMakeLists.txt
View file @
4ede6d7a
set
(
_SRCS
FieldLayoutUser.cpp
VRB.cpp
)
...
...
ippl/src/FieldLayout/FieldLayoutUser.h
View file @
4ede6d7a
...
...
@@ -3,9 +3,6 @@
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
#ifndef FIELD_LAYOUT_USER_H
...
...
@@ -31,10 +28,10 @@ class FieldLayoutUser : public User {
public:
// constructor - the base class selects a unique ID value
FieldLayoutUser
();
FieldLayoutUser
()
{}
;
// destructor, nothing to do here
virtual
~
FieldLayoutUser
();
virtual
~
FieldLayoutUser
()
{}
;
//
// virtual functions for FieldLayoutUser's
...
...
@@ -46,8 +43,10 @@ public:
#endif // FIELD_LAYOUT_USER_H
/***************************************************************************
* $RCSfile: FieldLayoutUser.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:27 $
* IPPL_VERSION_ID: $Id: FieldLayoutUser.h,v 1.1.1.1 2003/01/23 07:40:27 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/Message/TagMaker.h
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
#ifndef TAG_MAKER_H
...
...
@@ -107,3 +103,11 @@ private:
};
#endif // TAG_MAKER_H
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/Particle/ParticleAttrib.h
View file @
4ede6d7a
...
...
@@ -715,6 +715,9 @@ public:
T
const
*
operator
->
()
const
{
return
getP
();
}
ParticleAttribConstIterator
<
T
>&
operator
=
(
const
ParticleAttribConstIterator
<
T
>&
)
=
default
;
ParticleAttribConstIterator
<
T
>&
operator
++
(
void
)
{
++
curr
;
return
*
this
;
...
...
ippl/src/SubField/SubBareField.h
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
...
...
@@ -71,6 +67,8 @@ public:
//# public enumerations
enum
{
Dim_u
=
Dim
};
constexpr
SubBareField
(
const
SubBareField
<
T
,
Dim
,
S
>&
)
=
default
;
// Return the beginning and end iterators for this class.
iterator
begin
()
const
;
iterator
end
()
const
;
...
...
@@ -237,10 +235,12 @@ std::ostream& operator<<(std::ostream& o, const SubBareField<T,Dim,S>& s) {
#include "SubField/SubBareField.hpp"
#endif
// SUB_BARE_FIELD_H
#endif
/***************************************************************************
* $RCSfile: SubBareField.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
* IPPL_VERSION_ID: $Id: SubBareField.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/SubField/SubFieldAssign.h
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
...
...
@@ -73,8 +69,10 @@ SUB_ASSIGNMENT_OPERATORS(maxeq,OpMaxAssign)
#endif // SUB_FIELD_ASSIGN_H
/***************************************************************************
* $RCSfile: SubFieldAssign.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
* IPPL_VERSION_ID: $Id: SubFieldAssign.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/src/Utility/PAssert.h
View file @
4ede6d7a
// -*- C++ -*-
/***************************************************************************
*
* The IPPL Framework
*
*
* Visit http://people.web.psi.ch/adelmann/ for more details
*
***************************************************************************/
***************************************************************************/
#ifndef PASSERT_H
#define PASSERT_H
...
...
@@ -57,17 +53,11 @@ public:
assertion
(
const
char
*
cond
,
const
char
*
file
,
int
line
);
assertion
(
const
char
*
m
);
assertion
(
const
assertion
&
a
);
~
assertion
()
throw
()
{
delete
[]
msg
;
}
~
assertion
()
throw
()
{
delete
[]
msg
;
}
assertion
&
operator
=
(
const
assertion
&
a
);
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Woverloaded-virtual"
#endif
const
char
*
what
()
{
return
msg
;
}
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
using
std
::
runtime_error
::
what
;
virtual
const
char
*
what
()
{
return
msg
;
};
};
//---------------------------------------------------------------------------//
...
...
@@ -143,8 +133,10 @@ void insist( const char *cond, const char *msg, const char *file, int line );
#endif // PASSERT_H
/***************************************************************************
* $RCSfile: PAssert.h,v $ $Author: adelmann $
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:33 $
* IPPL_VERSION_ID: $Id: PAssert.h,v 1.1.1.1 2003/01/23 07:40:33 adelmann Exp $
***************************************************************************/
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/test/particle/p3m3dMicrobunching.cpp
View file @
4ede6d7a
// -*- C++ -*-
/**************************************************************************************************************************************
/******************************************************************************
*
* The IPPL Framework
*
...
...
@@ -14,7 +13,7 @@
* epsilon is the softening parameter, printSteps=10 prints every tenth step
*
*
******************************************************************************
*******************************************************
/
******************************************************************************/
#include "Ippl.h"
#include <cassert>
#include <string>
...
...
@@ -473,10 +472,6 @@ class ChargedParticles : public IpplParticleBase<PL> {
H5f_m
=
H5OpenFile
(
fn
.
c_str
(),
H5_O_WRONLY
,
props
);
}
inline
double
getEFDMag
(
int
x
,
int
y
,
int
z
)
{
return
eg_m
[
x
][
y
][
z
].
get
();
}
const
Vector_t
get_hr
()
{
return
hr_m
;
}
...
...
@@ -783,4 +778,12 @@ int main(int argc, char *argv[]){
delete
mesh
;
return
0
;
}
\ No newline at end of file
}
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
ippl/test/sindex/TestSIndex.cpp
View file @
4ede6d7a
...
...
@@ -23,7 +23,6 @@ int main(int argc, char *argv[]) {
const
unsigned
D
=
3U
;
double
hightail
;
unsigned
int
d
;
int
tag
=
Ippl
::
Comm
->
next_tag
(
tag
);
unsigned
ngrid
[
D
];
// grid sizes sizes
unsigned
int
iters
=
100
;
...
...
src/AbstractObjects/Expressions.h
View file @
4ede6d7a
#ifndef OPAL_Expressions_HH
#define OPAL_Expressions_HH 1
// ------------------------------------------------------------------------
// $RCSfile: Expressions.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Namespace Expressions
// This namespace contains the representations for all OPAL expressions
...
...
@@ -43,12 +33,16 @@
// Declared functions:
// A collection of functions implementing a recursive descent parser.
//
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:33:34 $
// $Author: Andreas Adelmann $
// Copyright (c) 2008-2020
// Paul Scherrer Institut, Villigen PSI, Switzerland
// All rights reserved.
//
// OPAL is licensed under GNU GPL version 3.
//
// ------------------------------------------------------------------------
#ifndef OPAL_Expressions_HH
#define OPAL_Expressions_HH 1
#include "MemoryManagement/OwnPtr.h"
#include "Parser/Token.h"
...
...
@@ -64,8 +58,6 @@ class Statement;
class
Table
;
class
TableRowRep
;
// Begin namespace Expression.
// ========================================================================
/// Representation objects and parsers for attribute expressions.
...
...
@@ -124,6 +116,7 @@ namespace Expressions {
PtrToScalar
();
PtrToScalar
(
const
PtrToScalar
&
rhs
);
~
PtrToScalar
();
PtrToScalar
&
operator
=
(
const
PtrToScalar
&
)
=
default
;
};
...
...
@@ -194,6 +187,7 @@ namespace Expressions {
PtrToArray
();
PtrToArray
(
const
PtrToArray
&
rhs
);
~
PtrToArray
();
PtrToArray
&
operator
=
(
const
PtrToArray
<
T
>&
)
=
default
;
};
...
...
@@ -399,3 +393,11 @@ namespace Expressions {
};
#endif // OPAL_Expressions_HH
// vi: set et ts=4 sw=4 sts=4:
// Local Variables:
// mode:c
// c-basic-offset: 4
// indent-tabs-mode: nil
// require-final-newline: nil
// End:
src/Algorithms/bet/math/rk.cpp
View file @
4ede6d7a
...
...
@@ -230,7 +230,7 @@ bool odeint(
}
if
((
x
+
h
-
x2
)
*
(
x
+
h
-
x1
)
>
0.0
)
h
=
x2
-
x
;
double
hdid
,
hnext
;
double
hdid
=
0.0
,
hnext
=
0.0
;
rkqs
(
y
,
dydx
,
nvar
,
x
,
h
,
eps
,
yscal
,
hdid
,
hnext
,
derivs
);
if
(
hdid
==
h
)
++
nok
;
...
...
src/Classic/Algorithms/CoordinateSystemTrafo.h
View file @
4ede6d7a
...
...
@@ -23,6 +23,7 @@ public:
void
invert
();
CoordinateSystemTrafo
inverted
()
const
;
CoordinateSystemTrafo
&
operator
=
(
const
CoordinateSystemTrafo
&
right
)
=
default
;
CoordinateSystemTrafo
operator
*
(
const
CoordinateSystemTrafo
&
right
)
const
;
void
operator
*=
(
const
CoordinateSystemTrafo
&
right
);
...
...
src/Classic/Algorithms/Quaternion.h
View file @
4ede6d7a
...
...
@@ -18,6 +18,7 @@ public:
Quaternion
operator
*
(
const
double
&
)
const
;
Quaternion
operator
*
(
const
Quaternion
&
)
const
;
Quaternion
&
operator
=
(
const
Quaternion
&
)
=
default
;
Quaternion
&
operator
*=
(
const
Quaternion
&
);
Quaternion
operator
/
(
const
double
&
)
const
;
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
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