Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenFOAM-plus
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
339
Issues
339
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Development
OpenFOAM-plus
Commits
60513758
Commit
60513758
authored
Feb 01, 2019
by
Mark Olesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
COMP: template specialization in incorrect namespace
STYLE: avoid local variable name masking
parent
3dd1a13b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
17 deletions
+13
-17
src/conversion/vtk/adaptor/foamVtkTools.H
src/conversion/vtk/adaptor/foamVtkTools.H
+6
-3
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
+7
-14
No files found.
src/conversion/vtk/adaptor/foamVtkTools.H
View file @
60513758
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2017-201
8
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2017-201
9
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -280,9 +280,11 @@ namespace Tools
};
// Specializations
//- Template specialization for symmTensor ordering
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
[
2
],
data
[
5
]);
// swap XZ <-> ZZ
...
...
@@ -291,7 +293,7 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(float data[])
//- Template specialization for symmTensor ordering
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
[
2
],
data
[
5
]);
// swap XZ <-> ZZ
...
...
@@ -303,6 +305,7 @@ inline void Foam::vtk::Tools::remapTuple<Foam::symmTensor>(double data[])
}
// End namespace vtk
}
// End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "foamVtkToolsI.H"
...
...
src/conversion/vtk/adaptor/foamVtkToolsTemplates.C
View file @
60513758
...
...
@@ -21,22 +21,19 @@ License
You should have received a copy of the GNU General Public License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
In
Class
In
Namespace
Foam::vtk::Tools
\*---------------------------------------------------------------------------*/
#ifndef foamVtkToolsTemplates_C
#define foamVtkToolsTemplates_C
// OpenFOAM includes
#include "error.H"
// VTK includes
#include
<vtkFloatArray.h>
#include
<vtkCellData.h>
#include
<vtkPointData.h>
#include
<vtkSmartPointer.h>
#include
"vtkFloatArray.h"
#include
"vtkCellData.h"
#include
"vtkPointData.h"
#include
"vtkSmartPointer.h"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
...
...
@@ -52,9 +49,9 @@ Foam::vtk::Tools::Patch::points(const PatchType& p)
vtkpoints
->
SetNumberOfPoints
(
pts
.
size
());
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
;
...
...
@@ -258,8 +255,4 @@ Foam::vtk::Tools::convertFieldToVTK
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment