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
60513758
Commit
60513758
authored
6 years ago
by
Mark OLESEN
Browse files
Options
Downloads
Patches
Plain Diff
COMP: template specialization in incorrect namespace
STYLE: avoid local variable name masking
parent
3dd1a13b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/conversion/vtk/adaptor/foamVtkTools.H
+6
-3
6 additions, 3 deletions
src/conversion/vtk/adaptor/foamVtkTools.H
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
+7
-14
7 additions, 14 deletions
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
with
13 additions
and
17 deletions
src/conversion/vtk/adaptor/foamVtkTools.H
+
6
−
3
View file @
60513758
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
========= |
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / O peration |
\\ / A nd | Copyright (C) 2017-201
8
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-201
9
OpenCFD Ltd.
\\/ M anipulation |
\\/ M anipulation |
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
License
License
...
@@ -280,9 +280,11 @@ namespace Tools
...
@@ -280,9 +280,11 @@ namespace Tools
};
};
// Specializations
//- Template specialization for symmTensor ordering
//- Template specialization for symmTensor ordering
template
<
>
template
<
>
inline
void
Foam
::
vtk
::
Tools
::
remapTuple
<
Foam
::
symmTensor
>
(
float
data
[])
inline
void
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
...
@@ -291,7 +293,7 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(float data[])
...
@@ -291,7 +293,7 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(float data[])
//- Template specialization for symmTensor ordering
//- Template specialization for symmTensor ordering
template
<
>
template
<
>
inline
void
Foam
::
vtk
::
Tools
::
remapTuple
<
Foam
::
symmTensor
>
(
double
data
[])
inline
void
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
...
@@ -303,6 +305,7 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(double data[])
...
@@ -303,6 +305,7 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(double data[])
}
// End namespace vtk
}
// End namespace vtk
}
// End namespace Foam
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include
"foamVtkToolsI.H"
#include
"foamVtkToolsI.H"
...
...
This diff is collapsed.
Click to expand it.
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
+
7
−
14
View file @
60513758
...
@@ -21,22 +21,19 @@ License
...
@@ -21,22 +21,19 @@ License
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
In
Class
In
Namespace
Foam::vtk::Tools
Foam::vtk::Tools
\*---------------------------------------------------------------------------*/
\*---------------------------------------------------------------------------*/
#ifndef foamVtkToolsTemplates_C
#define foamVtkToolsTemplates_C
// OpenFOAM includes
// OpenFOAM includes
#include
"error.H"
#include
"error.H"
// VTK includes
// VTK includes
#include
<
vtkFloatArray.h
>
#include
"
vtkFloatArray.h
"
#include
<
vtkCellData.h
>
#include
"
vtkCellData.h
"
#include
<
vtkPointData.h
>
#include
"
vtkPointData.h
"
#include
<
vtkSmartPointer.h
>
#include
"
vtkSmartPointer.h
"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
@@ -52,9 +49,9 @@ Foam::vtk::Tools::Patch::points(const PatchType& p)
...
@@ -52,9 +49,9 @@ Foam::vtk::Tools::Patch::points(const PatchType& p)
vtkpoints
->
SetNumberOfPoints
(
pts
.
size
());
vtkpoints
->
SetNumberOfPoints
(
pts
.
size
());
vtkIdType
pointId
=
0
;
vtkIdType
pointId
=
0
;
for
(
const
point
&
p
:
pts
)
for
(
const
point
&
p
t
:
pts
)
{
{
vtkpoints
->
SetPoint
(
pointId
++
,
p
.
v_
);
vtkpoints
->
SetPoint
(
pointId
++
,
p
t
.
v_
);
}
}
return
vtkpoints
;
return
vtkpoints
;
...
@@ -258,8 +255,4 @@ Foam::vtk::Tools::convertFieldToVTK
...
@@ -258,8 +255,4 @@ Foam::vtk::Tools::convertFieldToVTK
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
// ************************************************************************* //
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