Merge branch 'nextRelease' of ssh://git.code.sf.net/p/foam-extend/foam-extend-4.0 into nextRelease
This commit is contained in:
commit
267fa0eba8
7 changed files with 60 additions and 39 deletions
|
@ -1343,7 +1343,7 @@ void Foam::refinement::setRefinement(polyTopoChange& ref) const
|
|||
mesh_,
|
||||
pointLevel_,
|
||||
maxEqOp<label>(),
|
||||
0, // Null value
|
||||
label(0), // Null value
|
||||
true // Apply separation for parallel cyclics
|
||||
);
|
||||
|
||||
|
@ -1512,7 +1512,7 @@ void Foam::refinement::updateMesh(const mapPolyMesh& map)
|
|||
mesh_,
|
||||
newPointLevel,
|
||||
maxEqOp<label>(),
|
||||
0, // Null value
|
||||
label(0), // Null value
|
||||
true // Apply separation for parallel cyclics
|
||||
);
|
||||
|
||||
|
|
|
@ -67,11 +67,20 @@ fixedGradientFvPatchField<Type>::fixedGradientFvPatchField
|
|||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
// HR 15.12.18: Must not call evaluate during construction. Read value
|
||||
// instead. This is needed for PLB.
|
||||
fvPatchField<Type>(p, iF, dict, true),
|
||||
fvPatchField<Type>(p, iF, dict),
|
||||
gradient_("gradient", dict, p.size())
|
||||
{}
|
||||
{
|
||||
// Call evaluate only if the value is not found. Used to avoid evaluating
|
||||
// when we have incomplete meshes during Parallel Load Balancing. When
|
||||
// shipping the field over to another processor, we first call write, making
|
||||
// sure that the value is written and read it on the other side (see
|
||||
// write member function). If this proves to be problematic, we can always
|
||||
// initialize with patch internal field for the start-up. VV, 12/Apr/2019.
|
||||
if (!dict.found("value"))
|
||||
{
|
||||
evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
|
@ -190,6 +199,11 @@ void fixedGradientFvPatchField<Type>::write(Ostream& os) const
|
|||
{
|
||||
fvPatchField<Type>::write(os);
|
||||
gradient_.writeEntry("gradient", os);
|
||||
|
||||
// Write value along with the gradient in order to avoid calling evaluate
|
||||
// on construction (from dictionary constructor) for Parallel Load Balancing
|
||||
// runs. See dictionary constructor for details. VV, 12/Apr/2019.
|
||||
this->writeEntry("value", os);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -54,13 +54,22 @@ mixedFvPatchField<Type>::mixedFvPatchField
|
|||
const dictionary& dict
|
||||
)
|
||||
:
|
||||
// HR 15.12.18: Must not call evaluate during construction. Read value
|
||||
// instead. This is needed for PLB.
|
||||
fvPatchField<Type>(p, iF, dict, true),
|
||||
fvPatchField<Type>(p, iF, dict),
|
||||
refValue_("refValue", dict, p.size()),
|
||||
refGrad_("refGradient", dict, p.size()),
|
||||
valueFraction_("valueFraction", dict, p.size())
|
||||
{}
|
||||
{
|
||||
// Call evaluate only if the value is not found. Used to avoid evaluating
|
||||
// when we have incomplete meshes during Parallel Load Balancing. When
|
||||
// shipping the field over to another processor, we first call write, making
|
||||
// sure that the value is written and read it on the other side (see
|
||||
// write member function). If this proves to be problematic, we can always
|
||||
// initialize with patch internal field for the start-up. VV, 12/Apr/2019.
|
||||
if (!dict.found("value"))
|
||||
{
|
||||
evaluate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
template<class Type>
|
||||
|
|
|
@ -70,12 +70,7 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
|
|||
"fvSchemes",
|
||||
obr.time().system(),
|
||||
obr,
|
||||
(
|
||||
obr.readOpt() == IOobject::MUST_READ
|
||||
|| obr.readOpt() == IOobject::READ_IF_PRESENT
|
||||
? IOobject::MUST_READ_IF_MODIFIED
|
||||
: obr.readOpt()
|
||||
),
|
||||
IOobject::READ_IF_PRESENT_IF_MODIFIED, // Allow default dictionary creation
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
),
|
||||
|
@ -173,17 +168,21 @@ Foam::fvSchemes::fvSchemes(const objectRegistry& obr)
|
|||
fluxRequired_(), // Do not read flux required option
|
||||
defaultFluxRequired_(false)
|
||||
{
|
||||
// HR 21.12.18 : Writing a default fvSchemes is not useful in PLB. Please
|
||||
// specify MUST_READ on obr if you need this.
|
||||
if
|
||||
(
|
||||
readOpt() == IOobject::MUST_READ
|
||||
|| readOpt() == IOobject::MUST_READ_IF_MODIFIED
|
||||
|| (readOpt() == IOobject::READ_IF_PRESENT && headerOk())
|
||||
)
|
||||
if (!headerOk())
|
||||
{
|
||||
read();
|
||||
if (debug)
|
||||
{
|
||||
InfoIn
|
||||
(
|
||||
"fvSchemes::fvSchemes(const objectRegistry& obr)"
|
||||
) << "fvSchemes dictionary not found. Creating default."
|
||||
<< endl;
|
||||
}
|
||||
|
||||
regIOobject::write();
|
||||
}
|
||||
|
||||
read();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -457,8 +457,7 @@ static unsigned jenkins_hashbig
|
|||
case 4 : a += k[3]; [[fallthrough]];
|
||||
case 3 : a += static_cast<uint32_t>(k[2]) << 8; [[fallthrough]];
|
||||
case 2 : a += static_cast<uint32_t>(k[1]) << 16; [[fallthrough]];
|
||||
case 1 : a += static_cast<uint32_t>(k[0]) << 24; [[fallthrough]];
|
||||
break;
|
||||
case 1 : a += static_cast<uint32_t>(k[0]) << 24; break;
|
||||
case 0 : return c;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -674,7 +674,7 @@ void Foam::immersedBoundaryPolyPatch::calcImmersedBoundary() const
|
|||
{
|
||||
// Direct face cut, coupled on live side
|
||||
|
||||
// Get face index. Noye the difference between faceI
|
||||
// Get face index. Note the difference between faceI
|
||||
// and patchFaceI
|
||||
const label faceI = bMesh[patchI].start() + patchFaceI;
|
||||
|
||||
|
@ -945,8 +945,8 @@ void Foam::immersedBoundaryPolyPatch::calcImmersedBoundary() const
|
|||
// Wet on wet
|
||||
if
|
||||
(
|
||||
intersectedCell[patchFaceI] == immersedPoly::WET
|
||||
&& intersectedCell[patchFaceI] == immersedPoly::WET
|
||||
curOwnCut[patchFaceI] == immersedPoly::WET
|
||||
&& curNbrCut[patchFaceI] == immersedPoly::WET
|
||||
)
|
||||
{
|
||||
intersectedFace[patchStart + patchFaceI] =
|
||||
|
@ -956,8 +956,8 @@ void Foam::immersedBoundaryPolyPatch::calcImmersedBoundary() const
|
|||
// Dry on dry
|
||||
if
|
||||
(
|
||||
intersectedCell[patchFaceI] == immersedPoly::DRY
|
||||
&& intersectedCell[patchFaceI] == immersedPoly::DRY
|
||||
curOwnCut[patchFaceI] == immersedPoly::DRY
|
||||
&& curNbrCut[patchFaceI] == immersedPoly::DRY
|
||||
)
|
||||
{
|
||||
intersectedFace[patchStart + patchFaceI] =
|
||||
|
@ -969,12 +969,12 @@ void Foam::immersedBoundaryPolyPatch::calcImmersedBoundary() const
|
|||
if
|
||||
(
|
||||
(
|
||||
intersectedCell[patchFaceI] == immersedPoly::WET
|
||||
&& intersectedCell[patchFaceI] == immersedPoly::CUT
|
||||
curOwnCut[patchFaceI] == immersedPoly::WET
|
||||
&& curNbrCut[patchFaceI] == immersedPoly::CUT
|
||||
)
|
||||
|| (
|
||||
intersectedCell[patchFaceI] == immersedPoly::CUT
|
||||
&& intersectedCell[patchFaceI] == immersedPoly::WET
|
||||
curOwnCut[patchFaceI] == immersedPoly::CUT
|
||||
&& curNbrCut[patchFaceI] == immersedPoly::WET
|
||||
)
|
||||
)
|
||||
{
|
||||
|
|
Reference in a new issue