Merge branch 'master' into feature/cvMesh

Conflicts:
	applications/test/Matrix/Test-Matrix.C
	applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C
	applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H
	src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
	src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H
This commit is contained in:
laurence
2013-04-05 16:09:24 +01:00
1087 changed files with 16553 additions and 13759 deletions

View File

@ -862,7 +862,7 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::normaliseWeights
if (nFace)
{
Info<< "AMI: Patch " << patchName << " weights min/max/average = "
IInfo<< "AMI: Patch " << patchName << " weights min/max/average = "
<< gMin(wghtSum) << ", "
<< gMax(wghtSum) << ", "
<< gAverage(wghtSum) << endl;
@ -1161,7 +1161,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation
label srcSize = returnReduce(srcPatch.size(), sumOp<label>());
label tgtSize = returnReduce(tgtPatch.size(), sumOp<label>());
Info<< "AMI: Creating addressing and weights between "
IInfo<< "AMI: Creating addressing and weights between "
<< srcSize << " source faces and " << tgtSize << " target faces"
<< endl;
@ -1196,7 +1196,7 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation
label srcSize = returnReduce(srcPatch.size(), sumOp<label>());
label tgtSize = returnReduce(tgtPatch.size(), sumOp<label>());
Info<< "AMI: Creating addressing and weights between "
IInfo<< "AMI: Creating addressing and weights between "
<< srcSize << " source faces and " << tgtSize << " target faces"
<< endl;
@ -1317,9 +1317,9 @@ Foam::AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation
(
"AMIInterpolation<SourcePatch, TargetPatch>::AMIInterpolation"
"("
" const AMIInterpolation<SourcePatch, TargetPatch>&, "
" const labelList&, "
" const labelList&"
"const AMIInterpolation<SourcePatch, TargetPatch>&, "
"const labelList&, "
"const labelList&"
")"
) << "Size mismatch." << nl
<< "Source patch size:" << fineAMI.srcAddress().size() << nl
@ -1584,7 +1584,8 @@ void Foam::AMIInterpolation<SourcePatch, TargetPatch>::update
if (debug)
{
Info<< "AMIInterpolation : Constructed addressing and weights" << nl
<< " triMode :" << triMode_ << nl
<< " triMode :"
<< faceAreaIntersect::triangulationModeNames_[triMode_] << nl
<< " singlePatchProc:" << singlePatchProc_ << nl
<< " srcMagSf :" << gSum(srcMagSf_) << nl
<< " tgtMagSf :" << gSum(tgtMagSf_) << nl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,6 +42,7 @@ Description
SourceFiles
AMIInterpolation.C
AMIInterpolationName.C
AMIInterpolationParallelOps.C
\*---------------------------------------------------------------------------*/
@ -468,7 +469,7 @@ public:
) const;
//- Interpolate from target to source with supplied binary op
//- Interpolate from target to source with supplied op
template<class Type, class CombineOp>
tmp<Field<Type> > interpolateToSource
(
@ -476,8 +477,7 @@ public:
const CombineOp& cop
) const;
//- Interpolate from target tmp field to source with supplied
// binary op
//- Interpolate from target tmp field to source with supplied op
template<class Type, class CombineOp>
tmp<Field<Type> > interpolateToSource
(

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,6 +27,19 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
template<>
const char* NamedEnum<faceAreaIntersect::triangulationMode, 2>::names[] =
{
"fan",
"mesh"
};
}
const Foam::NamedEnum<Foam::faceAreaIntersect::triangulationMode, 2>
Foam::faceAreaIntersect::triangulationModeNames_;
Foam::scalar Foam::faceAreaIntersect::tol = 1e-6;
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,6 +41,7 @@ SourceFiles
#include "FixedList.H"
#include "plane.H"
#include "face.H"
#include "NamedEnum.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -63,6 +64,8 @@ public:
tmMesh
};
static const NamedEnum<triangulationMode, 2> triangulationModeNames_;
private:

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -239,7 +239,11 @@ void Foam::cyclicAMIPolyPatch::resetAMI() const
AMIPtr_.clear();
const polyPatch& nbr = neighbPatch();
pointField nbrPoints = neighbPatch().localPoints();
pointField nbrPoints
(
neighbPatch().boundaryMesh().mesh().points(),
neighbPatch().meshPoints()
);
if (debug)
{
@ -326,6 +330,9 @@ void Foam::cyclicAMIPolyPatch::initMovePoints
)
{
polyPatch::initMovePoints(pBufs, p);
// See below. Clear out any local geometry
primitivePatch::movePoints(p);
}
@ -339,6 +346,10 @@ void Foam::cyclicAMIPolyPatch::movePoints
calcTransforms();
// Note: resetAMI is called whilst in geometry update. So the slave
// side might not have reached 'movePoints'. Is explicitly handled by
// - clearing geometry of neighbour inside initMovePoints
// - not using localPoints() inside resetAMI
resetAMI();
}

View File

@ -129,6 +129,7 @@ faceZoneSources = sets/faceZoneSources
$(faceZoneSources)/faceZoneToFaceZone/faceZoneToFaceZone.C
$(faceZoneSources)/setsToFaceZone/setsToFaceZone.C
$(faceZoneSources)/setToFaceZone/setToFaceZone.C
$(faceZoneSources)/setAndNormalToFaceZone/setAndNormalToFaceZone.C
$(faceZoneSources)/searchableSurfaceToFaceZone/searchableSurfaceToFaceZone.C
cellZoneSources = sets/cellZoneSources

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -38,13 +38,13 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template <class Type, class TrackingData>
template<class Type, class TrackingData>
const Foam::scalar Foam::FaceCellWave<Type, TrackingData>::geomTol_ = 1e-6;
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::scalar Foam::FaceCellWave<Type, TrackingData>::propagationTol_ = 0.01;
template <class Type, class TrackingData>
template<class Type, class TrackingData>
int Foam::FaceCellWave<Type, TrackingData>::dummyTrackData_ = 12345;
namespace Foam
@ -111,7 +111,7 @@ namespace Foam
// Updates:
// - changedCell_, changedCells_, nChangedCells_,
// - statistics: nEvals_, nUnvisitedCells_
template <class Type, class TrackingData>
template<class Type, class TrackingData>
bool Foam::FaceCellWave<Type, TrackingData>::updateCell
(
const label cellI,
@ -159,7 +159,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateCell
// Updates:
// - changedFace_, changedFaces_, nChangedFaces_,
// - statistics: nEvals_, nUnvisitedFaces_
template <class Type, class TrackingData>
template<class Type, class TrackingData>
bool Foam::FaceCellWave<Type, TrackingData>::updateFace
(
const label faceI,
@ -207,7 +207,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
// Updates:
// - changedFace_, changedFaces_, nChangedFaces_,
// - statistics: nEvals_, nUnvisitedFaces_
template <class Type, class TrackingData>
template<class Type, class TrackingData>
bool Foam::FaceCellWave<Type, TrackingData>::updateFace
(
const label faceI,
@ -249,7 +249,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::updateFace
// For debugging: check status on both sides of cyclic
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
(
const polyPatch& patch
@ -302,8 +302,8 @@ void Foam::FaceCellWave<Type, TrackingData>::checkCyclic
// Check if has cyclic patches
template <class Type, class TrackingData>
template <class PatchType>
template<class Type, class TrackingData>
template<class PatchType>
bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const
{
forAll(mesh_.boundaryMesh(), patchI)
@ -318,7 +318,7 @@ bool Foam::FaceCellWave<Type, TrackingData>::hasPatch() const
// Copy face information into member data
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo
(
const labelList& changedFaces,
@ -349,7 +349,7 @@ void Foam::FaceCellWave<Type, TrackingData>::setFaceInfo
// Merge face information into member data
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::mergeFaceInfo
(
const polyPatch& patch,
@ -384,7 +384,7 @@ void Foam::FaceCellWave<Type, TrackingData>::mergeFaceInfo
// Construct compact patchFace change arrays for a (slice of a) single patch.
// changedPatchFaces in local patch numbering.
// Return length of arrays.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::getChangedPatchFaces
(
const polyPatch& patch,
@ -414,7 +414,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::getChangedPatchFaces
// Handle leaving domain. Implementation referred to Type
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::leaveDomain
(
const polyPatch& patch,
@ -436,7 +436,7 @@ void Foam::FaceCellWave<Type, TrackingData>::leaveDomain
// Handle entering domain. Implementation referred to Type
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::enterDomain
(
const polyPatch& patch,
@ -458,7 +458,7 @@ void Foam::FaceCellWave<Type, TrackingData>::enterDomain
// Transform. Implementation referred to Type
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::transform
(
const tensorField& rotTensor,
@ -486,7 +486,7 @@ void Foam::FaceCellWave<Type, TrackingData>::transform
// Offset mesh face. Used for transferring from one cyclic half to the other.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::offset
(
const polyPatch&,
@ -503,7 +503,7 @@ void Foam::FaceCellWave<Type, TrackingData>::offset
// Tranfer all the information to/from neighbouring processors
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
{
const globalMeshData& pData = mesh_.globalData();
@ -622,7 +622,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleProcPatches()
// Transfer information across cyclic halves.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
{
forAll(mesh_.boundaryMesh(), patchI)
@ -707,7 +707,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleCyclicPatches()
// Transfer information across cyclic halves.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
{
forAll(mesh_.boundaryMesh(), patchI)
@ -800,7 +800,7 @@ void Foam::FaceCellWave<Type, TrackingData>::handleAMICyclicPatches()
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Set up only. Use setFaceInfo and iterate() to do actual calculation.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
(
const polyMesh& mesh,
@ -852,7 +852,7 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
// Iterate, propagating changedFacesInfo across mesh, until no change (or
// maxIter reached). Initial cell values specified.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
(
const polyMesh& mesh,
@ -929,14 +929,14 @@ Foam::FaceCellWave<Type, TrackingData>::FaceCellWave
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::getUnsetCells() const
{
return nUnvisitedCells_;
}
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::getUnsetFaces() const
{
return nUnvisitedFaces_;
@ -945,7 +945,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::getUnsetFaces() const
// Propagate cell to face
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
{
const labelList& owner = mesh_.faceOwner();
@ -1030,7 +1030,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::faceToCell()
// Propagate cell to face
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
{
const cellList& cells = mesh_.cells();
@ -1112,7 +1112,7 @@ Foam::label Foam::FaceCellWave<Type, TrackingData>::cellToFace()
// Iterate
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::FaceCellWave<Type, TrackingData>::iterate(const label maxIter)
{
if (hasCyclicPatches_)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -166,7 +166,7 @@ class FaceCellWave
void checkCyclic(const polyPatch& pPatch) const;
//- Has cyclic patch?
template <class PatchType>
template<class PatchType>
bool hasPatch() const;
//- Merge received patch data into global data

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -29,7 +29,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template <class Type, class TrackingData>
template<class Type, class TrackingData>
int Foam::MeshWave<Type, TrackingData>::dummyTrackData_ = 12345;
@ -37,7 +37,7 @@ int Foam::MeshWave<Type, TrackingData>::dummyTrackData_ = 12345;
// Iterate, propagating changedFacesInfo across mesh, until no change (or
// maxIter reached).
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::MeshWave<Type, TrackingData>::MeshWave
(
const polyMesh& mesh,
@ -64,7 +64,7 @@ Foam::MeshWave<Type, TrackingData>::MeshWave
// Iterate, propagating changedFacesInfo across mesh, until no change (or
// maxIter reached). Initial cell values specified.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::MeshWave<Type, TrackingData>::MeshWave
(
const polyMesh& mesh,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,7 +53,7 @@ TemplateName(MeshWave);
Class MeshWave Declaration
\*---------------------------------------------------------------------------*/
template <class Type, class TrackingData = int>
template<class Type, class TrackingData = int>
class MeshWave
:
public MeshWaveName

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -234,7 +234,7 @@ inline bool Foam::patchEdgeFaceInfo::updateFace
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::patchEdgeFaceInfo::equal
(
const patchEdgeFaceInfo& rhs,

View File

@ -37,10 +37,10 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::scalar Foam::PointEdgeWave<Type, TrackingData>::propagationTol_ = 0.01;
template <class Type, class TrackingData>
template<class Type, class TrackingData>
int Foam::PointEdgeWave<Type, TrackingData>::dummyTrackData_ = 12345;
namespace Foam
@ -71,7 +71,7 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Handle leaving domain. Implementation referred to Type
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::leaveDomain
(
const polyPatch& patch,
@ -93,7 +93,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::leaveDomain
// Handle entering domain. Implementation referred to Type
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::enterDomain
(
const polyPatch& patch,
@ -115,7 +115,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::enterDomain
// Transform. Implementation referred to Type
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::transform
(
const polyPatch& patch,
@ -156,7 +156,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::transform
// Updates:
// - changedPoint_, changedPoints_, nChangedPoints_,
// - statistics: nEvals_, nUnvisitedPoints_
template <class Type, class TrackingData>
template<class Type, class TrackingData>
bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
(
const label pointI,
@ -203,7 +203,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
// Updates:
// - changedPoint_, changedPoints_, nChangedPoints_,
// - statistics: nEvals_, nUnvisitedPoints_
template <class Type, class TrackingData>
template<class Type, class TrackingData>
bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
(
const label pointI,
@ -248,7 +248,7 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updatePoint
// Updates:
// - changedEdge_, changedEdges_, nChangedEdges_,
// - statistics: nEvals_, nUnvisitedEdge_
template <class Type, class TrackingData>
template<class Type, class TrackingData>
bool Foam::PointEdgeWave<Type, TrackingData>::updateEdge
(
const label edgeI,
@ -291,8 +291,8 @@ bool Foam::PointEdgeWave<Type, TrackingData>::updateEdge
// Check if patches of given type name are present
template <class Type, class TrackingData>
template <class PatchType>
template<class Type, class TrackingData>
template<class PatchType>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::countPatchType() const
{
label nPatches = 0;
@ -309,7 +309,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::countPatchType() const
// Transfer all the information to/from neighbouring processors
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
{
// 1. Send all point info on processor patches.
@ -458,7 +458,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches()
}
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
{
// 1. Send all point info on cyclic patches.
@ -549,7 +549,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleCyclicPatches()
// Guarantee collocated points have same information.
// Return number of points changed.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
{
// Transfer onto coupled patch
@ -643,7 +643,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::handleCollocatedPoints()
// Iterate, propagating changedPointsInfo across mesh, until no change (or
// maxIter reached). Initial point values specified.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
(
const polyMesh& mesh,
@ -728,7 +728,7 @@ Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
}
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
(
const polyMesh& mesh,
@ -756,7 +756,7 @@ Foam::PointEdgeWave<Type, TrackingData>::PointEdgeWave
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::PointEdgeWave<Type, TrackingData>::~PointEdgeWave()
{}
@ -764,14 +764,14 @@ Foam::PointEdgeWave<Type, TrackingData>::~PointEdgeWave()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::getUnsetPoints() const
{
return nUnvisitedPoints_;
}
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::getUnsetEdges() const
{
return nUnvisitedEdges_;
@ -779,7 +779,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::getUnsetEdges() const
// Copy point information into member data
template <class Type, class TrackingData>
template<class Type, class TrackingData>
void Foam::PointEdgeWave<Type, TrackingData>::setPointInfo
(
const labelList& changedPoints,
@ -816,7 +816,7 @@ void Foam::PointEdgeWave<Type, TrackingData>::setPointInfo
// Propagate information from edge to point. Return number of points changed.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::edgeToPoint()
{
for
@ -892,7 +892,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::edgeToPoint()
// Propagate information from point to edge. Return number of edges changed.
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::pointToEdge()
{
const labelListList& pointEdges = mesh_.pointEdges();
@ -960,7 +960,7 @@ Foam::label Foam::PointEdgeWave<Type, TrackingData>::pointToEdge()
// Iterate
template <class Type, class TrackingData>
template<class Type, class TrackingData>
Foam::label Foam::PointEdgeWave<Type, TrackingData>::iterate
(
const label maxIter

View File

@ -82,7 +82,7 @@ TemplateName(PointEdgeWave);
Class PointEdgeWave Declaration
\*---------------------------------------------------------------------------*/
template <class Type, class TrackingData = int>
template<class Type, class TrackingData = int>
class PointEdgeWave
:
public PointEdgeWaveName
@ -196,7 +196,7 @@ class PointEdgeWave
// Parallel, cyclic
//- Has patches of certain type?
template <class PatchType>
template<class PatchType>
label countPatchType() const;
//- Merge data from across processor boundaries
@ -323,7 +323,7 @@ public:
\*---------------------------------------------------------------------------*/
//- List update operation
template <class Type, class TrackingData = int>
template<class Type, class TrackingData = int>
class listUpdateOp
{
//- Additional data to be passed into container

View File

@ -296,7 +296,7 @@ inline bool Foam::pointEdgePoint::updateEdge
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::pointEdgePoint::equal
(
const pointEdgePoint& rhs,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -244,7 +244,7 @@ inline bool Foam::cellInfo::updateFace
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::cellInfo::equal
(
const cellInfo& rhs,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,7 +32,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
template <class Type>
template<class Type>
Ostream& operator<<
(
Ostream& os,
@ -45,7 +45,7 @@ Ostream& operator<<
}
template <class Type>
template<class Type>
Istream& operator>>
(
Istream& is,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,7 @@ template<class Type> Ostream& operator<<(Ostream&, const wallPointData<Type>&);
Class wallPointData Declaration
\*---------------------------------------------------------------------------*/
template <class Type>
template<class Type>
class wallPointData
:
public wallPoint
@ -163,37 +163,37 @@ public:
//- Data associated with wallPointData type are contiguous. List the usual
// ones.
template <>
template<>
inline bool contiguous<wallPointData<bool> >()
{
return contiguous<wallPoint>();
}
template <>
template<>
inline bool contiguous<wallPointData<label> >()
{
return contiguous<wallPoint>();
}
template <>
template<>
inline bool contiguous<wallPointData<scalar> >()
{
return contiguous<wallPoint>();
}
template <>
template<>
inline bool contiguous<wallPointData<vector> >()
{
return contiguous<wallPoint>();
}
template <>
template<>
inline bool contiguous<wallPointData<sphericalTensor> >()
{
return contiguous<wallPoint>();
}
template <>
template<>
inline bool contiguous<wallPointData<symmTensor> >()
{
return contiguous<wallPoint>();
}
template <>
template<>
inline bool contiguous<wallPointData<tensor> >()
{
return contiguous<wallPoint>();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,8 +31,8 @@ namespace Foam
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Update this with w2 if w2 nearer to pt.
template <class Type>
template <class TrackingData>
template<class Type>
template<class TrackingData>
inline bool wallPointData<Type>::update
(
const point& pt,
@ -75,7 +75,7 @@ inline bool wallPointData<Type>::update
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Null constructor
template <class Type>
template<class Type>
inline wallPointData<Type>::wallPointData()
:
wallPoint(),
@ -84,7 +84,7 @@ inline wallPointData<Type>::wallPointData()
// Construct from components
template <class Type>
template<class Type>
inline wallPointData<Type>::wallPointData
(
const point& origin,
@ -99,14 +99,14 @@ inline wallPointData<Type>::wallPointData
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type>
template<class Type>
inline const Type& wallPointData<Type>::data() const
{
return data_;
}
template <class Type>
template<class Type>
inline Type& wallPointData<Type>::data()
{
return data_;
@ -114,8 +114,8 @@ inline Type& wallPointData<Type>::data()
// Update this with w2 if w2 nearer to pt.
template <class Type>
template <class TrackingData>
template<class Type>
template<class TrackingData>
inline bool wallPointData<Type>::updateCell
(
const polyMesh& mesh,
@ -139,8 +139,8 @@ inline bool wallPointData<Type>::updateCell
// Update this with w2 if w2 nearer to pt.
template <class Type>
template <class TrackingData>
template<class Type>
template<class TrackingData>
inline bool wallPointData<Type>::updateFace
(
const polyMesh& mesh,
@ -164,8 +164,8 @@ inline bool wallPointData<Type>::updateFace
// Update this with w2 if w2 nearer to pt.
template <class Type>
template <class TrackingData>
template<class Type>
template<class TrackingData>
inline bool wallPointData<Type>::updateFace
(
const polyMesh& mesh,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -277,7 +277,7 @@ inline bool Foam::wallPoint::updateFace
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::wallPoint::equal
(
const wallPoint& rhs,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,7 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "cellQuality.H"

View File

@ -171,12 +171,7 @@ Foam::tmp<Foam::vectorField> Foam::axesRotation::transform
const vectorField& st
) const
{
notImplemented
(
"tmp<vectorField> Foam::axesRotation:: "
"transform(const vectorField& st) const"
);
return tmp<vectorField>(NULL);
return (R_ & st);
}
@ -185,12 +180,7 @@ Foam::tmp<Foam::vectorField> Foam::axesRotation::invTransform
const vectorField& st
) const
{
notImplemented
(
"tmp<vectorField> Foam::axesRotation::"
"invTransform(const vectorField& st) const"
);
return tmp<vectorField>(NULL);
return (Rtr_ & st);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,7 +40,12 @@ Foam::meshSearchFACECENTRETETSMeshObject::meshSearchFACECENTRETETSMeshObject
const polyMesh& mesh
)
:
MeshObject<polyMesh, meshSearchFACECENTRETETSMeshObject>(mesh),
MeshObject
<
polyMesh,
Foam::GeometricMeshObject,
meshSearchFACECENTRETETSMeshObject
>(mesh),
meshSearch(mesh, polyMesh::FACECENTRETETS)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,12 @@ namespace Foam
class meshSearchFACECENTRETETSMeshObject
:
public MeshObject<polyMesh, meshSearchFACECENTRETETSMeshObject>,
public MeshObject
<
polyMesh,
GeometricMeshObject,
meshSearchFACECENTRETETSMeshObject
>,
public meshSearch
{
@ -66,18 +71,6 @@ public:
//- Destructor
virtual ~meshSearchFACECENTRETETSMeshObject()
{}
//
// // Member functions
//
// // Edit
//
// //- Update mesh topology using the morph engine
// void updateMesh();
//
// //- Correct weighting factors for moving mesh.
// bool movePoints();
//
};

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,7 +37,7 @@ namespace Foam
Foam::meshSearchMeshObject::meshSearchMeshObject(const polyMesh& mesh)
:
MeshObject<polyMesh, meshSearchMeshObject>(mesh),
MeshObject<polyMesh, Foam::GeometricMeshObject, meshSearchMeshObject>(mesh),
meshSearch(mesh)
{}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,7 +48,7 @@ namespace Foam
class meshSearchMeshObject
:
public MeshObject<polyMesh, meshSearchMeshObject>,
public MeshObject<polyMesh, GeometricMeshObject, meshSearchMeshObject>,
public meshSearch
{
@ -66,18 +66,6 @@ public:
//- Destructor
virtual ~meshSearchMeshObject()
{}
//
// // Member functions
//
// // Edit
//
// //- Update mesh topology using the morph engine
// void updateMesh();
//
// //- Correct weighting factors for moving mesh.
// bool movePoints();
//
};

View File

@ -52,7 +52,7 @@ inline Foam::pointTopoDistanceData::pointTopoDistanceData
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class TrackingData>
template<class TrackingData>
inline bool Foam::pointTopoDistanceData::valid(TrackingData& td) const
{
return distance_ != -1;
@ -60,7 +60,7 @@ inline bool Foam::pointTopoDistanceData::valid(TrackingData& td) const
// No geometric data so never any problem on cyclics
template <class TrackingData>
template<class TrackingData>
inline bool Foam::pointTopoDistanceData::sameGeometry
(
const pointTopoDistanceData&,
@ -73,7 +73,7 @@ inline bool Foam::pointTopoDistanceData::sameGeometry
// No geometric data.
template <class TrackingData>
template<class TrackingData>
inline void Foam::pointTopoDistanceData::leaveDomain
(
const polyPatch& patch,
@ -85,7 +85,7 @@ inline void Foam::pointTopoDistanceData::leaveDomain
// No geometric data.
template <class TrackingData>
template<class TrackingData>
inline void Foam::pointTopoDistanceData::transform
(
const tensor& rotTensor,
@ -95,7 +95,7 @@ inline void Foam::pointTopoDistanceData::transform
// No geometric data.
template <class TrackingData>
template<class TrackingData>
inline void Foam::pointTopoDistanceData::enterDomain
(
const polyPatch& patch,
@ -107,7 +107,7 @@ inline void Foam::pointTopoDistanceData::enterDomain
// Update this with information from connected edge
template <class TrackingData>
template<class TrackingData>
inline bool Foam::pointTopoDistanceData::updatePoint
(
const polyMesh& mesh,
@ -199,7 +199,7 @@ inline bool Foam::pointTopoDistanceData::updateEdge
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::pointTopoDistanceData::equal
(
const pointTopoDistanceData& rhs,

View File

@ -52,7 +52,7 @@ inline Foam::topoDistanceData::topoDistanceData
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class TrackingData>
template<class TrackingData>
inline bool Foam::topoDistanceData::valid(TrackingData& td) const
{
return distance_ != -1;
@ -60,7 +60,7 @@ inline bool Foam::topoDistanceData::valid(TrackingData& td) const
// No geometric data so never any problem on cyclics
template <class TrackingData>
template<class TrackingData>
inline bool Foam::topoDistanceData::sameGeometry
(
const polyMesh&,
@ -74,7 +74,7 @@ inline bool Foam::topoDistanceData::sameGeometry
// No geometric data.
template <class TrackingData>
template<class TrackingData>
inline void Foam::topoDistanceData::leaveDomain
(
const polyMesh&,
@ -87,7 +87,7 @@ inline void Foam::topoDistanceData::leaveDomain
// No geometric data.
template <class TrackingData>
template<class TrackingData>
inline void Foam::topoDistanceData::transform
(
const polyMesh&,
@ -98,7 +98,7 @@ inline void Foam::topoDistanceData::transform
// No geometric data.
template <class TrackingData>
template<class TrackingData>
inline void Foam::topoDistanceData::enterDomain
(
const polyMesh&,
@ -111,7 +111,7 @@ inline void Foam::topoDistanceData::enterDomain
// Update cell with neighbouring face information
template <class TrackingData>
template<class TrackingData>
inline bool Foam::topoDistanceData::updateCell
(
const polyMesh&,
@ -135,7 +135,7 @@ inline bool Foam::topoDistanceData::updateCell
// Update face with neighbouring cell information
template <class TrackingData>
template<class TrackingData>
inline bool Foam::topoDistanceData::updateFace
(
const polyMesh& mesh,
@ -162,7 +162,7 @@ inline bool Foam::topoDistanceData::updateFace
// Update face with coupled face information
template <class TrackingData>
template<class TrackingData>
inline bool Foam::topoDistanceData::updateFace
(
const polyMesh&,
@ -185,7 +185,7 @@ inline bool Foam::topoDistanceData::updateFace
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::topoDistanceData::equal
(
const topoDistanceData& rhs,

View File

@ -136,7 +136,7 @@ namespace meshTools
);
//- Write obj representation of faces subset
template <class FaceType>
template<class FaceType>
void writeOBJ
(
Ostream& os,
@ -146,7 +146,7 @@ namespace meshTools
);
//- Write obj representation of faces
template <class FaceType>
template<class FaceType>
void writeOBJ
(
Ostream& os,

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
template <class FaceType>
template<class FaceType>
void Foam::meshTools::writeOBJ
(
Ostream& os,
@ -59,7 +59,7 @@ void Foam::meshTools::writeOBJ
}
template <class FaceType>
template<class FaceType>
void Foam::meshTools::writeOBJ
(
Ostream& os,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -692,7 +692,7 @@ Foam::autoPtr<Foam::globalIndex> Foam::regionSplit::calcRegionSplit
Foam::regionSplit::regionSplit(const polyMesh& mesh)
:
MeshObject<polyMesh, regionSplit>(mesh),
MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh),
labelList(mesh.nCells(), -1)
{
globalNumberingPtr_ = calcRegionSplit
@ -710,7 +710,7 @@ Foam::regionSplit::regionSplit
const boolList& blockedFace
)
:
MeshObject<polyMesh, regionSplit>(mesh),
MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh),
labelList(mesh.nCells(), -1)
{
globalNumberingPtr_ = calcRegionSplit
@ -729,7 +729,7 @@ Foam::regionSplit::regionSplit
const List<labelPair>& explicitConnections
)
:
MeshObject<polyMesh, regionSplit>(mesh),
MeshObject<polyMesh, Foam::TopologicalMeshObject, regionSplit>(mesh),
labelList(mesh.nCells(), -1)
{
globalNumberingPtr_ = calcRegionSplit

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,12 +108,12 @@ namespace Foam
class polyMesh;
/*---------------------------------------------------------------------------*\
Class regionSplit Declaration
Class regionSplit Declaration
\*---------------------------------------------------------------------------*/
class regionSplit
:
public MeshObject<polyMesh, regionSplit>,
public MeshObject<polyMesh, TopologicalMeshObject, regionSplit>,
public labelList
{
// Private data

View File

@ -21,7 +21,7 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*----------------------------------------------------------------------------*/
\*---------------------------------------------------------------------------*/
#include "searchableSurfaces.H"
#include "searchableSurfacesQueries.H"

View File

@ -21,7 +21,7 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*----------------------------------------------------------------------------*/
\*---------------------------------------------------------------------------*/
#include "searchableSurfacesQueries.H"
#include "ListOps.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -139,7 +139,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
const boundBox& bb = mesh_.bounds();
pointField points(bb.points());
label minPointI = -1;
//label minPointI = -1;
label maxPointI = -1;
forAll(points, pointI)
{
@ -152,7 +152,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
else if (c < minComp)
{
minComp = c;
minPointI = pointI;
//minPointI = pointI;
}
}
@ -179,7 +179,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
PackedBoolList selected(mesh_.nCells());
label nSelected = -1;
scalar selectedVol = 0.0;
scalar selectedComp = 0.0;
//scalar selectedComp = 0.0;
scalar low = minComp;
@ -228,7 +228,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
if (selectedVol < vol_)
{
selectedComp = high;
//selectedComp = high;
}
else
{
@ -237,7 +237,7 @@ void Foam::targetVolumeToCell::combine(topoSet& set, const bool add) const
if (selectedVol < vol_)
{
selectedComp = low;
//selectedComp = low;
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -163,7 +163,7 @@ inline bool Foam::patchEdgeFaceRegion::updateFace
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::patchEdgeFaceRegion::equal
(
const patchEdgeFaceRegion& rhs,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -120,7 +120,7 @@ void Foam::searchableSurfaceToFaceZone::applyToSet
// Boundary faces
vectorField nbrCellCentres;
syncTools::swapBoundaryCellList(mesh_, cc, nbrCellCentres);
syncTools::swapBoundaryCellPositions(mesh_, cc, nbrCellCentres);
const polyBoundaryMesh& pbm = mesh_.boundaryMesh();

View File

@ -0,0 +1,189 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "setAndNormalToFaceZone.H"
#include "polyMesh.H"
#include "faceZoneSet.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(setAndNormalToFaceZone, 0);
addToRunTimeSelectionTable(topoSetSource, setAndNormalToFaceZone, word);
addToRunTimeSelectionTable(topoSetSource, setAndNormalToFaceZone, istream);
}
Foam::topoSetSource::addToUsageTable Foam::setAndNormalToFaceZone::usage_
(
setAndNormalToFaceZone::typeName,
"\n Usage: setAndNormalToFaceZone <faceSet> <normal>\n\n"
" Select all faces in the faceSet and orient using normal.\n\n"
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::setAndNormalToFaceZone::setAndNormalToFaceZone
(
const polyMesh& mesh,
const word& setName,
const vector& normal
)
:
topoSetSource(mesh),
setName_(setName),
normal_(normal)
{}
Foam::setAndNormalToFaceZone::setAndNormalToFaceZone
(
const polyMesh& mesh,
const dictionary& dict
)
:
topoSetSource(mesh),
setName_(dict.lookup("faceSet")),
normal_(dict.lookup("normal"))
{}
Foam::setAndNormalToFaceZone::setAndNormalToFaceZone
(
const polyMesh& mesh,
Istream& is
)
:
topoSetSource(mesh),
setName_(checkIs(is)),
normal_(checkIs(is))
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::setAndNormalToFaceZone::~setAndNormalToFaceZone()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::setAndNormalToFaceZone::applyToSet
(
const topoSetSource::setAction action,
topoSet& set
) const
{
if (!isA<faceZoneSet>(set))
{
WarningIn
(
"setAndNormalToFaceZone::applyToSet"
"("
"const topoSetSource::setAction, "
"topoSet&"
")"
) << "Operation only allowed on a faceZoneSet." << endl;
}
else
{
faceZoneSet& fzSet = refCast<faceZoneSet>(set);
if ((action == topoSetSource::NEW) || (action == topoSetSource::ADD))
{
Info<< " Adding all faces from faceSet " << setName_
<< " ..." << endl;
// Load the sets
faceSet fSet(mesh_, setName_);
// Start off from copy
DynamicList<label> newAddressing(fzSet.addressing());
DynamicList<bool> newFlipMap(fzSet.flipMap());
const faceList& faces = mesh_.faces();
const pointField& points = mesh_.points();
forAllConstIter(faceSet, fSet, iter)
{
label faceI = iter.key();
if (!fzSet.found(faceI))
{
newAddressing.append(faceI);
vector n = faces[faceI].normal(points);
if ((n & normal_) > 0)
{
newFlipMap.append(false);
}
else
{
newFlipMap.append(true);
}
}
}
fzSet.addressing().transfer(newAddressing);
fzSet.flipMap().transfer(newFlipMap);
fzSet.updateSet();
}
else if (action == topoSetSource::DELETE)
{
Info<< " Removing all faces from faceSet " << setName_
<< " ..." << endl;
// Load the set
faceSet loadedSet(mesh_, setName_);
// Start off empty
DynamicList<label> newAddressing(fzSet.addressing().size());
DynamicList<bool> newFlipMap(fzSet.flipMap().size());
forAll(fzSet.addressing(), i)
{
if (!loadedSet.found(fzSet.addressing()[i]))
{
newAddressing.append(fzSet.addressing()[i]);
newFlipMap.append(fzSet.flipMap()[i]);
}
}
fzSet.addressing().transfer(newAddressing);
fzSet.flipMap().transfer(newFlipMap);
fzSet.updateSet();
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,124 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::setAndNormalToFaceZone
Description
A topoSetSource to select faces based on usage in a faceSet, where the
normal vector is used to orient the faces.
SourceFiles
setAndNormalToFaceZone.C
\*---------------------------------------------------------------------------*/
#ifndef setAndNormalToFaceZone_H
#define setAndNormalToFaceZone_H
#include "topoSetSource.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class setAndNormalToFaceZone Declaration
\*---------------------------------------------------------------------------*/
class setAndNormalToFaceZone
:
public topoSetSource
{
// Private data
//- Add usage string
static addToUsageTable usage_;
//- Name of set to use
word setName_;
//- Normal used to orient the faces
vector normal_;
public:
//- Runtime type information
TypeName("setAndNormalToFaceZone");
// Constructors
//- Construct from components
setAndNormalToFaceZone
(
const polyMesh& mesh,
const word& setName,
const vector& normal
);
//- Construct from dictionary
setAndNormalToFaceZone
(
const polyMesh& mesh,
const dictionary& dict
);
//- Construct from Istream
setAndNormalToFaceZone
(
const polyMesh& mesh,
Istream&
);
//- Destructor
virtual ~setAndNormalToFaceZone();
// Member Functions
virtual sourceType setType() const
{
return FACEZONESOURCE;
}
virtual void applyToSet
(
const topoSetSource::setAction action,
topoSet&
) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,8 +49,8 @@ void faceZoneSet::updateSet()
{
labelList order;
sortedOrder(addressing_, order);
inplaceReorder(order, addressing_);
inplaceReorder(order, flipMap_);
addressing_ = UIndirectList<label>(addressing_, order)();
flipMap_ = UIndirectList<bool>(flipMap_, order)();
faceSet::clearStorage();
faceSet::resize(2*addressing_.size());

View File

@ -21,7 +21,6 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::tetOverlapVolume

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -21,7 +21,7 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*----------------------------------------------------------------------------*/
\*---------------------------------------------------------------------------*/
#include "surfaceLocation.H"
#include "triSurface.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -222,7 +222,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation
)
:
perturb_(perturb),
referenceCS_(calcCoordinateSystem(sourcePoints))
referenceCS_(calcCoordinateSystem(sourcePoints)),
nPoints_(sourcePoints.size())
{
calcWeights(sourcePoints, destPoints);
@ -238,7 +239,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation
)
:
perturb_(perturb),
referenceCS_(referenceCS)
referenceCS_(referenceCS),
nPoints_(sourcePoints.size())
{
calcWeights(sourcePoints, destPoints);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -59,6 +59,9 @@ class pointToPointPlanarInterpolation
//- Coordinate system
coordinateSystem referenceCS_;
//- Number of source points (for checking)
label nPoints_;
//- Current interpolation addressing to face centres of underlying
// patch
List<FixedList<label, 3> > nearestVertex_;
@ -114,6 +117,12 @@ public:
return referenceCS_;
}
//- Number of source points
label sourceSize() const
{
return nPoints_;
}
// patch
const List<FixedList<label, 3> >& nearestVertex() const
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,6 +33,17 @@ Foam::tmp<Foam::Field<Type> > Foam::pointToPointPlanarInterpolation::interpolate
const Field<Type>& sourceFld
) const
{
if (nPoints_ != sourceFld.size())
{
FatalErrorIn
(
"pointToPointPlanarInterpolation::interpolate"
"(const Field<Type>&) const"
) << "Number of source points = " << nPoints_
<< " number of values = " << sourceFld.size()
<< exit(FatalError);
}
tmp<Field<Type> > tfld(new Field<Type>(nearestVertex_.size()));
Field<Type>& fld = tfld();