Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
f4596ad2
Commit
f4596ad2
authored
Dec 15, 2014
by
Henry
Browse files
Resolve issues relating to compilation with clang-3.5.0
parent
41368add
Changes
52
Hide whitespace changes
Inline
Side-by-side
README.org
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
#
#+
TITLE
:
OpenFOAM
README
for
version
dev
#+
AUTHOR
:
The
OpenFOAM
Foundation
#+
DATE
:
1
4
th
December
2014
#+
DATE
:
1
6
th
December
2014
#+
LINK
:
http
://
www
.
openfoam
.
org
#+
OPTIONS
:
author
:
nil
^:{}
#
Copyright
(
c
)
2014
OpenFOAM
Foundation
.
...
...
applications/test/nullObject/Make/files
0 → 100644
View file @
f4596ad2
Test-nullObject.C
EXE = $(FOAM_USER_APPBIN)/nullObject
applications/test/nullObject/Make/options
0 → 100644
View file @
f4596ad2
applications/test/nullObject/Test-nullObject.C
0 → 100644
View file @
f4596ad2
#include
"nullObject.H"
#include
"IOstreams.H"
using
namespace
Foam
;
class
SimpleClass
{
public:
//- Null constructor
SimpleClass
()
{}
};
int
main
()
{
// Test pointer and reference to a class
SimpleClass
*
ptrToClass
=
new
SimpleClass
;
SimpleClass
&
refToClass
(
*
ptrToClass
);
if
(
notNull
(
ptrToClass
))
{
Info
<<
"Pass: ptrToClass is not null"
<<
endl
;
}
else
{
Info
<<
"FAIL: refToClass is null"
<<
endl
;
}
if
(
notNull
(
refToClass
))
{
Info
<<
"Pass: refToClass is not null"
<<
endl
;
}
else
{
Info
<<
"FAIL: refToClass is null"
<<
endl
;
}
// Test pointer and reference to the nullObject
const
SimpleClass
*
ptrToNull
(
NullObjectPtr
<
SimpleClass
>
());
const
SimpleClass
&
refToNull
(
*
ptrToNull
);
if
(
isNull
(
ptrToNull
))
{
Info
<<
"Pass: ptrToNull is null"
<<
endl
;
}
else
{
Info
<<
"FAIL: ptrToNull is not null"
<<
endl
;
}
if
(
isNull
(
refToNull
))
{
Info
<<
"Pass: refToNull is null"
<<
endl
;
}
else
{
Info
<<
"FAIL: refToNull is not null"
<<
endl
;
}
// Clean-up
delete
ptrToClass
;
return
0
;
}
applications/utilities/surface/surfaceBooleanFeatures/surfaceBooleanFeatures.C
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
4
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -360,7 +360,6 @@ void calcFeaturePoints(const pointField& points, const edgeList& edges)
const
labelListList
&
pointEdges
=
eMesh
.
pointEdges
();
// Get total number of feature points
label
nFeaturePoints
=
0
;
forAll
(
pointEdges
,
pI
)
...
...
@@ -390,19 +389,6 @@ void calcFeaturePoints(const pointField& points, const edgeList& edges)
nFeatPts
++
;
}
}
label
concaveStart
=
0
;
label
mixedStart
=
0
;
label
nonFeatureStart
=
nFeaturePoints
;
labelListList
featurePointNormals
(
nFeaturePoints
);
labelListList
featurePointEdges
(
nFeaturePoints
);
labelList
regionEdges
;
}
...
...
etc/config/settings.csh
View file @
f4596ad2
...
...
@@ -235,7 +235,7 @@ case ThirdParty:
# using clang - not gcc
setenv WM_CC
'clang'
setenv WM_CXX
'clang++'
set
clang_version
=
llvm-3.
4.2
set
clang_version
=
llvm-3.
5.0
breaksw
default:
echo
...
...
etc/config/settings.sh
View file @
f4596ad2
...
...
@@ -256,7 +256,7 @@ OpenFOAM | ThirdParty)
# using clang - not gcc
export
WM_CC
=
'clang'
export
WM_CXX
=
'clang++'
clang_version
=
llvm-3.
4.2
clang_version
=
llvm-3.
5.0
;;
*
)
echo
1>&2
...
...
src/OpenFOAM/Make/files
View file @
f4596ad2
...
...
@@ -104,7 +104,6 @@ $(ranges)/labelRange/labelRanges.C
$(ranges)/scalarRange/scalarRange.C
$(ranges)/scalarRange/scalarRanges.C
containers/HashTables/HashTable/HashTableCore.C
containers/HashTables/StaticHashTable/StaticHashTableCore.C
containers/Lists/SortableList/ParSortableListName.C
...
...
src/OpenFOAM/containers/Lists/CompactListList/CompactListListI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
4
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -79,7 +79,7 @@ template<class T, class Container>
inline
const
Foam
::
CompactListList
<
T
,
Container
>&
Foam
::
CompactListList
<
T
,
Container
>::
null
()
{
return
*
reinterpret_cast
<
CompactListList
<
T
,
Container
>
*
>
(
0
);
return
NullObjectRef
<
CompactListList
<
T
,
Container
>
>
();
}
...
...
src/OpenFOAM/containers/Lists/FixedList/FixedListI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -107,7 +107,7 @@ Foam::FixedList<T, Size>::clone() const
template
<
class
T
,
unsigned
Size
>
inline
const
Foam
::
FixedList
<
T
,
Size
>&
Foam
::
FixedList
<
T
,
Size
>::
null
()
{
return
*
reinterpret_cast
<
FixedList
<
T
,
Size
>
*
>
(
0
);
return
NullObjectRef
<
FixedList
<
T
,
Size
>
>
();
}
...
...
src/OpenFOAM/containers/Lists/List/ListI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -42,7 +42,7 @@ inline Foam::autoPtr<Foam::List<T> > Foam::List<T>::clone() const
template
<
class
T
>
inline
const
Foam
::
List
<
T
>&
Foam
::
List
<
T
>::
null
()
{
return
*
reinterpret_cast
<
List
<
T
>
*
>
(
0
);
return
NullObjectRef
<
List
<
T
>
>
();
}
...
...
src/OpenFOAM/containers/Lists/SubList/SubListI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -74,7 +74,7 @@ inline Foam::SubList<T>::SubList
template
<
class
T
>
inline
const
Foam
::
SubList
<
T
>&
Foam
::
SubList
<
T
>::
null
()
{
return
*
reinterpret_cast
<
SubList
<
T
>
*
>
(
0
);
return
NullObjectRef
<
SubList
<
T
>
>
();
}
...
...
src/OpenFOAM/containers/Lists/UList/UList.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
4
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -45,6 +45,7 @@ SourceFiles
#include
"bool.H"
#include
"label.H"
#include
"uLabel.H"
#include
"nullObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
src/OpenFOAM/containers/Lists/UList/UListI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -50,7 +50,7 @@ inline Foam::UList<T>::UList(T* __restrict__ v, label size)
template
<
class
T
>
inline
const
Foam
::
UList
<
T
>&
Foam
::
UList
<
T
>::
null
()
{
return
*
reinterpret_cast
<
UList
<
T
>
*
>
(
0
);
return
NullObjectRef
<
UList
<
T
>
>
();
}
...
...
src/OpenFOAM/db/objectRegistry/objectRegistryTemplates.C
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
4
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -204,7 +204,7 @@ const Type& Foam::objectRegistry::lookupObject(const word& name) const
<<
abort
(
FatalError
);
}
return
*
reinterpret_cast
<
const
Type
*
>
(
0
);
return
NullObjectRef
<
Type
>
();
}
...
...
src/OpenFOAM/fields/DimensionedFields/DimensionedField/DimensionedFieldI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -23,57 +23,52 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
Type
,
class
GeoMesh
>
inline
const
DimensionedField
<
Type
,
GeoMesh
>&
DimensionedField
<
Type
,
GeoMesh
>::
null
()
inline
const
Foam
::
DimensionedField
<
Type
,
GeoMesh
>&
Foam
::
DimensionedField
<
Type
,
GeoMesh
>::
null
()
{
return
*
reinterpret_cast
<
DimensionedField
<
Type
,
GeoMesh
>
*
>
(
0
);
return
NullObjectRef
<
DimensionedField
<
Type
,
GeoMesh
>
>
();
}
template
<
class
Type
,
class
GeoMesh
>
inline
const
typename
GeoMesh
::
Mesh
&
DimensionedField
<
Type
,
GeoMesh
>::
mesh
()
const
Foam
::
DimensionedField
<
Type
,
GeoMesh
>::
mesh
()
const
{
return
mesh_
;
}
template
<
class
Type
,
class
GeoMesh
>
inline
const
dimensionSet
&
DimensionedField
<
Type
,
GeoMesh
>::
dimensions
()
const
inline
const
Foam
::
dimensionSet
&
Foam
::
DimensionedField
<
Type
,
GeoMesh
>::
dimensions
()
const
{
return
dimensions_
;
}
template
<
class
Type
,
class
GeoMesh
>
inline
dimensionSet
&
DimensionedField
<
Type
,
GeoMesh
>::
dimensions
()
inline
Foam
::
dimensionSet
&
Foam
::
DimensionedField
<
Type
,
GeoMesh
>::
dimensions
()
{
return
dimensions_
;
}
template
<
class
Type
,
class
GeoMesh
>
inline
const
Field
<
Type
>&
DimensionedField
<
Type
,
GeoMesh
>::
field
()
const
inline
const
Foam
::
Field
<
Type
>&
Foam
::
DimensionedField
<
Type
,
GeoMesh
>::
field
()
const
{
return
*
this
;
}
template
<
class
Type
,
class
GeoMesh
>
inline
Field
<
Type
>&
DimensionedField
<
Type
,
GeoMesh
>::
field
()
inline
Foam
::
Field
<
Type
>&
Foam
::
DimensionedField
<
Type
,
GeoMesh
>::
field
()
{
return
*
this
;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -23,15 +23,10 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
class
Type
,
class
GeoMesh
>
inline
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
inline
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
(
const
SubField
<
Type
>&
slist
)
...
...
@@ -40,7 +35,7 @@ inline SubDimensionedField<Type, GeoMesh>::SubDimensionedField
{}
template
<
class
Type
,
class
GeoMesh
>
inline
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
inline
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
(
const
UList
<
Type
>&
list
,
const
label
subSize
...
...
@@ -51,7 +46,7 @@ inline SubDimensionedField<Type, GeoMesh>::SubDimensionedField
template
<
class
Type
,
class
GeoMesh
>
inline
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
inline
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
(
const
UList
<
Type
>&
list
,
const
label
subSize
,
...
...
@@ -63,7 +58,7 @@ inline SubDimensionedField<Type, GeoMesh>::SubDimensionedField
template
<
class
Type
,
class
GeoMesh
>
inline
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
inline
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
SubDimensionedField
(
const
SubDimensionedField
<
Type
,
GeoMesh
>&
sfield
)
...
...
@@ -75,18 +70,21 @@ inline SubDimensionedField<Type, GeoMesh>::SubDimensionedField
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Return a null Field
template
<
class
Type
,
class
GeoMesh
>
inline
const
SubDimensionedField
<
Type
,
GeoMesh
>&
SubDimensionedField
<
Type
,
GeoMesh
>::
null
()
inline
const
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>&
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
null
()
{
return
*
reinterpret_cast
<
SubDimensionedField
<
Type
,
GeoMesh
>
*
>
(
0
);
return
NullObjectRef
<
SubDimensionedField
<
Type
,
GeoMesh
>
>
();
}
template
<
class
Type
,
class
GeoMesh
>
inline
tmp
<
Field
<
typename
SubDimensionedField
<
Type
,
GeoMesh
>::
cmptType
>
>
SubDimensionedField
<
Type
,
GeoMesh
>::
component
inline
Foam
::
tmp
<
Foam
::
Field
<
typename
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
cmptType
>
>
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
component
(
const
direction
d
)
const
...
...
@@ -99,8 +97,8 @@ SubDimensionedField<Type, GeoMesh>::component
template
<
class
Type
,
class
GeoMesh
>
inline
tmp
<
DimensionedField
<
Type
,
GeoMesh
>
>
SubDimensionedField
<
Type
,
GeoMesh
>::
T
()
const
inline
Foam
::
tmp
<
Foam
::
DimensionedField
<
Type
,
GeoMesh
>
>
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
T
()
const
{
return
(
...
...
@@ -112,7 +110,7 @@ SubDimensionedField<Type, GeoMesh>::T() const
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template
<
class
Type
,
class
GeoMesh
>
inline
void
SubDimensionedField
<
Type
,
GeoMesh
>::
operator
=
inline
void
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
operator
=
(
const
SubDimensionedField
<
Type
,
GeoMesh
>&
rhs
)
...
...
@@ -122,17 +120,12 @@ inline void SubDimensionedField<Type, GeoMesh>::operator=
}
// Allow cast to a const DimensionedField<Type, GeoMesh>&
template
<
class
Type
,
class
GeoMesh
>
inline
SubDimensionedField
<
Type
,
GeoMesh
>::
operator
const
DimensionedField
<
Type
,
GeoMesh
>&
()
const
inline
Foam
::
SubDimensionedField
<
Type
,
GeoMesh
>::
operator
const
Foam
::
DimensionedField
<
Type
,
GeoMesh
>&
()
const
{
return
*
(
reinterpret_cast
<
const
DimensionedField
<
Type
,
GeoMesh
>*>
(
this
));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
// ************************************************************************* //
src/OpenFOAM/fields/Fields/Field/Field.C
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
4
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -458,7 +458,7 @@ void Foam::Field<Type>::map
if
(
mapper
.
direct
()
&&
&
mapper
.
directAddressing
()
&&
notNull
(
mapper
.
directAddressing
()
)
&&
mapper
.
directAddressing
().
size
()
)
{
...
...
@@ -493,7 +493,7 @@ void Foam::Field<Type>::autoMap
(
(
mapper
.
direct
()
&&
&
mapper
.
directAddressing
()
&&
notNull
(
mapper
.
directAddressing
()
)
&&
mapper
.
directAddressing
().
size
()
)
||
(
!
mapper
.
direct
()
&&
mapper
.
addressing
().
size
())
...
...
src/OpenFOAM/fields/Fields/Field/Field.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-201
3
OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-201
4
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -100,7 +100,7 @@ public:
//- Return a null field
inline
static
const
Field
<
Type
>&
null
()
{
return
*
reinterpret_cast
<
Field
<
Type
>
*
>
(
0
);
return
NullObjectRef
<
Field
<
Type
>
>
();
}
...
...
src/OpenFOAM/fields/Fields/Field/SubFieldI.H
View file @
f4596ad2
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011
-2014
OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -84,7 +84,7 @@ inline Foam::SubField<Type>::SubField
template
<
class
Type
>
inline
const
Foam
::
SubField
<
Type
>&
Foam
::
SubField
<
Type
>::
null
()
{
return
*
reinterpret_cast
<
SubField
<
Type
>
*
>
(
0
);
return
NullObjectRef
<
SubField
<
Type
>
>
();
}
...
...
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