BUG: cyclicACMI: ensure transformation tensors are valid. Fixes #1088.
This commit is contained in:
parent
ba86d90ffc
commit
fa2971c17a
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2017 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -238,9 +238,11 @@ void Foam::cyclicACMIPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
Pout<< "cyclicACMIPolyPatch::initGeometry : " << name() << endl;
|
||||
}
|
||||
|
||||
// Note: calculates transformation and triggers face centre calculation
|
||||
cyclicAMIPolyPatch::initGeometry(pBufs);
|
||||
|
||||
// Initialise the AMI
|
||||
// Initialise the AMI early to make sure we adapt the face areas before the
|
||||
// cell centre calculation gets triggered.
|
||||
resetAMI();
|
||||
}
|
||||
|
||||
@ -265,9 +267,11 @@ void Foam::cyclicACMIPolyPatch::initMovePoints
|
||||
{
|
||||
Pout<< "cyclicACMIPolyPatch::initMovePoints : " << name() << endl;
|
||||
}
|
||||
|
||||
// Note: calculates transformation and triggers face centre calculation
|
||||
cyclicAMIPolyPatch::initMovePoints(pBufs, p);
|
||||
|
||||
// Initialise the AMI
|
||||
// Initialise the AMI early. See initGeometry.
|
||||
resetAMI();
|
||||
}
|
||||
|
||||
@ -540,30 +544,6 @@ Foam::label Foam::cyclicACMIPolyPatch::nonOverlapPatchID() const
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicACMIPolyPatch::calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
)
|
||||
{
|
||||
cyclicAMIPolyPatch::calcGeometry
|
||||
(
|
||||
referPatch,
|
||||
thisCtrs,
|
||||
thisAreas,
|
||||
thisCc,
|
||||
nbrCtrs,
|
||||
nbrAreas,
|
||||
nbrCc
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicACMIPolyPatch::initOrder
|
||||
(
|
||||
PstreamBuffers& pBufs,
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
\\/ M anipulation | Copyright (C) 2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -267,18 +267,6 @@ public:
|
||||
inline static scalar tolerance();
|
||||
|
||||
|
||||
//- Calculate the patch geometry
|
||||
virtual void calcGeometry
|
||||
(
|
||||
const primitivePatch& referPatch,
|
||||
const pointField& thisCtrs,
|
||||
const vectorField& thisAreas,
|
||||
const pointField& thisCc,
|
||||
const pointField& nbrCtrs,
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
);
|
||||
|
||||
//- Initialize ordering for primitivePatch. Does not
|
||||
// refer to *this (except for name() and type() etc.)
|
||||
virtual void initOrder
|
||||
|
@ -3,7 +3,7 @@
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
|
||||
\\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -403,21 +403,18 @@ void Foam::cyclicAMIPolyPatch::initGeometry(PstreamBuffers& pBufs)
|
||||
AMIPtr_.clear();
|
||||
|
||||
polyPatch::initGeometry(pBufs);
|
||||
|
||||
// Early calculation of transforms so e.g. cyclicACMI can use them.
|
||||
// Note: also triggers primitiveMesh face centre. Note that cell
|
||||
// centres should -not- be calculated
|
||||
// since e.g. cyclicACMI override face areas
|
||||
calcTransforms();
|
||||
}
|
||||
|
||||
|
||||
void Foam::cyclicAMIPolyPatch::calcGeometry(PstreamBuffers& pBufs)
|
||||
{
|
||||
calcGeometry
|
||||
(
|
||||
*this,
|
||||
faceCentres(),
|
||||
faceAreas(),
|
||||
faceCellCentres(),
|
||||
neighbPatch().faceCentres(),
|
||||
neighbPatch().faceAreas(),
|
||||
neighbPatch().faceCellCentres()
|
||||
);
|
||||
// All geometry done inside initGeometry
|
||||
}
|
||||
|
||||
|
||||
@ -434,6 +431,9 @@ void Foam::cyclicAMIPolyPatch::initMovePoints
|
||||
|
||||
// See below. Clear out any local geometry
|
||||
primitivePatch::movePoints(p);
|
||||
|
||||
// Early calculation of transforms. See above.
|
||||
calcTransforms();
|
||||
}
|
||||
|
||||
|
||||
@ -445,7 +445,7 @@ void Foam::cyclicAMIPolyPatch::movePoints
|
||||
{
|
||||
polyPatch::movePoints(pBufs, p);
|
||||
|
||||
calcTransforms();
|
||||
// All transformation tensors already done in initMovePoints
|
||||
}
|
||||
|
||||
|
||||
@ -962,16 +962,7 @@ void Foam::cyclicAMIPolyPatch::calcGeometry
|
||||
const vectorField& nbrAreas,
|
||||
const pointField& nbrCc
|
||||
)
|
||||
{
|
||||
calcTransforms
|
||||
(
|
||||
referPatch,
|
||||
thisCtrs,
|
||||
thisAreas,
|
||||
nbrCtrs,
|
||||
nbrAreas
|
||||
);
|
||||
}
|
||||
{}
|
||||
|
||||
|
||||
void Foam::cyclicAMIPolyPatch::initOrder
|
||||
|
Loading…
Reference in New Issue
Block a user