mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
This commit is contained in:
@ -143,14 +143,18 @@ bool Foam::functionEntries::codeStream::execute
|
||||
{
|
||||
Info<< "Creating new library in " << libPath << endl;
|
||||
|
||||
fileName templates(Foam::getEnv("OTF_TEMPLATE_DIR"));
|
||||
fileName templates
|
||||
(
|
||||
Foam::getEnv("FOAM_CODESTREAM_TEMPLATE_DIR")
|
||||
);
|
||||
if (!templates.size())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"functionEntries::codeStream::execute(..)",
|
||||
parentDict
|
||||
) << "Please set environment variable OTF_TEMPLATE_DIR"
|
||||
) << "Please set environment variable"
|
||||
" FOAM_CODESTREAM_TEMPLATE_DIR"
|
||||
<< " to point to the location of codeStreamTemplate.C"
|
||||
<< exit(FatalIOError);
|
||||
}
|
||||
@ -158,8 +162,8 @@ bool Foam::functionEntries::codeStream::execute
|
||||
List<fileAndVars> copyFiles(1);
|
||||
copyFiles[0].first() = templates/"codeStreamTemplate.C";
|
||||
stringPairList bodyVars(2);
|
||||
bodyVars[0] = Pair<string>("OTF_INCLUDES", codeInclude);
|
||||
bodyVars[1] = Pair<string>("OTF_BODY", code);
|
||||
bodyVars[0] = Pair<string>("codeInclude", codeInclude);
|
||||
bodyVars[1] = Pair<string>("code", code);
|
||||
copyFiles[0].second() = bodyVars;
|
||||
|
||||
List<fileAndContent> filesContents(2);
|
||||
|
||||
@ -149,8 +149,8 @@ bool Foam::codeStreamTools::copyFilesContents(const fileName& dir) const
|
||||
// Create dir
|
||||
mkDir(dir);
|
||||
|
||||
//Info<< "Setting envvar OTF_TYPENAME=" << name_ << endl;
|
||||
setEnv("OTF_TYPENAME", name_, true);
|
||||
//Info<< "Setting envvar typeName=" << name_ << endl;
|
||||
setEnv("typeName", name_, true);
|
||||
// Copy any template files
|
||||
forAll(copyFiles_, i)
|
||||
{
|
||||
|
||||
@ -78,14 +78,15 @@ void Foam::codedFixedValueFvPatchScalarField::writeLibrary
|
||||
// Write files for new library
|
||||
if (Pstream::master())
|
||||
{
|
||||
fileName templates(Foam::getEnv("OTF_TEMPLATE_DIR"));
|
||||
fileName templates(Foam::getEnv("FOAM_CODESTREAM_TEMPLATE_DIR"));
|
||||
if (!templates.size())
|
||||
{
|
||||
FatalIOErrorIn
|
||||
(
|
||||
"codedFixedValueFvPatchScalarField::writeLibrary(..)",
|
||||
dict
|
||||
) << "Please set environment variable OTF_TEMPLATE_DIR"
|
||||
) << "Please set environment variable"
|
||||
<< " FOAM_CODESTREAM_TEMPLATE_DIR"
|
||||
<< " to point to the location of "
|
||||
<< "fixedValueFvPatchScalarFieldTemplate.C"
|
||||
<< exit(FatalIOError);
|
||||
@ -112,8 +113,8 @@ void Foam::codedFixedValueFvPatchScalarField::writeLibrary
|
||||
templates/"fixedValueFvPatchScalarFieldTemplate.C";
|
||||
|
||||
copyFiles[0].second().setSize(2);
|
||||
copyFiles[0].second()[0] = Pair<string>("OTF_INCLUDES", codeInclude);
|
||||
copyFiles[0].second()[1] = Pair<string>("OTF_UPDATECOEFFS", code);
|
||||
copyFiles[0].second()[0] = Pair<string>("codeInclude", codeInclude);
|
||||
copyFiles[0].second()[1] = Pair<string>("code", code);
|
||||
|
||||
copyFiles[1].first() =
|
||||
templates/"fixedValueFvPatchScalarFieldTemplate.H";
|
||||
|
||||
@ -35,7 +35,7 @@ Description
|
||||
|
||||
movingWall
|
||||
{
|
||||
type codedFixedValue;
|
||||
type codedFixedValue<scalar>;
|
||||
value uniform 0;
|
||||
redirectType rampedFixedValue; // name of generated bc
|
||||
|
||||
@ -118,7 +118,7 @@ class codedFixedValueFvPatchScalarField
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("codedFixedValue");
|
||||
TypeName("codedFixedValue<scalar>");
|
||||
|
||||
|
||||
// Constructors
|
||||
|
||||
Reference in New Issue
Block a user