mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Updated comment
This commit is contained in:
@ -123,12 +123,14 @@ inline Vector<Cmpt> Tensor<Cmpt>::x() const
|
|||||||
return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
|
return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Vector<Cmpt> Tensor<Cmpt>::y() const
|
inline Vector<Cmpt> Tensor<Cmpt>::y() const
|
||||||
{
|
{
|
||||||
return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
|
return Vector<Cmpt>(this->v_[YX], this->v_[YY], this->v_[YZ]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Vector<Cmpt> Tensor<Cmpt>::z() const
|
inline Vector<Cmpt> Tensor<Cmpt>::z() const
|
||||||
{
|
{
|
||||||
@ -160,12 +162,14 @@ inline const Cmpt& Tensor<Cmpt>::xx() const
|
|||||||
return this->v_[XX];
|
return this->v_[XX];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline const Cmpt& Tensor<Cmpt>::xy() const
|
inline const Cmpt& Tensor<Cmpt>::xy() const
|
||||||
{
|
{
|
||||||
return this->v_[XY];
|
return this->v_[XY];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline const Cmpt& Tensor<Cmpt>::xz() const
|
inline const Cmpt& Tensor<Cmpt>::xz() const
|
||||||
{
|
{
|
||||||
@ -179,12 +183,14 @@ inline const Cmpt& Tensor<Cmpt>::yx() const
|
|||||||
return this->v_[YX];
|
return this->v_[YX];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline const Cmpt& Tensor<Cmpt>::yy() const
|
inline const Cmpt& Tensor<Cmpt>::yy() const
|
||||||
{
|
{
|
||||||
return this->v_[YY];
|
return this->v_[YY];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline const Cmpt& Tensor<Cmpt>::yz() const
|
inline const Cmpt& Tensor<Cmpt>::yz() const
|
||||||
{
|
{
|
||||||
@ -198,12 +204,14 @@ inline const Cmpt& Tensor<Cmpt>::zx() const
|
|||||||
return this->v_[ZX];
|
return this->v_[ZX];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline const Cmpt& Tensor<Cmpt>::zy() const
|
inline const Cmpt& Tensor<Cmpt>::zy() const
|
||||||
{
|
{
|
||||||
return this->v_[ZY];
|
return this->v_[ZY];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline const Cmpt& Tensor<Cmpt>::zz() const
|
inline const Cmpt& Tensor<Cmpt>::zz() const
|
||||||
{
|
{
|
||||||
@ -217,12 +225,14 @@ inline Cmpt& Tensor<Cmpt>::xx()
|
|||||||
return this->v_[XX];
|
return this->v_[XX];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt& Tensor<Cmpt>::xy()
|
inline Cmpt& Tensor<Cmpt>::xy()
|
||||||
{
|
{
|
||||||
return this->v_[XY];
|
return this->v_[XY];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt& Tensor<Cmpt>::xz()
|
inline Cmpt& Tensor<Cmpt>::xz()
|
||||||
{
|
{
|
||||||
@ -236,12 +246,14 @@ inline Cmpt& Tensor<Cmpt>::yx()
|
|||||||
return this->v_[YX];
|
return this->v_[YX];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt& Tensor<Cmpt>::yy()
|
inline Cmpt& Tensor<Cmpt>::yy()
|
||||||
{
|
{
|
||||||
return this->v_[YY];
|
return this->v_[YY];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt& Tensor<Cmpt>::yz()
|
inline Cmpt& Tensor<Cmpt>::yz()
|
||||||
{
|
{
|
||||||
@ -255,12 +267,14 @@ inline Cmpt& Tensor<Cmpt>::zx()
|
|||||||
return this->v_[ZX];
|
return this->v_[ZX];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt& Tensor<Cmpt>::zy()
|
inline Cmpt& Tensor<Cmpt>::zy()
|
||||||
{
|
{
|
||||||
return this->v_[ZY];
|
return this->v_[ZY];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt& Tensor<Cmpt>::zz()
|
inline Cmpt& Tensor<Cmpt>::zz()
|
||||||
{
|
{
|
||||||
@ -268,7 +282,6 @@ inline Cmpt& Tensor<Cmpt>::zz()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Return tensor transpose
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Tensor<Cmpt> Tensor<Cmpt>::T() const
|
inline Tensor<Cmpt> Tensor<Cmpt>::T() const
|
||||||
{
|
{
|
||||||
@ -320,7 +333,6 @@ inline void Tensor<Cmpt>::operator=(const Vector<Vector<Cmpt> >& tr)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
//- Hodge Dual operator (tensor -> vector)
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
|
inline Vector<Cmpt> operator*(const Tensor<Cmpt>& t)
|
||||||
{
|
{
|
||||||
@ -328,7 +340,6 @@ 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)
|
inline Tensor<Cmpt> operator*(const Vector<Cmpt>& v)
|
||||||
{
|
{
|
||||||
@ -341,7 +352,6 @@ 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
|
inline typename innerProduct<Tensor<Cmpt>, Tensor<Cmpt> >::type
|
||||||
operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
|
operator&(const Tensor<Cmpt>& t1, const Tensor<Cmpt>& t2)
|
||||||
@ -363,7 +373,6 @@ 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
|
inline typename innerProduct<Tensor<Cmpt>, Vector<Cmpt> >::type
|
||||||
operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
|
operator&(const Tensor<Cmpt>& t, const Vector<Cmpt>& v)
|
||||||
@ -377,7 +386,6 @@ 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
|
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
|
||||||
operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
|
operator&(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
|
||||||
@ -391,7 +399,6 @@ 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
|
inline typename outerProduct<Vector<Cmpt>, Vector<Cmpt> >::type
|
||||||
operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
|
operator*(const Vector<Cmpt>& v1, const Vector<Cmpt>& v2)
|
||||||
@ -405,7 +412,6 @@ 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
|
inline typename innerProduct<Vector<Cmpt>, Tensor<Cmpt> >::type
|
||||||
operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
|
operator/(const Vector<Cmpt>& v, const Tensor<Cmpt>& t)
|
||||||
@ -690,6 +696,7 @@ operator&&(const Tensor<Cmpt>& t1, const SphericalTensor<Cmpt>& st2)
|
|||||||
return(t1.xx()*st2.ii() + t1.yy()*st2.ii() + t1.zz()*st2.ii());
|
return(t1.xx()*st2.ii() + t1.yy()*st2.ii() + t1.zz()*st2.ii());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt> >
|
class typeOfSum<SphericalTensor<Cmpt>, Tensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -698,6 +705,7 @@ public:
|
|||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class typeOfSum<Tensor<Cmpt>, SphericalTensor<Cmpt> >
|
class typeOfSum<Tensor<Cmpt>, SphericalTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -706,6 +714,7 @@ public:
|
|||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class innerProduct<SphericalTensor<Cmpt>, Tensor<Cmpt> >
|
class innerProduct<SphericalTensor<Cmpt>, Tensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -714,6 +723,7 @@ public:
|
|||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class innerProduct<Tensor<Cmpt>, SphericalTensor<Cmpt> >
|
class innerProduct<Tensor<Cmpt>, SphericalTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -777,7 +787,7 @@ operator-(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Inner-product between a spherical tensor and a tensor
|
//- Inner-product between a symmetric tensor and a tensor
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Tensor<Cmpt>
|
inline Tensor<Cmpt>
|
||||||
operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
|
operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
|
||||||
@ -799,7 +809,7 @@ operator&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Inner-product between a tensor and a spherical tensor
|
//- Inner-product between a tensor and a symmetric tensor
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Tensor<Cmpt>
|
inline Tensor<Cmpt>
|
||||||
operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
||||||
@ -821,7 +831,7 @@ operator&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Double-dot-product between a spherical tensor and a tensor
|
//- Double-dot-product between a symmetric tensor and a tensor
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt
|
inline Cmpt
|
||||||
operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
|
operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
|
||||||
@ -835,7 +845,7 @@ operator&&(const SymmTensor<Cmpt>& st1, const Tensor<Cmpt>& t2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//- Double-dot-product between a tensor and a spherical tensor
|
//- Double-dot-product between a tensor and a symmetric tensor
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
inline Cmpt
|
inline Cmpt
|
||||||
operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
||||||
@ -848,6 +858,7 @@ operator&&(const Tensor<Cmpt>& t1, const SymmTensor<Cmpt>& st2)
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
|
class typeOfSum<SymmTensor<Cmpt>, Tensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -856,6 +867,7 @@ public:
|
|||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class typeOfSum<Tensor<Cmpt>, SymmTensor<Cmpt> >
|
class typeOfSum<Tensor<Cmpt>, SymmTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
@ -873,6 +885,7 @@ public:
|
|||||||
typedef Tensor<Cmpt> type;
|
typedef Tensor<Cmpt> type;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Cmpt>
|
template<class Cmpt>
|
||||||
class innerProduct<Tensor<Cmpt>, SymmTensor<Cmpt> >
|
class innerProduct<Tensor<Cmpt>, SymmTensor<Cmpt> >
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user