Skip to content
Snippets Groups Projects
Commit c35544f9 authored by mattijs's avatar mattijs
Browse files

Merge remote-tracking branch 'origin/develop' into feature-shared-file

parents fffb871d 427b3704
Branches
Tags
No related merge requests found
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......
......@@ -3,7 +3,7 @@
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -38,6 +38,16 @@ Description
we detect the keywords in zones and redo the dictionary entries
to be labelLists.
Usage
- foamFormatConvert [OPTION]
\param -noConstant \n
Exclude the constant/ directory from the times list
\param -enableFunctionEntries \n
By default all dictionary preprocessing of fields is disabled
\*---------------------------------------------------------------------------*/
#include "argList.H"
......@@ -148,6 +158,11 @@ int main(int argc, char *argv[])
"noConstant",
"exclude the 'constant/' dir in the times list"
);
argList::addBoolOption
(
"enableFunctionEntries",
"enable expansion of dictionary directives - #include, #codeStream etc"
);
#include "addRegionOption.H"
#include "setRootCase.H"
......@@ -166,6 +181,19 @@ int main(int argc, char *argv[])
#include "createTime.H"
const bool enableEntries = args.optionFound("enableFunctionEntries");
if (enableEntries)
{
Info<< "Allowing dictionary preprocessing ('#include', '#codeStream')."
<< endl;
}
int oldFlag = entry::disableFunctionEntries;
if (!enableEntries)
{
// By default disable dictionary expansion for fields
entry::disableFunctionEntries = 1;
}
// Make sure we do not use the master-only reading since we read
// fields (different per processor) as dictionaries.
......@@ -267,6 +295,8 @@ int main(int argc, char *argv[])
Info<< endl;
}
entry::disableFunctionEntries = oldFlag;
Info<< "End\n" << endl;
return 0;
......
......@@ -86,15 +86,26 @@ Foam::fixedFluxPressureFvPatchScalarField::fixedFluxPressureFvPatchScalarField
gradient().map(ptf.gradient(), mapper);
// Evaluate the value field from the gradient if the internal field is valid
if (notNull(iF) && iF.size())
if (notNull(iF))
{
scalarField::operator=
(
//patchInternalField() + gradient()/patch().deltaCoeffs()
// ***HGW Hack to avoid the construction of mesh.deltaCoeffs
// which fails for AMI patches for some mapping operations
patchInternalField() + gradient()*(patch().nf() & patch().delta())
);
if (iF.size())
{
// Note: cannot ask for nf() if zero faces
scalarField::operator=
(
//patchInternalField() + gradient()/patch().deltaCoeffs()
// ***HGW Hack to avoid the construction of mesh.deltaCoeffs
// which fails for AMI patches for some mapping operations
patchInternalField()
+ gradient()*(patch().nf() & patch().delta())
);
}
}
else
{
// Enforce mapping of values so we have a valid starting value
this->map(ptf, mapper);
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment