mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Reformat "template <..." to template<"
Add support for constructing VectorSpaces from forms with lower component type, e.g. Vector<scalar> from Vector<label>
This commit is contained in:
@ -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_)
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -234,7 +234,7 @@ inline bool Foam::patchEdgeFaceInfo::updateFace
|
||||
}
|
||||
|
||||
|
||||
template <class TrackingData>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::patchEdgeFaceInfo::equal
|
||||
(
|
||||
const patchEdgeFaceInfo& rhs,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -296,7 +296,7 @@ inline bool Foam::pointEdgePoint::updateEdge
|
||||
}
|
||||
|
||||
|
||||
template <class TrackingData>
|
||||
template<class TrackingData>
|
||||
inline bool Foam::pointEdgePoint::equal
|
||||
(
|
||||
const pointEdgePoint& rhs,
|
||||
|
||||
Reference in New Issue
Block a user