mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Reformat "template <..." to template<"
Add support for constructing VectorSpaces from forms with lower component type, e.g. Vector<scalar> from Vector<label>
This commit is contained in:
@ -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());
|
||||
|
||||
Reference in New Issue
Block a user