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
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,7 +37,7 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from component
template <class T0>
template<class T0>
Gather<T0>::Gather(const T0& localData, const bool redistribute)
:
List<T0>(0),

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -106,7 +106,7 @@ public:
////IMPLEMENTATION////////////////////////////////////////////////////
template < class TPoly , class VertexPropertyMap>
template< class TPoly , class VertexPropertyMap>
void T_PolyhedralSurf_rings <TPoly, VertexPropertyMap>::
push_neighbours_of(Vertex* start, int ith,
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>::
collect_ith_ring(int ith, std::vector< Vertex* >& currentRing,
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>::
reset_ring_indices(std::vector< Vertex* >& vces,
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>::
collect_i_rings(Vertex* v,
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>::
collect_enough_rings(Vertex* v,
unsigned int min_nb,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,7 +30,7 @@ namespace Foam
// * * * * * * * * * * * * * * * 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)
{
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 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
(
const List<T>& lst,

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -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)
{
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)
{
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)
{
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)
{
const label listSize = list.size();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -45,7 +45,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T, class CombineOp>
template<class T, class CombineOp>
void Pstream::combineGather
(
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)
{
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
(
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)
{
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
(
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
(
List<T>& Values,
@ -342,7 +342,7 @@ void Pstream::listCombineGather
}
template <class T>
template<class T>
void Pstream::listCombineScatter
(
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)
{
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
(
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
(
Container& Values,
@ -518,7 +518,7 @@ void Pstream::mapCombineGather
}
template <class Container>
template<class Container>
void Pstream::mapCombineScatter
(
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)
{
if (UPstream::nProcs() < UPstream::nProcsSimpleSum)

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,7 +42,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T, class BinaryOp>
template<class T, class BinaryOp>
void Pstream::gather
(
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)
{
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
(
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)
{
if (UPstream::nProcs() < UPstream::nProcsSimpleSum)

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,7 +44,7 @@ namespace Foam
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class T>
template<class T>
void Pstream::gatherList
(
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)
{
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
(
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)
{
if (UPstream::nProcs() < UPstream::nProcsSimpleSum)

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -27,7 +27,7 @@ License
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
template <class T>
template<class T>
Foam::List<T> Foam::transform
(
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
if (rotTensor.size() == 1)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ namespace Foam
Class DiagTensor Declaration
\*---------------------------------------------------------------------------*/
template <class Cmpt>
template<class Cmpt>
class DiagTensor
:
public VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>
@ -86,7 +86,8 @@ public:
inline DiagTensor();
//- 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
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
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,25 +32,23 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null
template <class Cmpt>
template<class Cmpt>
inline DiagTensor<Cmpt>::DiagTensor()
{}
// Construct given VectorSpace
template <class Cmpt>
template<class Cmpt>
template<class Cmpt2>
inline DiagTensor<Cmpt>::DiagTensor
(
const VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>& vs
const VectorSpace<DiagTensor<Cmpt2>, Cmpt2, 3>& vs
)
:
VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(vs)
{}
// Construct given three Cmpts
template <class Cmpt>
template<class Cmpt>
inline DiagTensor<Cmpt>::DiagTensor
(
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)
:
VectorSpace<DiagTensor<Cmpt>, Cmpt, 3>(is)
@ -74,38 +71,38 @@ inline DiagTensor<Cmpt>::DiagTensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& DiagTensor<Cmpt>::xx() const
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& DiagTensor<Cmpt>::yy() const
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& DiagTensor<Cmpt>::zz() const
{
return this->v_[ZZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& DiagTensor<Cmpt>::xx()
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& DiagTensor<Cmpt>::yy()
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& DiagTensor<Cmpt>::zz()
{
return this->v_[ZZ];
@ -114,7 +111,7 @@ inline Cmpt& DiagTensor<Cmpt>::zz()
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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>
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>
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>
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
template <class Cmpt>
template<class Cmpt>
inline DiagTensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline DiagTensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt tr(const DiagTensor<Cmpt>& dt)
{
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
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const DiagTensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt det(const DiagTensor<Cmpt>& t)
{
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
template <class Cmpt>
template<class Cmpt>
inline DiagTensor<Cmpt> inv(const DiagTensor<Cmpt>& dt)
{
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
template <class Cmpt>
template<class Cmpt>
inline DiagTensor<Cmpt> diag(const Tensor<Cmpt>& t)
{
return DiagTensor<Cmpt>(t.xx(), t.yy(), t.zz());

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,33 +32,30 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt>::SphericalTensor()
{}
// Construct given VectorSpace
template <class Cmpt>
template<class Cmpt>
template<class Cmpt2>
inline SphericalTensor<Cmpt>::SphericalTensor
(
const VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>& vs
const VectorSpace<SphericalTensor<Cmpt2>, Cmpt2, 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)
{
this->v_[II] = stii;
}
// Construct from Istream
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt>::SphericalTensor(Istream& is)
:
VectorSpace<SphericalTensor<Cmpt>, Cmpt, 1>(is)
@ -67,21 +64,21 @@ inline SphericalTensor<Cmpt>::SphericalTensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SphericalTensor<Cmpt>::ii() const
{
return this->v_[II];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SphericalTensor<Cmpt>::ii()
{
return this->v_[II];
}
template <class Cmpt>
template<class Cmpt>
inline const SphericalTensor<Cmpt>& SphericalTensor<Cmpt>::T() const
{
return *this;
@ -91,7 +88,7 @@ inline const SphericalTensor<Cmpt>& SphericalTensor<Cmpt>::T() const
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Inner-product between two spherical tensors
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt>
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)
{
return 3*magSqr(st.ii());
@ -153,7 +150,7 @@ inline Cmpt magSqr(const SphericalTensor<Cmpt>& st)
//- Return the trace of a spherical tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt tr(const SphericalTensor<Cmpt>& st)
{
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
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const SphericalTensor<Cmpt>& st)
{
return st;
@ -169,7 +166,7 @@ inline SphericalTensor<Cmpt> sph(const SphericalTensor<Cmpt>& st)
//- Return the determinant of a spherical tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt det(const SphericalTensor<Cmpt>& st)
{
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
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt> inv(const SphericalTensor<Cmpt>& st)
{
return SphericalTensor<Cmpt>(1.0/st.ii());

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -33,22 +33,23 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt>::SymmTensor()
{}
template <class Cmpt>
template<class Cmpt>
template<class Cmpt2>
inline SymmTensor<Cmpt>::SymmTensor
(
const VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>& vs
const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>& vs
)
:
VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(vs)
{}
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt>::SymmTensor(const SphericalTensor<Cmpt>& st)
{
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
(
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)
:
VectorSpace<SymmTensor<Cmpt>, Cmpt, 6>(is)
@ -80,81 +81,81 @@ inline SymmTensor<Cmpt>::SymmTensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::xx() const
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::xy() const
{
return this->v_[XY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::xz() const
{
return this->v_[XZ];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::yy() const
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::yz() const
{
return this->v_[YZ];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& SymmTensor<Cmpt>::zz() const
{
return this->v_[ZZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::xx()
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::xy()
{
return this->v_[XY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::xz()
{
return this->v_[XZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::yy()
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::yz()
{
return this->v_[YZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& SymmTensor<Cmpt>::zz()
{
return this->v_[ZZ];
}
template <class Cmpt>
template<class Cmpt>
inline const SymmTensor<Cmpt>& SymmTensor<Cmpt>::T() const
{
return *this;
@ -163,7 +164,7 @@ inline const SymmTensor<Cmpt>& SymmTensor<Cmpt>::T() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline void SymmTensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
{
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 * * * * * * * * * * * * * //
//- Hodge Dual operator (tensor -> vector)
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt> operator*(const SymmTensor<Cmpt>& st)
{
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>
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)
{
return
@ -260,7 +261,7 @@ inline Cmpt magSqr(const SymmTensor<Cmpt>& st)
//- Return the trace of a symmetric tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt tr(const SymmTensor<Cmpt>& st)
{
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
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const SymmTensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline const SymmTensor<Cmpt>& symm(const SymmTensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> twoSymm(const SymmTensor<Cmpt>& st)
{
return 2*st;
@ -292,7 +293,7 @@ inline SymmTensor<Cmpt> twoSymm(const SymmTensor<Cmpt>& st)
//- Return the deviatoric part of a symmetric tensor
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> dev(const SymmTensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> dev2(const SymmTensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt det(const SymmTensor<Cmpt>& st)
{
return
@ -321,7 +322,7 @@ inline Cmpt det(const SymmTensor<Cmpt>& st)
//- Return the cofactor symmetric tensor of a symmetric tensor
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> cof(const SymmTensor<Cmpt>& st)
{
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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st, const Cmpt detst)
{
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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantI(const SymmTensor<Cmpt>& st)
{
return tr(st);
@ -373,7 +374,7 @@ inline Cmpt invariantI(const SymmTensor<Cmpt>& st)
//- Return the 2nd invariant of a symmetric tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
{
return
@ -390,14 +391,14 @@ inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
//- Return the 3rd invariant of a symmetric tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantIII(const SymmTensor<Cmpt>& st)
{
return det(st);
}
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt>
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>
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>
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>
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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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)
{
return SymmTensor<Cmpt>

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -32,22 +32,20 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
//- Construct null
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>::Tensor()
{}
//- Construct given VectorSpace
template <class Cmpt>
inline Tensor<Cmpt>::Tensor(const VectorSpace<Tensor<Cmpt>, Cmpt, 9>& vs)
template<class Cmpt>
template<class Cmpt2>
inline Tensor<Cmpt>::Tensor(const VectorSpace<Tensor<Cmpt2>, Cmpt2, 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)
{
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)
{
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)
{
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
(
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
(
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)
:
VectorSpace<Tensor<Cmpt>, Cmpt, 9>(is)
@ -124,133 +117,133 @@ inline Tensor<Cmpt>::Tensor(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline const Vector<Cmpt> Tensor<Cmpt>::x() const
{
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
{
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
{
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
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xy() const
{
return this->v_[XY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::xz() const
{
return this->v_[XZ];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yx() const
{
return this->v_[YX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yy() const
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::yz() const
{
return this->v_[YZ];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zx() const
{
return this->v_[ZX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zy() const
{
return this->v_[ZY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor<Cmpt>::zz() const
{
return this->v_[ZZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xx()
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xy()
{
return this->v_[XY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::xz()
{
return this->v_[XZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yx()
{
return this->v_[YX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yy()
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::yz()
{
return this->v_[YZ];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zx()
{
return this->v_[ZX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zy()
{
return this->v_[ZY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor<Cmpt>::zz()
{
return this->v_[ZZ];
@ -258,7 +251,7 @@ inline Cmpt& Tensor<Cmpt>::zz()
//- Return tensor transpose
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> Tensor<Cmpt>::T() const
{
return Tensor<Cmpt>
@ -272,7 +265,7 @@ inline Tensor<Cmpt> Tensor<Cmpt>::T() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline void Tensor<Cmpt>::operator=(const SphericalTensor<Cmpt>& st)
{
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)
{
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)
{
this->v_[XX] = tr.x().x();
@ -310,7 +303,7 @@ inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Hodge Dual operator (tensor -> vector)
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
{
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)
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
{
return Tensor<Cmpt>
@ -331,7 +324,7 @@ inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
//- Inner-product between two tensors
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
{
@ -406,7 +399,7 @@ operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
//- Return the trace of a tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt tr(const Tensor<Cmpt>& t)
{
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
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor<Cmpt> sph(const Tensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t)
{
return SymmTensor<Cmpt>
@ -435,7 +428,7 @@ inline SymmTensor<Cmpt> symm(const Tensor<Cmpt>& t)
//- Return twice the symmetric part of a tensor
template <class Cmpt>
template<class Cmpt>
inline SymmTensor<Cmpt> twoSymm(const Tensor<Cmpt>& t)
{
return SymmTensor<Cmpt>
@ -448,7 +441,7 @@ inline SymmTensor<Cmpt> twoSymm(const Tensor<Cmpt>& t)
//- Return the skew-symmetric part of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t)
{
return Tensor<Cmpt>
@ -461,7 +454,7 @@ inline Tensor<Cmpt> skew(const Tensor<Cmpt>& t)
//- Return the skew-symmetric part of a symmetric tensor
template <class Cmpt>
template<class Cmpt>
inline const Tensor<Cmpt>& skew(const SymmTensor<Cmpt>& st)
{
return Tensor<Cmpt>::zero;
@ -469,7 +462,7 @@ inline const Tensor<Cmpt>& skew(const SymmTensor<Cmpt>& st)
//- Return the deviatoric part of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> dev(const Tensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> dev2(const Tensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt det(const Tensor<Cmpt>& t)
{
return
@ -498,7 +491,7 @@ inline Cmpt det(const Tensor<Cmpt>& t)
//- Return the cofactor tensor of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> cof(const Tensor<Cmpt>& t)
{
return Tensor<Cmpt>
@ -519,7 +512,7 @@ inline Tensor<Cmpt> cof(const Tensor<Cmpt>& t)
//- 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)
{
return Tensor<Cmpt>
@ -540,7 +533,7 @@ inline Tensor<Cmpt> inv(const Tensor<Cmpt>& t, const Cmpt dett)
//- Return the inverse of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt> inv(const Tensor<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantI(const Tensor<Cmpt>& t)
{
return tr(t);
@ -556,7 +549,7 @@ inline Cmpt invariantI(const Tensor<Cmpt>& t)
//- Return the 2nd invariant of a tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantII(const Tensor<Cmpt>& t)
{
return
@ -573,7 +566,7 @@ inline Cmpt invariantII(const Tensor<Cmpt>& t)
//- Return the 3rd invariant of a tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantIII(const Tensor<Cmpt>& t)
{
return det(t);
@ -582,7 +575,7 @@ inline Cmpt invariantIII(const Tensor<Cmpt>& t)
// * * * * * * * * * Mixed Tensor SphericalTensor Operators * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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>
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>
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>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
{
@ -714,7 +707,7 @@ public:
// * * * * * * * * * * Mixed Tensor SymmTensor Operators * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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>
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>
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>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
{

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,19 +30,19 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D()
{}
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D(const 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)
{
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
(
const Vector2D<Cmpt>& x,
@ -62,7 +62,7 @@ inline Tensor2D<Cmpt>::Tensor2D
}
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt>::Tensor2D
(
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)
:
VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>(is)
@ -83,70 +83,70 @@ inline Tensor2D<Cmpt>::Tensor2D(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline Vector2D<Cmpt> Tensor2D<Cmpt>::x() const
{
return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
}
template <class Cmpt>
template<class Cmpt>
inline Vector2D<Cmpt> Tensor2D<Cmpt>::y() const
{
return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::xx() const
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::xy() const
{
return this->v_[XY];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::yx() const
{
return this->v_[YX];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Tensor2D<Cmpt>::yy() const
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::xx()
{
return this->v_[XX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::xy()
{
return this->v_[XY];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::yx()
{
return this->v_[YX];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Tensor2D<Cmpt>::yy()
{
return this->v_[YY];
}
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const
{
return Tensor2D<Cmpt>
@ -159,7 +159,7 @@ inline Tensor2D<Cmpt> Tensor2D<Cmpt>::T() const
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline void Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
{
this->v_[XX] = st.ii(); this->v_[XY] = 0;
@ -171,7 +171,7 @@ inline void Tensor2D<Cmpt>::operator=(const SphericalTensor2D<Cmpt>& st)
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
//- Inner-product between two tensors
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt> >::type
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt tr(const Tensor2D<Cmpt>& t)
{
return t.xx() + t.yy();
@ -231,7 +231,7 @@ inline Cmpt tr(const Tensor2D<Cmpt>& t)
//- Return the spherical part of a tensor
template <class Cmpt>
template<class Cmpt>
inline SphericalTensor2D<Cmpt> sph(const Tensor2D<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> symm(const Tensor2D<Cmpt>& t)
{
return Tensor2D<Cmpt>
@ -250,7 +250,7 @@ inline Tensor2D<Cmpt> symm(const Tensor2D<Cmpt>& t)
}
//- Return the twice the symmetric part of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> twoSymm(const Tensor2D<Cmpt>& t)
{
return Tensor2D<Cmpt>
@ -261,7 +261,7 @@ inline Tensor2D<Cmpt> twoSymm(const Tensor2D<Cmpt>& t)
}
//- Return the skew-symmetric part of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> skew(const Tensor2D<Cmpt>& t)
{
return Tensor2D<Cmpt>
@ -273,7 +273,7 @@ inline Tensor2D<Cmpt> skew(const Tensor2D<Cmpt>& t)
//- Return the deviatoric part of a tensor
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> dev(const Tensor2D<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> dev2(const Tensor2D<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt det(const Tensor2D<Cmpt>& t)
{
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
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> cof(const Tensor2D<Cmpt>& t)
{
return Tensor2D<Cmpt>
@ -309,7 +309,7 @@ inline Tensor2D<Cmpt> cof(const Tensor2D<Cmpt>& t)
//- 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)
{
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
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& 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
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
{
return tr(t);
@ -333,7 +333,7 @@ inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
//- Return the 2nd invariant of a tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
{
return
@ -349,7 +349,7 @@ inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
//- Return the 3rd invariant of a tensor
template <class Cmpt>
template<class Cmpt>
inline Cmpt invariantIII(const Tensor2D<Cmpt>& t)
{
return det(t);
@ -358,7 +358,7 @@ inline Cmpt invariantIII(const Tensor2D<Cmpt>& t)
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt>
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>
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>
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>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Tensor2D<Cmpt>
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
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
template <class Cmpt>
template<class Cmpt>
inline Cmpt
operator&&(const Tensor2D<Cmpt>& t1, const SphericalTensor2D<Cmpt>& st2)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,7 +54,7 @@ template<class T> class List;
Class Vector Declaration
\*---------------------------------------------------------------------------*/
template <class Cmpt>
template<class Cmpt>
class Vector
:
public VectorSpace<Vector<Cmpt>, Cmpt, 3>
@ -93,8 +93,9 @@ public:
//- Construct null
inline Vector();
//- Construct given VectorSpace
inline Vector(const VectorSpace<Vector<Cmpt>, Cmpt, 3>&);
//- Construct given VectorSpace of the same rank
template<class Cmpt2>
inline Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 3>&);
//- Construct given three components
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
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -30,22 +30,20 @@ namespace Foam
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct null
template <class Cmpt>
template<class Cmpt>
inline Vector<Cmpt>::Vector()
{}
// Construct given VectorSpace
template <class Cmpt>
inline Vector<Cmpt>::Vector(const VectorSpace<Vector<Cmpt>, Cmpt, 3>& vs)
template<class Cmpt>
template<class Cmpt2>
inline Vector<Cmpt>::Vector(const VectorSpace<Vector<Cmpt2>, Cmpt2, 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)
{
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)
:
VectorSpace<Vector<Cmpt>, Cmpt, 3>(is)
@ -64,38 +61,38 @@ inline Vector<Cmpt>::Vector(Istream& is)
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Vector<Cmpt>::x() const
{
return this->v_[X];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Vector<Cmpt>::y() const
{
return this->v_[Y];
}
template <class Cmpt>
template<class Cmpt>
inline const Cmpt& Vector<Cmpt>::z() const
{
return this->v_[Z];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Vector<Cmpt>::x()
{
return this->v_[X];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Vector<Cmpt>::y()
{
return this->v_[Y];
}
template <class Cmpt>
template<class Cmpt>
inline Cmpt& Vector<Cmpt>::z()
{
return this->v_[Z];
@ -104,7 +101,7 @@ inline Cmpt& Vector<Cmpt>::z()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline const Vector<Cmpt>& Vector<Cmpt>::centre
(
const Foam::List<Vector<Cmpt> >&
@ -116,7 +113,7 @@ inline const Vector<Cmpt>& Vector<Cmpt>::centre
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
template <class Cmpt>
template<class Cmpt>
inline typename innerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
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)
{
return Vector<Cmpt>

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -107,6 +107,10 @@ public:
//- Construct as copy
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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -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 * * * * * * * * * * * * * //
template<class Form, class Cmpt, int nCmpt>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -193,7 +193,7 @@ inline bool Foam::sweepData::updateFace
}
template <class TrackingData>
template<class TrackingData>
inline bool Foam::sweepData::equal
(
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
// //- 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
template<class Type>
static tmp<GeometricField<Type, fvPatchField, volMesh> > weightedSum
template<class Type, class WeightType>
static
tmp
<
GeometricField
<
typename outerProduct<WeightType, Type>::type,
fvPatchField,
volMesh
>
> weightedSum
(
const mapDistribute& map,
const labelListList& stencil,
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 "extendedCellToFaceStencil.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>
Foam::tmp<Foam::GeometricField<Type, Foam::fvPatchField, Foam::volMesh> >
Foam::extendedCellToCellStencil::weightedSum
template<class Type, class WeightType>
Foam::tmp
<
Foam::GeometricField
<
typename Foam::outerProduct<WeightType, Type>::type,
Foam::fvPatchField,
Foam::volMesh
>
> Foam::extendedCellToCellStencil::weightedSum
(
const mapDistribute& map,
const labelListList& stencil,
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();
// Collect internal and boundary values
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
(
@ -54,31 +66,31 @@ Foam::extendedCellToCellStencil::weightedSum
mesh
),
mesh,
dimensioned<Type>
dimensioned<WeightedType>
(
fld.name(),
fld.dimensions(),
pTraits<Type>::zero
pTraits<WeightedType>::zero
)
)
);
GeometricField<Type, fvPatchField, volMesh>& sf = tsfCorr();
WeightedFieldType& wf = twf();
// cells
forAll(sf, cellI)
forAll(wf, cellI)
{
const List<Type>& stField = stencilFld[cellI];
const List<scalar>& stWeight = stencilWeights[cellI];
const List<WeightType>& stWeight = stencilWeights[cellI];
forAll(stField, i)
{
sf[cellI] += stField[i]*stWeight[i];
wf[cellI] += stWeight[i]*stField[i];
}
}
// Boundaries values?
return tsfCorr;
return twf;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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