Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
andy
2013-02-21 16:11:47 +00:00
180 changed files with 1358 additions and 1079 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -37,7 +37,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from component // Construct from component
template <class T0> template<class T0>
Gather<T0>::Gather(const T0& localData, const bool redistribute) Gather<T0>::Gather(const T0& localData, const bool redistribute)
: :
List<T0>(0), List<T0>(0),

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,7 +48,7 @@ namespace Foam
Class Gather Declaration Class Gather Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class T0> template<class T0>
class Gather class Gather
: :
public GatherBase, public GatherBase,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,7 +32,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type> template<class Type>
Type GatherBase::flatten(const List<Type> lst) Type GatherBase::flatten(const List<Type> lst)
{ {
label sum = 0; label sum = 0;
@ -60,7 +60,7 @@ Type GatherBase::flatten(const List<Type> lst)
} }
template <class DataType, class IndexType, class AddOp> template<class DataType, class IndexType, class AddOp>
IndexType GatherBase::offset IndexType GatherBase::offset
( (
const List<DataType>& values, const List<DataType>& values,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,12 +53,12 @@ public:
//- Flatten: appends all elements of list into one single list. //- Flatten: appends all elements of list into one single list.
// Used to collapse 'Gathered' data. // Used to collapse 'Gathered' data.
template <class T> template<class T>
static T flatten(const List<T>); static T flatten(const List<T>);
//- Flatten and offset 'Gathered' indices (into value) so they //- Flatten and offset 'Gathered' indices (into value) so they
// remain valid with respect to values (after they have been flattened) // remain valid with respect to values (after they have been flattened)
template <class DataType, class IndexType, class AddOp> template<class DataType, class IndexType, class AddOp>
static IndexType offset static IndexType offset
( (
const List<DataType>& values, const List<DataType>& values,
@ -68,7 +68,7 @@ public:
}; };
template <class T> template<class T>
class AddOp class AddOp
{ {

View File

@ -291,7 +291,7 @@ void separateList
// Synchronise points on both sides of coupled boundaries. // Synchronise points on both sides of coupled boundaries.
template <class CombineOp> template<class CombineOp>
void syncPoints void syncPoints
( (
const polyMesh& mesh, const polyMesh& mesh,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,7 +68,7 @@ void ensightCloudField
ensightCaseFile.setf(ios_base::left); ensightCaseFile.setf(ios_base::left);
ensightCaseFile ensightCaseFile
<< ("c" + fieldObject.name()).c_str() << ("c" + fieldObject.name()).c_str()
<< (' ' + prepend + "***." + cloudName << (' ' + prepend + "****." + cloudName
+ "." + fieldObject.name()).c_str() + "." + fieldObject.name()).c_str()
<< nl; << nl;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -201,7 +201,7 @@ void writePatchField
<< pTraits<Type>::typeName << pTraits<Type>::typeName
<< " per element: 1 " << " per element: 1 "
<< setw(15) << pfName << setw(15) << pfName
<< (' ' + prepend + "***." + pfName).c_str() << (' ' + prepend + "****." + pfName).c_str()
<< nl; << nl;
} }
@ -344,7 +344,7 @@ void ensightField
<< pTraits<Type>::typeName << pTraits<Type>::typeName
<< " per element: 1 " << " per element: 1 "
<< setw(15) << vf.name() << setw(15) << vf.name()
<< (' ' + prepend + "***." + vf.name()).c_str() << (' ' + prepend + "****." + vf.name()).c_str()
<< nl; << nl;
} }
@ -558,7 +558,7 @@ void ensightPointField
<< pTraits<Type>::typeName << pTraits<Type>::typeName
<< " per node: 1 " << " per node: 1 "
<< setw(15) << pf.name() << setw(15) << pf.name()
<< (' ' + prepend + "***." + pf.name()).c_str() << (' ' + prepend + "****." + pf.name()).c_str()
<< nl; << nl;
} }

View File

@ -245,7 +245,7 @@ int main(int argc, char *argv[])
// test pre check variable if there is a moving mesh // test pre check variable if there is a moving mesh
if (meshMoving) if (meshMoving)
{ {
geomFileName = prepend + "***"; geomFileName = prepend + "****";
} }
ensightCaseFile ensightCaseFile
@ -294,7 +294,7 @@ int main(int argc, char *argv[])
<< ( << (
"measured: 1 " "measured: 1 "
+ prepend + prepend
+ "***." + "****."
+ cloudIter.key() + cloudIter.key()
).c_str() ).c_str()
<< nl; << nl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -35,7 +35,7 @@ namespace Foam
word itoa(const label n) word itoa(const label n)
{ {
const label offset = '0'; const label offset = '0';
const label length = 3; const label length = 4;
char val[length + 1]; char val[length + 1];

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -207,7 +207,7 @@ void Foam::ensightLagrangianField
//- write generalized field components //- write generalized field components
template <class Type> template<class Type>
void Foam::ensightVolField void Foam::ensightVolField
( (
const ensightParts& partsList, const ensightParts& partsList,

View File

@ -106,7 +106,7 @@ public:
////IMPLEMENTATION//////////////////////////////////////////////////// ////IMPLEMENTATION////////////////////////////////////////////////////
template < class TPoly , class VertexPropertyMap> template< class TPoly , class VertexPropertyMap>
void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>:: void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>::
push_neighbours_of(Vertex* start, int ith, push_neighbours_of(Vertex* start, int ith,
std::vector< Vertex* >& nextRing, std::vector< Vertex* >& nextRing,
@ -129,7 +129,7 @@ push_neighbours_of(Vertex* start, int ith,
} }
template <class TPoly, class VertexPropertyMap> template<class TPoly, class VertexPropertyMap>
void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>:: void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>::
collect_ith_ring(int ith, std::vector< Vertex* >& currentRing, collect_ith_ring(int ith, std::vector< Vertex* >& currentRing,
std::vector< Vertex* >& nextRing, std::vector< Vertex* >& nextRing,
@ -146,7 +146,7 @@ collect_ith_ring(int ith, std::vector< Vertex* >& currentRing,
} }
template <class TPoly, class VertexPropertyMap> template<class TPoly, class VertexPropertyMap>
void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>:: void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>::
reset_ring_indices(std::vector< Vertex* >& vces, reset_ring_indices(std::vector< Vertex* >& vces,
VertexPropertyMap& vpm) VertexPropertyMap& vpm)
@ -161,7 +161,7 @@ reset_ring_indices(std::vector< Vertex* >& vces,
} }
template <class TPoly, class VertexPropertyMap> template<class TPoly, class VertexPropertyMap>
void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>:: void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>::
collect_i_rings(Vertex* v, collect_i_rings(Vertex* v,
int ring_i, int ring_i,
@ -192,7 +192,7 @@ collect_i_rings(Vertex* v,
} }
template <class TPoly, class VertexPropertyMap> template<class TPoly, class VertexPropertyMap>
void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>:: void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>::
collect_enough_rings(Vertex* v, collect_enough_rings(Vertex* v,
unsigned int min_nb, unsigned int min_nb,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,7 +30,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::scalar Foam::dynamicIndexedOctree<Type>::perturbTol_ = 10*SMALL; Foam::scalar Foam::dynamicIndexedOctree<Type>::perturbTol_ = 10*SMALL;
@ -38,7 +38,7 @@ Foam::scalar Foam::dynamicIndexedOctree<Type>::perturbTol_ = 10*SMALL;
// Does bb intersect a sphere around sample? Or is any corner point of bb // Does bb intersect a sphere around sample? Or is any corner point of bb
// closer than nearestDistSqr to sample. // closer than nearestDistSqr to sample.
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::overlaps bool Foam::dynamicIndexedOctree<Type>::overlaps
( (
const point& p0, const point& p0,
@ -82,7 +82,7 @@ bool Foam::dynamicIndexedOctree<Type>::overlaps
// Does bb intersect a sphere around sample? Or is any corner point of bb // Does bb intersect a sphere around sample? Or is any corner point of bb
// closer than nearestDistSqr to sample. // closer than nearestDistSqr to sample.
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::overlaps bool Foam::dynamicIndexedOctree<Type>::overlaps
( (
const treeBoundBox& parentBb, const treeBoundBox& parentBb,
@ -145,7 +145,7 @@ bool Foam::dynamicIndexedOctree<Type>::overlaps
// //
// Split list of indices into 8 bins // Split list of indices into 8 bins
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::divide void Foam::dynamicIndexedOctree<Type>::divide
( (
const autoPtr<DynamicList<label> >& indices, const autoPtr<DynamicList<label> >& indices,
@ -187,7 +187,7 @@ void Foam::dynamicIndexedOctree<Type>::divide
// Subdivide the (content) node. // Subdivide the (content) node.
template <class Type> template<class Type>
typename Foam::dynamicIndexedOctree<Type>::node typename Foam::dynamicIndexedOctree<Type>::node
Foam::dynamicIndexedOctree<Type>::divide Foam::dynamicIndexedOctree<Type>::divide
( (
@ -280,7 +280,7 @@ Foam::dynamicIndexedOctree<Type>::divide
} }
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::recursiveSubDivision void Foam::dynamicIndexedOctree<Type>::recursiveSubDivision
( (
const treeBoundBox& subBb, const treeBoundBox& subBb,
@ -333,7 +333,7 @@ void Foam::dynamicIndexedOctree<Type>::recursiveSubDivision
// Pre-calculates wherever possible the volume status per node/subnode. // Pre-calculates wherever possible the volume status per node/subnode.
// Recurses to determine status of lowest level boxes. Level above is // Recurses to determine status of lowest level boxes. Level above is
// combination of octants below. // combination of octants below.
template <class Type> template<class Type>
typename Foam::dynamicIndexedOctree<Type>::volumeType typename Foam::dynamicIndexedOctree<Type>::volumeType
Foam::dynamicIndexedOctree<Type>::calcVolumeType Foam::dynamicIndexedOctree<Type>::calcVolumeType
( (
@ -391,7 +391,7 @@ Foam::dynamicIndexedOctree<Type>::calcVolumeType
} }
template <class Type> template<class Type>
typename Foam::dynamicIndexedOctree<Type>::volumeType typename Foam::dynamicIndexedOctree<Type>::volumeType
Foam::dynamicIndexedOctree<Type>::getVolumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
( (
@ -467,7 +467,7 @@ Foam::dynamicIndexedOctree<Type>::getVolumeType
} }
template <class Type> template<class Type>
typename Foam::dynamicIndexedOctree<Type>::volumeType typename Foam::dynamicIndexedOctree<Type>::volumeType
Foam::dynamicIndexedOctree<Type>::getSide Foam::dynamicIndexedOctree<Type>::getSide
( (
@ -492,7 +492,7 @@ Foam::dynamicIndexedOctree<Type>::getSide
// //
// Find nearest point starting from nodeI // Find nearest point starting from nodeI
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::findNearest void Foam::dynamicIndexedOctree<Type>::findNearest
( (
const label nodeI, const label nodeI,
@ -564,7 +564,7 @@ void Foam::dynamicIndexedOctree<Type>::findNearest
// Find nearest point to line. // Find nearest point to line.
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::findNearest void Foam::dynamicIndexedOctree<Type>::findNearest
( (
const label nodeI, const label nodeI,
@ -630,7 +630,7 @@ void Foam::dynamicIndexedOctree<Type>::findNearest
} }
template <class Type> template<class Type>
Foam::treeBoundBox Foam::dynamicIndexedOctree<Type>::subBbox Foam::treeBoundBox Foam::dynamicIndexedOctree<Type>::subBbox
( (
const label parentNodeI, const label parentNodeI,
@ -656,7 +656,7 @@ Foam::treeBoundBox Foam::dynamicIndexedOctree<Type>::subBbox
// Takes a bb and a point on/close to the edge of the bb and pushes the point // Takes a bb and a point on/close to the edge of the bb and pushes the point
// inside by a small fraction. // inside by a small fraction.
template <class Type> template<class Type>
Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
( (
const treeBoundBox& bb, const treeBoundBox& bb,
@ -727,7 +727,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
// Takes a bb and a point on the edge of the bb and pushes the point // Takes a bb and a point on the edge of the bb and pushes the point
// outside by a small fraction. // outside by a small fraction.
template <class Type> template<class Type>
Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
( (
const treeBoundBox& bb, const treeBoundBox& bb,
@ -840,7 +840,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPoint
// Guarantees that if pt is on a face it gets perturbed so it is away // Guarantees that if pt is on a face it gets perturbed so it is away
// from the face edges. // from the face edges.
// If pt is not on a face does nothing. // If pt is not on a face does nothing.
template <class Type> template<class Type>
Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
( (
const treeBoundBox& bb, const treeBoundBox& bb,
@ -1000,7 +1000,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
//// Takes a bb and a point on the outside of the bb. Checks if on multiple //// Takes a bb and a point on the outside of the bb. Checks if on multiple
// faces // faces
//// and if so perturbs point so it is only on one face. //// and if so perturbs point so it is only on one face.
//template <class Type> //template<class Type>
//void Foam::dynamicIndexedOctree<Type>::checkMultipleFaces //void Foam::dynamicIndexedOctree<Type>::checkMultipleFaces
//( //(
// const treeBoundBox& bb, // const treeBoundBox& bb,
@ -1196,7 +1196,7 @@ Foam::point Foam::dynamicIndexedOctree<Type>::pushPointIntoFace
// Get parent node and octant. Return false if top of tree reached. // Get parent node and octant. Return false if top of tree reached.
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::walkToParent bool Foam::dynamicIndexedOctree<Type>::walkToParent
( (
const label nodeI, const label nodeI,
@ -1246,7 +1246,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToParent
// node and octant in this node and walks in the direction given by // node and octant in this node and walks in the direction given by
// the facePointBits (combination of treeBoundBox::LEFTBIT, TOPBIT etc.) // the facePointBits (combination of treeBoundBox::LEFTBIT, TOPBIT etc.)
// Returns false if edge of tree hit. // Returns false if edge of tree hit.
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
( (
const point& facePoint, const point& facePoint,
@ -1484,7 +1484,7 @@ bool Foam::dynamicIndexedOctree<Type>::walkToNeighbour
} }
template <class Type> template<class Type>
Foam::word Foam::dynamicIndexedOctree<Type>::faceString Foam::word Foam::dynamicIndexedOctree<Type>::faceString
( (
const direction faceID const direction faceID
@ -1536,7 +1536,7 @@ Foam::word Foam::dynamicIndexedOctree<Type>::faceString
// Else return a miss and the bounding box face hit: // Else return a miss and the bounding box face hit:
// hitInfo.point = coordinate of intersection of ray with bounding box // hitInfo.point = coordinate of intersection of ray with bounding box
// hitBits = posbits of point on bounding box // hitBits = posbits of point on bounding box
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::traverseNode void Foam::dynamicIndexedOctree<Type>::traverseNode
( (
const bool findAny, const bool findAny,
@ -1699,7 +1699,7 @@ void Foam::dynamicIndexedOctree<Type>::traverseNode
// Find first intersection // Find first intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
( (
const bool findAny, const bool findAny,
@ -1887,7 +1887,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
// Find first intersection // Find first intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
( (
const bool findAny, const bool findAny,
@ -1958,7 +1958,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
} }
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::findBox void Foam::dynamicIndexedOctree<Type>::findBox
( (
const label nodeI, const label nodeI,
@ -2005,7 +2005,7 @@ void Foam::dynamicIndexedOctree<Type>::findBox
} }
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::findSphere void Foam::dynamicIndexedOctree<Type>::findSphere
( (
const label nodeI, const label nodeI,
@ -2053,8 +2053,8 @@ void Foam::dynamicIndexedOctree<Type>::findSphere
} }
template <class Type> template<class Type>
template <class CompareOp> template<class CompareOp>
void Foam::dynamicIndexedOctree<Type>::findNear void Foam::dynamicIndexedOctree<Type>::findNear
( (
const scalar nearDist, const scalar nearDist,
@ -2228,7 +2228,7 @@ void Foam::dynamicIndexedOctree<Type>::findNear
// Number of elements in node. // Number of elements in node.
template <class Type> template<class Type>
Foam::label Foam::dynamicIndexedOctree<Type>::countElements Foam::label Foam::dynamicIndexedOctree<Type>::countElements
( (
const labelBits index const labelBits index
@ -2261,7 +2261,7 @@ Foam::label Foam::dynamicIndexedOctree<Type>::countElements
} }
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::writeOBJ void Foam::dynamicIndexedOctree<Type>::writeOBJ
( (
const label nodeI, const label nodeI,
@ -2310,7 +2310,7 @@ void Foam::dynamicIndexedOctree<Type>::writeOBJ
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::dynamicIndexedOctree<Type>::dynamicIndexedOctree Foam::dynamicIndexedOctree<Type>::dynamicIndexedOctree
( (
const Type& shapes, const Type& shapes,
@ -2347,14 +2347,14 @@ Foam::dynamicIndexedOctree<Type>::dynamicIndexedOctree
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::scalar& Foam::dynamicIndexedOctree<Type>::perturbTol() Foam::scalar& Foam::dynamicIndexedOctree<Type>::perturbTol()
{ {
return perturbTol_; return perturbTol_;
} }
template <class Type> template<class Type>
Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
( (
const point& sample, const point& sample,
@ -2382,7 +2382,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
} }
template <class Type> template<class Type>
Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
( (
const linePointRef& ln, const linePointRef& ln,
@ -2416,7 +2416,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findNearest
// Find nearest intersection // Find nearest intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
( (
const point& start, const point& start,
@ -2428,7 +2428,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLine
// Find nearest intersection // Find nearest intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLineAny Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLineAny
( (
const point& start, const point& start,
@ -2439,7 +2439,7 @@ Foam::pointIndexHit Foam::dynamicIndexedOctree<Type>::findLineAny
} }
template <class Type> template<class Type>
Foam::labelList Foam::dynamicIndexedOctree<Type>::findBox Foam::labelList Foam::dynamicIndexedOctree<Type>::findBox
( (
const treeBoundBox& searchBox const treeBoundBox& searchBox
@ -2457,7 +2457,7 @@ Foam::labelList Foam::dynamicIndexedOctree<Type>::findBox
} }
template <class Type> template<class Type>
Foam::labelList Foam::dynamicIndexedOctree<Type>::findSphere Foam::labelList Foam::dynamicIndexedOctree<Type>::findSphere
( (
const point& centre, const point& centre,
@ -2477,7 +2477,7 @@ Foam::labelList Foam::dynamicIndexedOctree<Type>::findSphere
// Find node (as parent+octant) containing point // Find node (as parent+octant) containing point
template <class Type> template<class Type>
Foam::labelBits Foam::dynamicIndexedOctree<Type>::findNode Foam::labelBits Foam::dynamicIndexedOctree<Type>::findNode
( (
const label nodeI, const label nodeI,
@ -2524,7 +2524,7 @@ Foam::labelBits Foam::dynamicIndexedOctree<Type>::findNode
} }
template <class Type> template<class Type>
Foam::label Foam::dynamicIndexedOctree<Type>::findInside Foam::label Foam::dynamicIndexedOctree<Type>::findInside
( (
const point& sample const point& sample
@ -2556,7 +2556,7 @@ Foam::label Foam::dynamicIndexedOctree<Type>::findInside
} }
template <class Type> template<class Type>
const Foam::labelList& Foam::dynamicIndexedOctree<Type>::findIndices const Foam::labelList& Foam::dynamicIndexedOctree<Type>::findIndices
( (
const point& sample const point& sample
@ -2581,7 +2581,7 @@ const Foam::labelList& Foam::dynamicIndexedOctree<Type>::findIndices
// Determine type (inside/outside/mixed) per node. // Determine type (inside/outside/mixed) per node.
template <class Type> template<class Type>
typename Foam::dynamicIndexedOctree<Type>::volumeType typename Foam::dynamicIndexedOctree<Type>::volumeType
Foam::dynamicIndexedOctree<Type>::getVolumeType Foam::dynamicIndexedOctree<Type>::getVolumeType
( (
@ -2651,8 +2651,8 @@ Foam::dynamicIndexedOctree<Type>::getVolumeType
} }
template <class Type> template<class Type>
template <class CompareOp> template<class CompareOp>
void Foam::dynamicIndexedOctree<Type>::findNear void Foam::dynamicIndexedOctree<Type>::findNear
( (
const scalar nearDist, const scalar nearDist,
@ -2675,7 +2675,7 @@ void Foam::dynamicIndexedOctree<Type>::findNear
} }
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::insert(label startIndex, label endIndex) bool Foam::dynamicIndexedOctree<Type>::insert(label startIndex, label endIndex)
{ {
if (startIndex == endIndex) if (startIndex == endIndex)
@ -2721,7 +2721,7 @@ bool Foam::dynamicIndexedOctree<Type>::insert(label startIndex, label endIndex)
} }
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::insertIndex bool Foam::dynamicIndexedOctree<Type>::insertIndex
( (
const label nodIndex, const label nodIndex,
@ -2798,7 +2798,7 @@ bool Foam::dynamicIndexedOctree<Type>::insertIndex
} }
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::remove(const label index) bool Foam::dynamicIndexedOctree<Type>::remove(const label index)
{ {
if (nodes_.empty()) if (nodes_.empty())
@ -2812,7 +2812,7 @@ bool Foam::dynamicIndexedOctree<Type>::remove(const label index)
} }
template <class Type> template<class Type>
Foam::label Foam::dynamicIndexedOctree<Type>::removeIndex Foam::label Foam::dynamicIndexedOctree<Type>::removeIndex
( (
const label nodIndex, const label nodIndex,
@ -2896,7 +2896,7 @@ Foam::label Foam::dynamicIndexedOctree<Type>::removeIndex
// Print contents of nodeI // Print contents of nodeI
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::print void Foam::dynamicIndexedOctree<Type>::print
( (
prefixOSstream& os, prefixOSstream& os,
@ -2969,7 +2969,7 @@ void Foam::dynamicIndexedOctree<Type>::print
} }
template <class Type> template<class Type>
void Foam::dynamicIndexedOctree<Type>::writeTreeInfo() const void Foam::dynamicIndexedOctree<Type>::writeTreeInfo() const
{ {
label nEntries = 0; label nEntries = 0;
@ -2996,7 +2996,7 @@ void Foam::dynamicIndexedOctree<Type>::writeTreeInfo() const
// Print contents of nodeI // Print contents of nodeI
template <class Type> template<class Type>
bool Foam::dynamicIndexedOctree<Type>::write(Ostream& os) const bool Foam::dynamicIndexedOctree<Type>::write(Ostream& os) const
{ {
os << *this; os << *this;
@ -3005,7 +3005,7 @@ bool Foam::dynamicIndexedOctree<Type>::write(Ostream& os) const
} }
template <class Type> template<class Type>
Foam::Ostream& Foam::Ostream&
Foam::operator<<(Ostream& os, const dynamicIndexedOctree<Type>& t) Foam::operator<<(Ostream& os, const dynamicIndexedOctree<Type>& t)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,7 +74,7 @@ TemplateName(dynamicIndexedOctree);
Class dynamicIndexedOctree Declaration Class dynamicIndexedOctree Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Type> template<class Type>
class dynamicIndexedOctree class dynamicIndexedOctree
: :
public dynamicIndexedOctreeName public dynamicIndexedOctreeName
@ -372,7 +372,7 @@ private:
) const; ) const;
template <class CompareOp> template<class CompareOp>
static void findNear static void findNear
( (
const scalar nearDist, const scalar nearDist,
@ -632,7 +632,7 @@ public:
//- Find near pairs and apply CompareOp to them. //- Find near pairs and apply CompareOp to them.
// tree2 can be *this or different tree. // tree2 can be *this or different tree.
template <class CompareOp> template<class CompareOp>
void findNear void findNear
( (
const scalar nearDist, const scalar nearDist,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,7 +30,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::scalar Foam::indexedOctree<Type>::perturbTol_ = 10*SMALL; Foam::scalar Foam::indexedOctree<Type>::perturbTol_ = 10*SMALL;
@ -38,7 +38,7 @@ Foam::scalar Foam::indexedOctree<Type>::perturbTol_ = 10*SMALL;
// Does bb intersect a sphere around sample? Or is any corner point of bb // Does bb intersect a sphere around sample? Or is any corner point of bb
// closer than nearestDistSqr to sample. // closer than nearestDistSqr to sample.
template <class Type> template<class Type>
bool Foam::indexedOctree<Type>::overlaps bool Foam::indexedOctree<Type>::overlaps
( (
const point& p0, const point& p0,
@ -55,7 +55,7 @@ bool Foam::indexedOctree<Type>::overlaps
// Does bb intersect a sphere around sample? Or is any corner point of bb // Does bb intersect a sphere around sample? Or is any corner point of bb
// closer than nearestDistSqr to sample. // closer than nearestDistSqr to sample.
template <class Type> template<class Type>
bool Foam::indexedOctree<Type>::overlaps bool Foam::indexedOctree<Type>::overlaps
( (
const treeBoundBox& parentBb, const treeBoundBox& parentBb,
@ -118,7 +118,7 @@ bool Foam::indexedOctree<Type>::overlaps
// //
// Split list of indices into 8 bins // Split list of indices into 8 bins
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::divide void Foam::indexedOctree<Type>::divide
( (
const labelList& indices, const labelList& indices,
@ -161,7 +161,7 @@ void Foam::indexedOctree<Type>::divide
// Subdivide the (content) node. // Subdivide the (content) node.
template <class Type> template<class Type>
typename Foam::indexedOctree<Type>::node typename Foam::indexedOctree<Type>::node
Foam::indexedOctree<Type>::divide Foam::indexedOctree<Type>::divide
( (
@ -231,7 +231,7 @@ Foam::indexedOctree<Type>::divide
// Split any contents node with more than minSize elements. // Split any contents node with more than minSize elements.
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::splitNodes void Foam::indexedOctree<Type>::splitNodes
( (
const label minSize, const label minSize,
@ -285,7 +285,7 @@ void Foam::indexedOctree<Type>::splitNodes
// Reorder contents to be in same order as nodes. Returns number of nodes on // Reorder contents to be in same order as nodes. Returns number of nodes on
// the compactLevel. // the compactLevel.
template <class Type> template<class Type>
Foam::label Foam::indexedOctree<Type>::compactContents Foam::label Foam::indexedOctree<Type>::compactContents
( (
DynamicList<node>& nodes, DynamicList<node>& nodes,
@ -355,7 +355,7 @@ Foam::label Foam::indexedOctree<Type>::compactContents
// Pre-calculates wherever possible the volume status per node/subnode. // Pre-calculates wherever possible the volume status per node/subnode.
// Recurses to determine status of lowest level boxes. Level above is // Recurses to determine status of lowest level boxes. Level above is
// combination of octants below. // combination of octants below.
template <class Type> template<class Type>
typename Foam::indexedOctree<Type>::volumeType typename Foam::indexedOctree<Type>::volumeType
Foam::indexedOctree<Type>::calcVolumeType Foam::indexedOctree<Type>::calcVolumeType
( (
@ -413,7 +413,7 @@ Foam::indexedOctree<Type>::calcVolumeType
} }
template <class Type> template<class Type>
typename Foam::indexedOctree<Type>::volumeType typename Foam::indexedOctree<Type>::volumeType
Foam::indexedOctree<Type>::getVolumeType Foam::indexedOctree<Type>::getVolumeType
( (
@ -489,7 +489,7 @@ Foam::indexedOctree<Type>::getVolumeType
} }
template <class Type> template<class Type>
typename Foam::indexedOctree<Type>::volumeType typename Foam::indexedOctree<Type>::volumeType
Foam::indexedOctree<Type>::getSide Foam::indexedOctree<Type>::getSide
( (
@ -514,7 +514,7 @@ Foam::indexedOctree<Type>::getSide
// //
//template <class Type> //template<class Type>
//bool Foam::indexedOctree<Type>::findAnyOverlap //bool Foam::indexedOctree<Type>::findAnyOverlap
//( //(
// const label nodeI, // const label nodeI,
@ -575,7 +575,7 @@ Foam::indexedOctree<Type>::getSide
// Find nearest point starting from nodeI // Find nearest point starting from nodeI
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::findNearest void Foam::indexedOctree<Type>::findNearest
( (
const label nodeI, const label nodeI,
@ -647,7 +647,7 @@ void Foam::indexedOctree<Type>::findNearest
// Find nearest point to line. // Find nearest point to line.
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::findNearest void Foam::indexedOctree<Type>::findNearest
( (
const label nodeI, const label nodeI,
@ -713,7 +713,7 @@ void Foam::indexedOctree<Type>::findNearest
} }
template <class Type> template<class Type>
Foam::treeBoundBox Foam::indexedOctree<Type>::subBbox Foam::treeBoundBox Foam::indexedOctree<Type>::subBbox
( (
const label parentNodeI, const label parentNodeI,
@ -739,7 +739,7 @@ Foam::treeBoundBox Foam::indexedOctree<Type>::subBbox
// Takes a bb and a point on/close to the edge of the bb and pushes the point // Takes a bb and a point on/close to the edge of the bb and pushes the point
// inside by a small fraction. // inside by a small fraction.
template <class Type> template<class Type>
Foam::point Foam::indexedOctree<Type>::pushPoint Foam::point Foam::indexedOctree<Type>::pushPoint
( (
const treeBoundBox& bb, const treeBoundBox& bb,
@ -810,7 +810,7 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
// Takes a bb and a point on the edge of the bb and pushes the point // Takes a bb and a point on the edge of the bb and pushes the point
// outside by a small fraction. // outside by a small fraction.
template <class Type> template<class Type>
Foam::point Foam::indexedOctree<Type>::pushPoint Foam::point Foam::indexedOctree<Type>::pushPoint
( (
const treeBoundBox& bb, const treeBoundBox& bb,
@ -923,7 +923,7 @@ Foam::point Foam::indexedOctree<Type>::pushPoint
// Guarantees that if pt is on a face it gets perturbed so it is away // Guarantees that if pt is on a face it gets perturbed so it is away
// from the face edges. // from the face edges.
// If pt is not on a face does nothing. // If pt is not on a face does nothing.
template <class Type> template<class Type>
Foam::point Foam::indexedOctree<Type>::pushPointIntoFace Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
( (
const treeBoundBox& bb, const treeBoundBox& bb,
@ -1083,7 +1083,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
//// Takes a bb and a point on the outside of the bb. Checks if on multiple //// Takes a bb and a point on the outside of the bb. Checks if on multiple
// faces // faces
//// and if so perturbs point so it is only on one face. //// and if so perturbs point so it is only on one face.
//template <class Type> //template<class Type>
//void Foam::indexedOctree<Type>::checkMultipleFaces //void Foam::indexedOctree<Type>::checkMultipleFaces
//( //(
// const treeBoundBox& bb, // const treeBoundBox& bb,
@ -1279,7 +1279,7 @@ Foam::point Foam::indexedOctree<Type>::pushPointIntoFace
// Get parent node and octant. Return false if top of tree reached. // Get parent node and octant. Return false if top of tree reached.
template <class Type> template<class Type>
bool Foam::indexedOctree<Type>::walkToParent bool Foam::indexedOctree<Type>::walkToParent
( (
const label nodeI, const label nodeI,
@ -1329,7 +1329,7 @@ bool Foam::indexedOctree<Type>::walkToParent
// node and octant in this node and walks in the direction given by // node and octant in this node and walks in the direction given by
// the facePointBits (combination of treeBoundBox::LEFTBIT, TOPBIT etc.) // the facePointBits (combination of treeBoundBox::LEFTBIT, TOPBIT etc.)
// Returns false if edge of tree hit. // Returns false if edge of tree hit.
template <class Type> template<class Type>
bool Foam::indexedOctree<Type>::walkToNeighbour bool Foam::indexedOctree<Type>::walkToNeighbour
( (
const point& facePoint, const point& facePoint,
@ -1567,7 +1567,7 @@ bool Foam::indexedOctree<Type>::walkToNeighbour
} }
template <class Type> template<class Type>
Foam::word Foam::indexedOctree<Type>::faceString Foam::word Foam::indexedOctree<Type>::faceString
( (
const direction faceID const direction faceID
@ -1619,7 +1619,7 @@ Foam::word Foam::indexedOctree<Type>::faceString
// Else return a miss and the bounding box face hit: // Else return a miss and the bounding box face hit:
// hitInfo.point = coordinate of intersection of ray with bounding box // hitInfo.point = coordinate of intersection of ray with bounding box
// hitBits = posbits of point on bounding box // hitBits = posbits of point on bounding box
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::traverseNode void Foam::indexedOctree<Type>::traverseNode
( (
const bool findAny, const bool findAny,
@ -1781,7 +1781,7 @@ void Foam::indexedOctree<Type>::traverseNode
// Find first intersection // Find first intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::indexedOctree<Type>::findLine Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
( (
const bool findAny, const bool findAny,
@ -1973,7 +1973,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
} }
//template <class Type> //template<class Type>
//bool Foam::indexedOctree<Type>::isLineInsideOrOutside //bool Foam::indexedOctree<Type>::isLineInsideOrOutside
//( //(
// const label nodeI, // const label nodeI,
@ -2006,7 +2006,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
// Find first intersection // Find first intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::indexedOctree<Type>::findLine Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
( (
const bool findAny, const bool findAny,
@ -2077,7 +2077,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
} }
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::findBox void Foam::indexedOctree<Type>::findBox
( (
const label nodeI, const label nodeI,
@ -2124,7 +2124,7 @@ void Foam::indexedOctree<Type>::findBox
} }
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::findSphere void Foam::indexedOctree<Type>::findSphere
( (
const label nodeI, const label nodeI,
@ -2172,8 +2172,8 @@ void Foam::indexedOctree<Type>::findSphere
} }
template <class Type> template<class Type>
template <class CompareOp> template<class CompareOp>
void Foam::indexedOctree<Type>::findNear void Foam::indexedOctree<Type>::findNear
( (
const scalar nearDist, const scalar nearDist,
@ -2347,7 +2347,7 @@ void Foam::indexedOctree<Type>::findNear
// Number of elements in node. // Number of elements in node.
template <class Type> template<class Type>
Foam::label Foam::indexedOctree<Type>::countElements Foam::label Foam::indexedOctree<Type>::countElements
( (
const labelBits index const labelBits index
@ -2380,7 +2380,7 @@ Foam::label Foam::indexedOctree<Type>::countElements
} }
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::writeOBJ void Foam::indexedOctree<Type>::writeOBJ
( (
const label nodeI, const label nodeI,
@ -2429,7 +2429,7 @@ void Foam::indexedOctree<Type>::writeOBJ
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::indexedOctree<Type>::indexedOctree(const Type& shapes) Foam::indexedOctree<Type>::indexedOctree(const Type& shapes)
: :
shapes_(shapes), shapes_(shapes),
@ -2439,7 +2439,7 @@ Foam::indexedOctree<Type>::indexedOctree(const Type& shapes)
{} {}
template <class Type> template<class Type>
Foam::indexedOctree<Type>::indexedOctree Foam::indexedOctree<Type>::indexedOctree
( (
const Type& shapes, const Type& shapes,
@ -2454,7 +2454,7 @@ Foam::indexedOctree<Type>::indexedOctree
{} {}
template <class Type> template<class Type>
Foam::indexedOctree<Type>::indexedOctree Foam::indexedOctree<Type>::indexedOctree
( (
const Type& shapes, const Type& shapes,
@ -2606,7 +2606,7 @@ Foam::indexedOctree<Type>::indexedOctree
} }
template <class Type> template<class Type>
Foam::indexedOctree<Type>::indexedOctree Foam::indexedOctree<Type>::indexedOctree
( (
const Type& shapes, const Type& shapes,
@ -2622,14 +2622,14 @@ Foam::indexedOctree<Type>::indexedOctree
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::scalar& Foam::indexedOctree<Type>::perturbTol() Foam::scalar& Foam::indexedOctree<Type>::perturbTol()
{ {
return perturbTol_; return perturbTol_;
} }
//template <class Type> //template<class Type>
//bool Foam::indexedOctree<Type>::findAnyOverlap //bool Foam::indexedOctree<Type>::findAnyOverlap
//( //(
// const point& sample, // const point& sample,
@ -2650,7 +2650,7 @@ Foam::scalar& Foam::indexedOctree<Type>::perturbTol()
//} //}
template <class Type> template<class Type>
Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
( (
const point& sample, const point& sample,
@ -2678,7 +2678,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
} }
template <class Type> template<class Type>
Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
( (
const linePointRef& ln, const linePointRef& ln,
@ -2708,7 +2708,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findNearest
// Find nearest intersection // Find nearest intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::indexedOctree<Type>::findLine Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
( (
const point& start, const point& start,
@ -2720,7 +2720,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLine
// Find nearest intersection // Find nearest intersection
template <class Type> template<class Type>
Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny
( (
const point& start, const point& start,
@ -2731,7 +2731,7 @@ Foam::pointIndexHit Foam::indexedOctree<Type>::findLineAny
} }
template <class Type> template<class Type>
Foam::labelList Foam::indexedOctree<Type>::findBox Foam::labelList Foam::indexedOctree<Type>::findBox
( (
const treeBoundBox& searchBox const treeBoundBox& searchBox
@ -2749,7 +2749,7 @@ Foam::labelList Foam::indexedOctree<Type>::findBox
} }
template <class Type> template<class Type>
Foam::labelList Foam::indexedOctree<Type>::findSphere Foam::labelList Foam::indexedOctree<Type>::findSphere
( (
const point& centre, const point& centre,
@ -2769,7 +2769,7 @@ Foam::labelList Foam::indexedOctree<Type>::findSphere
// Find node (as parent+octant) containing point // Find node (as parent+octant) containing point
template <class Type> template<class Type>
Foam::labelBits Foam::indexedOctree<Type>::findNode Foam::labelBits Foam::indexedOctree<Type>::findNode
( (
const label nodeI, const label nodeI,
@ -2816,7 +2816,7 @@ Foam::labelBits Foam::indexedOctree<Type>::findNode
} }
template <class Type> template<class Type>
Foam::label Foam::indexedOctree<Type>::findInside(const point& sample) const Foam::label Foam::indexedOctree<Type>::findInside(const point& sample) const
{ {
labelBits index = findNode(0, sample); labelBits index = findNode(0, sample);
@ -2845,7 +2845,7 @@ Foam::label Foam::indexedOctree<Type>::findInside(const point& sample) const
} }
template <class Type> template<class Type>
const Foam::labelList& Foam::indexedOctree<Type>::findIndices const Foam::labelList& Foam::indexedOctree<Type>::findIndices
( (
const point& sample const point& sample
@ -2870,7 +2870,7 @@ const Foam::labelList& Foam::indexedOctree<Type>::findIndices
// Determine type (inside/outside/mixed) per node. // Determine type (inside/outside/mixed) per node.
template <class Type> template<class Type>
typename Foam::indexedOctree<Type>::volumeType typename Foam::indexedOctree<Type>::volumeType
Foam::indexedOctree<Type>::getVolumeType Foam::indexedOctree<Type>::getVolumeType
( (
@ -2940,8 +2940,8 @@ Foam::indexedOctree<Type>::getVolumeType
} }
template <class Type> template<class Type>
template <class CompareOp> template<class CompareOp>
void Foam::indexedOctree<Type>::findNear void Foam::indexedOctree<Type>::findNear
( (
const scalar nearDist, const scalar nearDist,
@ -2965,7 +2965,7 @@ void Foam::indexedOctree<Type>::findNear
// Print contents of nodeI // Print contents of nodeI
template <class Type> template<class Type>
void Foam::indexedOctree<Type>::print void Foam::indexedOctree<Type>::print
( (
prefixOSstream& os, prefixOSstream& os,
@ -3039,7 +3039,7 @@ void Foam::indexedOctree<Type>::print
// Print contents of nodeI // Print contents of nodeI
template <class Type> template<class Type>
bool Foam::indexedOctree<Type>::write(Ostream& os) const bool Foam::indexedOctree<Type>::write(Ostream& os) const
{ {
os << *this; os << *this;
@ -3048,7 +3048,7 @@ bool Foam::indexedOctree<Type>::write(Ostream& os) const
} }
template <class Type> template<class Type>
Foam::Ostream& Foam::operator<<(Ostream& os, const indexedOctree<Type>& t) Foam::Ostream& Foam::operator<<(Ostream& os, const indexedOctree<Type>& t)
{ {
return return

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,7 @@ TemplateName(indexedOctree);
Class indexedOctree Declaration Class indexedOctree Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Type> template<class Type>
class indexedOctree class indexedOctree
: :
public indexedOctreeName public indexedOctreeName
@ -354,7 +354,7 @@ private:
) const; ) const;
template <class CompareOp> template<class CompareOp>
static void findNear static void findNear
( (
const scalar nearDist, const scalar nearDist,
@ -640,7 +640,7 @@ public:
//- Find near pairs and apply CompareOp to them. //- Find near pairs and apply CompareOp to them.
// tree2 can be *this or different tree. // tree2 can be *this or different tree.
template <class CompareOp> template<class CompareOp>
void findNear void findNear
( (
const scalar nearDist, const scalar nearDist,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -583,7 +583,7 @@ void Foam::Distribution<Type>::operator=
// * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::Istream& Foam::operator>> Foam::Istream& Foam::operator>>
( (
Istream& is, Istream& is,
@ -621,7 +621,7 @@ Foam::Ostream& Foam::operator<<
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::Distribution<Type> Foam::operator+ Foam::Distribution<Type> Foam::operator+
( (
const Distribution<Type>& d1, const Distribution<Type>& d1,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,7 +30,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class AccessType, class T, class AccessOp> template<class AccessType, class T, class AccessOp>
AccessType ListListOps::combine(const List<T>& lst, AccessOp aop) AccessType ListListOps::combine(const List<T>& lst, AccessOp aop)
{ {
label sum = 0; label sum = 0;
@ -57,7 +57,7 @@ AccessType ListListOps::combine(const List<T>& lst, AccessOp aop)
} }
template <class T, class AccessOp> template<class T, class AccessOp>
labelList ListListOps::subSizes(const List<T>& lst, AccessOp aop) labelList ListListOps::subSizes(const List<T>& lst, AccessOp aop)
{ {
labelList sizes(lst.size()); labelList sizes(lst.size());
@ -70,7 +70,7 @@ labelList ListListOps::subSizes(const List<T>& lst, AccessOp aop)
} }
template <class AccessType, class T, class AccessOp, class OffsetOp> template<class AccessType, class T, class AccessOp, class OffsetOp>
AccessType ListListOps::combineOffset AccessType ListListOps::combineOffset
( (
const List<T>& lst, const List<T>& lst,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -94,7 +94,7 @@ namespace Foam
{ {
// Dummy access operator for ListListOps::combine() // Dummy access operator for ListListOps::combine()
template <class T> template<class T>
class accessOp class accessOp
{ {
public: public:
@ -107,7 +107,7 @@ public:
// Offset operator for ListListOps::combineOffset() // Offset operator for ListListOps::combineOffset()
template <class T> template<class T>
class offsetOp class offsetOp
{ {
public: public:
@ -126,15 +126,15 @@ namespace ListListOps
{ {
//- Combines sublists into one big list //- Combines sublists into one big list
template <class AccessType, class T, class AccessOp> template<class AccessType, class T, class AccessOp>
AccessType combine(const List<T>&, AccessOp aop = accessOp<T>()); AccessType combine(const List<T>&, AccessOp aop = accessOp<T>());
//- Gets sizes of sublists //- Gets sizes of sublists
template <class T, class AccessOp> template<class T, class AccessOp>
labelList subSizes(const List<T>&, AccessOp aop = accessOp<T>()); labelList subSizes(const List<T>&, AccessOp aop = accessOp<T>());
//- Like combine but also offsets sublists based on passed sizes //- Like combine but also offsets sublists based on passed sizes
template <class AccessType, class T, class AccessOp, class OffsetOp> template<class AccessType, class T, class AccessOp, class OffsetOp>
AccessType combineOffset AccessType combineOffset
( (
const List<T>&, const List<T>&,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -255,23 +255,23 @@ public:
//- Reverse a list. First element becomes last element etc. //- Reverse a list. First element becomes last element etc.
template <class ListType> template<class ListType>
ListType reverseList(const ListType& list); ListType reverseList(const ListType& list);
//- Inplace reversal of a list using Swap. //- Inplace reversal of a list using Swap.
template <class ListType> template<class ListType>
void inplaceReverseList(ListType& list); void inplaceReverseList(ListType& list);
//- Rotate a list by n places. If n is positive rotate clockwise/right/down. //- Rotate a list by n places. If n is positive rotate clockwise/right/down.
// If n is negative rotate anti-clockwise/left/up. // If n is negative rotate anti-clockwise/left/up.
template <class ListType> template<class ListType>
ListType rotateList(const ListType& list, const label n); ListType rotateList(const ListType& list, const label n);
//- Inplace reversal of a list using the Reversal Block Swapping algorithm. //- Inplace reversal of a list using the Reversal Block Swapping algorithm.
template <template <typename> class ListType, class DataType> template<template<typename> class ListType, class DataType>
void inplaceRotateList(ListType<DataType>& list, label n); void inplaceRotateList(ListType<DataType>& list, label n);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -706,7 +706,7 @@ void Foam::ListAppendEqOp<T>::operator()(List<T>& x, const List<T>& y) const
} }
template <class ListType> template<class ListType>
ListType Foam::reverseList(const ListType& list) ListType Foam::reverseList(const ListType& list)
{ {
const label listSize = list.size(); const label listSize = list.size();
@ -723,7 +723,7 @@ ListType Foam::reverseList(const ListType& list)
} }
template <class ListType> template<class ListType>
void Foam::inplaceReverseList(ListType& list) void Foam::inplaceReverseList(ListType& list)
{ {
const label listSize = list.size(); const label listSize = list.size();
@ -740,7 +740,7 @@ void Foam::inplaceReverseList(ListType& list)
} }
template <class ListType> template<class ListType>
ListType Foam::rotateList(const ListType& list, const label n) ListType Foam::rotateList(const ListType& list, const label n)
{ {
const label listSize = list.size(); const label listSize = list.size();
@ -763,7 +763,7 @@ ListType Foam::rotateList(const ListType& list, const label n)
} }
template <template <typename> class ListType, class DataType> template<template<typename> class ListType, class DataType>
void Foam::inplaceRotateList(ListType<DataType>& list, label n) void Foam::inplaceRotateList(ListType<DataType>& list, label n)
{ {
const label listSize = list.size(); const label listSize = list.size();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,7 +31,7 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
template <class Type> template<class Type>
void Foam::ParSortableList<Type>::write void Foam::ParSortableList<Type>::write
( (
const List<Type>& elems, const List<Type>& elems,
@ -49,7 +49,7 @@ void Foam::ParSortableList<Type>::write
// Copy src, starting at destI into dest. // Copy src, starting at destI into dest.
template <class Type> template<class Type>
void Foam::ParSortableList<Type>::copyInto void Foam::ParSortableList<Type>::copyInto
( (
const List<Type>& values, const List<Type>& values,
@ -72,7 +72,7 @@ void Foam::ParSortableList<Type>::copyInto
} }
template <class Type> template<class Type>
void Foam::ParSortableList<Type>::getPivots void Foam::ParSortableList<Type>::getPivots
( (
const List<Type>& elems, const List<Type>& elems,
@ -92,7 +92,7 @@ void Foam::ParSortableList<Type>::getPivots
} }
template <class Type> template<class Type>
void Foam::ParSortableList<Type>::checkAndSend void Foam::ParSortableList<Type>::checkAndSend
( (
List<Type>& values, List<Type>& values,
@ -123,7 +123,7 @@ void Foam::ParSortableList<Type>::checkAndSend
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from List, sorting the elements // Construct from List, sorting the elements
template <class Type> template<class Type>
Foam::ParSortableList<Type>::ParSortableList(const UList<Type>& values) Foam::ParSortableList<Type>::ParSortableList(const UList<Type>& values)
: :
List<Type>(values), List<Type>(values),
@ -135,7 +135,7 @@ Foam::ParSortableList<Type>::ParSortableList(const UList<Type>& values)
// Construct given size. Sort later on. // Construct given size. Sort later on.
template <class Type> template<class Type>
Foam::ParSortableList<Type>::ParSortableList(const label size) Foam::ParSortableList<Type>::ParSortableList(const label size)
: :
List<Type>(size), List<Type>(size),
@ -147,7 +147,7 @@ Foam::ParSortableList<Type>::ParSortableList(const label size)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// Sort // Sort
template <class Type> template<class Type>
void Foam::ParSortableList<Type>::sort() void Foam::ParSortableList<Type>::sort()
{ {
// //

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -92,7 +92,7 @@ public:
//- Gather data. Apply bop to combine Value //- Gather data. Apply bop to combine Value
// from different processors // from different processors
template <class T, class BinaryOp> template<class T, class BinaryOp>
static void gather static void gather
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -102,7 +102,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T, class BinaryOp> template<class T, class BinaryOp>
static void gather static void gather
( (
T& Value, T& Value,
@ -111,7 +111,7 @@ public:
); );
//- Scatter data. Distribute without modification. Reverse of gather //- Scatter data. Distribute without modification. Reverse of gather
template <class T> template<class T>
static void scatter static void scatter
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -120,14 +120,14 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T> template<class T>
static void scatter(T& Value, const int tag = Pstream::msgType()); static void scatter(T& Value, const int tag = Pstream::msgType());
// Combine variants. Inplace combine values from processors. // Combine variants. Inplace combine values from processors.
// (Uses construct from Istream instead of <<) // (Uses construct from Istream instead of <<)
template <class T, class CombineOp> template<class T, class CombineOp>
static void combineGather static void combineGather
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -137,7 +137,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T, class CombineOp> template<class T, class CombineOp>
static void combineGather static void combineGather
( (
T& Value, T& Value,
@ -146,7 +146,7 @@ public:
); );
//- Scatter data. Reverse of combineGather //- Scatter data. Reverse of combineGather
template <class T> template<class T>
static void combineScatter static void combineScatter
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -155,7 +155,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T> template<class T>
static void combineScatter static void combineScatter
( (
T& Value, T& Value,
@ -164,7 +164,7 @@ public:
// Combine variants working on whole List at a time. // Combine variants working on whole List at a time.
template <class T, class CombineOp> template<class T, class CombineOp>
static void listCombineGather static void listCombineGather
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -174,7 +174,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T, class CombineOp> template<class T, class CombineOp>
static void listCombineGather static void listCombineGather
( (
List<T>& Value, List<T>& Value,
@ -183,7 +183,7 @@ public:
); );
//- Scatter data. Reverse of combineGather //- Scatter data. Reverse of combineGather
template <class T> template<class T>
static void listCombineScatter static void listCombineScatter
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -192,7 +192,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T> template<class T>
static void listCombineScatter static void listCombineScatter
( (
List<T>& Value, List<T>& Value,
@ -202,7 +202,7 @@ public:
// Combine variants working on whole map at a time. Container needs to // Combine variants working on whole map at a time. Container needs to
// have iterators and find() defined. // have iterators and find() defined.
template <class Container, class CombineOp> template<class Container, class CombineOp>
static void mapCombineGather static void mapCombineGather
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -212,7 +212,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class Container, class CombineOp> template<class Container, class CombineOp>
static void mapCombineGather static void mapCombineGather
( (
Container& Values, Container& Values,
@ -221,7 +221,7 @@ public:
); );
//- Scatter data. Reverse of combineGather //- Scatter data. Reverse of combineGather
template <class Container> template<class Container>
static void mapCombineScatter static void mapCombineScatter
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -230,7 +230,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class Container> template<class Container>
static void mapCombineScatter static void mapCombineScatter
( (
Container& Values, Container& Values,
@ -244,7 +244,7 @@ public:
// Values[UPstream::myProcNo()] is the data for the current processor. // Values[UPstream::myProcNo()] is the data for the current processor.
//- Gather data but keep individual values separate //- Gather data but keep individual values separate
template <class T> template<class T>
static void gatherList static void gatherList
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -253,7 +253,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T> template<class T>
static void gatherList static void gatherList
( (
List<T>& Values, List<T>& Values,
@ -261,7 +261,7 @@ public:
); );
//- Scatter data. Reverse of gatherList //- Scatter data. Reverse of gatherList
template <class T> template<class T>
static void scatterList static void scatterList
( (
const List<commsStruct>& comms, const List<commsStruct>& comms,
@ -270,7 +270,7 @@ public:
); );
//- Like above but switches between linear/tree communication //- Like above but switches between linear/tree communication
template <class T> template<class T>
static void scatterList static void scatterList
( (
List<T>& Values, List<T>& Values,
@ -284,7 +284,7 @@ public:
// sizes (not bytes). sizes[p0][p1] is what processor p0 has // sizes (not bytes). sizes[p0][p1] is what processor p0 has
// sent to p1. Continuous data only. // sent to p1. Continuous data only.
// If block=true will wait for all transfers to finish. // If block=true will wait for all transfers to finish.
template <class Container, class T> template<class Container, class T>
static void exchange static void exchange
( (
const List<Container >&, const List<Container >&,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -47,7 +47,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template <class T, class CombineOp> template<class T, class CombineOp>
void combineReduce void combineReduce
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -61,7 +61,7 @@ void combineReduce
} }
template <class T, class CombineOp> template<class T, class CombineOp>
void combineReduce void combineReduce
( (
T& Value, T& Value,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,7 +38,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Reduce operation with user specified communication schedule // Reduce operation with user specified communication schedule
template <class T, class BinaryOp> template<class T, class BinaryOp>
void reduce void reduce
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -53,7 +53,7 @@ void reduce
// Reduce using either linear or tree communication schedule // Reduce using either linear or tree communication schedule
template <class T, class BinaryOp> template<class T, class BinaryOp>
void reduce void reduce
( (
T& Value, T& Value,
@ -73,7 +73,7 @@ void reduce
// Reduce using either linear or tree communication schedule // Reduce using either linear or tree communication schedule
template <class T, class BinaryOp> template<class T, class BinaryOp>
T returnReduce T returnReduce
( (
const T& Value, const T& Value,
@ -97,7 +97,7 @@ T returnReduce
// Reduce with sum of both value and count (for averaging) // Reduce with sum of both value and count (for averaging)
template <class T> template<class T>
void sumReduce void sumReduce
( (
T& Value, T& Value,
@ -111,7 +111,7 @@ void sumReduce
// Non-blocking version of reduce. Sets request. // Non-blocking version of reduce. Sets request.
template <class T, class BinaryOp> template<class T, class BinaryOp>
void reduce void reduce
( (
T& Value, T& Value,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -45,7 +45,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T, class CombineOp> template<class T, class CombineOp>
void Pstream::combineGather void Pstream::combineGather
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -129,7 +129,7 @@ void Pstream::combineGather
} }
template <class T, class CombineOp> template<class T, class CombineOp>
void Pstream::combineGather(T& Value, const CombineOp& cop, const int tag) void Pstream::combineGather(T& Value, const CombineOp& cop, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)
@ -143,7 +143,7 @@ void Pstream::combineGather(T& Value, const CombineOp& cop, const int tag)
} }
template <class T> template<class T>
void Pstream::combineScatter void Pstream::combineScatter
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -214,7 +214,7 @@ void Pstream::combineScatter
} }
template <class T> template<class T>
void Pstream::combineScatter(T& Value, const int tag) void Pstream::combineScatter(T& Value, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)
@ -232,7 +232,7 @@ void Pstream::combineScatter(T& Value, const int tag)
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
template <class T, class CombineOp> template<class T, class CombineOp>
void Pstream::listCombineGather void Pstream::listCombineGather
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -323,7 +323,7 @@ void Pstream::listCombineGather
} }
template <class T, class CombineOp> template<class T, class CombineOp>
void Pstream::listCombineGather void Pstream::listCombineGather
( (
List<T>& Values, List<T>& Values,
@ -342,7 +342,7 @@ void Pstream::listCombineGather
} }
template <class T> template<class T>
void Pstream::listCombineScatter void Pstream::listCombineScatter
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -413,7 +413,7 @@ void Pstream::listCombineScatter
} }
template <class T> template<class T>
void Pstream::listCombineScatter(List<T>& Values, const int tag) void Pstream::listCombineScatter(List<T>& Values, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)
@ -433,7 +433,7 @@ void Pstream::listCombineScatter(List<T>& Values, const int tag)
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
template <class Container, class CombineOp> template<class Container, class CombineOp>
void Pstream::mapCombineGather void Pstream::mapCombineGather
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -499,7 +499,7 @@ void Pstream::mapCombineGather
} }
template <class Container, class CombineOp> template<class Container, class CombineOp>
void Pstream::mapCombineGather void Pstream::mapCombineGather
( (
Container& Values, Container& Values,
@ -518,7 +518,7 @@ void Pstream::mapCombineGather
} }
template <class Container> template<class Container>
void Pstream::mapCombineScatter void Pstream::mapCombineScatter
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -561,7 +561,7 @@ void Pstream::mapCombineScatter
} }
template <class Container> template<class Container>
void Pstream::mapCombineScatter(Container& Values, const int tag) void Pstream::mapCombineScatter(Container& Values, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -38,8 +38,8 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
//template <template<class> class ListType, class T> //template<template<class> class ListType, class T>
template <class Container, class T> template<class Container, class T>
void Pstream::exchange void Pstream::exchange
( (
const List<Container>& sendBufs, const List<Container>& sendBufs,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -42,7 +42,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T, class BinaryOp> template<class T, class BinaryOp>
void Pstream::gather void Pstream::gather
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -111,7 +111,7 @@ void Pstream::gather
} }
template <class T, class BinaryOp> template<class T, class BinaryOp>
void Pstream::gather(T& Value, const BinaryOp& bop, const int tag) void Pstream::gather(T& Value, const BinaryOp& bop, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)
@ -125,7 +125,7 @@ void Pstream::gather(T& Value, const BinaryOp& bop, const int tag)
} }
template <class T> template<class T>
void Pstream::scatter void Pstream::scatter
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -189,7 +189,7 @@ void Pstream::scatter
} }
template <class T> template<class T>
void Pstream::scatter(T& Value, const int tag) void Pstream::scatter(T& Value, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,7 +44,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T> template<class T>
void Pstream::gatherList void Pstream::gatherList
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -179,7 +179,7 @@ void Pstream::gatherList
} }
template <class T> template<class T>
void Pstream::gatherList(List<T>& Values, const int tag) void Pstream::gatherList(List<T>& Values, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)
@ -193,7 +193,7 @@ void Pstream::gatherList(List<T>& Values, const int tag)
} }
template <class T> template<class T>
void Pstream::scatterList void Pstream::scatterList
( (
const List<UPstream::commsStruct>& comms, const List<UPstream::commsStruct>& comms,
@ -307,7 +307,7 @@ void Pstream::scatterList
} }
template <class T> template<class T>
void Pstream::scatterList(List<T>& Values, const int tag) void Pstream::scatterList(List<T>& Values, const int tag)
{ {
if (UPstream::nProcs() < UPstream::nProcsSimpleSum) if (UPstream::nProcs() < UPstream::nProcsSimpleSum)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -34,7 +34,7 @@ namespace Foam
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
template <class Type> template<class Type>
dimensioned<Type> dimensioned<Type>::lookupOrDefault dimensioned<Type> dimensioned<Type>::lookupOrDefault
( (
const word& name, const word& name,
@ -48,7 +48,7 @@ dimensioned<Type> dimensioned<Type>::lookupOrDefault
} }
template <class Type> template<class Type>
dimensioned<Type> dimensioned<Type>::lookupOrAddToDict dimensioned<Type> dimensioned<Type>::lookupOrAddToDict
( (
const word& name, const word& name,
@ -64,7 +64,7 @@ dimensioned<Type> dimensioned<Type>::lookupOrAddToDict
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Type> template<class Type>
dimensioned<Type>::dimensioned dimensioned<Type>::dimensioned
( (
const word& name, const word& name,
@ -78,7 +78,7 @@ dimensioned<Type>::dimensioned
{} {}
template <class Type> template<class Type>
dimensioned<Type>::dimensioned dimensioned<Type>::dimensioned
( (
const word& name, const word& name,
@ -91,7 +91,7 @@ dimensioned<Type>::dimensioned
{} {}
template <class Type> template<class Type>
dimensioned<Type>::dimensioned dimensioned<Type>::dimensioned
( (
Istream& is Istream& is
@ -103,7 +103,7 @@ dimensioned<Type>::dimensioned
} }
template <class Type> template<class Type>
dimensioned<Type>::dimensioned dimensioned<Type>::dimensioned
( (
const word& name, const word& name,
@ -120,7 +120,7 @@ dimensioned<Type>::dimensioned
} }
template <class Type> template<class Type>
dimensioned<Type>::dimensioned dimensioned<Type>::dimensioned
( (
const word& name, const word& name,
@ -171,7 +171,7 @@ dimensioned<Type>::dimensioned
} }
template <class Type> template<class Type>
dimensioned<Type>::dimensioned dimensioned<Type>::dimensioned
() ()
: :
@ -183,46 +183,46 @@ dimensioned<Type>::dimensioned
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Type> template<class Type>
const word& dimensioned<Type>::name() const const word& dimensioned<Type>::name() const
{ {
return name_; return name_;
} }
template <class Type> template<class Type>
word& dimensioned<Type>::name() word& dimensioned<Type>::name()
{ {
return name_; return name_;
} }
template <class Type> template<class Type>
const dimensionSet& dimensioned<Type>::dimensions() const const dimensionSet& dimensioned<Type>::dimensions() const
{ {
return dimensions_; return dimensions_;
} }
template <class Type> template<class Type>
dimensionSet& dimensioned<Type>::dimensions() dimensionSet& dimensioned<Type>::dimensions()
{ {
return dimensions_; return dimensions_;
} }
template <class Type> template<class Type>
const Type& dimensioned<Type>::value() const const Type& dimensioned<Type>::value() const
{ {
return value_; return value_;
} }
template <class Type> template<class Type>
Type& dimensioned<Type>::value() Type& dimensioned<Type>::value()
{ {
return value_; return value_;
} }
template <class Type> template<class Type>
dimensioned<typename dimensioned<Type>::cmptType> dimensioned<Type>::component dimensioned<typename dimensioned<Type>::cmptType> dimensioned<Type>::component
( (
const direction d const direction d
@ -237,7 +237,7 @@ dimensioned<typename dimensioned<Type>::cmptType> dimensioned<Type>::component
} }
template <class Type> template<class Type>
void dimensioned<Type>::replace void dimensioned<Type>::replace
( (
const direction d, const direction d,
@ -249,14 +249,14 @@ void dimensioned<Type>::replace
} }
template <class Type> template<class Type>
bool dimensioned<Type>::readIfPresent(const dictionary& dict) bool dimensioned<Type>::readIfPresent(const dictionary& dict)
{ {
return dict.readIfPresent(name_, value_); return dict.readIfPresent(name_, value_);
} }
template <class Type> template<class Type>
Foam::Istream& dimensioned<Type>::read(Istream& is, const dictionary& readSet) Foam::Istream& dimensioned<Type>::read(Istream& is, const dictionary& readSet)
{ {
// Read name // Read name
@ -280,7 +280,7 @@ Foam::Istream& dimensioned<Type>::read(Istream& is, const dictionary& readSet)
} }
template <class Type> template<class Type>
Foam::Istream& dimensioned<Type>::read Foam::Istream& dimensioned<Type>::read
( (
Istream& is, Istream& is,
@ -309,7 +309,7 @@ Foam::Istream& dimensioned<Type>::read
} }
template <class Type> template<class Type>
Foam::Istream& dimensioned<Type>::read(Istream& is) Foam::Istream& dimensioned<Type>::read(Istream& is)
{ {
// Read name // Read name
@ -335,7 +335,7 @@ Foam::Istream& dimensioned<Type>::read(Istream& is)
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
template <class Type> template<class Type>
dimensioned<typename dimensioned<Type>::cmptType> dimensioned<Type>::operator[] dimensioned<typename dimensioned<Type>::cmptType> dimensioned<Type>::operator[]
( (
const direction d const direction d
@ -345,7 +345,7 @@ dimensioned<typename dimensioned<Type>::cmptType> dimensioned<Type>::operator[]
} }
template <class Type> template<class Type>
void dimensioned<Type>::operator+= void dimensioned<Type>::operator+=
( (
const dimensioned<Type>& dt const dimensioned<Type>& dt
@ -356,7 +356,7 @@ void dimensioned<Type>::operator+=
} }
template <class Type> template<class Type>
void dimensioned<Type>::operator-= void dimensioned<Type>::operator-=
( (
const dimensioned<Type>& dt const dimensioned<Type>& dt
@ -367,7 +367,7 @@ void dimensioned<Type>::operator-=
} }
template <class Type> template<class Type>
void dimensioned<Type>::operator*= void dimensioned<Type>::operator*=
( (
const scalar s const scalar s
@ -377,7 +377,7 @@ void dimensioned<Type>::operator*=
} }
template <class Type> template<class Type>
void dimensioned<Type>::operator/= void dimensioned<Type>::operator/=
( (
const scalar s const scalar s
@ -436,7 +436,7 @@ dimensioned<scalar> mag(const dimensioned<Type>& dt)
} }
template <class Type> template<class Type>
dimensioned<Type> max dimensioned<Type> max
( (
const dimensioned<Type>& dt1, const dimensioned<Type>& dt1,
@ -459,7 +459,7 @@ dimensioned<Type> max
} }
template <class Type> template<class Type>
dimensioned<Type> min dimensioned<Type> min
( (
const dimensioned<Type>& dt1, const dimensioned<Type>& dt1,
@ -484,7 +484,7 @@ dimensioned<Type> min
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
template <class Type> template<class Type>
Istream& operator>>(Istream& is, dimensioned<Type>& dt) Istream& operator>>(Istream& is, dimensioned<Type>& dt)
{ {
token nextToken(is); token nextToken(is);
@ -517,7 +517,7 @@ Istream& operator>>(Istream& is, dimensioned<Type>& dt)
} }
template <class Type> template<class Type>
Ostream& operator<<(Ostream& os, const dimensioned<Type>& dt) Ostream& operator<<(Ostream& os, const dimensioned<Type>& dt)
{ {
// Write the name // Write the name
@ -541,7 +541,7 @@ Ostream& operator<<(Ostream& os, const dimensioned<Type>& dt)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Type> template<class Type>
bool operator> bool operator>
( (
const dimensioned<Type>& dt1, const dimensioned<Type>& dt1,
@ -552,7 +552,7 @@ bool operator>
} }
template <class Type> template<class Type>
bool operator< bool operator<
( (
const dimensioned<Type>& dt1, const dimensioned<Type>& dt1,
@ -563,7 +563,7 @@ bool operator<
} }
template <class Type> template<class Type>
dimensioned<Type> operator+ dimensioned<Type> operator+
( (
const dimensioned<Type>& dt1, const dimensioned<Type>& dt1,
@ -579,7 +579,7 @@ dimensioned<Type> operator+
} }
template <class Type> template<class Type>
dimensioned<Type> operator-(const dimensioned<Type>& dt) dimensioned<Type> operator-(const dimensioned<Type>& dt)
{ {
return dimensioned<Type> return dimensioned<Type>
@ -591,7 +591,7 @@ dimensioned<Type> operator-(const dimensioned<Type>& dt)
} }
template <class Type> template<class Type>
dimensioned<Type> operator- dimensioned<Type> operator-
( (
const dimensioned<Type>& dt1, const dimensioned<Type>& dt1,
@ -607,7 +607,7 @@ dimensioned<Type> operator-
} }
template <class Type> template<class Type>
dimensioned<Type> operator* dimensioned<Type> operator*
( (
const dimensioned<scalar>& ds, const dimensioned<scalar>& ds,
@ -623,7 +623,7 @@ dimensioned<Type> operator*
} }
template <class Type> template<class Type>
dimensioned<Type> operator/ dimensioned<Type> operator/
( (
const dimensioned<Type>& dt, const dimensioned<Type>& dt,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -61,7 +61,7 @@ class dictionary;
Class dimensioned Declaration Class dimensioned Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Type> template<class Type>
class dimensioned class dimensioned
{ {
// private data // private data

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,7 +27,7 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template <class T> template<class T>
Foam::List<T> Foam::transform Foam::List<T> Foam::transform
( (
const tensor& rotTensor, const tensor& rotTensor,
@ -45,7 +45,7 @@ Foam::List<T> Foam::transform
} }
template <class T> template<class T>
void Foam::transformList(const tensor& rotTensor, UList<T>& field) void Foam::transformList(const tensor& rotTensor, UList<T>& field)
{ {
forAll(field, i) forAll(field, i)
@ -55,7 +55,7 @@ void Foam::transformList(const tensor& rotTensor, UList<T>& field)
} }
template <class T> template<class T>
void Foam::transformList(const tensorField& rotTensor, UList<T>& field) void Foam::transformList(const tensorField& rotTensor, UList<T>& field)
{ {
if (rotTensor.size() == 1) if (rotTensor.size() == 1)
@ -84,7 +84,7 @@ void Foam::transformList(const tensorField& rotTensor, UList<T>& field)
} }
template <class T> template<class T>
void Foam::transformList(const tensor& rotTensor, Map<T>& field) void Foam::transformList(const tensor& rotTensor, Map<T>& field)
{ {
forAllIter(typename Map<T>, field, iter) forAllIter(typename Map<T>, field, iter)
@ -94,7 +94,7 @@ void Foam::transformList(const tensor& rotTensor, Map<T>& field)
} }
template <class T> template<class T>
void Foam::transformList(const tensorField& rotTensor, Map<T>& field) void Foam::transformList(const tensorField& rotTensor, Map<T>& field)
{ {
if (rotTensor.size() == 1) if (rotTensor.size() == 1)
@ -116,7 +116,7 @@ void Foam::transformList(const tensorField& rotTensor, Map<T>& field)
} }
template <class T> template<class T>
void Foam::transformList(const tensor& rotTensor, EdgeMap<T>& field) void Foam::transformList(const tensor& rotTensor, EdgeMap<T>& field)
{ {
forAllIter(typename EdgeMap<T>, field, iter) forAllIter(typename EdgeMap<T>, field, iter)
@ -126,7 +126,7 @@ void Foam::transformList(const tensor& rotTensor, EdgeMap<T>& field)
} }
template <class T> template<class T>
void Foam::transformList(const tensorField& rotTensor, EdgeMap<T>& field) void Foam::transformList(const tensorField& rotTensor, EdgeMap<T>& field)
{ {
if (rotTensor.size() == 1) if (rotTensor.size() == 1)

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::label Foam::interpolationLookUpTable<Type>::index Foam::label Foam::interpolationLookUpTable<Type>::index
( (
const List<scalar>& indices, const List<scalar>& indices,
@ -70,7 +70,7 @@ Foam::label Foam::interpolationLookUpTable<Type>::index
} }
template <class Type> template<class Type>
Foam::label Foam::interpolationLookUpTable<Type>::index Foam::label Foam::interpolationLookUpTable<Type>::index
( (
const scalar indice const scalar indice

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -28,7 +28,7 @@ License
// * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * //
template <class Type> template<class Type>
void Foam::uniformInterpolationTable<Type>::checkTable() const void Foam::uniformInterpolationTable<Type>::checkTable() const
{ {
if (size() < 2) if (size() < 2)
@ -44,7 +44,7 @@ void Foam::uniformInterpolationTable<Type>::checkTable() const
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::uniformInterpolationTable<Type>::uniformInterpolationTable Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
( (
const IOobject& io, const IOobject& io,
@ -73,7 +73,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
} }
template <class Type> template<class Type>
Foam::uniformInterpolationTable<Type>::uniformInterpolationTable Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
( (
const word& tableName, const word& tableName,
@ -112,7 +112,7 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
} }
template <class Type> template<class Type>
Foam::uniformInterpolationTable<Type>::uniformInterpolationTable Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
( (
const uniformInterpolationTable& uit const uniformInterpolationTable& uit
@ -131,14 +131,14 @@ Foam::uniformInterpolationTable<Type>::uniformInterpolationTable
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
template <class Type> template<class Type>
Foam::uniformInterpolationTable<Type>::~uniformInterpolationTable() Foam::uniformInterpolationTable<Type>::~uniformInterpolationTable()
{} {}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
template <class Type> template<class Type>
Type Foam::uniformInterpolationTable<Type>::interpolate(scalar x) const Type Foam::uniformInterpolationTable<Type>::interpolate(scalar x) const
{ {
if (bound_) if (bound_)
@ -186,7 +186,7 @@ Type Foam::uniformInterpolationTable<Type>::interpolate(scalar x) const
} }
template <class Type> template<class Type>
Type Foam::uniformInterpolationTable<Type>::interpolateLog10 Type Foam::uniformInterpolationTable<Type>::interpolateLog10
( (
scalar x scalar x
@ -217,7 +217,7 @@ Type Foam::uniformInterpolationTable<Type>::interpolateLog10
} }
template <class Type> template<class Type>
void Foam::uniformInterpolationTable<Type>::write() const void Foam::uniformInterpolationTable<Type>::write() const
{ {
IOdictionary dict(*this); IOdictionary dict(*this);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,7 +67,7 @@ namespace Foam
Class uniformInterpolationTable Declaration Class uniformInterpolationTable Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Type> template<class Type>
class uniformInterpolationTable class uniformInterpolationTable
: :
public IOobject, public IOobject,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -23,70 +23,70 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Type> template<class Type>
Foam::scalar Foam::uniformInterpolationTable<Type>::x0() const Foam::scalar Foam::uniformInterpolationTable<Type>::x0() const
{ {
return x0_; return x0_;
} }
template <class Type> template<class Type>
Foam::scalar Foam::uniformInterpolationTable<Type>::dx() const Foam::scalar Foam::uniformInterpolationTable<Type>::dx() const
{ {
return dx_; return dx_;
} }
template <class Type> template<class Type>
const Foam::Switch& Foam::uniformInterpolationTable<Type>::log10() const const Foam::Switch& Foam::uniformInterpolationTable<Type>::log10() const
{ {
return log10_; return log10_;
} }
template <class Type> template<class Type>
const Foam::Switch& Foam::uniformInterpolationTable<Type>::bound() const const Foam::Switch& Foam::uniformInterpolationTable<Type>::bound() const
{ {
return bound_; return bound_;
} }
template <class Type> template<class Type>
Foam::scalar& Foam::uniformInterpolationTable<Type>::x0() Foam::scalar& Foam::uniformInterpolationTable<Type>::x0()
{ {
return x0_; return x0_;
} }
template <class Type> template<class Type>
Foam::scalar& Foam::uniformInterpolationTable<Type>::dx() Foam::scalar& Foam::uniformInterpolationTable<Type>::dx()
{ {
return dx_; return dx_;
} }
template <class Type> template<class Type>
Foam::Switch& Foam::uniformInterpolationTable<Type>::log10() Foam::Switch& Foam::uniformInterpolationTable<Type>::log10()
{ {
return log10_; return log10_;
} }
template <class Type> template<class Type>
Foam::Switch& Foam::uniformInterpolationTable<Type>::bound() Foam::Switch& Foam::uniformInterpolationTable<Type>::bound()
{ {
return bound_; return bound_;
} }
template <class Type> template<class Type>
Foam::scalar Foam::uniformInterpolationTable<Type>::xMin() const Foam::scalar Foam::uniformInterpolationTable<Type>::xMin() const
{ {
return x0_; return x0_;
} }
template <class Type> template<class Type>
Foam::scalar Foam::uniformInterpolationTable<Type>::xMax() const Foam::scalar Foam::uniformInterpolationTable<Type>::xMax() const
{ {
return x0_ + dx_*(size() - 1); return x0_ + dx_*(size() - 1);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -112,7 +112,7 @@ class globalMeshData
// Private class // Private class
// To combineReduce a pointField. Just appends all lists. // To combineReduce a pointField. Just appends all lists.
template <class T> template<class T>
class plusEqOp class plusEqOp
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -65,7 +65,7 @@ class syncTools
// Private Member Functions // Private Member Functions
//- Combine value with existing value in map. //- Combine value with existing value in map.
template <class T, class CombineOp> template<class T, class CombineOp>
static void combine static void combine
( (
Map<T>& pointValues, Map<T>& pointValues,
@ -75,7 +75,7 @@ class syncTools
); );
//- Combine val with existing value at (implicit index) e. //- Combine val with existing value at (implicit index) e.
template <class T, class CombineOp> template<class T, class CombineOp>
static void combine static void combine
( (
EdgeMap<T>& edgeValues, EdgeMap<T>& edgeValues,
@ -92,7 +92,7 @@ public:
// use specialisations below. // use specialisations below.
//- Synchronize values on selected points. //- Synchronize values on selected points.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncPointMap static void syncPointMap
( (
const polyMesh&, const polyMesh&,
@ -102,7 +102,7 @@ public:
); );
//- Synchronize values on selected edges. //- Synchronize values on selected edges.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncEdgeMap static void syncEdgeMap
( (
const polyMesh&, const polyMesh&,
@ -112,7 +112,7 @@ public:
); );
//- Synchronize values on all mesh points. //- Synchronize values on all mesh points.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncPointList static void syncPointList
( (
const polyMesh&, const polyMesh&,
@ -123,7 +123,7 @@ public:
); );
//- Synchronize values on selected mesh points. //- Synchronize values on selected mesh points.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncPointList static void syncPointList
( (
const polyMesh&, const polyMesh&,
@ -135,7 +135,7 @@ public:
); );
//- Synchronize values on all mesh edges. //- Synchronize values on all mesh edges.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncEdgeList static void syncEdgeList
( (
const polyMesh&, const polyMesh&,
@ -146,7 +146,7 @@ public:
); );
//- Synchronize values on selected mesh edges. //- Synchronize values on selected mesh edges.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncEdgeList static void syncEdgeList
( (
const polyMesh&, const polyMesh&,
@ -158,7 +158,7 @@ public:
); );
//- Synchronize values on boundary faces only. //- Synchronize values on boundary faces only.
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
static void syncBoundaryFaceList static void syncBoundaryFaceList
( (
const polyMesh&, const polyMesh&,
@ -171,7 +171,7 @@ public:
// Synchronise point-wise data // Synchronise point-wise data
//- Synchronize values on all mesh points. //- Synchronize values on all mesh points.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncPointList static void syncPointList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -191,7 +191,7 @@ public:
} }
//- Synchronize locations on all mesh points. //- Synchronize locations on all mesh points.
template <class CombineOp> template<class CombineOp>
static void syncPointPositions static void syncPointPositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -211,7 +211,7 @@ public:
} }
//- Synchronize values on selected mesh points. //- Synchronize values on selected mesh points.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncPointList static void syncPointList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -233,7 +233,7 @@ public:
} }
//- Synchronize locations on selected mesh points. //- Synchronize locations on selected mesh points.
template <class CombineOp> template<class CombineOp>
static void syncPointPositions static void syncPointPositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -258,7 +258,7 @@ public:
// Synchronise edge-wise data // Synchronise edge-wise data
//- Synchronize values on all mesh edges. //- Synchronize values on all mesh edges.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncEdgeList static void syncEdgeList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -278,7 +278,7 @@ public:
} }
//- Synchronize locations on all mesh edges. //- Synchronize locations on all mesh edges.
template <class CombineOp> template<class CombineOp>
static void syncEdgePositions static void syncEdgePositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -298,7 +298,7 @@ public:
} }
//- Synchronize values on selected mesh edges. //- Synchronize values on selected mesh edges.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncEdgeList static void syncEdgeList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -320,7 +320,7 @@ public:
} }
//- Synchronize locations on selected mesh edges. //- Synchronize locations on selected mesh edges.
template <class CombineOp> template<class CombineOp>
static void syncEdgePositions static void syncEdgePositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -346,7 +346,7 @@ public:
// Synchronise face-wise data // Synchronise face-wise data
//- Synchronize values on boundary faces only. //- Synchronize values on boundary faces only.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncBoundaryFaceList static void syncBoundaryFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -358,7 +358,7 @@ public:
} }
//- Synchronize locations on boundary faces only. //- Synchronize locations on boundary faces only.
template <class CombineOp> template<class CombineOp>
static void syncBoundaryFacePositions static void syncBoundaryFacePositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -376,7 +376,7 @@ public:
} }
//- Synchronize values on all mesh faces. //- Synchronize values on all mesh faces.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncFaceList static void syncFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -401,7 +401,7 @@ public:
} }
//- Synchronize locations on all mesh faces. //- Synchronize locations on all mesh faces.
template <class CombineOp> template<class CombineOp>
static void syncFacePositions static void syncFacePositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -425,7 +425,7 @@ public:
} }
//- Swap coupled boundary face values. //- Swap coupled boundary face values.
template <class T> template<class T>
static void swapBoundaryFaceList static void swapBoundaryFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -442,7 +442,7 @@ public:
} }
//- Swap coupled positions. //- Swap coupled positions.
template <class T> template<class T>
static void swapBoundaryFacePositions static void swapBoundaryFacePositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -459,7 +459,7 @@ public:
} }
//- Swap coupled face values. //- Swap coupled face values.
template <class T> template<class T>
static void swapFaceList static void swapFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -482,7 +482,7 @@ public:
} }
//- Swap to obtain neighbour cell values for all boundary faces //- Swap to obtain neighbour cell values for all boundary faces
template <class T> template<class T>
static void swapBoundaryCellList static void swapBoundaryCellList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -493,7 +493,7 @@ public:
// Sparse versions // Sparse versions
//- Synchronize values on selected points. //- Synchronize values on selected points.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncPointMap static void syncPointMap
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -505,7 +505,7 @@ public:
} }
//- Synchronize locations on selected points. //- Synchronize locations on selected points.
template <class CombineOp> template<class CombineOp>
static void syncPointPositions static void syncPointPositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -519,7 +519,7 @@ public:
//- Synchronize values on selected edges. Edges are represented //- Synchronize values on selected edges. Edges are represented
// by the two vertices that make it up so global edges never get // by the two vertices that make it up so global edges never get
// constructed. // constructed.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncEdgeMap static void syncEdgeMap
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -531,7 +531,7 @@ public:
} }
//- Synchronize locations on selected edges. //- Synchronize locations on selected edges.
template <class T, class CombineOp> template<class T, class CombineOp>
static void syncEdgePositions static void syncEdgePositions
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -544,7 +544,7 @@ public:
// PackedList versions // PackedList versions
template <unsigned nBits, class CombineOp> template<unsigned nBits, class CombineOp>
static void syncFaceList static void syncFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -552,14 +552,14 @@ public:
const CombineOp& cop const CombineOp& cop
); );
template <unsigned nBits> template<unsigned nBits>
static void swapFaceList static void swapFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
PackedList<nBits>& faceValues PackedList<nBits>& faceValues
); );
template <unsigned nBits, class CombineOp> template<unsigned nBits, class CombineOp>
static void syncPointList static void syncPointList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -568,7 +568,7 @@ public:
const unsigned int nullValue const unsigned int nullValue
); );
template <unsigned nBits, class CombineOp> template<unsigned nBits, class CombineOp>
static void syncEdgeList static void syncEdgeList
( (
const polyMesh& mesh, const polyMesh& mesh,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -36,7 +36,7 @@ License
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// Combine val with existing value at index // Combine val with existing value at index
template <class T, class CombineOp> template<class T, class CombineOp>
void Foam::syncTools::combine void Foam::syncTools::combine
( (
Map<T>& pointValues, Map<T>& pointValues,
@ -59,7 +59,7 @@ void Foam::syncTools::combine
// Combine val with existing value at (implicit index) e. // Combine val with existing value at (implicit index) e.
template <class T, class CombineOp> template<class T, class CombineOp>
void Foam::syncTools::combine void Foam::syncTools::combine
( (
EdgeMap<T>& edgeValues, EdgeMap<T>& edgeValues,
@ -81,7 +81,7 @@ void Foam::syncTools::combine
} }
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncPointMap void Foam::syncTools::syncPointMap
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -386,7 +386,7 @@ void Foam::syncTools::syncPointMap
} }
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncEdgeMap void Foam::syncTools::syncEdgeMap
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -761,7 +761,7 @@ void Foam::syncTools::syncEdgeMap
} }
//template <class T, class CombineOp, class TransformOp> //template<class T, class CombineOp, class TransformOp>
//void Foam::syncTools::syncPointList //void Foam::syncTools::syncPointList
//( //(
// const polyMesh& mesh, // const polyMesh& mesh,
@ -937,7 +937,7 @@ void Foam::syncTools::syncEdgeMap
//} //}
//template <class T, class CombineOp, class TransformOp> //template<class T, class CombineOp, class TransformOp>
//void Foam::syncTools::syncPointList //void Foam::syncTools::syncPointList
//( //(
// const polyMesh& mesh, // const polyMesh& mesh,
@ -987,7 +987,7 @@ void Foam::syncTools::syncEdgeMap
// } // }
//} //}
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncPointList void Foam::syncTools::syncPointList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1013,7 +1013,7 @@ void Foam::syncTools::syncPointList
} }
//template <class CombineOp> //template<class CombineOp>
//void Foam::syncTools::syncPointPositions //void Foam::syncTools::syncPointPositions
//( //(
// const polyMesh& mesh, // const polyMesh& mesh,
@ -1037,7 +1037,7 @@ void Foam::syncTools::syncPointList
//} //}
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncPointList void Foam::syncTools::syncPointList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1097,7 +1097,7 @@ void Foam::syncTools::syncPointList
} }
//template <class CombineOp> //template<class CombineOp>
//void Foam::syncTools::syncPointPositions //void Foam::syncTools::syncPointPositions
//( //(
// const polyMesh& mesh, // const polyMesh& mesh,
@ -1157,7 +1157,7 @@ void Foam::syncTools::syncPointList
//} //}
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncEdgeList void Foam::syncTools::syncEdgeList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1204,7 +1204,7 @@ void Foam::syncTools::syncEdgeList
} }
//template <class CombineOp> //template<class CombineOp>
//void Foam::syncTools::syncEdgePositions //void Foam::syncTools::syncEdgePositions
//( //(
// const polyMesh& mesh, // const polyMesh& mesh,
@ -1251,7 +1251,7 @@ void Foam::syncTools::syncEdgeList
//} //}
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncEdgeList void Foam::syncTools::syncEdgeList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1310,7 +1310,7 @@ void Foam::syncTools::syncEdgeList
} }
} }
template <class T, class CombineOp, class TransformOp> template<class T, class CombineOp, class TransformOp>
void Foam::syncTools::syncBoundaryFaceList void Foam::syncTools::syncBoundaryFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1436,7 +1436,7 @@ void Foam::syncTools::syncBoundaryFaceList
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <unsigned nBits, class CombineOp> template<unsigned nBits, class CombineOp>
void Foam::syncTools::syncFaceList void Foam::syncTools::syncFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1553,7 +1553,7 @@ void Foam::syncTools::syncFaceList
} }
template <class T> template<class T>
void Foam::syncTools::swapBoundaryCellList void Foam::syncTools::swapBoundaryCellList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1592,7 +1592,7 @@ void Foam::syncTools::swapBoundaryCellList
} }
template <unsigned nBits> template<unsigned nBits>
void Foam::syncTools::swapFaceList void Foam::syncTools::swapFaceList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1603,7 +1603,7 @@ void Foam::syncTools::swapFaceList
} }
template <unsigned nBits, class CombineOp> template<unsigned nBits, class CombineOp>
void Foam::syncTools::syncPointList void Foam::syncTools::syncPointList
( (
const polyMesh& mesh, const polyMesh& mesh,
@ -1650,7 +1650,7 @@ void Foam::syncTools::syncPointList
} }
template <unsigned nBits, class CombineOp> template<unsigned nBits, class CombineOp>
void Foam::syncTools::syncEdgeList void Foam::syncTools::syncEdgeList
( (
const polyMesh& mesh, const polyMesh& mesh,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -394,7 +394,7 @@ public:
// Other patch operations // Other patch operations
//- Project vertices of patch onto another patch //- Project vertices of patch onto another patch
template <class ToPatch> template<class ToPatch>
List<objectHit> projectPoints List<objectHit> projectPoints
( (
const ToPatch& targetPatch, const ToPatch& targetPatch,
@ -404,7 +404,7 @@ public:
) const; ) const;
//- Project vertices of patch onto another patch //- Project vertices of patch onto another patch
template <class ToPatch> template<class ToPatch>
List<objectHit> projectFaceCentres List<objectHit> projectFaceCentres
( (
const ToPatch& targetPatch, const ToPatch& targetPatch,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -41,7 +41,7 @@ template
class PointField, class PointField,
class PointType class PointType
> >
template <class ToPatch> template<class ToPatch>
Foam::List<Foam::objectHit> Foam::List<Foam::objectHit>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
projectPoints projectPoints
@ -288,7 +288,7 @@ template
class PointField, class PointField,
class PointType class PointType
> >
template <class ToPatch> template<class ToPatch>
Foam::List<Foam::objectHit> Foam::List<Foam::objectHit>
Foam::PrimitivePatch<Face, FaceList, PointField, PointType>:: Foam::PrimitivePatch<Face, FaceList, PointField, PointType>::
projectFaceCentres projectFaceCentres

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ namespace Foam
Class DiagTensor Declaration Class DiagTensor Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt> template<class Cmpt>
class DiagTensor class DiagTensor
: :
public VectorSpace<DiagTensor<Cmpt>, Cmpt, 3> public VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>
@ -86,7 +86,8 @@ public:
inline DiagTensor(); inline DiagTensor();
//- Construct given VectorSpace //- Construct given VectorSpace
inline DiagTensor(const VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>&); template<class Cmpt2>
inline DiagTensor(const VectorSpace<DiagTensor<Cmpt2>, Cmpt2, 3>&);
//- Construct given three components //- Construct given three components
inline DiagTensor(const Cmpt& txx, const Cmpt& tyy, const Cmpt& tzz); inline DiagTensor(const Cmpt& txx, const Cmpt& tyy, const Cmpt& tzz);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,25 +32,23 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null template<class Cmpt>
template <class Cmpt>
inline DiagTensor<Cmpt>::DiagTensor() inline DiagTensor<Cmpt>::DiagTensor()
{} {}
// Construct given VectorSpace template<class Cmpt>
template <class Cmpt> template<class Cmpt2>
inline DiagTensor<Cmpt>::DiagTensor inline DiagTensor<Cmpt>::DiagTensor
( (
const VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>& vs const VectorSpace<DiagTensor<Cmpt2>, Cmpt2, 3>& vs
) )
: :
VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(vs) VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(vs)
{} {}
// Construct given three Cmpts template<class Cmpt>
template <class Cmpt>
inline DiagTensor<Cmpt>::DiagTensor inline DiagTensor<Cmpt>::DiagTensor
( (
const Cmpt& vxx, const Cmpt& vxx,
@ -64,8 +62,7 @@ inline DiagTensor<Cmpt>::DiagTensor
} }
// Construct from Istream template<class Cmpt>
template <class Cmpt>
inline DiagTensor<Cmpt>::DiagTensor(Istream& is) inline DiagTensor<Cmpt>::DiagTensor(Istream& is)
: :
VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(is) VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(is)
@ -74,38 +71,38 @@ inline DiagTensor<Cmpt>::DiagTensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Cmpt& DiagTensor<Cmpt>::xx() const inline const Cmpt& DiagTensor<Cmpt>::xx() const
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& DiagTensor<Cmpt>::yy() const inline const Cmpt& DiagTensor<Cmpt>::yy() const
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& DiagTensor<Cmpt>::zz() const inline const Cmpt& DiagTensor<Cmpt>::zz() const
{ {
return this->v_[ZZ]; return this->v_[ZZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& DiagTensor<Cmpt>::xx() inline Cmpt& DiagTensor<Cmpt>::xx()
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& DiagTensor<Cmpt>::yy() inline Cmpt& DiagTensor<Cmpt>::yy()
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& DiagTensor<Cmpt>::zz() inline Cmpt& DiagTensor<Cmpt>::zz()
{ {
return this->v_[ZZ]; return this->v_[ZZ];
@ -114,7 +111,7 @@ inline Cmpt& DiagTensor<Cmpt>::zz()
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator+(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2) operator+(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2)
{ {
@ -127,7 +124,7 @@ operator+(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator+(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2) operator+(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2)
{ {
@ -140,7 +137,7 @@ operator+(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator-(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2) operator-(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2)
{ {
@ -153,7 +150,7 @@ operator-(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator-(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2) operator-(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2)
{ {
@ -167,7 +164,7 @@ operator-(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2)
//- Inner-product between two diagonal tensors //- Inner-product between two diagonal tensors
template <class Cmpt> template<class Cmpt>
inline DiagTensor<Cmpt> inline DiagTensor<Cmpt>
operator&(const DiagTensor<Cmpt>& dt1, const DiagTensor<Cmpt>& dt2) operator&(const DiagTensor<Cmpt>& dt1, const DiagTensor<Cmpt>& dt2)
{ {
@ -181,7 +178,7 @@ operator&(const DiagTensor<Cmpt>& dt1, const DiagTensor<Cmpt>& dt2)
//- Inner-product between a diagonal tensor and a tensor //- Inner-product between a diagonal tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2) operator&(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2)
{ {
@ -203,7 +200,7 @@ operator&(const DiagTensor<Cmpt>& dt1, const Tensor<Cmpt>& t2)
//- Inner-product between a tensor and a diagonal tensor //- Inner-product between a tensor and a diagonal tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2) operator&(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2)
{ {
@ -225,7 +222,7 @@ operator&(const Tensor<Cmpt>& t1, const DiagTensor<Cmpt>& dt2)
//- Inner-product between a diagonal tensor and a vector //- Inner-product between a diagonal tensor and a vector
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator&(const DiagTensor<Cmpt>& dt, const Vector<Cmpt>& v) operator&(const DiagTensor<Cmpt>& dt, const Vector<Cmpt>& v)
{ {
@ -239,7 +236,7 @@ operator&(const DiagTensor<Cmpt>& dt, const Vector<Cmpt>& v)
//- Inner-product between a vector and a diagonal tensor //- Inner-product between a vector and a diagonal tensor
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator&(const Vector<Cmpt>& v, const DiagTensor<Cmpt>& dt) operator&(const Vector<Cmpt>& v, const DiagTensor<Cmpt>& dt)
{ {
@ -253,7 +250,7 @@ operator&(const Vector<Cmpt>& v, const DiagTensor<Cmpt>& dt)
//- Division of a scalar by a diagonalTensor //- Division of a scalar by a diagonalTensor
template <class Cmpt> template<class Cmpt>
inline DiagTensor<Cmpt> inline DiagTensor<Cmpt>
operator/(const scalar s, const DiagTensor<Cmpt>& dt) operator/(const scalar s, const DiagTensor<Cmpt>& dt)
{ {
@ -262,7 +259,7 @@ operator/(const scalar s, const DiagTensor<Cmpt>& dt)
//- Division of a vector by a diagonalTensor //- Division of a vector by a diagonalTensor
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator/(const Vector<Cmpt> v, const DiagTensor<Cmpt>& dt) operator/(const Vector<Cmpt> v, const DiagTensor<Cmpt>& dt)
{ {
@ -271,7 +268,7 @@ operator/(const Vector<Cmpt> v, const DiagTensor<Cmpt>& dt)
//- Return the trace of a diagonal tensor //- Return the trace of a diagonal tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt tr(const DiagTensor<Cmpt>& dt) inline Cmpt tr(const DiagTensor<Cmpt>& dt)
{ {
return dt.xx() + dt.yy() + dt.zz(); return dt.xx() + dt.yy() + dt.zz();
@ -279,7 +276,7 @@ inline Cmpt tr(const DiagTensor<Cmpt>& dt)
//- Return the spherical part of a diagonal tensor //- Return the spherical part of a diagonal tensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const DiagTensor<Cmpt>& dt) inline SphericalTensor<Cmpt> sph(const DiagTensor<Cmpt>& dt)
{ {
return 0.5*tr(dt); return 0.5*tr(dt);
@ -287,7 +284,7 @@ inline SphericalTensor<Cmpt> sph(const DiagTensor<Cmpt>& dt)
//- Return the determinant of a diagonal tensor //- Return the determinant of a diagonal tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt det(const DiagTensor<Cmpt>& t) inline Cmpt det(const DiagTensor<Cmpt>& t)
{ {
return t.xx()*t.yy()*t.zz(); return t.xx()*t.yy()*t.zz();
@ -295,7 +292,7 @@ inline Cmpt det(const DiagTensor<Cmpt>& t)
//- Return the inverse of a symmetric tensor //- Return the inverse of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline DiagTensor<Cmpt> inv(const DiagTensor<Cmpt>& dt) inline DiagTensor<Cmpt> inv(const DiagTensor<Cmpt>& dt)
{ {
return DiagTensor<Cmpt>(1.0/dt.xx(), 1.0/dt.yy(), 1.0/dt.zz()); return DiagTensor<Cmpt>(1.0/dt.xx(), 1.0/dt.yy(), 1.0/dt.zz());
@ -303,7 +300,7 @@ inline DiagTensor<Cmpt> inv(const DiagTensor<Cmpt>& dt)
//- Return the diagonal of a tensor as a diagonal tensor //- Return the diagonal of a tensor as a diagonal tensor
template <class Cmpt> template<class Cmpt>
inline DiagTensor<Cmpt> diag(const Tensor<Cmpt>& t) inline DiagTensor<Cmpt> diag(const Tensor<Cmpt>& t)
{ {
return DiagTensor<Cmpt>(t.xx(), t.yy(), t.zz()); return DiagTensor<Cmpt>(t.xx(), t.yy(), t.zz());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -91,9 +91,10 @@ public:
inline SphericalTensor(); inline SphericalTensor();
//- Construct given VectorSpace //- Construct given VectorSpace
template<class Cmpt2>
inline SphericalTensor inline SphericalTensor
( (
const VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>& const VectorSpace<SphericalTensor<Cmpt2>, Cmpt2, 1>&
); );
//- Construct given the component //- Construct given the component

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,33 +32,30 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null template<class Cmpt>
template <class Cmpt>
inline SphericalTensor<Cmpt>::SphericalTensor() inline SphericalTensor<Cmpt>::SphericalTensor()
{} {}
// Construct given VectorSpace template<class Cmpt>
template <class Cmpt> template<class Cmpt2>
inline SphericalTensor<Cmpt>::SphericalTensor inline SphericalTensor<Cmpt>::SphericalTensor
( (
const VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>& vs const VectorSpace<SphericalTensor<Cmpt2>, Cmpt2, 1>& vs
) )
: :
VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(vs) VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(vs)
{} {}
// Construct given three Cmpts template<class Cmpt>
template <class Cmpt>
inline SphericalTensor<Cmpt>::SphericalTensor(const Cmpt& stii) inline SphericalTensor<Cmpt>::SphericalTensor(const Cmpt& stii)
{ {
this->v_[II] = stii; this->v_[II] = stii;
} }
// Construct from Istream template<class Cmpt>
template <class Cmpt>
inline SphericalTensor<Cmpt>::SphericalTensor(Istream& is) inline SphericalTensor<Cmpt>::SphericalTensor(Istream& is)
: :
VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(is) VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(is)
@ -67,21 +64,21 @@ inline SphericalTensor<Cmpt>::SphericalTensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SphericalTensor<Cmpt>::ii() const inline const Cmpt& SphericalTensor<Cmpt>::ii() const
{ {
return this->v_[II]; return this->v_[II];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SphericalTensor<Cmpt>::ii() inline Cmpt& SphericalTensor<Cmpt>::ii()
{ {
return this->v_[II]; return this->v_[II];
} }
template <class Cmpt> template<class Cmpt>
inline const SphericalTensor<Cmpt>& SphericalTensor<Cmpt>::T() const inline const SphericalTensor<Cmpt>& SphericalTensor<Cmpt>::T() const
{ {
return *this; return *this;
@ -91,7 +88,7 @@ inline const SphericalTensor<Cmpt>& SphericalTensor<Cmpt>::T() const
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Inner-product between two spherical tensors //- Inner-product between two spherical tensors
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> inline SphericalTensor<Cmpt>
operator&(const SphericalTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& st2) operator&(const SphericalTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& st2)
{ {
@ -100,7 +97,7 @@ operator&(const SphericalTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& st2)
//- Inner-product between a spherical tensor and a vector //- Inner-product between a spherical tensor and a vector
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator&(const SphericalTensor<Cmpt>& st, const Vector<Cmpt>& v) operator&(const SphericalTensor<Cmpt>& st, const Vector<Cmpt>& v)
{ {
@ -114,7 +111,7 @@ operator&(const SphericalTensor<Cmpt>& st, const Vector<Cmpt>& v)
//- Inner-product between a vector and a spherical tensor //- Inner-product between a vector and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator&(const Vector<Cmpt>& v, const SphericalTensor<Cmpt>& st) operator&(const Vector<Cmpt>& v, const SphericalTensor<Cmpt>& st)
{ {
@ -128,7 +125,7 @@ operator&(const Vector<Cmpt>& v, const SphericalTensor<Cmpt>& st)
//- Double-dot-product between a spherical tensor and a spherical tensor //- Double-dot-product between a spherical tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SphericalTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& st2) operator&&(const SphericalTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& st2)
{ {
@ -137,7 +134,7 @@ operator&&(const SphericalTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& st2)
//- Division of a scalar by a sphericalTensor //- Division of a scalar by a sphericalTensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> inline SphericalTensor<Cmpt>
operator/(const scalar s, const SphericalTensor<Cmpt>& st) operator/(const scalar s, const SphericalTensor<Cmpt>& st)
{ {
@ -145,7 +142,7 @@ operator/(const scalar s, const SphericalTensor<Cmpt>& st)
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt magSqr(const SphericalTensor<Cmpt>& st) inline Cmpt magSqr(const SphericalTensor<Cmpt>& st)
{ {
return 3*magSqr(st.ii()); return 3*magSqr(st.ii());
@ -153,7 +150,7 @@ inline Cmpt magSqr(const SphericalTensor<Cmpt>& st)
//- Return the trace of a spherical tensor //- Return the trace of a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt tr(const SphericalTensor<Cmpt>& st) inline Cmpt tr(const SphericalTensor<Cmpt>& st)
{ {
return 3*st.ii(); return 3*st.ii();
@ -161,7 +158,7 @@ inline Cmpt tr(const SphericalTensor<Cmpt>& st)
//- Return the spherical part of a spherical tensor, i.e. itself //- Return the spherical part of a spherical tensor, i.e. itself
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const SphericalTensor<Cmpt>& st) inline SphericalTensor<Cmpt> sph(const SphericalTensor<Cmpt>& st)
{ {
return st; return st;
@ -169,7 +166,7 @@ inline SphericalTensor<Cmpt> sph(const SphericalTensor<Cmpt>& st)
//- Return the determinant of a spherical tensor //- Return the determinant of a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt det(const SphericalTensor<Cmpt>& st) inline Cmpt det(const SphericalTensor<Cmpt>& st)
{ {
return st.ii()*st.ii()*st.ii(); return st.ii()*st.ii()*st.ii();
@ -177,7 +174,7 @@ inline Cmpt det(const SphericalTensor<Cmpt>& st)
//- Return the inverse of a spherical tensor //- Return the inverse of a spherical tensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> inv(const SphericalTensor<Cmpt>& st) inline SphericalTensor<Cmpt> inv(const SphericalTensor<Cmpt>& st)
{ {
return SphericalTensor<Cmpt>(1.0/st.ii()); return SphericalTensor<Cmpt>(1.0/st.ii());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,13 +33,13 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null // Construct null
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt>::SphericalTensor2D() inline SphericalTensor2D<Cmpt>::SphericalTensor2D()
{} {}
// Construct given VectorSpace // Construct given VectorSpace
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt>::SphericalTensor2D inline SphericalTensor2D<Cmpt>::SphericalTensor2D
( (
const VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>& vs const VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>& vs
@ -50,7 +50,7 @@ inline SphericalTensor2D<Cmpt>::SphericalTensor2D
// Construct given three Cmpts // Construct given three Cmpts
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt>::SphericalTensor2D(const Cmpt& stii) inline SphericalTensor2D<Cmpt>::SphericalTensor2D(const Cmpt& stii)
{ {
this->v_[II] = stii; this->v_[II] = stii;
@ -58,7 +58,7 @@ inline SphericalTensor2D<Cmpt>::SphericalTensor2D(const Cmpt& stii)
// Construct from Istream // Construct from Istream
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt>::SphericalTensor2D(Istream& is) inline SphericalTensor2D<Cmpt>::SphericalTensor2D(Istream& is)
: :
VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>(is) VectorSpace<SphericalTensor2D<Cmpt>, Cmpt, 1>(is)
@ -67,14 +67,14 @@ inline SphericalTensor2D<Cmpt>::SphericalTensor2D(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SphericalTensor2D<Cmpt>::ii() const inline const Cmpt& SphericalTensor2D<Cmpt>::ii() const
{ {
return this->v_[II]; return this->v_[II];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SphericalTensor2D<Cmpt>::ii() inline Cmpt& SphericalTensor2D<Cmpt>::ii()
{ {
return this->v_[II]; return this->v_[II];
@ -84,7 +84,7 @@ inline Cmpt& SphericalTensor2D<Cmpt>::ii()
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Inner-product between two spherical tensors //- Inner-product between two spherical tensors
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt> inline SphericalTensor2D<Cmpt>
operator& operator&
( (
@ -97,7 +97,7 @@ operator&
//- Inner-product between a spherical tensor and a vector //- Inner-product between a spherical tensor and a vector
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt> inline Vector2D<Cmpt>
operator&(const SphericalTensor2D<Cmpt>& st, const Vector2D<Cmpt>& v) operator&(const SphericalTensor2D<Cmpt>& st, const Vector2D<Cmpt>& v)
{ {
@ -110,7 +110,7 @@ operator&(const SphericalTensor2D<Cmpt>& st, const Vector2D<Cmpt>& v)
//- Inner-product between a vector and a spherical tensor //- Inner-product between a vector and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt> inline Vector2D<Cmpt>
operator&(const Vector2D<Cmpt>& v, const SphericalTensor2D<Cmpt>& st) operator&(const Vector2D<Cmpt>& v, const SphericalTensor2D<Cmpt>& st)
{ {
@ -123,7 +123,7 @@ operator&(const Vector2D<Cmpt>& v, const SphericalTensor2D<Cmpt>& st)
//- Division of a scalar by a sphericalTensor2D //- Division of a scalar by a sphericalTensor2D
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt> inline SphericalTensor2D<Cmpt>
operator/(const scalar s, const SphericalTensor2D<Cmpt>& st) operator/(const scalar s, const SphericalTensor2D<Cmpt>& st)
{ {
@ -132,7 +132,7 @@ operator/(const scalar s, const SphericalTensor2D<Cmpt>& st)
//- Return the trace of a spherical tensor //- Return the trace of a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt tr(const SphericalTensor2D<Cmpt>& st) inline Cmpt tr(const SphericalTensor2D<Cmpt>& st)
{ {
return 2*st.ii(); return 2*st.ii();
@ -140,7 +140,7 @@ inline Cmpt tr(const SphericalTensor2D<Cmpt>& st)
//- Return the spherical part of a spherical tensor, i.e. itself //- Return the spherical part of a spherical tensor, i.e. itself
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt> sph(const SphericalTensor2D<Cmpt>& st) inline SphericalTensor2D<Cmpt> sph(const SphericalTensor2D<Cmpt>& st)
{ {
return st; return st;
@ -148,7 +148,7 @@ inline SphericalTensor2D<Cmpt> sph(const SphericalTensor2D<Cmpt>& st)
//- Return the determinant of a spherical tensor //- Return the determinant of a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt det(const SphericalTensor2D<Cmpt>& st) inline Cmpt det(const SphericalTensor2D<Cmpt>& st)
{ {
return st.ii()*st.ii(); return st.ii()*st.ii();
@ -156,7 +156,7 @@ inline Cmpt det(const SphericalTensor2D<Cmpt>& st)
//- Return the inverse of a symmetric tensor //- Return the inverse of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt> inv(const SphericalTensor2D<Cmpt>& st) inline SphericalTensor2D<Cmpt> inv(const SphericalTensor2D<Cmpt>& st)
{ {
return SphericalTensor2D<Cmpt>(1.0/st.ii()); return SphericalTensor2D<Cmpt>(1.0/st.ii());

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ namespace Foam
Class SymmTensor Declaration Class SymmTensor Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt> template<class Cmpt>
class SymmTensor class SymmTensor
: :
public VectorSpace<SymmTensor<Cmpt>, Cmpt, 6> public VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>
@ -91,8 +91,9 @@ public:
//- Construct null //- Construct null
inline SymmTensor(); inline SymmTensor();
//- Construct given VectorSpace //- Construct given VectorSpace of the same rank
inline SymmTensor(const VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>&); template<class Cmpt2>
inline SymmTensor(const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>&);
//- Construct given SphericalTensor //- Construct given SphericalTensor
inline SymmTensor(const SphericalTensor<Cmpt>&); inline SymmTensor(const SphericalTensor<Cmpt>&);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -33,22 +33,23 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt>::SymmTensor() inline SymmTensor<Cmpt>::SymmTensor()
{} {}
template <class Cmpt> template<class Cmpt>
template<class Cmpt2>
inline SymmTensor<Cmpt>::SymmTensor inline SymmTensor<Cmpt>::SymmTensor
( (
const VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>& vs const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>& vs
) )
: :
VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(vs) VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(vs)
{} {}
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st) inline SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st)
{ {
this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0; this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
@ -57,7 +58,7 @@ inline SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st)
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt>::SymmTensor inline SymmTensor<Cmpt>::SymmTensor
( (
const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt txx, const Cmpt txy, const Cmpt txz,
@ -71,7 +72,7 @@ inline SymmTensor<Cmpt>::SymmTensor
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt>::SymmTensor(Istream& is) inline SymmTensor<Cmpt>::SymmTensor(Istream& is)
: :
VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(is) VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(is)
@ -80,81 +81,81 @@ inline SymmTensor<Cmpt>::SymmTensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::xx() const inline const Cmpt& SymmTensor<Cmpt>::xx() const
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::xy() const inline const Cmpt& SymmTensor<Cmpt>::xy() const
{ {
return this->v_[XY]; return this->v_[XY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::xz() const inline const Cmpt& SymmTensor<Cmpt>::xz() const
{ {
return this->v_[XZ]; return this->v_[XZ];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::yy() const inline const Cmpt& SymmTensor<Cmpt>::yy() const
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::yz() const inline const Cmpt& SymmTensor<Cmpt>::yz() const
{ {
return this->v_[YZ]; return this->v_[YZ];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::zz() const inline const Cmpt& SymmTensor<Cmpt>::zz() const
{ {
return this->v_[ZZ]; return this->v_[ZZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::xx() inline Cmpt& SymmTensor<Cmpt>::xx()
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::xy() inline Cmpt& SymmTensor<Cmpt>::xy()
{ {
return this->v_[XY]; return this->v_[XY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::xz() inline Cmpt& SymmTensor<Cmpt>::xz()
{ {
return this->v_[XZ]; return this->v_[XZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::yy() inline Cmpt& SymmTensor<Cmpt>::yy()
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::yz() inline Cmpt& SymmTensor<Cmpt>::yz()
{ {
return this->v_[YZ]; return this->v_[YZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::zz() inline Cmpt& SymmTensor<Cmpt>::zz()
{ {
return this->v_[ZZ]; return this->v_[ZZ];
} }
template <class Cmpt> template<class Cmpt>
inline const SymmTensor<Cmpt>& SymmTensor<Cmpt>::T() const inline const SymmTensor<Cmpt>& SymmTensor<Cmpt>::T() const
{ {
return *this; return *this;
@ -163,7 +164,7 @@ inline const SymmTensor<Cmpt>& SymmTensor<Cmpt>::T() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline void SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st) inline void SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
{ {
this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0; this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
@ -176,7 +177,7 @@ inline void SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Hodge Dual operator (tensor -> vector) //- Hodge Dual operator (tensor -> vector)
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> operator*(const SymmTensor<Cmpt>& st) inline Vector<Cmpt> operator*(const SymmTensor<Cmpt>& st)
{ {
return Vector<Cmpt>(st.yz(), -st.xz(), st.xy()); return Vector<Cmpt>(st.yz(), -st.xz(), st.xy());
@ -184,7 +185,7 @@ inline Vector<Cmpt> operator*(const SymmTensor<Cmpt>& st)
//- Inner-product between two symmetric tensors //- Inner-product between two symmetric tensors
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2) operator&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2)
{ {
@ -206,7 +207,7 @@ operator&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2)
//- Double-dot-product between a symmetric tensor and a symmetric tensor //- Double-dot-product between a symmetric tensor and a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2) operator&&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2)
{ {
@ -220,7 +221,7 @@ operator&&(const SymmTensor<Cmpt>& st1, const SymmTensor<Cmpt>& st2)
//- Inner-product between a symmetric tensor and a vector //- Inner-product between a symmetric tensor and a vector
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator&(const SymmTensor<Cmpt>& st, const Vector<Cmpt>& v) operator&(const SymmTensor<Cmpt>& st, const Vector<Cmpt>& v)
{ {
@ -234,7 +235,7 @@ operator&(const SymmTensor<Cmpt>& st, const Vector<Cmpt>& v)
//- Inner-product between a vector and a symmetric tensor //- Inner-product between a vector and a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> inline Vector<Cmpt>
operator&(const Vector<Cmpt>& v, const SymmTensor<Cmpt>& st) operator&(const Vector<Cmpt>& v, const SymmTensor<Cmpt>& st)
{ {
@ -247,7 +248,7 @@ operator&(const Vector<Cmpt>& v, const SymmTensor<Cmpt>& st)
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt magSqr(const SymmTensor<Cmpt>& st) inline Cmpt magSqr(const SymmTensor<Cmpt>& st)
{ {
return return
@ -260,7 +261,7 @@ inline Cmpt magSqr(const SymmTensor<Cmpt>& st)
//- Return the trace of a symmetric tensor //- Return the trace of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt tr(const SymmTensor<Cmpt>& st) inline Cmpt tr(const SymmTensor<Cmpt>& st)
{ {
return st.xx() + st.yy() + st.zz(); return st.xx() + st.yy() + st.zz();
@ -268,7 +269,7 @@ inline Cmpt tr(const SymmTensor<Cmpt>& st)
//- Return the spherical part of a symmetric tensor //- Return the spherical part of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const SymmTensor<Cmpt>& st) inline SphericalTensor<Cmpt> sph(const SymmTensor<Cmpt>& st)
{ {
return (1.0/3.0)*tr(st); return (1.0/3.0)*tr(st);
@ -276,7 +277,7 @@ inline SphericalTensor<Cmpt> sph(const SymmTensor<Cmpt>& st)
//- Return the symmetric part of a symmetric tensor, i.e. itself //- Return the symmetric part of a symmetric tensor, i.e. itself
template <class Cmpt> template<class Cmpt>
inline const SymmTensor<Cmpt>& symm(const SymmTensor<Cmpt>& st) inline const SymmTensor<Cmpt>& symm(const SymmTensor<Cmpt>& st)
{ {
return st; return st;
@ -284,7 +285,7 @@ inline const SymmTensor<Cmpt>& symm(const SymmTensor<Cmpt>& st)
//- Return twice the symmetric part of a symmetric tensor //- Return twice the symmetric part of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> twoSymm(const SymmTensor<Cmpt>& st) inline SymmTensor<Cmpt> twoSymm(const SymmTensor<Cmpt>& st)
{ {
return 2*st; return 2*st;
@ -292,7 +293,7 @@ inline SymmTensor<Cmpt> twoSymm(const SymmTensor<Cmpt>& st)
//- Return the deviatoric part of a symmetric tensor //- Return the deviatoric part of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> dev(const SymmTensor<Cmpt>& st) inline SymmTensor<Cmpt> dev(const SymmTensor<Cmpt>& st)
{ {
return st - SphericalTensor<Cmpt>::oneThirdI*tr(st); return st - SphericalTensor<Cmpt>::oneThirdI*tr(st);
@ -300,7 +301,7 @@ inline SymmTensor<Cmpt> dev(const SymmTensor<Cmpt>& st)
//- Return the deviatoric part of a symmetric tensor //- Return the deviatoric part of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> dev2(const SymmTensor<Cmpt>& st) inline SymmTensor<Cmpt> dev2(const SymmTensor<Cmpt>& st)
{ {
return st - SphericalTensor<Cmpt>::twoThirdsI*tr(st); return st - SphericalTensor<Cmpt>::twoThirdsI*tr(st);
@ -308,7 +309,7 @@ inline SymmTensor<Cmpt> dev2(const SymmTensor<Cmpt>& st)
//- Return the determinant of a symmetric tensor //- Return the determinant of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt det(const SymmTensor<Cmpt>& st) inline Cmpt det(const SymmTensor<Cmpt>& st)
{ {
return return
@ -321,7 +322,7 @@ inline Cmpt det(const SymmTensor<Cmpt>& st)
//- Return the cofactor symmetric tensor of a symmetric tensor //- Return the cofactor symmetric tensor of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> cof(const SymmTensor<Cmpt>& st) inline SymmTensor<Cmpt> cof(const SymmTensor<Cmpt>& st)
{ {
return SymmTensor<Cmpt> return SymmTensor<Cmpt>
@ -339,7 +340,7 @@ inline SymmTensor<Cmpt> cof(const SymmTensor<Cmpt>& st)
//- Return the inverse of a symmetric tensor give the determinant //- Return the inverse of a symmetric tensor give the determinant
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st, const Cmpt detst) inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st, const Cmpt detst)
{ {
return SymmTensor<Cmpt> return SymmTensor<Cmpt>
@ -357,7 +358,7 @@ inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st, const Cmpt detst)
//- Return the inverse of a symmetric tensor //- Return the inverse of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st) inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st)
{ {
return inv(st, det(st)); return inv(st, det(st));
@ -365,7 +366,7 @@ inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st)
//- Return the 1st invariant of a symmetric tensor //- Return the 1st invariant of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantI(const SymmTensor<Cmpt>& st) inline Cmpt invariantI(const SymmTensor<Cmpt>& st)
{ {
return tr(st); return tr(st);
@ -373,7 +374,7 @@ inline Cmpt invariantI(const SymmTensor<Cmpt>& st)
//- Return the 2nd invariant of a symmetric tensor //- Return the 2nd invariant of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantII(const SymmTensor<Cmpt>& st) inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
{ {
return return
@ -390,14 +391,14 @@ inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
//- Return the 3rd invariant of a symmetric tensor //- Return the 3rd invariant of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantIII(const SymmTensor<Cmpt>& st) inline Cmpt invariantIII(const SymmTensor<Cmpt>& st)
{ {
return det(st); return det(st);
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inline SymmTensor<Cmpt>
operator+(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2) operator+(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
{ {
@ -410,7 +411,7 @@ operator+(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inline SymmTensor<Cmpt>
operator+(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2) operator+(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
{ {
@ -423,7 +424,7 @@ operator+(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inline SymmTensor<Cmpt>
operator-(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2) operator-(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
{ {
@ -436,7 +437,7 @@ operator-(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inline SymmTensor<Cmpt>
operator-(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2) operator-(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
{ {
@ -450,7 +451,7 @@ operator-(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
//- Inner-product between a spherical symmetric tensor and a symmetric tensor //- Inner-product between a spherical symmetric tensor and a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inline SymmTensor<Cmpt>
operator&(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2) operator&(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
{ {
@ -464,7 +465,7 @@ operator&(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
//- Inner-product between a tensor and a spherical tensor //- Inner-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> inline SymmTensor<Cmpt>
operator&(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2) operator&(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
{ {
@ -478,7 +479,7 @@ operator&(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
//- Double-dot-product between a spherical tensor and a symmetric tensor //- Double-dot-product between a spherical tensor and a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2) operator&&(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
{ {
@ -487,7 +488,7 @@ operator&&(const SphericalTensor<Cmpt>& spt1, const SymmTensor<Cmpt>& st2)
//- Double-dot-product between a tensor and a spherical tensor //- Double-dot-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2) operator&&(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
{ {
@ -495,7 +496,7 @@ operator&&(const SymmTensor<Cmpt>& st1, const SphericalTensor<Cmpt>& spt2)
} }
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> sqr(const Vector<Cmpt>& v) inline SymmTensor<Cmpt> sqr(const Vector<Cmpt>& v)
{ {
return SymmTensor<Cmpt> return SymmTensor<Cmpt>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -53,7 +53,7 @@ class SymmTensor;
Class Tensor Declaration Class Tensor Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt> template<class Cmpt>
class Tensor class Tensor
: :
public VectorSpace<Tensor<Cmpt>, Cmpt, 9> public VectorSpace<Tensor<Cmpt>, Cmpt, 9>
@ -94,8 +94,9 @@ public:
//- Construct null //- Construct null
inline Tensor(); inline Tensor();
//- Construct given VectorSpace //- Construct given VectorSpace of the same rank
inline Tensor(const VectorSpace<Tensor<Cmpt>, Cmpt, 9>&); template<class Cmpt2>
inline Tensor(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>&);
//- Construct given SphericalTensor //- Construct given SphericalTensor
inline Tensor(const SphericalTensor<Cmpt>&); inline Tensor(const SphericalTensor<Cmpt>&);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -32,22 +32,20 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct null template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor() inline Tensor<Cmpt>::Tensor()
{} {}
//- Construct given VectorSpace template<class Cmpt>
template <class Cmpt> template<class Cmpt2>
inline Tensor<Cmpt>::Tensor(const VectorSpace<Tensor<Cmpt>, Cmpt, 9>& vs) inline Tensor<Cmpt>::Tensor(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 9>& vs)
: :
VectorSpace<Tensor<Cmpt>, Cmpt, 9>(vs) VectorSpace<Tensor<Cmpt>, Cmpt, 9>(vs)
{} {}
//- Construct given SphericalTensor template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor(const SphericalTensor<Cmpt>& st) inline Tensor<Cmpt>::Tensor(const SphericalTensor<Cmpt>& st)
{ {
this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0; this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
@ -56,8 +54,7 @@ inline Tensor<Cmpt>::Tensor(const SphericalTensor<Cmpt>& st)
} }
//- Construct given SymmTensor template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st) inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
{ {
this->v_[XX] = st.xx(); this->v_[XY] = st.xy(); this->v_[XZ] = st.xz(); this->v_[XX] = st.xx(); this->v_[XY] = st.xy(); this->v_[XZ] = st.xz();
@ -66,8 +63,7 @@ inline Tensor<Cmpt>::Tensor(const SymmTensor<Cmpt>& st)
} }
//- Construct given triad template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor(const Vector<Vector<Cmpt> >& tr) inline Tensor<Cmpt>::Tensor(const Vector<Vector<Cmpt> >& tr)
{ {
this->v_[XX] = tr.x().x(); this->v_[XX] = tr.x().x();
@ -84,8 +80,7 @@ inline Tensor<Cmpt>::Tensor(const Vector<Vector<Cmpt> >& tr)
} }
//- Construct given the three vector components template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor inline Tensor<Cmpt>::Tensor
( (
const Vector<Cmpt>& x, const Vector<Cmpt>& x,
@ -99,8 +94,7 @@ inline Tensor<Cmpt>::Tensor
} }
//- Construct from components template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor inline Tensor<Cmpt>::Tensor
( (
const Cmpt txx, const Cmpt txy, const Cmpt txz, const Cmpt txx, const Cmpt txy, const Cmpt txz,
@ -114,8 +108,7 @@ inline Tensor<Cmpt>::Tensor
} }
//- Construct from Istream template<class Cmpt>
template <class Cmpt>
inline Tensor<Cmpt>::Tensor(Istream& is) inline Tensor<Cmpt>::Tensor(Istream& is)
: :
VectorSpace<Tensor<Cmpt>, Cmpt, 9>(is) VectorSpace<Tensor<Cmpt>, Cmpt, 9>(is)
@ -124,133 +117,133 @@ inline Tensor<Cmpt>::Tensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Vector<Cmpt> Tensor<Cmpt>::x() const inline const Vector<Cmpt> Tensor<Cmpt>::x() const
{ {
return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]); return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
} }
template <class Cmpt> template<class Cmpt>
inline const Vector<Cmpt> Tensor<Cmpt>::y() const inline const Vector<Cmpt> Tensor<Cmpt>::y() const
{ {
return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]); return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
} }
template <class Cmpt> template<class Cmpt>
inline const Vector<Cmpt> Tensor<Cmpt>::z() const inline const Vector<Cmpt> Tensor<Cmpt>::z() const
{ {
return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]); return Vector<Cmpt>(this->v_[ZX], this->v_[ZY], this->v_[ZZ]);
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xx() const inline const Cmpt& Tensor<Cmpt>::xx() const
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xy() const inline const Cmpt& Tensor<Cmpt>::xy() const
{ {
return this->v_[XY]; return this->v_[XY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xz() const inline const Cmpt& Tensor<Cmpt>::xz() const
{ {
return this->v_[XZ]; return this->v_[XZ];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yx() const inline const Cmpt& Tensor<Cmpt>::yx() const
{ {
return this->v_[YX]; return this->v_[YX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yy() const inline const Cmpt& Tensor<Cmpt>::yy() const
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yz() const inline const Cmpt& Tensor<Cmpt>::yz() const
{ {
return this->v_[YZ]; return this->v_[YZ];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zx() const inline const Cmpt& Tensor<Cmpt>::zx() const
{ {
return this->v_[ZX]; return this->v_[ZX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zy() const inline const Cmpt& Tensor<Cmpt>::zy() const
{ {
return this->v_[ZY]; return this->v_[ZY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zz() const inline const Cmpt& Tensor<Cmpt>::zz() const
{ {
return this->v_[ZZ]; return this->v_[ZZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xx() inline Cmpt& Tensor<Cmpt>::xx()
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xy() inline Cmpt& Tensor<Cmpt>::xy()
{ {
return this->v_[XY]; return this->v_[XY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xz() inline Cmpt& Tensor<Cmpt>::xz()
{ {
return this->v_[XZ]; return this->v_[XZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yx() inline Cmpt& Tensor<Cmpt>::yx()
{ {
return this->v_[YX]; return this->v_[YX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yy() inline Cmpt& Tensor<Cmpt>::yy()
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yz() inline Cmpt& Tensor<Cmpt>::yz()
{ {
return this->v_[YZ]; return this->v_[YZ];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zx() inline Cmpt& Tensor<Cmpt>::zx()
{ {
return this->v_[ZX]; return this->v_[ZX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zy() inline Cmpt& Tensor<Cmpt>::zy()
{ {
return this->v_[ZY]; return this->v_[ZY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zz() inline Cmpt& Tensor<Cmpt>::zz()
{ {
return this->v_[ZZ]; return this->v_[ZZ];
@ -258,7 +251,7 @@ inline Cmpt& Tensor<Cmpt>::zz()
//- Return tensor transpose //- Return tensor transpose
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> Tensor<Cmpt>::T() const inline Tensor<Cmpt> Tensor<Cmpt>::T() const
{ {
return Tensor<Cmpt> return Tensor<Cmpt>
@ -272,7 +265,7 @@ inline Tensor<Cmpt> Tensor<Cmpt>::T() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline void Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st) inline void Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
{ {
this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0; this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XZ] = 0;
@ -281,7 +274,7 @@ inline void Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
} }
template <class Cmpt> template<class Cmpt>
inline void Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st) inline void Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st)
{ {
this->v_[XX] = st.xx(); this->v_[XY] = st.xy(); this->v_[XZ] = st.xz(); this->v_[XX] = st.xx(); this->v_[XY] = st.xy(); this->v_[XZ] = st.xz();
@ -290,7 +283,7 @@ inline void Tensor<Cmpt>::operator=(const SymmTensor<Cmpt>& st)
} }
template <class Cmpt> template<class Cmpt>
inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr) inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
{ {
this->v_[XX] = tr.x().x(); this->v_[XX] = tr.x().x();
@ -310,7 +303,7 @@ inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Hodge Dual operator (tensor -> vector) //- Hodge Dual operator (tensor -> vector)
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t) inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
{ {
return Vector<Cmpt>(t.yz(), -t.xz(), t.xy()); return Vector<Cmpt>(t.yz(), -t.xz(), t.xy());
@ -318,7 +311,7 @@ inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
//- Hodge Dual operator (vector -> tensor) //- Hodge Dual operator (vector -> tensor)
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v) inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
{ {
return Tensor<Cmpt> return Tensor<Cmpt>
@ -331,7 +324,7 @@ inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
//- Inner-product between two tensors //- Inner-product between two tensors
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt> >::type inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt> >::type
operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2) operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
{ {
@ -353,7 +346,7 @@ operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
//- Inner-product between a tensor and a vector //- Inner-product between a tensor and a vector
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt> >::type inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt> >::type
operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v) operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
{ {
@ -367,7 +360,7 @@ operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
//- Inner-product between a vector and a tensor //- Inner-product between a vector and a tensor
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t) operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
{ {
@ -381,7 +374,7 @@ operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
//- Outer-product between two vectors //- Outer-product between two vectors
template <class Cmpt> template<class Cmpt>
inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt> >::type inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2) operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
{ {
@ -395,7 +388,7 @@ operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
//- Division of a vector by a tensor, i.e. dot-product with the tensor inverse //- Division of a vector by a tensor, i.e. dot-product with the tensor inverse
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t) operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
{ {
@ -406,7 +399,7 @@ operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
//- Return the trace of a tensor //- Return the trace of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt tr(const Tensor<Cmpt>& t) inline Cmpt tr(const Tensor<Cmpt>& t)
{ {
return t.xx() + t.yy() + t.zz(); return t.xx() + t.yy() + t.zz();
@ -414,7 +407,7 @@ inline Cmpt tr(const Tensor<Cmpt>& t)
//- Return the spherical part of a tensor //- Return the spherical part of a tensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const Tensor<Cmpt>& t) inline SphericalTensor<Cmpt> sph(const Tensor<Cmpt>& t)
{ {
return (1.0/3.0)*tr(t); return (1.0/3.0)*tr(t);
@ -422,7 +415,7 @@ inline SphericalTensor<Cmpt> sph(const Tensor<Cmpt>& t)
//- Return the symmetric part of a tensor //- Return the symmetric part of a tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t) inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t)
{ {
return SymmTensor<Cmpt> return SymmTensor<Cmpt>
@ -435,7 +428,7 @@ inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t)
//- Return twice the symmetric part of a tensor //- Return twice the symmetric part of a tensor
template <class Cmpt> template<class Cmpt>
inline SymmTensor<Cmpt> twoSymm(const Tensor<Cmpt>& t) inline SymmTensor<Cmpt> twoSymm(const Tensor<Cmpt>& t)
{ {
return SymmTensor<Cmpt> return SymmTensor<Cmpt>
@ -448,7 +441,7 @@ inline SymmTensor<Cmpt> twoSymm(const Tensor<Cmpt>& t)
//- Return the skew-symmetric part of a tensor //- Return the skew-symmetric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t) inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t)
{ {
return Tensor<Cmpt> return Tensor<Cmpt>
@ -461,7 +454,7 @@ inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t)
//- Return the skew-symmetric part of a symmetric tensor //- Return the skew-symmetric part of a symmetric tensor
template <class Cmpt> template<class Cmpt>
inline const Tensor<Cmpt>& skew(const SymmTensor<Cmpt>& st) inline const Tensor<Cmpt>& skew(const SymmTensor<Cmpt>& st)
{ {
return Tensor<Cmpt>::zero; return Tensor<Cmpt>::zero;
@ -469,7 +462,7 @@ inline const Tensor<Cmpt>& skew(const SymmTensor<Cmpt>& st)
//- Return the deviatoric part of a tensor //- Return the deviatoric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> dev(const Tensor<Cmpt>& t) inline Tensor<Cmpt> dev(const Tensor<Cmpt>& t)
{ {
return t - SphericalTensor<Cmpt>::oneThirdI*tr(t); return t - SphericalTensor<Cmpt>::oneThirdI*tr(t);
@ -477,7 +470,7 @@ inline Tensor<Cmpt> dev(const Tensor<Cmpt>& t)
//- Return the deviatoric part of a tensor //- Return the deviatoric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> dev2(const Tensor<Cmpt>& t) inline Tensor<Cmpt> dev2(const Tensor<Cmpt>& t)
{ {
return t - SphericalTensor<Cmpt>::twoThirdsI*tr(t); return t - SphericalTensor<Cmpt>::twoThirdsI*tr(t);
@ -485,7 +478,7 @@ inline Tensor<Cmpt> dev2(const Tensor<Cmpt>& t)
//- Return the determinant of a tensor //- Return the determinant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt det(const Tensor<Cmpt>& t) inline Cmpt det(const Tensor<Cmpt>& t)
{ {
return return
@ -498,7 +491,7 @@ inline Cmpt det(const Tensor<Cmpt>& t)
//- Return the cofactor tensor of a tensor //- Return the cofactor tensor of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> cof(const Tensor<Cmpt>& t) inline Tensor<Cmpt> cof(const Tensor<Cmpt>& t)
{ {
return Tensor<Cmpt> return Tensor<Cmpt>
@ -519,7 +512,7 @@ inline Tensor<Cmpt> cof(const Tensor<Cmpt>& t)
//- Return the inverse of a tensor given the determinant //- Return the inverse of a tensor given the determinant
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t, const Cmpt dett) inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t, const Cmpt dett)
{ {
return Tensor<Cmpt> return Tensor<Cmpt>
@ -540,7 +533,7 @@ inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t, const Cmpt dett)
//- Return the inverse of a tensor //- Return the inverse of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t) inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t)
{ {
return inv(t, det(t)); return inv(t, det(t));
@ -548,7 +541,7 @@ inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t)
//- Return the 1st invariant of a tensor //- Return the 1st invariant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantI(const Tensor<Cmpt>& t) inline Cmpt invariantI(const Tensor<Cmpt>& t)
{ {
return tr(t); return tr(t);
@ -556,7 +549,7 @@ inline Cmpt invariantI(const Tensor<Cmpt>& t)
//- Return the 2nd invariant of a tensor //- Return the 2nd invariant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantII(const Tensor<Cmpt>& t) inline Cmpt invariantII(const Tensor<Cmpt>& t)
{ {
return return
@ -573,7 +566,7 @@ inline Cmpt invariantII(const Tensor<Cmpt>& t)
//- Return the 3rd invariant of a tensor //- Return the 3rd invariant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantIII(const Tensor<Cmpt>& t) inline Cmpt invariantIII(const Tensor<Cmpt>& t)
{ {
return det(t); return det(t);
@ -582,7 +575,7 @@ inline Cmpt invariantIII(const Tensor<Cmpt>& t)
// * * * * * * * * * Mixed Tensor SphericalTensor Operators * * * * * * * * // // * * * * * * * * * Mixed Tensor SphericalTensor Operators * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator+(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator+(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -595,7 +588,7 @@ operator+(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator+(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2) operator+(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
{ {
@ -608,7 +601,7 @@ operator+(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator-(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator-(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -621,7 +614,7 @@ operator-(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator-(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2) operator-(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
{ {
@ -635,7 +628,7 @@ operator-(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
//- Inner-product between a spherical tensor and a tensor //- Inner-product between a spherical tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator&(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -649,7 +642,7 @@ operator&(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
//- Inner-product between a tensor and a spherical tensor //- Inner-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2) operator&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
{ {
@ -663,7 +656,7 @@ operator&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
//- Double-dot-product between a spherical tensor and a tensor //- Double-dot-product between a spherical tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator&&(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -672,7 +665,7 @@ operator&&(const SphericalTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
//- Double-dot-product between a tensor and a spherical tensor //- Double-dot-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2) operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
{ {
@ -714,7 +707,7 @@ public:
// * * * * * * * * * * Mixed Tensor SymmTensor Operators * * * * * * * * * * // // * * * * * * * * * * Mixed Tensor SymmTensor Operators * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator+(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator+(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -727,7 +720,7 @@ operator+(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator+(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2) operator+(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
{ {
@ -740,7 +733,7 @@ operator+(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator-(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator-(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -753,7 +746,7 @@ operator-(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator-(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2) operator-(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
{ {
@ -767,7 +760,7 @@ operator-(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
//- Inner-product between a spherical tensor and a tensor //- Inner-product between a spherical tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -789,7 +782,7 @@ operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
//- Inner-product between a tensor and a spherical tensor //- Inner-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Tensor<Cmpt> inline Tensor<Cmpt>
operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2) operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
{ {
@ -811,7 +804,7 @@ operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
//- Double-dot-product between a spherical tensor and a tensor //- Double-dot-product between a spherical tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2) operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
{ {
@ -825,7 +818,7 @@ operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
//- Double-dot-product between a tensor and a spherical tensor //- Double-dot-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2) operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,7 +50,7 @@ namespace Foam
Class Tensor2D Declaration Class Tensor2D Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt> template<class Cmpt>
class Tensor2D class Tensor2D
: :
public VectorSpace<Tensor2D<Cmpt>, Cmpt, 4> public VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,19 +30,19 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D() inline Tensor2D<Cmpt>::Tensor2D()
{} {}
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D(const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs) inline Tensor2D<Cmpt>::Tensor2D(const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs)
: :
VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(vs) VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(vs)
{} {}
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st) inline Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
{ {
this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XX] = st.ii(); this->v_[XY] = 0;
@ -50,7 +50,7 @@ inline Tensor2D<Cmpt>::Tensor2D(const SphericalTensor2D<Cmpt>& st)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D inline Tensor2D<Cmpt>::Tensor2D
( (
const Vector2D<Cmpt>& x, const Vector2D<Cmpt>& x,
@ -62,7 +62,7 @@ inline Tensor2D<Cmpt>::Tensor2D
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D inline Tensor2D<Cmpt>::Tensor2D
( (
const Cmpt txx, const Cmpt txy, const Cmpt txx, const Cmpt txy,
@ -74,7 +74,7 @@ inline Tensor2D<Cmpt>::Tensor2D
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D(Istream& is) inline Tensor2D<Cmpt>::Tensor2D(Istream& is)
: :
VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(is) VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(is)
@ -83,70 +83,70 @@ inline Tensor2D<Cmpt>::Tensor2D(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt> Tensor2D<Cmpt>::x() const inline Vector2D<Cmpt> Tensor2D<Cmpt>::x() const
{ {
return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]); return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
} }
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt> Tensor2D<Cmpt>::y() const inline Vector2D<Cmpt> Tensor2D<Cmpt>::y() const
{ {
return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]); return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::xx() const inline const Cmpt& Tensor2D<Cmpt>::xx() const
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::xy() const inline const Cmpt& Tensor2D<Cmpt>::xy() const
{ {
return this->v_[XY]; return this->v_[XY];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::yx() const inline const Cmpt& Tensor2D<Cmpt>::yx() const
{ {
return this->v_[YX]; return this->v_[YX];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::yy() const inline const Cmpt& Tensor2D<Cmpt>::yy() const
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::xx() inline Cmpt& Tensor2D<Cmpt>::xx()
{ {
return this->v_[XX]; return this->v_[XX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::xy() inline Cmpt& Tensor2D<Cmpt>::xy()
{ {
return this->v_[XY]; return this->v_[XY];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::yx() inline Cmpt& Tensor2D<Cmpt>::yx()
{ {
return this->v_[YX]; return this->v_[YX];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::yy() inline Cmpt& Tensor2D<Cmpt>::yy()
{ {
return this->v_[YY]; return this->v_[YY];
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const
{ {
return Tensor2D<Cmpt> return Tensor2D<Cmpt>
@ -159,7 +159,7 @@ inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline void Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st) inline void Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
{ {
this->v_[XX] = st.ii(); this->v_[XY] = 0; this->v_[XX] = st.ii(); this->v_[XY] = 0;
@ -171,7 +171,7 @@ inline void Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Inner-product between two tensors //- Inner-product between two tensors
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt> >::type inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt> >::type
operator&(const Tensor2D<Cmpt>& t1, const Tensor2D<Cmpt>& t2) operator&(const Tensor2D<Cmpt>& t1, const Tensor2D<Cmpt>& t2)
{ {
@ -186,7 +186,7 @@ operator&(const Tensor2D<Cmpt>& t1, const Tensor2D<Cmpt>& t2)
} }
//- Inner-product between a tensor and a vector //- Inner-product between a tensor and a vector
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt> >::type inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt> >::type
operator&(const Tensor2D<Cmpt>& t, const Vector2D<Cmpt>& v) operator&(const Tensor2D<Cmpt>& t, const Vector2D<Cmpt>& v)
{ {
@ -198,7 +198,7 @@ operator&(const Tensor2D<Cmpt>& t, const Vector2D<Cmpt>& v)
} }
//- Inner-product between a vector and a tensor //- Inner-product between a vector and a tensor
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt> >::type inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt> >::type
operator&(const Vector2D<Cmpt>& v, const Tensor2D<Cmpt>& t) operator&(const Vector2D<Cmpt>& v, const Tensor2D<Cmpt>& t)
{ {
@ -210,7 +210,7 @@ operator&(const Vector2D<Cmpt>& v, const Tensor2D<Cmpt>& t)
} }
//- Outer-product between two vectors //- Outer-product between two vectors
template <class Cmpt> template<class Cmpt>
inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type
operator*(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2) operator*(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2)
{ {
@ -223,7 +223,7 @@ operator*(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2)
//- Return the trace of a tensor //- Return the trace of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt tr(const Tensor2D<Cmpt>& t) inline Cmpt tr(const Tensor2D<Cmpt>& t)
{ {
return t.xx() + t.yy(); return t.xx() + t.yy();
@ -231,7 +231,7 @@ inline Cmpt tr(const Tensor2D<Cmpt>& t)
//- Return the spherical part of a tensor //- Return the spherical part of a tensor
template <class Cmpt> template<class Cmpt>
inline SphericalTensor2D<Cmpt> sph(const Tensor2D<Cmpt>& t) inline SphericalTensor2D<Cmpt> sph(const Tensor2D<Cmpt>& t)
{ {
return 0.5*tr(t); return 0.5*tr(t);
@ -239,7 +239,7 @@ inline SphericalTensor2D<Cmpt> sph(const Tensor2D<Cmpt>& t)
//- Return the symmetric part of a tensor //- Return the symmetric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> symm(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> symm(const Tensor2D<Cmpt>& t)
{ {
return Tensor2D<Cmpt> return Tensor2D<Cmpt>
@ -250,7 +250,7 @@ inline Tensor2D<Cmpt> symm(const Tensor2D<Cmpt>& t)
} }
//- Return the twice the symmetric part of a tensor //- Return the twice the symmetric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> twoSymm(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> twoSymm(const Tensor2D<Cmpt>& t)
{ {
return Tensor2D<Cmpt> return Tensor2D<Cmpt>
@ -261,7 +261,7 @@ inline Tensor2D<Cmpt> twoSymm(const Tensor2D<Cmpt>& t)
} }
//- Return the skew-symmetric part of a tensor //- Return the skew-symmetric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> skew(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> skew(const Tensor2D<Cmpt>& t)
{ {
return Tensor2D<Cmpt> return Tensor2D<Cmpt>
@ -273,7 +273,7 @@ inline Tensor2D<Cmpt> skew(const Tensor2D<Cmpt>& t)
//- Return the deviatoric part of a tensor //- Return the deviatoric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> dev(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> dev(const Tensor2D<Cmpt>& t)
{ {
return t - SphericalTensor2D<Cmpt>::oneThirdI*tr(t); return t - SphericalTensor2D<Cmpt>::oneThirdI*tr(t);
@ -281,7 +281,7 @@ inline Tensor2D<Cmpt> dev(const Tensor2D<Cmpt>& t)
//- Return the deviatoric part of a tensor //- Return the deviatoric part of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> dev2(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> dev2(const Tensor2D<Cmpt>& t)
{ {
return t - SphericalTensor2D<Cmpt>::twoThirdsI*tr(t); return t - SphericalTensor2D<Cmpt>::twoThirdsI*tr(t);
@ -289,7 +289,7 @@ inline Tensor2D<Cmpt> dev2(const Tensor2D<Cmpt>& t)
//- Return the determinant of a tensor //- Return the determinant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt det(const Tensor2D<Cmpt>& t) inline Cmpt det(const Tensor2D<Cmpt>& t)
{ {
return(t.xx()*t.yy() - t.xy()*t.yx()); return(t.xx()*t.yy() - t.xy()*t.yx());
@ -297,7 +297,7 @@ inline Cmpt det(const Tensor2D<Cmpt>& t)
//- Return the cofactor tensor of a tensor //- Return the cofactor tensor of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> cof(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> cof(const Tensor2D<Cmpt>& t)
{ {
return Tensor2D<Cmpt> return Tensor2D<Cmpt>
@ -309,7 +309,7 @@ inline Tensor2D<Cmpt> cof(const Tensor2D<Cmpt>& t)
//- Return the inverse of a tensor given the determinant //- Return the inverse of a tensor given the determinant
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t, const Cmpt dett) inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t, const Cmpt dett)
{ {
return cof(t)/dett; return cof(t)/dett;
@ -317,7 +317,7 @@ inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t, const Cmpt dett)
//- Return the inverse of a tensor //- Return the inverse of a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t) inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t)
{ {
return inv(t, det(t)); return inv(t, det(t));
@ -325,7 +325,7 @@ inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t)
//- Return the 1st invariant of a tensor //- Return the 1st invariant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantI(const Tensor2D<Cmpt>& t) inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
{ {
return tr(t); return tr(t);
@ -333,7 +333,7 @@ inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
//- Return the 2nd invariant of a tensor //- Return the 2nd invariant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantII(const Tensor2D<Cmpt>& t) inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
{ {
return return
@ -349,7 +349,7 @@ inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
//- Return the 3rd invariant of a tensor //- Return the 3rd invariant of a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt invariantIII(const Tensor2D<Cmpt>& t) inline Cmpt invariantIII(const Tensor2D<Cmpt>& t)
{ {
return det(t); return det(t);
@ -358,7 +358,7 @@ inline Cmpt invariantIII(const Tensor2D<Cmpt>& t)
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inline Tensor2D<Cmpt>
operator+(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2) operator+(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
{ {
@ -370,7 +370,7 @@ operator+(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inline Tensor2D<Cmpt>
operator+(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2) operator+(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
{ {
@ -382,7 +382,7 @@ operator+(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inline Tensor2D<Cmpt>
operator-(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2) operator-(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
{ {
@ -394,7 +394,7 @@ operator-(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
} }
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inline Tensor2D<Cmpt>
operator-(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2) operator-(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
{ {
@ -407,7 +407,7 @@ operator-(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
//- Inner-product between a spherical tensor and a tensor //- Inner-product between a spherical tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inline Tensor2D<Cmpt>
operator&(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2) operator&(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
{ {
@ -422,7 +422,7 @@ operator&(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
//- Inner-product between a tensor and a spherical tensor //- Inner-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Tensor2D<Cmpt> inline Tensor2D<Cmpt>
operator&(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2) operator&(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
{ {
@ -438,7 +438,7 @@ operator&(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
//- Double-dot-product between a spherical tensor and a tensor //- Double-dot-product between a spherical tensor and a tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2) operator&&(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
{ {
@ -447,7 +447,7 @@ operator&&(const SphericalTensor2D<Cmpt>& st1, const Tensor2D<Cmpt>& t2)
//- Double-dot-product between a tensor and a spherical tensor //- Double-dot-product between a tensor and a spherical tensor
template <class Cmpt> template<class Cmpt>
inline Cmpt inline Cmpt
operator&&(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2) operator&&(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -54,7 +54,7 @@ template<class T> class List;
Class Vector Declaration Class Vector Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt> template<class Cmpt>
class Vector class Vector
: :
public VectorSpace<Vector<Cmpt>, Cmpt, 3> public VectorSpace<Vector<Cmpt>, Cmpt, 3>
@ -93,8 +93,9 @@ public:
//- Construct null //- Construct null
inline Vector(); inline Vector();
//- Construct given VectorSpace //- Construct given VectorSpace of the same rank
inline Vector(const VectorSpace<Vector<Cmpt>, Cmpt, 3>&); template<class Cmpt2>
inline Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>&);
//- Construct given three components //- Construct given three components
inline Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz); inline Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz);

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -30,22 +30,20 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null template<class Cmpt>
template <class Cmpt>
inline Vector<Cmpt>::Vector() inline Vector<Cmpt>::Vector()
{} {}
// Construct given VectorSpace template<class Cmpt>
template <class Cmpt> template<class Cmpt2>
inline Vector<Cmpt>::Vector(const VectorSpace<Vector<Cmpt>, Cmpt, 3>& vs) inline Vector<Cmpt>::Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>& vs)
: :
VectorSpace<Vector<Cmpt>, Cmpt, 3>(vs) VectorSpace<Vector<Cmpt>, Cmpt, 3>(vs)
{} {}
// Construct given three Cmpts template<class Cmpt>
template <class Cmpt>
inline Vector<Cmpt>::Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz) inline Vector<Cmpt>::Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz)
{ {
this->v_[X] = vx; this->v_[X] = vx;
@ -54,8 +52,7 @@ inline Vector<Cmpt>::Vector(const Cmpt& vx, const Cmpt& vy, const Cmpt& vz)
} }
// Construct from Istream template<class Cmpt>
template <class Cmpt>
inline Vector<Cmpt>::Vector(Istream& is) inline Vector<Cmpt>::Vector(Istream& is)
: :
VectorSpace<Vector<Cmpt>, Cmpt, 3>(is) VectorSpace<Vector<Cmpt>, Cmpt, 3>(is)
@ -64,38 +61,38 @@ inline Vector<Cmpt>::Vector(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Vector<Cmpt>::x() const inline const Cmpt& Vector<Cmpt>::x() const
{ {
return this->v_[X]; return this->v_[X];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Vector<Cmpt>::y() const inline const Cmpt& Vector<Cmpt>::y() const
{ {
return this->v_[Y]; return this->v_[Y];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Vector<Cmpt>::z() const inline const Cmpt& Vector<Cmpt>::z() const
{ {
return this->v_[Z]; return this->v_[Z];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Vector<Cmpt>::x() inline Cmpt& Vector<Cmpt>::x()
{ {
return this->v_[X]; return this->v_[X];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Vector<Cmpt>::y() inline Cmpt& Vector<Cmpt>::y()
{ {
return this->v_[Y]; return this->v_[Y];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Vector<Cmpt>::z() inline Cmpt& Vector<Cmpt>::z()
{ {
return this->v_[Z]; return this->v_[Z];
@ -104,7 +101,7 @@ inline Cmpt& Vector<Cmpt>::z()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Vector<Cmpt>& Vector<Cmpt>::centre inline const Vector<Cmpt>& Vector<Cmpt>::centre
( (
const Foam::List<Vector<Cmpt> >& const Foam::List<Vector<Cmpt> >&
@ -116,7 +113,7 @@ inline const Vector<Cmpt>& Vector<Cmpt>::centre
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Vector<Cmpt> >::type inline typename innerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
operator&(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2) operator&(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
{ {
@ -124,7 +121,7 @@ operator&(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
} }
template <class Cmpt> template<class Cmpt>
inline Vector<Cmpt> operator^(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2) inline Vector<Cmpt> operator^(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
{ {
return Vector<Cmpt> return Vector<Cmpt>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -48,7 +48,7 @@ namespace Foam
Class Vector2D Declaration Class Vector2D Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
template <class Cmpt> template<class Cmpt>
class Vector2D class Vector2D
: :
public VectorSpace<Vector2D<Cmpt>, Cmpt, 2> public VectorSpace<Vector2D<Cmpt>, Cmpt, 2>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -31,13 +31,13 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null // Construct null
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt>::Vector2D() inline Vector2D<Cmpt>::Vector2D()
{} {}
// Construct given VectorSpace // Construct given VectorSpace
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt>::Vector2D(const VectorSpace<Vector2D<Cmpt>, Cmpt, 2>& vs) inline Vector2D<Cmpt>::Vector2D(const VectorSpace<Vector2D<Cmpt>, Cmpt, 2>& vs)
: :
VectorSpace<Vector2D<Cmpt>, Cmpt, 2>(vs) VectorSpace<Vector2D<Cmpt>, Cmpt, 2>(vs)
@ -45,7 +45,7 @@ inline Vector2D<Cmpt>::Vector2D(const VectorSpace<Vector2D<Cmpt>, Cmpt, 2>& vs)
// Construct given three Cmpts // Construct given three Cmpts
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt>::Vector2D(const Cmpt& vx, const Cmpt& vy) inline Vector2D<Cmpt>::Vector2D(const Cmpt& vx, const Cmpt& vy)
{ {
this->v_[X] = vx; this->v_[X] = vx;
@ -54,7 +54,7 @@ inline Vector2D<Cmpt>::Vector2D(const Cmpt& vx, const Cmpt& vy)
// Construct from Istream // Construct from Istream
template <class Cmpt> template<class Cmpt>
inline Vector2D<Cmpt>::Vector2D(Istream& is) inline Vector2D<Cmpt>::Vector2D(Istream& is)
: :
VectorSpace<Vector2D<Cmpt>, Cmpt, 2>(is) VectorSpace<Vector2D<Cmpt>, Cmpt, 2>(is)
@ -63,26 +63,26 @@ inline Vector2D<Cmpt>::Vector2D(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Vector2D<Cmpt>::x() const inline const Cmpt& Vector2D<Cmpt>::x() const
{ {
return this->v_[X]; return this->v_[X];
} }
template <class Cmpt> template<class Cmpt>
inline const Cmpt& Vector2D<Cmpt>::y() const inline const Cmpt& Vector2D<Cmpt>::y() const
{ {
return this->v_[Y]; return this->v_[Y];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Vector2D<Cmpt>::x() inline Cmpt& Vector2D<Cmpt>::x()
{ {
return this->v_[X]; return this->v_[X];
} }
template <class Cmpt> template<class Cmpt>
inline Cmpt& Vector2D<Cmpt>::y() inline Cmpt& Vector2D<Cmpt>::y()
{ {
return this->v_[Y]; return this->v_[Y];
@ -91,7 +91,7 @@ inline Cmpt& Vector2D<Cmpt>::y()
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Cmpt> template<class Cmpt>
inline typename innerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type inline typename innerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type
operator&(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2) operator&(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2)
{ {
@ -99,7 +99,7 @@ operator&(const Vector2D<Cmpt>& v1, const Vector2D<Cmpt>& v2)
} }
template <class Cmpt> template<class Cmpt>
inline scalar Vector2D<Cmpt>::perp(const Vector2D<Cmpt>& b) const inline scalar Vector2D<Cmpt>::perp(const Vector2D<Cmpt>& b) const
{ {
return x()*b.y()-y()*b.x(); return x()*b.y()-y()*b.x();

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -107,6 +107,10 @@ public:
//- Construct as copy //- Construct as copy
inline VectorSpace(const VectorSpace<Form, Cmpt, nCmpt>&); inline VectorSpace(const VectorSpace<Form, Cmpt, nCmpt>&);
//- Construct as copy of another VectorSpace type of the same rank
template<class Form2, class Cmpt2>
inline VectorSpace(const VectorSpace<Form2, Cmpt2, nCmpt>&);
// Member Functions // Member Functions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -50,6 +50,17 @@ inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
} }
template<class Form, class Cmpt, int nCmpt>
template<class Form2, class Cmpt2>
inline VectorSpace<Form, Cmpt, nCmpt>::VectorSpace
(
const VectorSpace<Form2, Cmpt2, nCmpt>& vs
)
{
VectorSpaceOps<nCmpt,0>::eqOp(*this, vs, eqOp<Cmpt>());
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Form, class Cmpt, int nCmpt> template<class Form, class Cmpt, int nCmpt>

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -103,14 +103,14 @@ class fvMeshDistribute
label findNonEmptyPatch() const; label findNonEmptyPatch() const;
//- Save boundary fields //- Save boundary fields
template <class T, class Mesh> template<class T, class Mesh>
void saveBoundaryFields void saveBoundaryFields
( (
PtrList<FieldField<fvsPatchField, T> >& bflds PtrList<FieldField<fvsPatchField, T> >& bflds
) const; ) const;
//- Map boundary fields //- Map boundary fields
template <class T, class Mesh> template<class T, class Mesh>
void mapBoundaryFields void mapBoundaryFields
( (
const mapPolyMesh& map, const mapPolyMesh& map,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -56,7 +56,7 @@ void Foam::fvMeshDistribute::printFieldInfo(const fvMesh& mesh)
// Save whole boundary field // Save whole boundary field
template <class T, class Mesh> template<class T, class Mesh>
void Foam::fvMeshDistribute::saveBoundaryFields void Foam::fvMeshDistribute::saveBoundaryFields
( (
PtrList<FieldField<fvsPatchField, T> >& bflds PtrList<FieldField<fvsPatchField, T> >& bflds
@ -85,7 +85,7 @@ void Foam::fvMeshDistribute::saveBoundaryFields
// Map boundary field // Map boundary field
template <class T, class Mesh> template<class T, class Mesh>
void Foam::fvMeshDistribute::mapBoundaryFields void Foam::fvMeshDistribute::mapBoundaryFields
( (
const mapPolyMesh& map, const mapPolyMesh& map,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -49,7 +49,7 @@ const Foam::scalar Foam::topoCellLooper::featureCos = Foam::cos(degToRad(10.0));
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
// In-memory truncate a list // In-memory truncate a list
template <class T> template<class T>
void Foam::topoCellLooper::subsetList void Foam::topoCellLooper::subsetList
( (
const label startI, const label startI,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -72,7 +72,7 @@ class topoCellLooper
// Private Member Functions // Private Member Functions
//- In-memory truncate a list //- In-memory truncate a list
template <class T> template<class T>
static void subsetList static void subsetList
( (
const label startI, const label startI,

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -179,7 +179,7 @@ class motionSmoother
// Private Member Functions // Private Member Functions
//- Average of connected points. //- Average of connected points.
template <class Type> template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> > avg tmp<GeometricField<Type, pointPatchField, pointMesh> > avg
( (
const GeometricField<Type, pointPatchField, pointMesh>& fld, const GeometricField<Type, pointPatchField, pointMesh>& fld,
@ -187,7 +187,7 @@ class motionSmoother
) const; ) const;
//- Average postion of connected points. //- Average postion of connected points.
template <class Type> template<class Type>
tmp<GeometricField<Type, pointPatchField, pointMesh> > avgPositions tmp<GeometricField<Type, pointPatchField, pointMesh> > avgPositions
( (
const GeometricField<Type, pointPatchField, pointMesh>& fld, const GeometricField<Type, pointPatchField, pointMesh>& fld,
@ -510,7 +510,7 @@ public:
//- Fully explicit smoothing of fields (not positions) //- Fully explicit smoothing of fields (not positions)
// of internal points with varying diffusivity. // of internal points with varying diffusivity.
template <class Type> template<class Type>
void smooth void smooth
( (
const GeometricField<Type, pointPatchField, pointMesh>& fld, const GeometricField<Type, pointPatchField, pointMesh>& fld,

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -153,7 +153,7 @@ void Foam::motionSmoother::applyCornerConstraints
// Average of connected points. // Average of connected points.
template <class Type> template<class Type>
Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> > Foam::tmp<Foam::GeometricField<Type, Foam::pointPatchField, Foam::pointMesh> >
Foam::motionSmoother::avg Foam::motionSmoother::avg
( (
@ -252,7 +252,7 @@ Foam::motionSmoother::avg
// smooth field (point-jacobi) // smooth field (point-jacobi)
template <class Type> template<class Type>
void Foam::motionSmoother::smooth void Foam::motionSmoother::smooth
( (
const GeometricField<Type, pointPatchField, pointMesh>& fld, const GeometricField<Type, pointPatchField, pointMesh>& fld,

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -27,7 +27,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T> template<class T>
void Foam::polyTopoChange::reorder void Foam::polyTopoChange::reorder
( (
const labelList& oldToNew, const labelList& oldToNew,
@ -49,7 +49,7 @@ void Foam::polyTopoChange::reorder
} }
template <class T> template<class T>
void Foam::polyTopoChange::reorder void Foam::polyTopoChange::reorder
( (
const labelList& oldToNew, const labelList& oldToNew,
@ -71,7 +71,7 @@ void Foam::polyTopoChange::reorder
} }
template <class T> template<class T>
void Foam::polyTopoChange::renumberKey void Foam::polyTopoChange::renumberKey
( (
const labelList& oldToNew, const labelList& oldToNew,

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -44,7 +44,7 @@ defineTypeNameAndDebug(removePoints, 0);
//- Combine-reduce operator to combine data on faces. Takes care //- Combine-reduce operator to combine data on faces. Takes care
// of reverse orientation on coupled face. // of reverse orientation on coupled face.
template <class T, template<class> class CombineOp> template<class T, template<class> class CombineOp>
class faceEqOp class faceEqOp
{ {
@ -73,7 +73,7 @@ public:
//// Dummy transform for List. Used in synchronisation. //// Dummy transform for List. Used in synchronisation.
//template <class T> //template<class T>
//class dummyTransformList //class dummyTransformList
//{ //{
//public: //public:

View File

@ -55,18 +55,20 @@ extendedStencil = fvMesh/extendedStencil
cellToCell = $(extendedStencil)/cellToCell cellToCell = $(extendedStencil)/cellToCell
$(cellToCell)/extendedCellToCellStencil.C $(cellToCell)/extendedCellToCellStencil.C
$(cellToCell)/extendedCentredCellToCellStencil.C $(cellToCell)/extendedCentredCellToCellStencil.C
$(cellToCell)/fullStencils/cellToCellStencil.C $(cellToCell)/globalIndexStencils/cellToCellStencil.C
$(cellToCell)/fullStencils/CFCCellToCellStencil.C $(cellToCell)/globalIndexStencils/CFCCellToCellStencil.C
$(cellToCell)/fullStencils/CPCCellToCellStencil.C $(cellToCell)/globalIndexStencils/CPCCellToCellStencil.C
$(cellToCell)/fullStencils/CECCellToCellStencil.C $(cellToCell)/globalIndexStencils/CECCellToCellStencil.C
$(cellToCell)/MeshObjects/centredCECCellToCellStencilObject.C $(cellToCell)/MeshObjects/centredCECCellToCellStencilObject.C
$(cellToCell)/MeshObjects/centredCFCCellToCellStencilObject.C
$(cellToCell)/MeshObjects/centredCPCCellToCellStencilObject.C
cellToFace = $(extendedStencil)/cellToFace cellToFace = $(extendedStencil)/cellToFace
$(cellToFace)/fullStencils/cellToFaceStencil.C $(cellToFace)/globalIndexStencils/cellToFaceStencil.C
$(cellToFace)/fullStencils/CFCCellToFaceStencil.C $(cellToFace)/globalIndexStencils/CFCCellToFaceStencil.C
$(cellToFace)/fullStencils/CECCellToFaceStencil.C $(cellToFace)/globalIndexStencils/CECCellToFaceStencil.C
$(cellToFace)/fullStencils/CPCCellToFaceStencil.C $(cellToFace)/globalIndexStencils/CPCCellToFaceStencil.C
$(cellToFace)/fullStencils/FECCellToFaceStencil.C $(cellToFace)/globalIndexStencils/FECCellToFaceStencil.C
$(cellToFace)/extendedCellToFaceStencil.C $(cellToFace)/extendedCellToFaceStencil.C
$(cellToFace)/extendedCentredCellToFaceStencil.C $(cellToFace)/extendedCentredCellToFaceStencil.C
$(cellToFace)/extendedUpwindCellToFaceStencil.C $(cellToFace)/extendedUpwindCellToFaceStencil.C
@ -81,8 +83,8 @@ $(cellToFace)/MeshObjects/upwindFECCellToFaceStencilObject.C
$(cellToFace)/MeshObjects/pureUpwindCFCCellToFaceStencilObject.C $(cellToFace)/MeshObjects/pureUpwindCFCCellToFaceStencilObject.C
faceToCell = $(extendedStencil)/faceToCell faceToCell = $(extendedStencil)/faceToCell
$(faceToCell)/fullStencils/faceToCellStencil.C $(faceToCell)/globalIndexStencils/faceToCellStencil.C
$(faceToCell)/fullStencils/CFCFaceToCellStencil.C $(faceToCell)/globalIndexStencils/CFCFaceToCellStencil.C
$(faceToCell)/extendedFaceToCellStencil.C $(faceToCell)/extendedFaceToCellStencil.C
$(faceToCell)/extendedCentredFaceToCellStencil.C $(faceToCell)/extendedCentredFaceToCellStencil.C
$(faceToCell)/MeshObjects/centredCFCFaceToCellStencilObject.C $(faceToCell)/MeshObjects/centredCFCFaceToCellStencilObject.C

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -104,7 +104,11 @@ oscillatingFixedValueFvPatchField<Type>::oscillatingFixedValueFvPatchField
} }
else else
{ {
fixedValueFvPatchField<Type>::operator==(refValue_*currentScale()); fixedValueFvPatchField<Type>::operator==
(
refValue_*currentScale()
+ offset_
);
} }
} }
@ -179,9 +183,11 @@ void oscillatingFixedValueFvPatchField<Type>::updateCoeffs()
if (curTimeIndex_ != this->db().time().timeIndex()) if (curTimeIndex_ != this->db().time().timeIndex())
{ {
Field<Type>& patchField = *this; fixedValueFvPatchField<Type>::operator==
(
patchField = refValue_*currentScale() + offset_; refValue_*currentScale()
+ offset_
);
curTimeIndex_ = this->db().time().timeIndex(); curTimeIndex_ = this->db().time().timeIndex();
} }

View File

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

View File

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

View File

@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "centredCFCCellToCellStencilObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(centredCFCCellToCellStencilObject, 0);
}
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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::centredCFCCellToCellStencilObject
Description
SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef centredCFCCellToCellStencilObject_H
#define centredCFCCellToCellStencilObject_H
#include "extendedCentredCellToCellStencil.H"
#include "CFCCellToCellStencil.H"
#include "MeshObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class centredCFCCellToCellStencilObject Declaration
\*---------------------------------------------------------------------------*/
class centredCFCCellToCellStencilObject
:
public MeshObject<fvMesh, centredCFCCellToCellStencilObject>,
public extendedCentredCellToCellStencil
{
public:
TypeName("centredCFCCellToCellStencil");
// Constructors
//- Construct from uncompacted cell stencil
explicit centredCFCCellToCellStencilObject
(
const fvMesh& mesh
)
:
MeshObject<fvMesh, centredCFCCellToCellStencilObject>(mesh),
extendedCentredCellToCellStencil(CFCCellToCellStencil(mesh))
{}
//- Destructor
virtual ~centredCFCCellToCellStencilObject()
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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 "centredCPCCellToCellStencilObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(centredCPCCellToCellStencilObject, 0);
}
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / 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::centredCPCCellToCellStencilObject
Description
SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef centredCPCCellToCellStencilObject_H
#define centredCPCCellToCellStencilObject_H
#include "extendedCentredCellToCellStencil.H"
#include "CPCCellToCellStencil.H"
#include "MeshObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class centredCPCCellToCellStencilObject Declaration
\*---------------------------------------------------------------------------*/
class centredCPCCellToCellStencilObject
:
public MeshObject<fvMesh, centredCPCCellToCellStencilObject>,
public extendedCentredCellToCellStencil
{
public:
TypeName("centredCPCCellToCellStencil");
// Constructors
//- Construct from uncompacted cell stencil
explicit centredCPCCellToCellStencilObject
(
const fvMesh& mesh
)
:
MeshObject<fvMesh, centredCPCCellToCellStencilObject>(mesh),
extendedCentredCellToCellStencil(CPCCellToCellStencil(mesh))
{}
//- Destructor
virtual ~centredCPCCellToCellStencilObject()
{}
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -68,24 +68,23 @@ public:
// Member Functions // Member Functions
// //- Use map to get the data into stencil order
// template<class T>
// static void collectData
// (
// const mapDistribute& map,
// const labelListList& stencil,
// const GeometricField<T, fvsPatchField, surfaceMesh>& fld,
// List<List<T> >& stencilFld
// );
//
//- Sum surface field contributions to create cell values //- Sum surface field contributions to create cell values
template<class Type> template<class Type, class WeightType>
static tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum static
tmp
<
GeometricField
<
typename outerProduct<WeightType, Type>::type,
fvPatchField,
volMesh
>
> weightedSum
( (
const mapDistribute& map, const mapDistribute& map,
const labelListList& stencil, const labelListList& stencil,
const GeometricField<Type, fvPatchField, volMesh>& fld, const GeometricField<Type, fvPatchField, volMesh>& fld,
const List<List<scalar> >& stencilWeights const List<List<WeightType> >& stencilWeights
); );
}; };

View File

@ -24,28 +24,40 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "extendedCellToCellStencil.H" #include "extendedCellToCellStencil.H"
#include "extendedCellToFaceStencil.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type> template<class Type, class WeightType>
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> > Foam::tmp
Foam::extendedCellToCellStencil::weightedSum <
Foam::GeometricField
<
typename Foam::outerProduct<WeightType, Type>::type,
Foam::fvPatchField,
Foam::volMesh
>
> Foam::extendedCellToCellStencil::weightedSum
( (
const mapDistribute& map, const mapDistribute& map,
const labelListList& stencil, const labelListList& stencil,
const GeometricField<Type, fvPatchField, volMesh>& fld, const GeometricField<Type, fvPatchField, volMesh>& fld,
const List<List<scalar> >& stencilWeights const List<List<WeightType> >& stencilWeights
) )
{ {
typedef typename outerProduct<WeightType, Type>::type WeightedType;
typedef GeometricField<WeightedType, fvPatchField, volMesh>
WeightedFieldType;
const fvMesh& mesh = fld.mesh(); const fvMesh& mesh = fld.mesh();
// Collect internal and boundary values // Collect internal and boundary values
List<List<Type> > stencilFld; List<List<Type> > stencilFld;
collectData(map, stencil, fld, stencilFld); extendedCellToFaceStencil::collectData(map, stencil, fld, stencilFld);
tmp<GeometricField<Type, fvPatchField, volMesh> > tsfCorr tmp<WeightedFieldType> twf
( (
new GeometricField<Type, fvPatchField, volMesh> new WeightedFieldType
( (
IOobject IOobject
( (
@ -54,31 +66,31 @@ Foam::extendedCellToCellStencil::weightedSum
mesh mesh
), ),
mesh, mesh,
dimensioned<Type> dimensioned<WeightedType>
( (
fld.name(), fld.name(),
fld.dimensions(), fld.dimensions(),
pTraits<Type>::zero pTraits<WeightedType>::zero
) )
) )
); );
GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr(); WeightedFieldType& wf = twf();
// cells // cells
forAll(sf, cellI) forAll(wf, cellI)
{ {
const List<Type>& stField = stencilFld[cellI]; const List<Type>& stField = stencilFld[cellI];
const List<scalar>& stWeight = stencilWeights[cellI]; const List<WeightType>& stWeight = stencilWeights[cellI];
forAll(stField, i) forAll(stField, i)
{ {
sf[cellI] += stField[i]*stWeight[i]; wf[cellI] += stWeight[i]*stField[i];
} }
} }
// Boundaries values? // Boundaries values?
return tsfCorr; return twf;
} }

View File

@ -116,14 +116,22 @@ public:
} }
//- Sum vol field contributions to create cell values //- Sum vol field contributions to create cell values
template<class Type> template<class Type, class WeightType>
tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum tmp
<
GeometricField
<
typename outerProduct<WeightType, Type>::type,
fvPatchField,
volMesh
>
> weightedSum
( (
const GeometricField<Type, fvPatchField, volMesh>& fld, const GeometricField<Type, fvPatchField, volMesh>& fld,
const List<List<scalar> >& stencilWeights const List<List<WeightType> >& stencilWeights
) const ) const
{ {
return weightedSum return extendedCellToCellStencil::weightedSum
( (
map(), map(),
stencil(), stencil(),
@ -131,7 +139,6 @@ public:
stencilWeights stencilWeights
); );
} }
}; };

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More