mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/develop' into feature-shared-file
This commit is contained in:
@ -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,16 +86,27 @@ 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))
|
||||
{
|
||||
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())
|
||||
patchInternalField()
|
||||
+ gradient()*(patch().nf() & patch().delta())
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Enforce mapping of values so we have a valid starting value
|
||||
this->map(ptf, mapper);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user