mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote branch 'OpenCFD/master' into olesenm
Conflicts: applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/createShellMesh.C applications/utilities/surface/surfaceCheck/surfaceCheck.C src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C NOTE: also needed to strip trailing space/lines in various files
This commit is contained in:
@ -37,11 +37,7 @@ SourceFiles
|
||||
#define pointEdgeStructuredWalk_H
|
||||
|
||||
#include "point.H"
|
||||
#include "label.H"
|
||||
#include "scalar.H"
|
||||
#include "tensor.H"
|
||||
#include "pTraits.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -75,10 +71,12 @@ class pointEdgeStructuredWalk
|
||||
// Private Member Functions
|
||||
|
||||
//- Evaluate distance to point.
|
||||
template<class TrackingData>
|
||||
inline bool update
|
||||
(
|
||||
const pointEdgeStructuredWalk& w2,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
public:
|
||||
@ -111,80 +109,105 @@ public:
|
||||
|
||||
// Needed by meshWave
|
||||
|
||||
//- Check whether still contains original (invalid) value.
|
||||
inline bool valid() const;
|
||||
//- Check whether origin has been changed at all or
|
||||
// still contains original (invalid) value.
|
||||
template<class TrackingData>
|
||||
inline bool valid(TrackingData& td) const;
|
||||
|
||||
//- Check for identical geometrical data. Used for cyclics checking.
|
||||
template<class TrackingData>
|
||||
inline bool sameGeometry
|
||||
(
|
||||
const pointEdgeStructuredWalk&,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
) const;
|
||||
|
||||
//- Convert origin to relative vector to leaving point
|
||||
// (= point coordinate)
|
||||
template<class TrackingData>
|
||||
inline void leaveDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const point& pos
|
||||
const point& pos,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Convert relative origin to absolute by adding entering point
|
||||
template<class TrackingData>
|
||||
inline void enterDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const point& pos
|
||||
const point& pos,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Apply rotation matrix to origin
|
||||
inline void transform(const tensor& rotTensor);
|
||||
template<class TrackingData>
|
||||
inline void transform
|
||||
(
|
||||
const tensor& rotTensor,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of edge on point
|
||||
template<class TrackingData>
|
||||
inline bool updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const label edgeI,
|
||||
const pointEdgeStructuredWalk& edgeInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of different value on same point.
|
||||
// Merge new and old info.
|
||||
template<class TrackingData>
|
||||
inline bool updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const pointEdgeStructuredWalk& newPointInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of different value on same point.
|
||||
// No information about current position whatsoever.
|
||||
template<class TrackingData>
|
||||
inline bool updatePoint
|
||||
(
|
||||
const pointEdgeStructuredWalk& newPointInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Influence of point on edge.
|
||||
template<class TrackingData>
|
||||
inline bool updateEdge
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label edgeI,
|
||||
const label pointI,
|
||||
const pointEdgeStructuredWalk& pointInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
);
|
||||
|
||||
//- Same (like operator==)
|
||||
template<class TrackingData>
|
||||
inline bool equal(const pointEdgeStructuredWalk&, TrackingData&)
|
||||
const;
|
||||
|
||||
|
||||
// Member Operators
|
||||
|
||||
//Note: Used to determine whether to call update.
|
||||
inline bool operator==(const pointEdgeStructuredWalk&) const;
|
||||
|
||||
inline bool operator!=(const pointEdgeStructuredWalk&) const;
|
||||
|
||||
|
||||
@ -195,6 +218,14 @@ public:
|
||||
};
|
||||
|
||||
|
||||
//- Data associated with pointEdgeStructuredWalk type are contiguous
|
||||
template<>
|
||||
inline bool contiguous<pointEdgeStructuredWalk>()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -29,13 +29,15 @@ License
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
// Update this with w2.
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::update
|
||||
(
|
||||
const pointEdgeStructuredWalk& w2,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
if (!valid())
|
||||
if (!valid(td))
|
||||
{
|
||||
// current not yet set. Walked from w2 to here (=point0)
|
||||
dist_ = w2.dist_ + mag(point0_-w2.previousPoint_);
|
||||
@ -105,17 +107,20 @@ inline const Foam::vector& Foam::pointEdgeStructuredWalk::data() const
|
||||
}
|
||||
|
||||
|
||||
inline bool Foam::pointEdgeStructuredWalk::valid() const
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::valid(TrackingData& td) const
|
||||
{
|
||||
return previousPoint_ != vector::max;
|
||||
}
|
||||
|
||||
|
||||
// Checks for cyclic points
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::sameGeometry
|
||||
(
|
||||
const pointEdgeStructuredWalk& w2,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
) const
|
||||
{
|
||||
scalar diff = Foam::mag(dist() - w2.dist());
|
||||
@ -138,18 +143,25 @@ inline bool Foam::pointEdgeStructuredWalk::sameGeometry
|
||||
}
|
||||
|
||||
|
||||
template<class TrackingData>
|
||||
inline void Foam::pointEdgeStructuredWalk::leaveDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const point& coord
|
||||
const point& coord,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
previousPoint_ -= coord;
|
||||
}
|
||||
|
||||
|
||||
inline void Foam::pointEdgeStructuredWalk::transform(const tensor& rotTensor)
|
||||
template<class TrackingData>
|
||||
inline void Foam::pointEdgeStructuredWalk::transform
|
||||
(
|
||||
const tensor& rotTensor,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
previousPoint_ = Foam::transform(rotTensor, previousPoint_);
|
||||
}
|
||||
@ -157,11 +169,13 @@ inline void Foam::pointEdgeStructuredWalk::transform(const tensor& rotTensor)
|
||||
|
||||
// Update absolute geometric quantities. Note that distance (dist_)
|
||||
// is not affected by leaving/entering domain.
|
||||
template<class TrackingData>
|
||||
inline void Foam::pointEdgeStructuredWalk::enterDomain
|
||||
(
|
||||
const polyPatch& patch,
|
||||
const label patchPointI,
|
||||
const point& coord
|
||||
const point& coord,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
// back to absolute form
|
||||
@ -170,18 +184,20 @@ inline void Foam::pointEdgeStructuredWalk::enterDomain
|
||||
|
||||
|
||||
// Update this with information from connected edge
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const label edgeI,
|
||||
const pointEdgeStructuredWalk& edgeInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
if (inZone())
|
||||
{
|
||||
return update(edgeInfo, tol);
|
||||
return update(edgeInfo, tol, td);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -191,17 +207,19 @@ inline bool Foam::pointEdgeStructuredWalk::updatePoint
|
||||
|
||||
|
||||
// Update this with new information on same point
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::updatePoint
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label pointI,
|
||||
const pointEdgeStructuredWalk& newPointInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
if (inZone())
|
||||
{
|
||||
return update(newPointInfo, tol);
|
||||
return update(newPointInfo, tol, td);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -211,29 +229,33 @@ inline bool Foam::pointEdgeStructuredWalk::updatePoint
|
||||
|
||||
|
||||
// Update this with new information on same point. No extra information.
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::updatePoint
|
||||
(
|
||||
const pointEdgeStructuredWalk& newPointInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
return update(newPointInfo, tol);
|
||||
return update(newPointInfo, tol, td);
|
||||
}
|
||||
|
||||
|
||||
// Update this with information from connected point
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::updateEdge
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const label edgeI,
|
||||
const label pointI,
|
||||
const pointEdgeStructuredWalk& pointInfo,
|
||||
const scalar tol
|
||||
const scalar tol,
|
||||
TrackingData& td
|
||||
)
|
||||
{
|
||||
if (inZone())
|
||||
{
|
||||
return update(pointInfo, tol);
|
||||
return update(pointInfo, tol, td);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -242,6 +264,17 @@ inline bool Foam::pointEdgeStructuredWalk::updateEdge
|
||||
}
|
||||
|
||||
|
||||
template <class TrackingData>
|
||||
inline bool Foam::pointEdgeStructuredWalk::equal
|
||||
(
|
||||
const pointEdgeStructuredWalk& rhs,
|
||||
TrackingData& td
|
||||
) const
|
||||
{
|
||||
return operator==(rhs);
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||
|
||||
inline bool Foam::pointEdgeStructuredWalk::operator==
|
||||
|
||||
@ -91,6 +91,9 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
List<pointEdgePoint> pointWallDist(mesh.nPoints());
|
||||
List<pointEdgePoint> edgeWallDist(mesh.nEdges());
|
||||
|
||||
int dummyTrackData = 0;
|
||||
|
||||
|
||||
{
|
||||
// Seeds
|
||||
List<pointEdgePoint> seedInfo(nPatchEdges);
|
||||
@ -108,7 +111,7 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
{
|
||||
label pointI = meshPoints[i];
|
||||
|
||||
if (!pointWallDist[pointI].valid())
|
||||
if (!pointWallDist[pointI].valid(dummyTrackData))
|
||||
{
|
||||
// Not yet seeded
|
||||
seedInfo[nPatchEdges] = pointEdgePoint
|
||||
@ -135,7 +138,8 @@ void Foam::inversePointDistanceDiffusivity::correct()
|
||||
|
||||
pointWallDist,
|
||||
edgeWallDist,
|
||||
mesh.globalData().nTotalPoints() // max iterations
|
||||
mesh.globalData().nTotalPoints(),// max iterations
|
||||
dummyTrackData
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user