mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Add the OpenFOAM source tree
This commit is contained in:
65
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.C
Normal file
65
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.C
Normal file
@ -0,0 +1,65 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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 "FilterFunctionObjectTemplate.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// dynamicCode:
|
||||
// SHA1 = ${SHA1sum}
|
||||
//
|
||||
// unique function name that can be checked if the correct library version
|
||||
// has been loaded
|
||||
void ${typeName}_${SHA1sum}(bool load)
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
// code that can be explicitly executed after loading
|
||||
}
|
||||
else
|
||||
{
|
||||
// code that can be explicitly executed before unloading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
defineNamedTemplateTypeNameAndDebug(${typeName}FilterFunctionObject, 0);
|
||||
|
||||
//addToRunTimeSelectionTable
|
||||
addRemovableToRunTimeSelectionTable
|
||||
(
|
||||
functionObject,
|
||||
${typeName}FilterFunctionObject,
|
||||
dictionary
|
||||
);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
51
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.H
Normal file
51
etc/codeTemplates/dynamicCode/FilterFunctionObjectTemplate.H
Normal file
@ -0,0 +1,51 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
FunctionObject wrapper around functionObjectTemplate to allow them
|
||||
to be created via the functions entry within controlDict.
|
||||
|
||||
SourceFiles
|
||||
FilterFunctionObject.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef FilterFunctionObject_H
|
||||
#define FilterFunctionObject_H
|
||||
|
||||
#include "functionObjectTemplate.H"
|
||||
#include "OutputFilterFunctionObject.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef OutputFilterFunctionObject<${typeName}FunctionObject>
|
||||
${typeName}FilterFunctionObject;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
50
etc/codeTemplates/dynamicCode/IOfunctionObjectTemplate.H
Normal file
50
etc/codeTemplates/dynamicCode/IOfunctionObjectTemplate.H
Normal file
@ -0,0 +1,50 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Typedef
|
||||
Foam::IOfunctionObjectTemplate
|
||||
|
||||
Description
|
||||
Instance of the generic IOOutputFilter for ${typeName}FunctionObject.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef IOfunctionObjectTemplate_H
|
||||
#define IOfunctionObjectTemplate_H
|
||||
|
||||
#include "functionObjectTemplate.H"
|
||||
#include "IOOutputFilter.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
typedef IOOutputFilter<${typeName}FunctionObject>
|
||||
IO${typeName}FunctionObject;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
71
etc/codeTemplates/dynamicCode/codeStreamTemplate.C
Normal file
71
etc/codeTemplates/dynamicCode/codeStreamTemplate.C
Normal file
@ -0,0 +1,71 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
Template for use with codeStream.
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "dictionary.H"
|
||||
#include "Ostream.H"
|
||||
#include "Pstream.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void ${typeName}
|
||||
(
|
||||
Ostream& os,
|
||||
const dictionary& dict
|
||||
)
|
||||
{
|
||||
//{{{ begin code
|
||||
${code}
|
||||
//}}} end code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
204
etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C
Normal file
204
etc/codeTemplates/dynamicCode/codedFvOptionTemplate.C
Normal file
@ -0,0 +1,204 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ 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 "codedFvOptionTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
#include "fvMatrix.H"
|
||||
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace fv
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// dynamicCode:
|
||||
// SHA1 = ${SHA1sum}
|
||||
//
|
||||
// unique function name that can be checked if the correct library version
|
||||
// has been loaded
|
||||
void ${typeName}_${SHA1sum}(bool load)
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
// code that can be explicitly executed after loading
|
||||
}
|
||||
else
|
||||
{
|
||||
// code that can be explicitly executed before unloading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
//makeRemovablePatchTypeField
|
||||
//(
|
||||
// fvPatch${FieldType},
|
||||
// ${typeName}FvOption${SourceType}
|
||||
//);
|
||||
defineTypeNameAndDebug(${typeName}FvOption${SourceType}, 0);
|
||||
addRemovableToRunTimeSelectionTable
|
||||
(
|
||||
option,
|
||||
${typeName}FvOption${SourceType},
|
||||
dictionary
|
||||
);
|
||||
|
||||
|
||||
const char* const ${typeName}FvOption${SourceType}::SHA1sum =
|
||||
"${SHA1sum}";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FvOption${SourceType}::
|
||||
${typeName}FvOption${SourceType}
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
)
|
||||
:
|
||||
option(name, modelType, dict, mesh)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from components\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FvOption${SourceType}::
|
||||
~${typeName}FvOption${SourceType}()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"destroy ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ${typeName}FvOption${SourceType}::correct
|
||||
(
|
||||
GeometricField<${TemplateType}, fvPatchField, volMesh>& fld
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"${typeName}FvOption${SourceType}::correct()\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeCorrect}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FvOption${SourceType}::addSup
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"${typeName}FvOption${SourceType}::addSup()\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeAddSup}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FvOption${SourceType}::addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"${typeName}FvOption${SourceType}::addSup()\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeAddSup}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FvOption${SourceType}::setValue
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"${typeName}FvOption${SourceType}::setValue()\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeSetValue}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
} // End namespace fv
|
||||
// ************************************************************************* //
|
||||
193
etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H
Normal file
193
etc/codeTemplates/dynamicCode/codedFvOptionTemplate.H
Normal file
@ -0,0 +1,193 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
Template for use with dynamic code generation of a source.
|
||||
The hook functions take the following arguments:
|
||||
|
||||
codeCorrect
|
||||
(
|
||||
GeometricField<Type, fvPatchField, volMesh>& fld
|
||||
)
|
||||
|
||||
codeAddSup
|
||||
(
|
||||
fvMatrix<Type}>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
|
||||
setValue
|
||||
(
|
||||
fvMatrix<Type}>& eqn,
|
||||
const label fieldI
|
||||
)
|
||||
|
||||
where :
|
||||
fld is the field in fieldNames
|
||||
eqn is the fvMatrix
|
||||
|
||||
energySource
|
||||
{
|
||||
type scalarCodedSource;
|
||||
|
||||
active true;
|
||||
selectionMode all;
|
||||
|
||||
scalarCodedSourceCoeffs
|
||||
{
|
||||
fieldNames (h);
|
||||
redirectType sourceTime;
|
||||
|
||||
codeInclude
|
||||
#{
|
||||
|
||||
#};
|
||||
|
||||
codeCorrect
|
||||
#{
|
||||
Pout<< "**codeCorrect**" << endl;
|
||||
#};
|
||||
|
||||
codeAddSup
|
||||
#{
|
||||
const Time& time = mesh().time();
|
||||
const scalarField& V = mesh_.V();
|
||||
scalarField& heSource = eqn.source();
|
||||
heSource -= 0.1*sqr(time.value())*V;
|
||||
#};
|
||||
|
||||
codeSetValue
|
||||
#{
|
||||
Pout<< "**codeSetValue**" << endl;
|
||||
#};
|
||||
|
||||
// Dummy entry. Make dependent on above to trigger recompilation
|
||||
code
|
||||
#{
|
||||
$codeInclude
|
||||
$codeCorrect
|
||||
$codeAddSup
|
||||
$codeSetValue
|
||||
#};
|
||||
}
|
||||
|
||||
sourceTimeCoeffs
|
||||
{
|
||||
// Dummy entry
|
||||
}
|
||||
}
|
||||
|
||||
SourceFiles
|
||||
codedFvOptionTemplate.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef codedFvOptionTemplate_H
|
||||
#define codedFvOptionTemplate_H
|
||||
|
||||
#include "fvOption.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
namespace fv
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
A templated CodedFvOption
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ${typeName}FvOption${SourceType}
|
||||
:
|
||||
public option
|
||||
{
|
||||
public:
|
||||
|
||||
//- Information about the SHA1 of the code itself
|
||||
static const char* const SHA1sum;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("${typeName}");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
${typeName}FvOption${SourceType}
|
||||
(
|
||||
const word& name,
|
||||
const word& modelType,
|
||||
const dictionary& dict,
|
||||
const fvMesh& mesh
|
||||
);
|
||||
|
||||
//- Destructor
|
||||
virtual ~${typeName}FvOption${SourceType}();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Correct field
|
||||
virtual void correct
|
||||
(
|
||||
GeometricField<${TemplateType}, fvPatchField, volMesh>&
|
||||
);
|
||||
|
||||
//- Explicit and implicit matrix contributions
|
||||
virtual void addSup
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
);
|
||||
|
||||
//- Explicit and implicit matrix contributions for compressible
|
||||
// equations
|
||||
virtual void addSup
|
||||
(
|
||||
const volScalarField& rho,
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
);
|
||||
|
||||
//- Set value
|
||||
virtual void setValue
|
||||
(
|
||||
fvMatrix<${TemplateType}>& eqn,
|
||||
const label fieldI
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
} // End namespace fv
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
211
etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.C
Normal file
211
etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.C
Normal file
@ -0,0 +1,211 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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 "fixedValueFvPatchFieldTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// dynamicCode:
|
||||
// SHA1 = ${SHA1sum}
|
||||
//
|
||||
// unique function name that can be checked if the correct library version
|
||||
// has been loaded
|
||||
void ${typeName}_${SHA1sum}(bool load)
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
// code that can be explicitly executed after loading
|
||||
}
|
||||
else
|
||||
{
|
||||
// code that can be explicitly executed before unloading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeRemovablePatchTypeField
|
||||
(
|
||||
fvPatch${FieldType},
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
);
|
||||
|
||||
|
||||
const char* const ${typeName}FixedValueFvPatch${FieldType}::SHA1sum =
|
||||
"${SHA1sum}";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<${TemplateType}>(p, iF)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/DimensionedField\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/DimensionedField/mapper\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<${TemplateType}>(p, iF, dict)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/dictionary\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<${TemplateType}>(ptf)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" as copy\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}& ptf,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValueFvPatchField<${TemplateType}>(ptf, iF)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum} "
|
||||
"as copy/DimensionedField\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FixedValueFvPatch${FieldType}::
|
||||
~${typeName}FixedValueFvPatch${FieldType}()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"destroy ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ${typeName}FixedValueFvPatch${FieldType}::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"updateCoeffs ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${code}
|
||||
//}}} end code
|
||||
|
||||
this->fixedValueFvPatchField<${TemplateType}>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
142
etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H
Normal file
142
etc/codeTemplates/dynamicCode/fixedValueFvPatchFieldTemplate.H
Normal file
@ -0,0 +1,142 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
Template for use with dynamic code generation of a
|
||||
fixedValue fvPatchField.
|
||||
|
||||
- without state
|
||||
|
||||
SourceFiles
|
||||
fixedValueFvPatchFieldTemplate.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedValueFvPatchTemplate${FieldType}_H
|
||||
#define fixedValueFvPatchTemplate${FieldType}_H
|
||||
|
||||
#include "fixedValueFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
A templated FixedValueFvPatch
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ${typeName}FixedValueFvPatch${FieldType}
|
||||
:
|
||||
public fixedValueFvPatchField<${TemplateType}>
|
||||
{
|
||||
public:
|
||||
|
||||
//- Information about the SHA1 of the code itself
|
||||
static const char* const SHA1sum;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("${typeName}");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping a copy onto a new patch
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp< fvPatch${FieldType} > clone() const
|
||||
{
|
||||
return tmp< fvPatch${FieldType} >
|
||||
(
|
||||
new ${typeName}FixedValueFvPatch${FieldType}(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
${typeName}FixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValueFvPatch${FieldType}&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp< fvPatch${FieldType} > clone
|
||||
(
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp< fvPatch${FieldType} >
|
||||
(
|
||||
new ${typeName}FixedValueFvPatch${FieldType}(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~${typeName}FixedValueFvPatch${FieldType}();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,211 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ 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 "fixedValuePointPatchFieldTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "pointPatchFieldMapper.H"
|
||||
#include "pointFields.H"
|
||||
#include "unitConversion.H"
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// dynamicCode:
|
||||
// SHA1 = ${SHA1sum}
|
||||
//
|
||||
// unique function name that can be checked if the correct library version
|
||||
// has been loaded
|
||||
void ${typeName}_${SHA1sum}(bool load)
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
// code that can be explicitly executed after loading
|
||||
}
|
||||
else
|
||||
{
|
||||
// code that can be explicitly executed before unloading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makePointPatchTypeField
|
||||
(
|
||||
pointPatch${FieldType},
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
);
|
||||
|
||||
|
||||
const char* const ${typeName}FixedValuePointPatch${FieldType}::SHA1sum =
|
||||
"${SHA1sum}";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FixedValuePointPatch${FieldType}::
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<${TemplateType}, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<${TemplateType}>(p, iF)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/DimensionedField\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValuePointPatch${FieldType}::
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValuePointPatch${FieldType}& ptf,
|
||||
const pointPatch& p,
|
||||
const DimensionedField<${TemplateType}, pointMesh>& iF,
|
||||
const pointPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/DimensionedField/mapper\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValuePointPatch${FieldType}::
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const pointPatch& p,
|
||||
const DimensionedField<${TemplateType}, pointMesh>& iF,
|
||||
const dictionary& dict,
|
||||
const bool valueRequired
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<${TemplateType}>(p, iF, dict, valueRequired)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/dictionary\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValuePointPatch${FieldType}::
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValuePointPatch${FieldType}& ptf
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<${TemplateType}>(ptf)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" as copy\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}FixedValuePointPatch${FieldType}::
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValuePointPatch${FieldType}& ptf,
|
||||
const DimensionedField<${TemplateType}, pointMesh>& iF
|
||||
)
|
||||
:
|
||||
fixedValuePointPatchField<${TemplateType}>(ptf, iF)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum} "
|
||||
"as copy/DimensionedField\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FixedValuePointPatch${FieldType}::
|
||||
~${typeName}FixedValuePointPatch${FieldType}()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"destroy ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ${typeName}FixedValuePointPatch${FieldType}::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"updateCoeffs ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${code}
|
||||
//}}} end code
|
||||
|
||||
this->fixedValuePointPatchField<${TemplateType}>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,143 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
Template for use with dynamic code generation of a
|
||||
fixedValue pointPatchField.
|
||||
|
||||
- without state
|
||||
|
||||
SourceFiles
|
||||
fixedValuePointPatchFieldTemplate.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef fixedValuePointPatchTemplate${FieldType}_H
|
||||
#define fixedValuePointPatchTemplate${FieldType}_H
|
||||
|
||||
#include "fixedValuePointPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
A templated FixedValuePointPatchField
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ${typeName}FixedValuePointPatch${FieldType}
|
||||
:
|
||||
public fixedValuePointPatchField<${TemplateType}>
|
||||
{
|
||||
public:
|
||||
|
||||
//- Information about the SHA1 of the code itself
|
||||
static const char* const SHA1sum;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("${typeName}");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<${TemplateType}, pointMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const pointPatch&,
|
||||
const DimensionedField<${TemplateType}, pointMesh>&,
|
||||
const dictionary&,
|
||||
const bool valueRequired=true
|
||||
);
|
||||
|
||||
//- Construct by mapping a copy onto a new patch
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValuePointPatch${FieldType}&,
|
||||
const pointPatch&,
|
||||
const DimensionedField<${TemplateType}, pointMesh>&,
|
||||
const pointPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValuePointPatch${FieldType}&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual autoPtr< pointPatchField<${TemplateType}> > clone() const
|
||||
{
|
||||
return autoPtr< pointPatchField<${TemplateType}> >
|
||||
(
|
||||
new ${typeName}FixedValuePointPatch${FieldType}(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
${typeName}FixedValuePointPatch${FieldType}
|
||||
(
|
||||
const ${typeName}FixedValuePointPatch${FieldType}&,
|
||||
const DimensionedField<${TemplateType}, pointMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual autoPtr< pointPatchField<${TemplateType}> > clone
|
||||
(
|
||||
const DimensionedField<${TemplateType}, pointMesh>& iF
|
||||
) const
|
||||
{
|
||||
return autoPtr< pointPatchField<${TemplateType}> >
|
||||
(
|
||||
new ${typeName}FixedValuePointPatch${FieldType}(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~${typeName}FixedValuePointPatch${FieldType}();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
156
etc/codeTemplates/dynamicCode/functionObjectTemplate.C
Normal file
156
etc/codeTemplates/dynamicCode/functionObjectTemplate.C
Normal file
@ -0,0 +1,156 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ 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 "functionObjectTemplate.H"
|
||||
#include "Time.H"
|
||||
#include "fvCFD.H"
|
||||
#include "unitConversion.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
defineTypeNameAndDebug(${typeName}FunctionObject, 0);
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
const objectRegistry& ${typeName}FunctionObject::obr() const
|
||||
{
|
||||
return obr_;
|
||||
}
|
||||
|
||||
|
||||
const fvMesh& ${typeName}FunctionObject::mesh() const
|
||||
{
|
||||
return refCast<const fvMesh>(obr_);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FunctionObject::${typeName}FunctionObject
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& obr,
|
||||
const dictionary& dict,
|
||||
const bool
|
||||
)
|
||||
:
|
||||
name_(name),
|
||||
obr_(obr)
|
||||
{
|
||||
read(dict);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}FunctionObject::~${typeName}FunctionObject()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ${typeName}FunctionObject::read(const dictionary& dict)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"read ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeRead}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FunctionObject::execute()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"execute ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeExecute}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FunctionObject::end()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"end ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${codeEnd}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FunctionObject::timeSet()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"timeSet ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin codeTime
|
||||
${codeTimeSet}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
|
||||
void ${typeName}FunctionObject::write()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"write ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${code}
|
||||
//}}} end code
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
151
etc/codeTemplates/dynamicCode/functionObjectTemplate.H
Normal file
151
etc/codeTemplates/dynamicCode/functionObjectTemplate.H
Normal file
@ -0,0 +1,151 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
Template for use with dynamic code generation of a
|
||||
OutputFilter functionObject.
|
||||
|
||||
SourceFiles
|
||||
functionObjectTemplate.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef functionObjectTemplate_H
|
||||
#define functionObjectTemplate_H
|
||||
|
||||
#include "stringList.H"
|
||||
#include "pointField.H"
|
||||
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declaration of classes
|
||||
class objectRegistry;
|
||||
class dictionary;
|
||||
class polyMesh;
|
||||
class mapPolyMesh;
|
||||
class fvMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
A templated functionObject
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ${typeName}FunctionObject
|
||||
{
|
||||
// Private data
|
||||
|
||||
//- Name of this set of system calls
|
||||
word name_;
|
||||
|
||||
//- Registry
|
||||
const objectRegistry& obr_;
|
||||
|
||||
//{{{ begin codeData
|
||||
${codeData}
|
||||
//}}} end codeData
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
||||
const objectRegistry& obr() const;
|
||||
|
||||
const fvMesh& mesh() const;
|
||||
|
||||
//- Disallow default bitwise copy construct
|
||||
${typeName}FunctionObject(const ${typeName}FunctionObject&);
|
||||
|
||||
//- Disallow default bitwise assignment
|
||||
void operator=(const ${typeName}FunctionObject&);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("${typeName}");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct for given objectRegistry and dictionary.
|
||||
// Allow the possibility to load fields from files
|
||||
${typeName}FunctionObject
|
||||
(
|
||||
const word& name,
|
||||
const objectRegistry& unused,
|
||||
const dictionary&,
|
||||
const bool loadFromFilesUnused = false
|
||||
);
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~${typeName}FunctionObject();
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
//- Return name of the system call set
|
||||
virtual const word& name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
||||
//- Read the system calls
|
||||
virtual void read(const dictionary&);
|
||||
|
||||
//- Execute the "executeCalls" at each time-step
|
||||
virtual void execute();
|
||||
|
||||
//- Execute the "endCalls" at the final time-loop
|
||||
virtual void end();
|
||||
|
||||
//- Write, execute the "writeCalls"
|
||||
virtual void write();
|
||||
|
||||
//- Called when time was set at the end of the Time::operator++
|
||||
virtual void timeSet();
|
||||
|
||||
//- Update for changes of mesh
|
||||
virtual void updateMesh(const mapPolyMesh&)
|
||||
{}
|
||||
|
||||
//- Update for changes of mesh
|
||||
virtual void movePoints(const polyMesh&)
|
||||
{}
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
211
etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.C
Normal file
211
etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.C
Normal file
@ -0,0 +1,211 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ 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 "mixedFvPatchFieldTemplate.H"
|
||||
#include "addToRunTimeSelectionTable.H"
|
||||
#include "fvPatchFieldMapper.H"
|
||||
#include "volFields.H"
|
||||
#include "surfaceFields.H"
|
||||
#include "unitConversion.H"
|
||||
//{{{ begin codeInclude
|
||||
${codeInclude}
|
||||
//}}} end codeInclude
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
|
||||
|
||||
//{{{ begin localCode
|
||||
${localCode}
|
||||
//}}} end localCode
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// dynamicCode:
|
||||
// SHA1 = ${SHA1sum}
|
||||
//
|
||||
// unique function name that can be checked if the correct library version
|
||||
// has been loaded
|
||||
void ${typeName}_${SHA1sum}(bool load)
|
||||
{
|
||||
if (load)
|
||||
{
|
||||
// code that can be explicitly executed after loading
|
||||
}
|
||||
else
|
||||
{
|
||||
// code that can be explicitly executed before unloading
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||
|
||||
makeRemovablePatchTypeField
|
||||
(
|
||||
fvPatch${FieldType},
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
);
|
||||
|
||||
|
||||
const char* const ${typeName}MixedValueFvPatch${FieldType}::SHA1sum =
|
||||
"${SHA1sum}";
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(p, iF)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/DimensionedField\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const fvPatchFieldMapper& mapper
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(ptf, p, iF, mapper)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/DimensionedField/mapper\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch& p,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF,
|
||||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(p, iF, dict)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" from patch/dictionary\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(ptf)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum}"
|
||||
" as copy\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}MixedValueFvPatch${FieldType}& ptf,
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
)
|
||||
:
|
||||
mixedFvPatchField<${TemplateType}>(ptf, iF)
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"construct ${typeName} sha1: ${SHA1sum} "
|
||||
"as copy/DimensionedField\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||
|
||||
${typeName}MixedValueFvPatch${FieldType}::
|
||||
~${typeName}MixedValueFvPatch${FieldType}()
|
||||
{
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"destroy ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void ${typeName}MixedValueFvPatch${FieldType}::updateCoeffs()
|
||||
{
|
||||
if (this->updated())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (${verbose:-false})
|
||||
{
|
||||
Info<<"updateCoeffs ${typeName} sha1: ${SHA1sum}\n";
|
||||
}
|
||||
|
||||
//{{{ begin code
|
||||
${code}
|
||||
//}}} end code
|
||||
|
||||
this->mixedFvPatchField<${TemplateType}>::updateCoeffs();
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// ************************************************************************* //
|
||||
142
etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H
Normal file
142
etc/codeTemplates/dynamicCode/mixedFvPatchFieldTemplate.H
Normal file
@ -0,0 +1,142 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\/ 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/>.
|
||||
|
||||
Description
|
||||
Template for use with dynamic code generation of a
|
||||
mixed fvPatchField.
|
||||
|
||||
- without state
|
||||
|
||||
SourceFiles
|
||||
mixedFvPatchFieldTemplate.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef mixedFvPatchTemplate${FieldType}_H
|
||||
#define mixedFvPatchTemplate${FieldType}_H
|
||||
|
||||
#include "mixedFvPatchFields.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
A templated MixedValueFvPatchField
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
class ${typeName}MixedValueFvPatch${FieldType}
|
||||
:
|
||||
public mixedFvPatchField<${TemplateType}>
|
||||
{
|
||||
public:
|
||||
|
||||
//- Information about the SHA1 of the code itself
|
||||
static const char* const SHA1sum;
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("${typeName}");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
//- Construct from patch and internal field
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct from patch, internal field and dictionary
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const dictionary&
|
||||
);
|
||||
|
||||
//- Construct by mapping a copy onto a new patch
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||
const fvPatch&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&,
|
||||
const fvPatchFieldMapper&
|
||||
);
|
||||
|
||||
//- Construct as copy
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&
|
||||
);
|
||||
|
||||
//- Construct and return a clone
|
||||
virtual tmp< fvPatch${FieldType} > clone() const
|
||||
{
|
||||
return tmp< fvPatch${FieldType} >
|
||||
(
|
||||
new ${typeName}MixedValueFvPatch${FieldType}(*this)
|
||||
);
|
||||
}
|
||||
|
||||
//- Construct as copy setting internal field reference
|
||||
${typeName}MixedValueFvPatch${FieldType}
|
||||
(
|
||||
const ${typeName}MixedValueFvPatch${FieldType}&,
|
||||
const DimensionedField<${TemplateType}, volMesh>&
|
||||
);
|
||||
|
||||
//- Construct and return a clone setting internal field reference
|
||||
virtual tmp< fvPatch${FieldType} > clone
|
||||
(
|
||||
const DimensionedField<${TemplateType}, volMesh>& iF
|
||||
) const
|
||||
{
|
||||
return tmp< fvPatch${FieldType} >
|
||||
(
|
||||
new ${typeName}MixedValueFvPatch${FieldType}(*this, iF)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
//- Destructor
|
||||
virtual ~${typeName}MixedValueFvPatch${FieldType}();
|
||||
|
||||
|
||||
// Member functions
|
||||
|
||||
//- Update the coefficients associated with the patch field
|
||||
virtual void updateCoeffs();
|
||||
};
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
#endif
|
||||
|
||||
// ************************************************************************* //
|
||||
Reference in New Issue
Block a user