Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenFOAM-plus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Development
OpenFOAM-plus
Commits
da17cf9c
Commit
da17cf9c
authored
6 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
COMP: foamVtkTools: template specialization bug in gcc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56480
parent
8b9375d4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conversion/vtk/adaptor/foamVtkTools.H
+15
-7
15 additions, 7 deletions
src/conversion/vtk/adaptor/foamVtkTools.H
with
15 additions
and
7 deletions
src/conversion/vtk/adaptor/foamVtkTools.H
+
15
−
7
View file @
da17cf9c
...
...
@@ -222,11 +222,19 @@ namespace Tools
template
<
class
Type
>
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)
// \param data[in,out] The data to be remapped in-place
template
<
class
Type
>
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
// This allows a change of data type (float vs double) as well as
// addressing any swapping issues (eg, symmTensor)
...
...
@@ -282,13 +290,18 @@ namespace Tools
const
label
size
);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace vtk
}
// End namespace Foam
// Specializations
//- Template specialization for symmTensor ordering
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
[
2
],
data
[
5
]);
// swap XZ <-> ZZ
...
...
@@ -297,18 +310,13 @@ inline void Tools::remapTuple<Foam::symmTensor>(float data[])
//- Template specialization for symmTensor ordering
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
[
2
],
data
[
5
]);
// swap XZ <-> ZZ
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
}
// End namespace vtk
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment