CONFIG: incorrect BC code templates (fixes #1885)

- autoPtr to Function requires clone() method, not optional copy/move
  argument.

- fix bad character range for 'sed'
This commit is contained in:
Mark Olesen 2020-10-20 14:14:40 +02:00
parent f425424eef
commit e11c072bc4
14 changed files with 43 additions and 46 deletions

View File

@ -207,7 +207,7 @@ do
sed -i \
-e '/^template<class Type>$/d' \
-e 's/this->//g' \
-e 's/\.template[\t ]*\([a-Z]\)/\.\1/g' \
-e 's/\.template[\t ]*\([A-Za-z]\)/\.\1/g' \
-e '/#ifdef NoRepository/,/\/\/ */d' \
${NAME}/${NEWFILE}
;;

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -51,7 +51,7 @@ CONSTRUCT
)
:
PARENT(p, iF),
scalarData_(0.0),
scalarData_(0),
data_(Zero),
fieldData_(p.size(), Zero),
timeVsData_(),
@ -61,7 +61,7 @@ CONSTRUCT
{
this->refValue() = Zero;
this->refGrad() = Zero;
this->valueFraction() = 0.0;
this->valueFraction() = Zero;
}
@ -84,7 +84,7 @@ CONSTRUCT
boolData_(false)
{
this->refGrad() = Zero;
this->valueFraction() = 0.0;
this->valueFraction() = Zero;
this->refValue() = FIELD("fieldData", dict, p.size());
FVPATCHF::operator=(this->refValue());
@ -116,7 +116,7 @@ CONSTRUCT
scalarData_(ptf.scalarData_),
data_(ptf.data_),
fieldData_(ptf.fieldData_, mapper),
timeVsData_(ptf.timeVsData_, false),
timeVsData_(ptf.timeVsData_.clone()),
wordData_(ptf.wordData_),
labelData_(-1),
boolData_(ptf.boolData_)
@ -134,7 +134,7 @@ CONSTRUCT
scalarData_(ptf.scalarData_),
data_(ptf.data_),
fieldData_(ptf.fieldData_),
timeVsData_(ptf.timeVsData_, false),
timeVsData_(ptf.timeVsData_.clone()),
wordData_(ptf.wordData_),
labelData_(-1),
boolData_(ptf.boolData_)
@ -153,7 +153,7 @@ CONSTRUCT
scalarData_(ptf.scalarData_),
data_(ptf.data_),
fieldData_(ptf.fieldData_),
timeVsData_(ptf.timeVsData_, false),
timeVsData_(ptf.timeVsData_.clone()),
wordData_(ptf.wordData_),
labelData_(-1),
boolData_(ptf.boolData_)

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -47,12 +47,12 @@ Description
Usage
\table
Property | Description | Req'd? | Default
scalarData | single scalar value | yes |
data | single TYPE value | yes |
fieldData | TYPE field across patch | yes |
timeVsData | TYPE function of time | yes |
wordData | word, eg name of data object | no | wordDefault
Property | Description | Req'd | Default
scalarData | single scalar value | yes |
data | single TYPE value | yes |
fieldData | TYPE field across patch | yes |
timeVsData | TYPE function of time | yes |
wordData | word, eg name of data object | no | wordDefault
\endtable
Example of the boundary condition specification:
@ -97,7 +97,7 @@ class CONSTRUCT
:
public PARENT
{
// Private data
// Private Data
//- Single valued scalar quantity, e.g. a coefficient
scalar scalarData_;
@ -152,8 +152,7 @@ public:
const dictionary&
);
//- Construct by mapping given BASETypeFvPatchField
// onto a new patch
//- Construct by mapping onto a new patch
CONSTRUCT
(
const CLASS&,
@ -162,7 +161,7 @@ public:
const fvPatchFieldMapper&
);
//- Construct as copy
//- Copy construct
CONSTRUCT
(
const CLASS&
@ -201,7 +200,7 @@ public:
}
// Member functions
// Member Functions
// Mapping functions
@ -226,7 +225,7 @@ public:
//- Write
virtual void write(Ostream&) const;
virtual void write(Ostream& os) const;
};

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -46,7 +46,7 @@ ${codeInclude}
namespace Foam
{
// Forward declarations
// Forward Declarations
class fvMesh;
/*---------------------------------------------------------------------------*\

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) YEAR YEAR AUTHOR,AFFILIATION
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.

View File

@ -45,11 +45,11 @@ SourceFiles
namespace Foam
{
// Forward declarations
// Forward Declarations
class Istream;
class Ostream;
class CLASSNAME;
Istream& operator>>(Istream&, CLASSNAME&);
Ostream& operator<<(Ostream&, const CLASSNAME&);
@ -87,7 +87,7 @@ public:
// Generated Methods
// //- Construct null
// //- Default construct
// CLASSNAME() = default;
//
// //- Copy construct
@ -99,22 +99,22 @@ public:
// Constructors
//- Construct null
//- Default construct
CLASSNAME();
//- Construct from components
CLASSNAME(const dataType& data);
//- Construct from Istream
CLASSNAME(Istream& is);
//- Construct as copy
//- Copy construct
CLASSNAME(const CLASSNAME&);
//- Construct from Istream
explicit CLASSNAME(Istream& is);
// Selectors
//- Select null constructed
//- Select default constructed
static autoPtr<CLASSNAME> New();

View File

@ -25,7 +25,6 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -45,7 +45,7 @@ SourceFiles
namespace Foam
{
// Forward declarations
// Forward Declarations
class someClass;
template<TemplateClassArgument>
@ -90,7 +90,7 @@ public:
// Generated Methods
// //- Construct null
// //- Default construct
// CLASSNAME() = default;
//
// //- Copy construct
@ -102,22 +102,22 @@ public:
// Constructors
//- Construct null
//- Default construct
CLASSNAME();
//- Construct from components
CLASSNAME(const dataType& data);
//- Construct from Istream
CLASSNAME(Istream& is);
//- Construct as copy
CLASSNAME(const CLASSNAME<TemplateArgument>&);
//- Construct from Istream
explicit CLASSNAME(Istream& is);
// Selectors
//- Select null constructed
//- Select default constructed
static autoPtr<CLASSNAME<TemplateArgument>> New();

View File

@ -25,7 +25,6 @@ License
\*---------------------------------------------------------------------------*/
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //