mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge commit 'OpenCFD/master' into olesenm
This commit is contained in:
@ -68,8 +68,7 @@ int main(int argc, char *argv[])
|
|||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
pointMesh pMesh(mesh);
|
const volPointInterpolation& pInterp = volPointInterpolation::New(mesh);
|
||||||
volPointInterpolation pInterp(mesh, pMesh);
|
|
||||||
|
|
||||||
pointScalarField pp(pInterp.interpolate(p));
|
pointScalarField pp(pInterp.interpolate(p));
|
||||||
pp.write();
|
pp.write();
|
||||||
|
|||||||
@ -100,6 +100,7 @@ void processorPointPatchField<Type>::initSwapAdd(Field<Type>& pField) const
|
|||||||
{
|
{
|
||||||
if (Pstream::parRun())
|
if (Pstream::parRun())
|
||||||
{
|
{
|
||||||
|
// Get internal field into my point order
|
||||||
Field<Type> pf(this->patchInternalField(pField));
|
Field<Type> pf(this->patchInternalField(pField));
|
||||||
|
|
||||||
OPstream::write
|
OPstream::write
|
||||||
@ -130,11 +131,7 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
|
|||||||
|
|
||||||
if (doTransform())
|
if (doTransform())
|
||||||
{
|
{
|
||||||
const labelList& nonGlobalPatchPoints =
|
|
||||||
procPatch_.nonGlobalPatchPoints();
|
|
||||||
|
|
||||||
const processorPolyPatch& ppp = procPatch_.procPolyPatch();
|
const processorPolyPatch& ppp = procPatch_.procPolyPatch();
|
||||||
const labelListList& pointFaces = ppp.pointFaces();
|
|
||||||
const tensorField& forwardT = ppp.forwardT();
|
const tensorField& forwardT = ppp.forwardT();
|
||||||
|
|
||||||
if (forwardT.size() == 1)
|
if (forwardT.size() == 1)
|
||||||
@ -143,6 +140,10 @@ void processorPointPatchField<Type>::swapAdd(Field<Type>& pField) const
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
const labelList& nonGlobalPatchPoints =
|
||||||
|
procPatch_.nonGlobalPatchPoints();
|
||||||
|
const labelListList& pointFaces = ppp.pointFaces();
|
||||||
|
|
||||||
forAll(nonGlobalPatchPoints, pfi)
|
forAll(nonGlobalPatchPoints, pfi)
|
||||||
{
|
{
|
||||||
pnf[pfi] = transform
|
pnf[pfi] = transform
|
||||||
|
|||||||
@ -64,7 +64,7 @@ void Foam::processorPointPatch::initGeometry()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Slave side. Create the reversed patch and pick up its points
|
// Slave side. Create the reversed patch and pick up its points
|
||||||
// so that the order is correct
|
// so that the order is correct
|
||||||
const polyPatch& pp = patch();
|
const polyPatch& pp = patch();
|
||||||
|
|
||||||
|
|||||||
@ -330,7 +330,9 @@ public:
|
|||||||
|
|
||||||
// Addressing into mesh
|
// Addressing into mesh
|
||||||
|
|
||||||
//- Return labelList of mesh points in patch
|
//- Return labelList of mesh points in patch. They are constructed
|
||||||
|
// walking through the faces in incremental order and not sorted
|
||||||
|
// anymore.
|
||||||
const labelList& meshPoints() const;
|
const labelList& meshPoints() const;
|
||||||
|
|
||||||
//- Mesh point map. Given the global point index find its
|
//- Mesh point map. Given the global point index find its
|
||||||
|
|||||||
@ -67,30 +67,56 @@ calcMeshData() const
|
|||||||
// number of faces in the patch
|
// number of faces in the patch
|
||||||
Map<label> markedPoints(4*this->size());
|
Map<label> markedPoints(4*this->size());
|
||||||
|
|
||||||
// if the point is used, set the mark to 1
|
|
||||||
|
// Important:
|
||||||
|
// ~~~~~~~~~~
|
||||||
|
// In <= 1.5 the meshPoints would be in increasing order but this gives
|
||||||
|
// problems in processor point synchronisation where we have to find out
|
||||||
|
// how the opposite side would have allocated points.
|
||||||
|
|
||||||
|
////- 1.5 code:
|
||||||
|
//// if the point is used, set the mark to 1
|
||||||
|
//forAll (*this, faceI)
|
||||||
|
//{
|
||||||
|
// const Face& curPoints = this->operator[](faceI);
|
||||||
|
//
|
||||||
|
// forAll (curPoints, pointI)
|
||||||
|
// {
|
||||||
|
// markedPoints.insert(curPoints[pointI], -1);
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//// Create the storage and store the meshPoints. Mesh points are
|
||||||
|
//// the ones marked by the usage loop above
|
||||||
|
//meshPointsPtr_ = new labelList(markedPoints.toc());
|
||||||
|
//labelList& pointPatch = *meshPointsPtr_;
|
||||||
|
//
|
||||||
|
//// Sort the list to preserve compatibility with the old ordering
|
||||||
|
//sort(pointPatch);
|
||||||
|
//
|
||||||
|
//// For every point in map give it its label in mesh points
|
||||||
|
//forAll (pointPatch, pointI)
|
||||||
|
//{
|
||||||
|
// markedPoints.find(pointPatch[pointI])() = pointI;
|
||||||
|
//}
|
||||||
|
|
||||||
|
//- Unsorted version:
|
||||||
|
DynamicList<label> meshPoints(2*this->size());
|
||||||
forAll (*this, faceI)
|
forAll (*this, faceI)
|
||||||
{
|
{
|
||||||
const Face& curPoints = this->operator[](faceI);
|
const Face& curPoints = this->operator[](faceI);
|
||||||
|
|
||||||
forAll (curPoints, pointI)
|
forAll (curPoints, pointI)
|
||||||
{
|
{
|
||||||
markedPoints.insert(curPoints[pointI], -1);
|
if (markedPoints.insert(curPoints[pointI], meshPoints.size()))
|
||||||
|
{
|
||||||
|
meshPoints.append(curPoints[pointI]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Transfer to straight list (reuses storage)
|
||||||
|
meshPointsPtr_ = new labelList(meshPoints, true);
|
||||||
|
|
||||||
// Create the storage and store the meshPoints. Mesh points are
|
|
||||||
// the ones marked by the usage loop above
|
|
||||||
meshPointsPtr_ = new labelList(markedPoints.toc());
|
|
||||||
labelList& pointPatch = *meshPointsPtr_;
|
|
||||||
|
|
||||||
// Sort the list to preserve compatibility with the old ordering
|
|
||||||
sort(pointPatch);
|
|
||||||
|
|
||||||
// For every point in map give it its label in mesh points
|
|
||||||
forAll (pointPatch, pointI)
|
|
||||||
{
|
|
||||||
markedPoints.find(pointPatch[pointI])() = pointI;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create local faces. Note that we start off from copy of original face
|
// Create local faces. Note that we start off from copy of original face
|
||||||
// list (even though vertices are overwritten below). This is done so
|
// list (even though vertices are overwritten below). This is done so
|
||||||
|
|||||||
@ -38,7 +38,6 @@ SourceFiles
|
|||||||
|
|
||||||
#include "autoPtr.H"
|
#include "autoPtr.H"
|
||||||
#include "dictionary.H"
|
#include "dictionary.H"
|
||||||
#include "pointField.H"
|
|
||||||
#include "boolList.H"
|
#include "boolList.H"
|
||||||
#include "wallPoint.H"
|
#include "wallPoint.H"
|
||||||
#include "searchableSurfaces.H"
|
#include "searchableSurfaces.H"
|
||||||
|
|||||||
@ -29,7 +29,6 @@ Description
|
|||||||
|
|
||||||
#include "autoSnapDriver.H"
|
#include "autoSnapDriver.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "pointFields.H"
|
|
||||||
#include "motionSmoother.H"
|
#include "motionSmoother.H"
|
||||||
#include "polyTopoChange.H"
|
#include "polyTopoChange.H"
|
||||||
#include "OFstream.H"
|
#include "OFstream.H"
|
||||||
@ -1389,11 +1388,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::repatchToSurface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pointField localFaceCentres(pp.size());
|
pointField localFaceCentres(mesh.faceCentres(), pp.addressing());
|
||||||
forAll(pp, i)
|
|
||||||
{
|
|
||||||
localFaceCentres[i] = mesh.faceCentres()[pp.addressing()[i]];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get nearest surface and region
|
// Get nearest surface and region
|
||||||
labelList hitSurface;
|
labelList hitSurface;
|
||||||
|
|||||||
@ -1242,7 +1242,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::refine
|
|||||||
// Do refinement of consistent set of cells followed by truncation and
|
// Do refinement of consistent set of cells followed by truncation and
|
||||||
// load balancing.
|
// load balancing.
|
||||||
Foam::autoPtr<Foam::mapDistributePolyMesh>
|
Foam::autoPtr<Foam::mapDistributePolyMesh>
|
||||||
Foam::meshRefinement::refineAndBalance
|
Foam::meshRefinement::refineAndBalance
|
||||||
(
|
(
|
||||||
const string& msg,
|
const string& msg,
|
||||||
decompositionMethod& decomposer,
|
decompositionMethod& decomposer,
|
||||||
|
|||||||
@ -193,7 +193,7 @@ void Foam::shellSurfaces::orient()
|
|||||||
|
|
||||||
if (hasSurface)
|
if (hasSurface)
|
||||||
{
|
{
|
||||||
const point outsidePt = 2 * overallBb.span();
|
const point outsidePt = overallBb.max() + overallBb.span();
|
||||||
|
|
||||||
//Info<< "Using point " << outsidePt << " to orient shells" << endl;
|
//Info<< "Using point " << outsidePt << " to orient shells" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -120,6 +120,29 @@ const Foam::fileName& Foam::triSurfaceMesh::checkFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::triSurfaceMesh::addFaceToEdge
|
||||||
|
(
|
||||||
|
const edge& e,
|
||||||
|
EdgeMap<label>& facesPerEdge
|
||||||
|
)
|
||||||
|
{
|
||||||
|
EdgeMap<label>::iterator eFnd = facesPerEdge.find(e);
|
||||||
|
if (eFnd != facesPerEdge.end())
|
||||||
|
{
|
||||||
|
if (eFnd() == 2)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
eFnd()++;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
facesPerEdge.insert(e, 1);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::triSurfaceMesh::isSurfaceClosed() const
|
bool Foam::triSurfaceMesh::isSurfaceClosed() const
|
||||||
{
|
{
|
||||||
// Construct pointFaces. Let's hope surface has compact point
|
// Construct pointFaces. Let's hope surface has compact point
|
||||||
@ -142,48 +165,41 @@ bool Foam::triSurfaceMesh::isSurfaceClosed() const
|
|||||||
const labelledTri& f = triSurface::operator[](pFaces[i]);
|
const labelledTri& f = triSurface::operator[](pFaces[i]);
|
||||||
label fp = findIndex(f, pointI);
|
label fp = findIndex(f, pointI);
|
||||||
|
|
||||||
// Forward edge
|
// Something weird: if I expand the code of addFaceToEdge in both
|
||||||
{
|
// below instances it gives a segmentation violation on some
|
||||||
label p1 = f[f.fcIndex(fp)];
|
// surfaces. Compiler (4.3.2) problem?
|
||||||
|
|
||||||
if (p1 > pointI)
|
|
||||||
|
// Forward edge
|
||||||
|
label nextPointI = f[f.fcIndex(fp)];
|
||||||
|
|
||||||
|
if (nextPointI > pointI)
|
||||||
|
{
|
||||||
|
bool okFace = addFaceToEdge
|
||||||
|
(
|
||||||
|
edge(pointI, nextPointI),
|
||||||
|
facesPerEdge
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!okFace)
|
||||||
{
|
{
|
||||||
const edge e(pointI, p1);
|
return false;
|
||||||
EdgeMap<label>::iterator eFnd = facesPerEdge.find(e);
|
|
||||||
if (eFnd != facesPerEdge.end())
|
|
||||||
{
|
|
||||||
if (eFnd() == 2)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
eFnd()++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
facesPerEdge.insert(e, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Reverse edge
|
// Reverse edge
|
||||||
{
|
label prevPointI = f[f.rcIndex(fp)];
|
||||||
label p1 = f[f.rcIndex(fp)];
|
|
||||||
|
|
||||||
if (p1 > pointI)
|
if (prevPointI > pointI)
|
||||||
|
{
|
||||||
|
bool okFace = addFaceToEdge
|
||||||
|
(
|
||||||
|
edge(pointI, prevPointI),
|
||||||
|
facesPerEdge
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!okFace)
|
||||||
{
|
{
|
||||||
const edge e(pointI, p1);
|
return false;
|
||||||
EdgeMap<label>::iterator eFnd = facesPerEdge.find(e);
|
|
||||||
if (eFnd != facesPerEdge.end())
|
|
||||||
{
|
|
||||||
if (eFnd() == 2)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
eFnd()++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
facesPerEdge.insert(e, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,6 +42,7 @@ SourceFiles
|
|||||||
#include "indexedOctree.H"
|
#include "indexedOctree.H"
|
||||||
#include "treeDataTriSurface.H"
|
#include "treeDataTriSurface.H"
|
||||||
#include "treeDataEdge.H"
|
#include "treeDataEdge.H"
|
||||||
|
#include "EdgeMap.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
@ -91,6 +92,13 @@ private:
|
|||||||
const fileName& objectName
|
const fileName& objectName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Helper function for isSurfaceClosed
|
||||||
|
static bool addFaceToEdge
|
||||||
|
(
|
||||||
|
const edge&,
|
||||||
|
EdgeMap<label>&
|
||||||
|
);
|
||||||
|
|
||||||
//- Check whether surface is closed without calculating any permanent
|
//- Check whether surface is closed without calculating any permanent
|
||||||
// addressing.
|
// addressing.
|
||||||
bool isSurfaceClosed() const;
|
bool isSurfaceClosed() const;
|
||||||
|
|||||||
@ -175,6 +175,51 @@ Foam::labelList Foam::orientedSurface::edgeToFace
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::orientedSurface::walkSurface
|
||||||
|
(
|
||||||
|
const triSurface& s,
|
||||||
|
const label startFaceI,
|
||||||
|
labelList& flipState
|
||||||
|
)
|
||||||
|
{
|
||||||
|
// List of faces that were changed in the last iteration.
|
||||||
|
labelList changedFaces(1, startFaceI);
|
||||||
|
// List of edges that were changed in the last iteration.
|
||||||
|
labelList changedEdges;
|
||||||
|
|
||||||
|
while(true)
|
||||||
|
{
|
||||||
|
changedEdges = faceToEdge(s, changedFaces);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "From changedFaces:" << changedFaces.size()
|
||||||
|
<< " to changedEdges:" << changedEdges.size()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changedEdges.empty())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
changedFaces = edgeToFace(s, changedEdges, flipState);
|
||||||
|
|
||||||
|
if (debug)
|
||||||
|
{
|
||||||
|
Pout<< "From changedEdges:" << changedEdges.size()
|
||||||
|
<< " to changedFaces:" << changedFaces.size()
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changedFaces.empty())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::orientedSurface::propagateOrientation
|
void Foam::orientedSurface::propagateOrientation
|
||||||
(
|
(
|
||||||
const triSurface& s,
|
const triSurface& s,
|
||||||
@ -228,42 +273,8 @@ void Foam::orientedSurface::propagateOrientation
|
|||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Walk the surface from nearestFaceI, changing the flipstate.
|
||||||
// List of faces that were changed in the last iteration.
|
walkSurface(s, nearestFaceI, flipState);
|
||||||
labelList changedFaces(1, nearestFaceI);
|
|
||||||
// List of edges that were changed in the last iteration.
|
|
||||||
labelList changedEdges;
|
|
||||||
|
|
||||||
while(true)
|
|
||||||
{
|
|
||||||
changedEdges = faceToEdge(s, changedFaces);
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "From changedFaces:" << changedFaces.size()
|
|
||||||
<< " to changedEdges:" << changedEdges.size()
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changedEdges.empty())
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
changedFaces = edgeToFace(s, changedEdges, flipState);
|
|
||||||
|
|
||||||
if (debug)
|
|
||||||
{
|
|
||||||
Pout<< "From changedEdges:" << changedEdges.size()
|
|
||||||
<< " to changedFaces:" << changedFaces.size()
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changedFaces.empty())
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -352,6 +363,26 @@ bool Foam::orientedSurface::orient
|
|||||||
const bool orientOutside
|
const bool orientOutside
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
bool anyFlipped = false;
|
||||||
|
|
||||||
|
// Do initial flipping to make triangles consistent. Otherwise if the
|
||||||
|
// nearest is e.g. on an edge inbetween inconsistent triangles it might
|
||||||
|
// make the wrong decision.
|
||||||
|
if (s.size() > 0)
|
||||||
|
{
|
||||||
|
// Whether face has to be flipped.
|
||||||
|
// UNVISITED: unvisited
|
||||||
|
// NOFLIP: no need to flip
|
||||||
|
// FLIP: need to flip
|
||||||
|
labelList flipState(s.size(), UNVISITED);
|
||||||
|
|
||||||
|
flipState[0] = NOFLIP;
|
||||||
|
walkSurface(s, 0, flipState);
|
||||||
|
|
||||||
|
anyFlipped = flipSurface(s, flipState);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Whether face has to be flipped.
|
// Whether face has to be flipped.
|
||||||
// UNVISITED: unvisited
|
// UNVISITED: unvisited
|
||||||
// NOFLIP: no need to flip
|
// NOFLIP: no need to flip
|
||||||
@ -410,7 +441,9 @@ bool Foam::orientedSurface::orient
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Now finally flip triangles according to flipState.
|
// Now finally flip triangles according to flipState.
|
||||||
return flipSurface(s, flipState);
|
bool geomFlipped = flipSurface(s, flipState);
|
||||||
|
|
||||||
|
return anyFlipped || geomFlipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -94,6 +94,15 @@ class orientedSurface
|
|||||||
labelList& flip
|
labelList& flip
|
||||||
);
|
);
|
||||||
|
|
||||||
|
//- Walk from face across connected faces. Change orientation to be
|
||||||
|
// consistent with startFaceI.
|
||||||
|
static void walkSurface
|
||||||
|
(
|
||||||
|
const triSurface& s,
|
||||||
|
const label startFaceI,
|
||||||
|
labelList& flipState
|
||||||
|
);
|
||||||
|
|
||||||
//- Given nearest point and face check orientation to nearest face
|
//- Given nearest point and face check orientation to nearest face
|
||||||
// and flip if nessecary (only marked in flipState) and propagate.
|
// and flip if nessecary (only marked in flipState) and propagate.
|
||||||
static void propagateOrientation
|
static void propagateOrientation
|
||||||
|
|||||||
@ -307,6 +307,48 @@ Foam::tmp<Foam::volScalarField> Foam::sampledIsoSurface::average
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::tmp<Foam::pointScalarField> Foam::sampledIsoSurface::average
|
||||||
|
(
|
||||||
|
const pointMesh& pMesh,
|
||||||
|
const volScalarField& fld
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<pointScalarField> tpointAvg
|
||||||
|
(
|
||||||
|
new pointScalarField
|
||||||
|
(
|
||||||
|
IOobject
|
||||||
|
(
|
||||||
|
"pointAvg",
|
||||||
|
fld.time().timeName(),
|
||||||
|
fld.db(),
|
||||||
|
IOobject::NO_READ,
|
||||||
|
IOobject::NO_WRITE,
|
||||||
|
false
|
||||||
|
),
|
||||||
|
pMesh,
|
||||||
|
dimensionedScalar("zero", dimless, scalar(0.0))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
pointScalarField& pointAvg = tpointAvg();
|
||||||
|
|
||||||
|
for (label pointI = 0; pointI < fld.mesh().nPoints(); pointI++)
|
||||||
|
{
|
||||||
|
const labelList& pCells = fld.mesh().pointCells(pointI);
|
||||||
|
|
||||||
|
forAll(pCells, i)
|
||||||
|
{
|
||||||
|
pointAvg[pointI] += fld[pCells[i]];
|
||||||
|
}
|
||||||
|
pointAvg[pointI] /= pCells.size();
|
||||||
|
}
|
||||||
|
// Give value to calculatedFvPatchFields
|
||||||
|
pointAvg.correctBoundaryConditions();
|
||||||
|
|
||||||
|
return tpointAvg;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Foam::sampledIsoSurface::updateGeometry() const
|
bool Foam::sampledIsoSurface::updateGeometry() const
|
||||||
{
|
{
|
||||||
const fvMesh& fvm = static_cast<const fvMesh&>(mesh());
|
const fvMesh& fvm = static_cast<const fvMesh&>(mesh());
|
||||||
@ -407,6 +449,7 @@ bool Foam::sampledIsoSurface::updateGeometry() const
|
|||||||
(
|
(
|
||||||
*volFieldPtr_,
|
*volFieldPtr_,
|
||||||
*pointFieldPtr_,
|
*pointFieldPtr_,
|
||||||
|
//average(pointMesh::New(mesh()), *volFieldPtr_),
|
||||||
isoVal_,
|
isoVal_,
|
||||||
regularise_,
|
regularise_,
|
||||||
mergeTol_
|
mergeTol_
|
||||||
|
|||||||
@ -124,6 +124,12 @@ class sampledIsoSurface
|
|||||||
const pointScalarField&
|
const pointScalarField&
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
tmp<pointScalarField> average
|
||||||
|
(
|
||||||
|
const pointMesh&,
|
||||||
|
const volScalarField& fld
|
||||||
|
) const;
|
||||||
|
|
||||||
//- Create iso surface (if time has changed)
|
//- Create iso surface (if time has changed)
|
||||||
// Do nothing (and return false) if no update was needed
|
// Do nothing (and return false) if no update was needed
|
||||||
bool updateGeometry() const;
|
bool updateGeometry() const;
|
||||||
|
|||||||
Reference in New Issue
Block a user