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

BUG: mappedPatch: do not use sampleMesh. Fixes #1951.

The helper function sampleMesh returns a reference to
the sampled mesh. This will fail if that mesh
is on a different world.
parent 979dcf69
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -118,16 +118,6 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField ...@@ -118,16 +118,6 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
kappaLayers_(0), kappaLayers_(0),
contactRes_(0.0) contactRes_(0.0)
{ {
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorInFunction
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << internalField().name()
<< " in file " << internalField().objectPath()
<< exit(FatalError);
}
if (dict.readIfPresent("thicknessLayers", thicknessLayers_)) if (dict.readIfPresent("thicknessLayers", thicknessLayers_))
{ {
dict.readEntry("kappaLayers", kappaLayers_); dict.readEntry("kappaLayers", kappaLayers_);
......
...@@ -167,7 +167,9 @@ inline bool Foam::mappedPatchBase::sameRegion() const ...@@ -167,7 +167,9 @@ inline bool Foam::mappedPatchBase::sameRegion() const
inline const Foam::mapDistribute& Foam::mappedPatchBase::map() const inline const Foam::mapDistribute& Foam::mappedPatchBase::map() const
{ {
const polyMesh& thisMesh = patch_.boundaryMesh().mesh(); const polyMesh& thisMesh = patch_.boundaryMesh().mesh();
bool topoChange = sampleMesh().topoChanging() || thisMesh.topoChanging(); bool topoChange =
(sameWorld() && sampleMesh().topoChanging())
|| thisMesh.topoChanging();
if (topoChange) if (topoChange)
{ {
...@@ -189,7 +191,9 @@ inline const Foam::AMIPatchToPatchInterpolation& Foam::mappedPatchBase::AMI ...@@ -189,7 +191,9 @@ inline const Foam::AMIPatchToPatchInterpolation& Foam::mappedPatchBase::AMI
) const ) const
{ {
const polyMesh& thisMesh = patch_.boundaryMesh().mesh(); const polyMesh& thisMesh = patch_.boundaryMesh().mesh();
bool topoChange = sampleMesh().topoChanging() || thisMesh.topoChanging(); bool topoChange =
(sameWorld() && sampleMesh().topoChanging())
|| thisMesh.topoChanging();
if (topoChange || forceUpdate) if (topoChange || forceUpdate)
{ {
......
...@@ -17,7 +17,7 @@ FoamFile ...@@ -17,7 +17,7 @@ FoamFile
solvers solvers
{ {
h "h.*"
{ {
solver PCG; solver PCG;
preconditioner DIC; preconditioner DIC;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment