mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: foamVtkTools: template specialization bug in gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
This commit is contained in:
@ -222,11 +222,19 @@ namespace Tools
|
|||||||
template<class Type>
|
template<class Type>
|
||||||
inline static void remapTuple(float data[]) {}
|
inline static void remapTuple(float data[]) {}
|
||||||
|
|
||||||
|
//- Template specialization for symmTensor ordering
|
||||||
|
template<>
|
||||||
|
inline void remapTuple<symmTensor>(float data[]);
|
||||||
|
|
||||||
//- Remapping for some OpenFOAM data types (eg, symmTensor)
|
//- Remapping for some OpenFOAM data types (eg, symmTensor)
|
||||||
// \param data[in,out] The data to be remapped in-place
|
// \param data[in,out] The data to be remapped in-place
|
||||||
template<class Type>
|
template<class Type>
|
||||||
inline static void remapTuple(double data[]) {}
|
inline static void remapTuple(double data[]) {}
|
||||||
|
|
||||||
|
//- Template specialization for symmTensor ordering
|
||||||
|
template<>
|
||||||
|
inline void remapTuple<symmTensor>(double data[]);
|
||||||
|
|
||||||
//- Copy/transcribe OpenFOAM data types to VTK format
|
//- Copy/transcribe OpenFOAM data types to VTK format
|
||||||
// This allows a change of data type (float vs double) as well as
|
// This allows a change of data type (float vs double) as well as
|
||||||
// addressing any swapping issues (eg, symmTensor)
|
// addressing any swapping issues (eg, symmTensor)
|
||||||
@ -282,13 +290,18 @@ namespace Tools
|
|||||||
const label size
|
const label size
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace vtk
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Specializations
|
// Specializations
|
||||||
|
|
||||||
//- Template specialization for symmTensor ordering
|
//- Template specialization for symmTensor ordering
|
||||||
template<>
|
template<>
|
||||||
inline void Tools::remapTuple<Foam::symmTensor>(float data[])
|
void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(float data[])
|
||||||
{
|
{
|
||||||
std::swap(data[1], data[3]); // swap XY <-> YY
|
std::swap(data[1], data[3]); // swap XY <-> YY
|
||||||
std::swap(data[2], data[5]); // swap XZ <-> ZZ
|
std::swap(data[2], data[5]); // swap XZ <-> ZZ
|
||||||
@ -297,18 +310,13 @@ inline void Tools::remapTuple<Foam::symmTensor>(float data[])
|
|||||||
|
|
||||||
//- Template specialization for symmTensor ordering
|
//- Template specialization for symmTensor ordering
|
||||||
template<>
|
template<>
|
||||||
inline void Tools::remapTuple<Foam::symmTensor>(double data[])
|
void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(double data[])
|
||||||
{
|
{
|
||||||
std::swap(data[1], data[3]); // swap XY <-> YY
|
std::swap(data[1], data[3]); // swap XY <-> YY
|
||||||
std::swap(data[2], data[5]); // swap XZ <-> ZZ
|
std::swap(data[2], data[5]); // swap XZ <-> ZZ
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace vtk
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user