codedFixedValueFvPatchField: Updated and simplified using the new CodedBase class
reducing code duplication and maintenance overhead.
This commit is contained in:
@ -85,6 +85,10 @@ public:
|
|||||||
|
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct null
|
||||||
|
CodedBase()
|
||||||
|
{}
|
||||||
|
|
||||||
//- Construct from dictionary
|
//- Construct from dictionary
|
||||||
CodedBase(const dictionary& dict);
|
CodedBase(const dictionary& dict);
|
||||||
|
|
||||||
|
|||||||
@ -59,20 +59,23 @@ void Foam::Function1s::Coded<Type>::prepare
|
|||||||
// Copy filtered H template
|
// Copy filtered H template
|
||||||
dynCode.addCopyFile(codeTemplateH);
|
dynCode.addCopyFile(codeTemplateH);
|
||||||
|
|
||||||
// debugging: make verbose
|
// Debugging: make verbose
|
||||||
// dynCode.setFilterVariable("verbose", "true");
|
if (debug)
|
||||||
// Info<<"compile " << codeName() << " sha1: "
|
{
|
||||||
// << context.sha1() << endl;
|
dynCode.setFilterVariable("verbose", "true");
|
||||||
|
Info<<"compile " << codeName() << " sha1: "
|
||||||
|
<< context.sha1() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// define Make/options
|
// Define Make/options
|
||||||
dynCode.setMakeOptions
|
dynCode.setMakeOptions
|
||||||
(
|
(
|
||||||
"EXE_INC = -g \\\n"
|
"EXE_INC = -g \\\n"
|
||||||
+ context.options()
|
+ context.options()
|
||||||
+ "\n\nLIB_LIBS = \\\n"
|
+ "\n\nLIB_LIBS = \\\n"
|
||||||
+ " -lOpenFOAM \\\n"
|
+ " -lOpenFOAM \\\n"
|
||||||
+ context.libs()
|
+ context.libs()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -78,7 +78,7 @@ namespace Function1s
|
|||||||
{
|
{
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class coded Declaration
|
Class coded Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
class coded
|
class coded
|
||||||
|
|||||||
@ -31,74 +31,8 @@ License
|
|||||||
#include "dynamicCodeContext.H"
|
#include "dynamicCodeContext.H"
|
||||||
#include "stringOps.H"
|
#include "stringOps.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
const Foam::wordList Foam::codedFixedValueFvPatchField<Type>::codeKeys_ =
|
|
||||||
{"code", "codeInclude", "localCode"};
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
const Foam::word Foam::codedFixedValueFvPatchField<Type>::codeTemplateC =
|
|
||||||
"fixedValueFvPatchFieldTemplate.C";
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
const Foam::word Foam::codedFixedValueFvPatchField<Type>::codeTemplateH =
|
|
||||||
"fixedValueFvPatchFieldTemplate.H";
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
void Foam::codedFixedValueFvPatchField<Type>::setFieldTemplates
|
|
||||||
(
|
|
||||||
dynamicCode& dynCode
|
|
||||||
)
|
|
||||||
{
|
|
||||||
word fieldType(pTraits<Type>::typeName);
|
|
||||||
|
|
||||||
// template type for fvPatchField
|
|
||||||
dynCode.setFilterVariable("TemplateType", fieldType);
|
|
||||||
|
|
||||||
// Name for fvPatchField - eg, ScalarField, VectorField, ...
|
|
||||||
fieldType[0] = toupper(fieldType[0]);
|
|
||||||
dynCode.setFilterVariable("FieldType", fieldType + "Field");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
const Foam::IOdictionary& Foam::codedFixedValueFvPatchField<Type>::dict() const
|
|
||||||
{
|
|
||||||
const objectRegistry& obr = this->db();
|
|
||||||
|
|
||||||
if (obr.foundObject<IOdictionary>("codeDict"))
|
|
||||||
{
|
|
||||||
return obr.lookupObject<IOdictionary>("codeDict");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return obr.store
|
|
||||||
(
|
|
||||||
new IOdictionary
|
|
||||||
(
|
|
||||||
IOobject
|
|
||||||
(
|
|
||||||
"codeDict",
|
|
||||||
this->db().time().system(),
|
|
||||||
this->db(),
|
|
||||||
IOobject::MUST_READ_IF_MODIFIED,
|
|
||||||
IOobject::NO_WRITE
|
|
||||||
)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::codedFixedValueFvPatchField<Type>::prepare
|
void Foam::codedFixedValueFvPatchField<Type>::prepare
|
||||||
(
|
(
|
||||||
@ -106,75 +40,51 @@ void Foam::codedFixedValueFvPatchField<Type>::prepare
|
|||||||
const dynamicCodeContext& context
|
const dynamicCodeContext& context
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// take no chances - typeName must be identical to name_
|
dynCode.setFilterVariable("typeName", codeName());
|
||||||
dynCode.setFilterVariable("typeName", name_);
|
|
||||||
|
|
||||||
// set TemplateType and FieldType filter variables
|
// Set TemplateType and FieldType filter variables
|
||||||
// (for fvPatchField)
|
// (for fvPatchField)
|
||||||
setFieldTemplates(dynCode);
|
word fieldType(pTraits<Type>::typeName);
|
||||||
|
|
||||||
// compile filtered C template
|
// Template type for fvPatchField
|
||||||
|
dynCode.setFilterVariable("TemplateType", fieldType);
|
||||||
|
|
||||||
|
// Name for fvPatchField - eg, ScalarField, VectorField, ...
|
||||||
|
fieldType[0] = toupper(fieldType[0]);
|
||||||
|
dynCode.setFilterVariable("FieldType", fieldType + "Field");
|
||||||
|
|
||||||
|
// Compile filtered C template
|
||||||
dynCode.addCompileFile(codeTemplateC);
|
dynCode.addCompileFile(codeTemplateC);
|
||||||
|
|
||||||
// copy filtered H template
|
// Copy filtered H template
|
||||||
dynCode.addCopyFile(codeTemplateH);
|
dynCode.addCopyFile(codeTemplateH);
|
||||||
|
|
||||||
|
// Debugging: make BC verbose
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
dynCode.setFilterVariable("verbose", "true");
|
||||||
|
Info<<"compile " << codeName() << " sha1: "
|
||||||
|
<< context.sha1() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// debugging: make BC verbose
|
// Define Make/options
|
||||||
// dynCode.setFilterVariable("verbose", "true");
|
|
||||||
// Info<<"compile " << name_ << " sha1: "
|
|
||||||
// << context.sha1() << endl;
|
|
||||||
|
|
||||||
// define Make/options
|
|
||||||
dynCode.setMakeOptions
|
dynCode.setMakeOptions
|
||||||
(
|
|
||||||
"EXE_INC = -g \\\n"
|
|
||||||
"-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
|
|
||||||
+ context.options()
|
|
||||||
+ "\n\nLIB_LIBS = \\\n"
|
|
||||||
+ " -lOpenFOAM \\\n"
|
|
||||||
+ " -lfiniteVolume \\\n"
|
|
||||||
+ context.libs()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
const Foam::dictionary& Foam::codedFixedValueFvPatchField<Type>::codeDict()
|
|
||||||
const
|
|
||||||
{
|
|
||||||
// use system/codeDict or in-line
|
|
||||||
return
|
|
||||||
(
|
(
|
||||||
dict_.found("code")
|
"EXE_INC = -g \\\n"
|
||||||
? dict_
|
"-I$(LIB_SRC)/finiteVolume/lnInclude \\\n"
|
||||||
: this->dict().subDict(name_)
|
+ context.options()
|
||||||
|
+ "\n\nLIB_LIBS = \\\n"
|
||||||
|
+ " -lOpenFOAM \\\n"
|
||||||
|
+ " -lfiniteVolume \\\n"
|
||||||
|
+ context.libs()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
const Foam::wordList& Foam::codedFixedValueFvPatchField<Type>::codeKeys() const
|
|
||||||
{
|
|
||||||
return codeKeys_;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
|
||||||
Foam::string Foam::codedFixedValueFvPatchField<Type>::description() const
|
|
||||||
{
|
|
||||||
return
|
|
||||||
"patch "
|
|
||||||
+ this->patch().name()
|
|
||||||
+ " on field "
|
|
||||||
+ this->internalField().name();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
void Foam::codedFixedValueFvPatchField<Type>::clearRedirect() const
|
void Foam::codedFixedValueFvPatchField<Type>::clearRedirect() const
|
||||||
{
|
{
|
||||||
// remove instantiation of fvPatchField provided by library
|
// Remove instantiation of fvPatchField provided by library
|
||||||
redirectPatchFieldPtr_.clear();
|
redirectPatchFieldPtr_.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +99,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF),
|
fixedValueFvPatchField<Type>(p, iF),
|
||||||
codedBase(),
|
CodedBase<codedFixedValueFvPatchFieldBase>(),
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -204,9 +114,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
fixedValueFvPatchField<Type>(ptf, p, iF, mapper),
|
||||||
codedBase(),
|
CodedBase<codedFixedValueFvPatchFieldBase>(ptf),
|
||||||
dict_(ptf.dict_),
|
|
||||||
name_(ptf.name_),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -220,17 +128,10 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(p, iF, dict),
|
fixedValueFvPatchField<Type>(p, iF, dict),
|
||||||
codedBase(),
|
CodedBase<codedFixedValueFvPatchFieldBase>(dict),
|
||||||
dict_(dict),
|
|
||||||
name_
|
|
||||||
(
|
|
||||||
dict.found("redirectType")
|
|
||||||
? dict.lookup("redirectType")
|
|
||||||
: dict.lookup("name")
|
|
||||||
),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{
|
{
|
||||||
updateLibrary(name_);
|
updateLibrary(codeName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -241,9 +142,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(ptf),
|
fixedValueFvPatchField<Type>(ptf),
|
||||||
codedBase(),
|
CodedBase<codedFixedValueFvPatchFieldBase>(ptf),
|
||||||
dict_(ptf.dict_),
|
|
||||||
name_(ptf.name_),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -256,9 +155,7 @@ Foam::codedFixedValueFvPatchField<Type>::codedFixedValueFvPatchField
|
|||||||
)
|
)
|
||||||
:
|
:
|
||||||
fixedValueFvPatchField<Type>(ptf, iF),
|
fixedValueFvPatchField<Type>(ptf, iF),
|
||||||
codedBase(),
|
CodedBase<codedFixedValueFvPatchFieldBase>(ptf),
|
||||||
dict_(ptf.dict_),
|
|
||||||
name_(ptf.name_),
|
|
||||||
redirectPatchFieldPtr_()
|
redirectPatchFieldPtr_()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -275,7 +172,7 @@ Foam::codedFixedValueFvPatchField<Type>::redirectPatchField() const
|
|||||||
// Make sure to construct the patchfield with up-to-date value
|
// Make sure to construct the patchfield with up-to-date value
|
||||||
|
|
||||||
OStringStream os;
|
OStringStream os;
|
||||||
writeEntry(os, "type", name_);
|
writeEntry(os, "type", codeName());
|
||||||
writeEntry(os, "value", *this);
|
writeEntry(os, "value", *this);
|
||||||
IStringStream is(os.str());
|
IStringStream is(os.str());
|
||||||
dictionary dict(is);
|
dictionary dict(is);
|
||||||
@ -290,6 +187,7 @@ Foam::codedFixedValueFvPatchField<Type>::redirectPatchField() const
|
|||||||
).ptr()
|
).ptr()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return redirectPatchFieldPtr_();
|
return redirectPatchFieldPtr_();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +201,7 @@ void Foam::codedFixedValueFvPatchField<Type>::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Make sure library containing user-defined fvPatchField is up-to-date
|
// Make sure library containing user-defined fvPatchField is up-to-date
|
||||||
updateLibrary(name_);
|
updateLibrary(codeName());
|
||||||
|
|
||||||
const fvPatchField<Type>& fvp = redirectPatchField();
|
const fvPatchField<Type>& fvp = redirectPatchField();
|
||||||
|
|
||||||
@ -323,7 +221,7 @@ void Foam::codedFixedValueFvPatchField<Type>::evaluate
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Make sure library containing user-defined fvPatchField is up-to-date
|
// Make sure library containing user-defined fvPatchField is up-to-date
|
||||||
updateLibrary(name_);
|
updateLibrary(codeName());
|
||||||
|
|
||||||
const fvPatchField<Type>& fvp = redirectPatchField();
|
const fvPatchField<Type>& fvp = redirectPatchField();
|
||||||
|
|
||||||
@ -337,42 +235,7 @@ template<class Type>
|
|||||||
void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
|
void Foam::codedFixedValueFvPatchField<Type>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
fixedValueFvPatchField<Type>::write(os);
|
fixedValueFvPatchField<Type>::write(os);
|
||||||
writeEntry(os, "name", name_);
|
writeCode(os);
|
||||||
|
|
||||||
if (dict_.found("codeInclude"))
|
|
||||||
{
|
|
||||||
writeKeyword(os, "codeInclude");
|
|
||||||
os.write(verbatimString(dict_["codeInclude"]))
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict_.found("localCode"))
|
|
||||||
{
|
|
||||||
writeKeyword(os, "localCode");
|
|
||||||
os.write(verbatimString(dict_["localCode"]))
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict_.found("code"))
|
|
||||||
{
|
|
||||||
writeKeyword(os, "code");
|
|
||||||
os.write(verbatimString(dict_["code"]))
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict_.found("codeOptions"))
|
|
||||||
{
|
|
||||||
writeKeyword(os, "codeOptions");
|
|
||||||
os.write(verbatimString(dict_["codeOptions"]))
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (dict_.found("codeLibs"))
|
|
||||||
{
|
|
||||||
writeKeyword(os, "codeLibs");
|
|
||||||
os.write(verbatimString(dict_["codeLibs"]))
|
|
||||||
<< token::END_STATEMENT << nl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -81,13 +81,25 @@ SourceFiles
|
|||||||
#define codedFixedValueFvPatchField_H
|
#define codedFixedValueFvPatchField_H
|
||||||
|
|
||||||
#include "fixedValueFvPatchFields.H"
|
#include "fixedValueFvPatchFields.H"
|
||||||
#include "codedBase.H"
|
#include "CodedBase.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class codedFixedValueFvPatchFieldBase Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
class codedFixedValueFvPatchFieldBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
ClassNameNoDebug("fixedValueFvPatchField");
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------*\
|
/*---------------------------------------------------------------------------*\
|
||||||
Class codedFixedValueFvPatchField Declaration
|
Class codedFixedValueFvPatchField Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
@ -96,58 +108,27 @@ template<class Type>
|
|||||||
class codedFixedValueFvPatchField
|
class codedFixedValueFvPatchField
|
||||||
:
|
:
|
||||||
public fixedValueFvPatchField<Type>,
|
public fixedValueFvPatchField<Type>,
|
||||||
public codedBase
|
public CodedBase<codedFixedValueFvPatchFieldBase>
|
||||||
{
|
{
|
||||||
// Private static data
|
|
||||||
|
|
||||||
//- The keywords associated with source code
|
|
||||||
static const wordList codeKeys_;
|
|
||||||
|
|
||||||
|
|
||||||
// Private Data
|
// Private Data
|
||||||
|
|
||||||
//- Dictionary contents for the boundary condition
|
|
||||||
const dictionary dict_;
|
|
||||||
|
|
||||||
const word name_;
|
|
||||||
|
|
||||||
mutable autoPtr<fvPatchField<Type>> redirectPatchFieldPtr_;
|
mutable autoPtr<fvPatchField<Type>> redirectPatchFieldPtr_;
|
||||||
|
|
||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
const IOdictionary& dict() const;
|
|
||||||
|
|
||||||
//- Set the rewrite vars controlling the Type
|
//- Set the rewrite vars controlling the Type
|
||||||
static void setFieldTemplates(dynamicCode& dynCode);
|
static void setFieldTemplates(dynamicCode& dynCode);
|
||||||
|
|
||||||
//- Adapt the context for the current object
|
//- Adapt the context for the current object
|
||||||
virtual void prepare(dynamicCode&, const dynamicCodeContext&) const;
|
virtual void prepare(dynamicCode&, const dynamicCodeContext&) const;
|
||||||
|
|
||||||
//- Return a description (type + name) for the output
|
|
||||||
virtual string description() const;
|
|
||||||
|
|
||||||
//- Clear the ptr to the redirected object
|
//- Clear the ptr to the redirected object
|
||||||
virtual void clearRedirect() const;
|
virtual void clearRedirect() const;
|
||||||
|
|
||||||
//- Get the dictionary to initialize the codeContext
|
|
||||||
virtual const dictionary& codeDict() const;
|
|
||||||
|
|
||||||
//- Get the keywords associated with source code
|
|
||||||
virtual const wordList& codeKeys() const;
|
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Static Data Members
|
|
||||||
|
|
||||||
//- Name of the C code template to be used
|
|
||||||
static const word codeTemplateC;
|
|
||||||
|
|
||||||
//- Name of the H code template to be used
|
|
||||||
static const word codeTemplateH;
|
|
||||||
|
|
||||||
|
|
||||||
//- Runtime type information
|
//- Runtime type information
|
||||||
TypeName("codedFixedValue");
|
TypeName("codedFixedValue");
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -27,6 +27,20 @@ License
|
|||||||
#include "addToRunTimeSelectionTable.H"
|
#include "addToRunTimeSelectionTable.H"
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * //
|
||||||
|
|
||||||
|
defineTypeName(Foam::codedFixedValueFvPatchFieldBase);
|
||||||
|
|
||||||
|
template<>
|
||||||
|
const Foam::wordList
|
||||||
|
Foam::CodedBase<Foam::codedFixedValueFvPatchFieldBase>::codeKeys_ =
|
||||||
|
{
|
||||||
|
"code",
|
||||||
|
"codeInclude",
|
||||||
|
"localCode"
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
|
|||||||
@ -80,9 +80,12 @@ void Foam::codedFunctionObject::prepare
|
|||||||
dynCode.addCopyFile("functionObjectTemplate.H");
|
dynCode.addCopyFile("functionObjectTemplate.H");
|
||||||
|
|
||||||
// Debugging: make verbose
|
// Debugging: make verbose
|
||||||
// dynCode.setFilterVariable("verbose", "true");
|
if (debug)
|
||||||
// Info<<"compile " << codeName() << " sha1: "
|
{
|
||||||
// << context.sha1() << endl;
|
dynCode.setFilterVariable("verbose", "true");
|
||||||
|
Info<<"compile " << codeName() << " sha1: "
|
||||||
|
<< context.sha1() << endl;
|
||||||
|
}
|
||||||
|
|
||||||
// Define Make/options
|
// Define Make/options
|
||||||
dynCode.setMakeOptions
|
dynCode.setMakeOptions
|
||||||
|
|||||||
Reference in New Issue
Block a user