Merge remote branch 'OpenCFD/master' into olesenm

This commit is contained in:
Mark Olesen
2011-02-21 15:51:40 +01:00
11 changed files with 358 additions and 23 deletions

View File

@ -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);

View File

@ -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)
{

View File

@ -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";

View File

@ -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