Skip to content
GitLab
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
46b76862
Commit
46b76862
authored
May 16, 2018
by
Mark OLESEN
Browse files
STYLE: use FieldBase for template invariant parts
- use refCount instead of the tmp<...>::refCount alias
parent
fe80e3b4
Changes
33
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/Make/files
View file @
46b76862
...
...
@@ -627,36 +627,36 @@ fields/cloud/cloud.C
Fields = fields/Fields
$(Fields)/Field/FieldBase.C
$(Fields)/labelField/labelField.C
$(Fields)/scalarField/scalarField.C
$(Fields)/vectorField/vectorField.C
$(Fields)/vector2DField/vector2DField.C
$(Fields)/sphericalTensorField/sphericalTensorField.C
$(Fields)/diagTensorField/diagTensorField.C
$(Fields)/symmTensorField/symmTensorField.C
$(Fields)/tensorField/tensorField.C
$(Fields)/quaternionField/quaternionField.C
$(Fields)/triadField/triadField.C
$(Fields)/complexFields/complexFields.C
$(Fields)/labelField/labelIOField.C
$(Fields)/labelField/labelFieldIOField.C
$(Fields)/scalarField/scalarField.C
$(Fields)/scalarField/scalarIOField.C
$(Fields)/scalarField/scalarFieldIOField.C
$(Fields)/vectorField/vectorField.C
$(Fields)/vectorField/vectorIOField.C
$(Fields)/vectorField/vectorFieldIOField.C
$(Fields)/vector2DField/vector2DField.C
$(Fields)/vector2DField/vector2DIOField.C
$(Fields)/vector2DField/vector2DFieldIOField.C
$(Fields)/sphericalTensorField/sphericalTensorField.C
$(Fields)/sphericalTensorField/sphericalTensorIOField.C
$(Fields)/sphericalTensorField/sphericalTensorFieldIOField.C
$(Fields)/diagTensorField/diagTensorField.C
$(Fields)/diagTensorField/diagTensorIOField.C
$(Fields)/diagTensorField/diagTensorFieldIOField.C
$(Fields)/symmTensorField/symmTensorField.C
$(Fields)/symmTensorField/symmTensorIOField.C
$(Fields)/symmTensorField/symmTensorFieldIOField.C
$(Fields)/tensorField/tensorField.C
$(Fields)/tensorField/tensorIOField.C
$(Fields)/tensorField/tensorFieldIOField.C
$(Fields)/quaternionField/quaternionField.C
$(Fields)/quaternionField/quaternionIOField.C
$(Fields)/triadField/triadField.C
$(Fields)/triadField/triadIOField.C
$(Fields)/complexFields/complexFields.C
$(Fields)/transformField/transformField.C
...
...
src/OpenFOAM/fields/DimensionedFields/DimensionedField/SubDimensionedFieldI.H
View file @
46b76862
...
...
@@ -63,7 +63,7 @@ inline Foam::SubDimensionedField<Type, GeoMesh>::SubDimensionedField
const
SubDimensionedField
<
Type
,
GeoMesh
>&
sfield
)
:
tmp
<
SubDimensionedField
<
Type
,
GeoMesh
>>::
refCount
(),
refCount
(),
SubField
<
Type
>
(
sfield
)
{}
...
...
src/OpenFOAM/fields/FieldFields/FieldField/FieldField.C
View file @
46b76862
...
...
@@ -21,9 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Generic fieldField type.
\*---------------------------------------------------------------------------*/
#include
"FieldField.H"
...
...
@@ -137,7 +134,7 @@ FieldField<Field, Type>::FieldField
template
<
template
<
class
>
class
Field
,
class
Type
>
FieldField
<
Field
,
Type
>::
FieldField
(
const
FieldField
<
Field
,
Type
>&
f
)
:
tmp
<
FieldField
<
Field
,
Type
>>::
refCount
(),
refCount
(),
PtrList
<
Field
<
Type
>>
(
f
)
{}
...
...
src/OpenFOAM/fields/FieldFields/FieldField/FieldField.H
View file @
46b76862
...
...
@@ -73,7 +73,7 @@ Ostream& operator<<
template
<
template
<
class
>
class
Field
,
class
Type
>
class
FieldField
:
public
tmp
<
FieldField
<
Field
,
Type
>>::
refCount
,
public
refCount
,
public
PtrList
<
Field
<
Type
>>
{
...
...
src/OpenFOAM/fields/Fields/Field/Field.C
View file @
46b76862
...
...
@@ -29,12 +29,6 @@ License
#include
"contiguous.H"
#include
"mapDistributeBase.H"
// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
template
<
class
Type
>
const
char
*
const
Foam
::
Field
<
Type
>::
typeName
(
"Field"
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template
<
class
Type
>
...
...
src/OpenFOAM/fields/Fields/Field/Field.H
View file @
46b76862
...
...
@@ -47,6 +47,7 @@ SourceFiles
#include
"VectorSpace.H"
#include
"scalarList.H"
#include
"labelList.H"
#include
"FieldBase.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -73,7 +74,7 @@ Ostream& operator<<(Ostream&, const tmp<Field<Type>>&);
template
<
class
Type
>
class
Field
:
public
tmp
<
Field
<
Type
>>::
refCount
,
public
Field
Base
,
public
List
<
Type
>
{
...
...
@@ -86,11 +87,6 @@ public:
typedef
SubField
<
Type
>
subField
;
// Static data members
static
const
char
*
const
typeName
;
// Static Member Functions
//- Return nullObject reference field
...
...
src/OpenFOAM/fields/Fields/Field/FieldBase.C
0 → 100644
View file @
46b76862
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include
"FieldBase.H"
// * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * //
const
char
*
const
Foam
::
FieldBase
::
typeName
(
"Field"
);
// ************************************************************************* //
src/OpenFOAM/fields/Fields/Field/FieldBase.H
0 → 100644
View file @
46b76862
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::FieldBase
Description
Template invariant parts for Field
SourceFiles
FieldBase.C
\*---------------------------------------------------------------------------*/
#ifndef FieldBase_H
#define FieldBase_H
#include
"refCount.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace
Foam
{
/*---------------------------------------------------------------------------*\
Class FieldBase Declaration
\*---------------------------------------------------------------------------*/
class
FieldBase
:
public
refCount
{
public:
// Static data members
//- Typename for Field
static
const
char
*
const
typeName
;
// Constructors
//- Construct null, with refCount zero
constexpr
FieldBase
()
noexcept
:
refCount
()
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace Foam
#endif
// ************************************************************************* //
src/OpenFOAM/fields/Fields/Field/SubField.H
View file @
46b76862
...
...
@@ -59,7 +59,7 @@ template<class Type> class SubField;
template
<
class
Type
>
class
SubField
:
public
tmp
<
SubField
<
Type
>>::
refCount
,
public
refCount
,
public
SubList
<
Type
>
{
...
...
src/OpenFOAM/fields/Fields/Field/SubFieldI.H
View file @
46b76862
...
...
@@ -74,7 +74,7 @@ inline Foam::SubField<Type>::SubField
const
SubField
<
Type
>&
sfield
)
:
tmp
<
SubField
<
Type
>>::
refCount
(),
refCount
(),
SubList
<
Type
>
(
sfield
)
{}
...
...
src/OpenFOAM/primitives/functions/Function1/Function1/Function1.C
View file @
46b76862
...
...
@@ -38,18 +38,11 @@ Foam::Function1<Type>::Function1(const word& entryName)
template
<
class
Type
>
Foam
::
Function1
<
Type
>::
Function1
(
const
Function1
<
Type
>&
de
)
:
tmp
<
Function1
<
Type
>>::
refCount
(),
refCount
(),
name_
(
de
.
name_
)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
Foam
::
Function1
<
Type
>::~
Function1
()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template
<
class
Type
>
...
...
@@ -111,8 +104,8 @@ Foam::FieldFunction1<Function1Type>::value
const
scalarField
&
x
)
const
{
tmp
<
Field
<
Type
>>
tfld
(
new
Field
<
Type
>
(
x
.
size
())
)
;
Field
<
Type
>
&
fld
=
tfld
.
ref
();
auto
tfld
=
tmp
<
Field
<
Type
>>
::
New
(
x
.
size
());
auto
&
fld
=
tfld
.
ref
();
forAll
(
x
,
i
)
{
...
...
@@ -152,8 +145,8 @@ Foam::FieldFunction1<Function1Type>::integrate
const
scalarField
&
x2
)
const
{
tmp
<
Field
<
Type
>>
tfld
(
new
Field
<
Type
>
(
x1
.
size
())
)
;
Field
<
Type
>
&
fld
=
tfld
.
ref
();
auto
tfld
=
tmp
<
Field
<
Type
>>
::
New
(
x1
.
size
());
auto
&
fld
=
tfld
.
ref
();
forAll
(
x1
,
i
)
{
...
...
src/OpenFOAM/primitives/functions/Function1/Function1/Function1.H
View file @
46b76862
...
...
@@ -61,11 +61,11 @@ template<class Type> Ostream& operator<<(Ostream&, const Function1<Type>&);
template
<
class
Type
>
class
Function1
:
public
tmp
<
Function1
<
Type
>>::
refCount
public
refCount
{
// Private Member Functions
//-
Disallow default bitwise
assignment
//-
No copy
assignment
void
operator
=
(
const
Function1
<
Type
>&
)
=
delete
;
...
...
@@ -119,7 +119,7 @@ public:
//- Destructor
virtual
~
Function1
();
virtual
~
Function1
()
=
default
;
// Member Functions
...
...
@@ -194,8 +194,7 @@ public:
//- Destructor
virtual
~
FieldFunction1
()
{}
virtual
~
FieldFunction1
()
=
default
;
// Member Functions
...
...
src/finiteArea/faMatrices/faMatrix/faMatrix.H
View file @
46b76862
...
...
@@ -71,7 +71,7 @@ Ostream& operator<<(Ostream&, const faMatrix<Type>&);
template
<
class
Type
>
class
faMatrix
:
public
tmp
<
faMatrix
<
Type
>>::
refCount
,
public
refCount
,
public
lduMatrix
{
// Private data
...
...
src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C
View file @
46b76862
...
...
@@ -46,7 +46,7 @@ namespace fv
template
<
class
Type
>
convectionScheme
<
Type
>::
convectionScheme
(
const
convectionScheme
&
cs
)
:
tmp
<
convectionScheme
<
Type
>>::
refCount
(),
refCount
(),
mesh_
(
cs
.
mesh_
)
{}
...
...
src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.H
View file @
46b76862
...
...
@@ -67,7 +67,7 @@ namespace fv
template
<
class
Type
>
class
convectionScheme
:
public
tmp
<
convectionScheme
<
Type
>>::
refCount
public
refCount
{
// Private data
...
...
src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C
View file @
46b76862
...
...
@@ -21,9 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Description
Abstract base class for finite volume calculus d2dt2 schemes.
\*---------------------------------------------------------------------------*/
#include
"fv.H"
...
...
@@ -84,13 +81,6 @@ tmp<d2dt2Scheme<Type>> d2dt2Scheme<Type>::New
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
d2dt2Scheme
<
Type
>::~
d2dt2Scheme
()
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace fv
...
...
src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.H
View file @
46b76862
...
...
@@ -25,7 +25,7 @@ Class
Foam::fv::d2dt2Scheme
Description
Abstract base class for d2dt2 schemes.
Abstract base class for
finite volume
d2dt2 schemes.
SourceFiles
d2dt2Scheme.C
...
...
@@ -64,7 +64,7 @@ namespace fv
template
<
class
Type
>
class
d2dt2Scheme
:
public
tmp
<
d2dt2Scheme
<
Type
>>::
refCount
public
refCount
{
protected:
...
...
@@ -76,11 +76,11 @@ protected:
// Private Member Functions
//-
Disallow
copy construct
d2dt2Scheme
(
const
d2dt2Scheme
&
);
//-
No
copy construct
d2dt2Scheme
(
const
d2dt2Scheme
&
)
=
delete
;
//-
Disallow default bitwise
assignment
void
operator
=
(
const
d2dt2Scheme
&
);
//-
No copy
assignment
void
operator
=
(
const
d2dt2Scheme
&
)
=
delete
;
public:
...
...
@@ -127,7 +127,7 @@ public:
//- Destructor
virtual
~
d2dt2Scheme
();
virtual
~
d2dt2Scheme
()
=
default
;
// Member Functions
...
...
src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C
View file @
46b76862
...
...
@@ -84,13 +84,6 @@ tmp<ddtScheme<Type>> ddtScheme<Type>::New
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
ddtScheme
<
Type
>::~
ddtScheme
()
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template
<
class
Type
>
...
...
@@ -120,14 +113,11 @@ tmp<fvMatrix<Type>> ddtScheme<Type>::fvmDdt
{
NotImplemented
;
return
tmp
<
fvMatrix
<
Type
>>
return
tmp
<
fvMatrix
<
Type
>>
::
New
(
new
fvMatrix
<
Type
>
(
vf
,
alpha
.
dimensions
()
*
rho
.
dimensions
()
*
vf
.
dimensions
()
*
dimVol
/
dimTime
)
vf
,
alpha
.
dimensions
()
*
rho
.
dimensions
()
*
vf
.
dimensions
()
*
dimVol
/
dimTime
);
}
...
...
src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.H
View file @
46b76862
...
...
@@ -30,7 +30,6 @@ Group
Description
Abstract base class for ddt schemes.
SourceFiles
ddtScheme.C
...
...
@@ -68,7 +67,7 @@ namespace fv
template
<
class
Type
>
class
ddtScheme
:
public
tmp
<
ddtScheme
<
Type
>>::
refCount
public
refCount
{
protected:
...
...
@@ -83,11 +82,11 @@ protected:
// Private Member Functions
//-
Disallow
copy construct
ddtScheme
(
const
ddtScheme
&
);
//-
No
copy construct
ddtScheme
(
const
ddtScheme
&
)
=
delete
;
//-
Disallow default bitwise
assignment
void
operator
=
(
const
ddtScheme
&
);
//-
No copy
assignment
void
operator
=
(
const
ddtScheme
&
)
=
delete
;
public:
...
...
@@ -136,7 +135,7 @@ public:
//- Destructor
virtual
~
ddtScheme
();
virtual
~
ddtScheme
()
=
default
;
// Member Functions
...
...
src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C
View file @
46b76862
...
...
@@ -85,16 +85,6 @@ tmp<divScheme<Type>> divScheme<Type>::New
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template
<
class
Type
>
divScheme
<
Type
>::~
divScheme
()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace fv
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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