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

ENH: processorCyclic : set transformation on both sides of underlying cyclic

parent 380329dd
Branches
Tags
No related merge requests found
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -197,6 +197,10 @@ protected:
public:
//- Declare friendship with processorCyclicPolyPatch
friend class processorCyclicPolyPatch;
//- Runtime type information
TypeName("cyclic");
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -26,6 +26,7 @@ License
#include "processorCyclicPolyPatch.H"
#include "addToRunTimeSelectionTable.H"
#include "SubField.H"
#include "cyclicPolyPatch.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......@@ -171,9 +172,9 @@ void Foam::processorCyclicPolyPatch::calcGeometry(PstreamBuffers& pBufs)
// - or do we not auto-calculate the transformation but
// have option of reading it.
// Update underlying cyclic
// Update underlying cyclic halves. Need to do both since only one
// half might be present as a processorCyclic.
coupledPolyPatch& pp = const_cast<coupledPolyPatch&>(referPatch());
pp.calcGeometry
(
*this,
......@@ -184,6 +185,21 @@ void Foam::processorCyclicPolyPatch::calcGeometry(PstreamBuffers& pBufs)
neighbFaceAreas(),
neighbFaceCellCentres()
);
if (isA<cyclicPolyPatch>(pp))
{
const cyclicPolyPatch& cpp = refCast<const cyclicPolyPatch>(pp);
const_cast<cyclicPolyPatch&>(cpp.neighbPatch()).calcGeometry
(
*this,
neighbFaceCentres(),
neighbFaceAreas(),
neighbFaceCellCentres(),
faceCentres(),
faceAreas(),
faceCellCentres()
);
}
}
}
......
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