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
C
catalyst
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Community
catalyst
Commits
566968ca
Commit
566968ca
authored
Jan 31, 2019
by
Mark Olesen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STYLE: use vtk::Tools directly instead of relying on inheritance
parent
22a67b4d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
src/catalyst/areaMesh/foamVtkFaMeshAdaptor.H
src/catalyst/areaMesh/foamVtkFaMeshAdaptor.H
+1
-3
src/catalyst/volMesh/foamVtkFvMeshAdaptor.H
src/catalyst/volMesh/foamVtkFvMeshAdaptor.H
+1
-3
src/catalyst/volMesh/foamVtkFvMeshAdaptorFieldTemplates.C
src/catalyst/volMesh/foamVtkFvMeshAdaptorFieldTemplates.C
+12
-9
No files found.
src/catalyst/areaMesh/foamVtkFaMeshAdaptor.H
View file @
566968ca
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018
-2019
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -78,8 +78,6 @@ namespace vtk
\*---------------------------------------------------------------------------*/
class
faMeshAdaptor
:
protected
vtk
::
Tools
{
public:
...
...
src/catalyst/volMesh/foamVtkFvMeshAdaptor.H
View file @
566968ca
...
...
@@ -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
...
...
@@ -91,8 +91,6 @@ namespace vtk
\*---------------------------------------------------------------------------*/
class
fvMeshAdaptor
:
protected
vtk
::
Tools
{
public:
...
...
src/catalyst/volMesh/foamVtkFvMeshAdaptorFieldTemplates.C
View file @
566968ca
...
...
@@ -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
...
...
@@ -94,7 +94,7 @@ void Foam::vtk::fvMeshAdaptor::convertVolField
// To improve code reuse, we allocate the CellData as a zeroed-field
// ahead of time.
vtkSmartPointer
<
vtkFloatArray
>
cdata
=
zeroField
<
Type
>
vtkSmartPointer
<
vtkFloatArray
>
cdata
=
vtk
::
Tools
::
zeroField
<
Type
>
(
fld
.
name
(),
dataset
->
GetNumberOfPolys
()
...
...
@@ -121,7 +121,7 @@ void Foam::vtk::fvMeshAdaptor::convertVolField
fvPatchField
<
Type
>
(
p
,
fld
).
patchInternalField
()
);
transcribeFloatData
(
cdata
,
tpptf
());
vtk
::
Tools
::
transcribeFloatData
(
cdata
,
tpptf
());
if
(
...
...
@@ -138,7 +138,7 @@ void Foam::vtk::fvMeshAdaptor::convertVolField
}
else
{
transcribeFloatData
(
cdata
,
ptf
);
vtk
::
Tools
::
transcribeFloatData
(
cdata
,
ptf
);
if
(
...
...
@@ -291,7 +291,7 @@ vtkSmartPointer<vtkFloatArray> Foam::vtk::fvMeshAdaptor::convertPointField
{
for
(
const
label
meshPointi
:
pointMap
)
{
foamToVtkTuple
(
scratch
,
pfld
[
meshPointi
]);
vtk
::
Tools
::
foamToVtkTuple
(
scratch
,
pfld
[
meshPointi
]);
data
->
SetTuple
(
pointi
++
,
scratch
);
}
}
...
...
@@ -299,7 +299,7 @@ vtkSmartPointer<vtkFloatArray> Foam::vtk::fvMeshAdaptor::convertPointField
{
for
(
const
Type
&
val
:
pfld
)
{
foamToVtkTuple
(
scratch
,
val
);
vtk
::
Tools
::
foamToVtkTuple
(
scratch
,
val
);
data
->
SetTuple
(
pointi
++
,
scratch
);
}
}
...
...
@@ -311,7 +311,7 @@ vtkSmartPointer<vtkFloatArray> Foam::vtk::fvMeshAdaptor::convertPointField
{
for
(
const
label
meshCelli
:
addPointCellLabels
)
{
foamToVtkTuple
(
scratch
,
vfld
[
meshCelli
]);
vtk
::
Tools
::
foamToVtkTuple
(
scratch
,
vfld
[
meshCelli
]);
data
->
SetTuple
(
pointi
++
,
scratch
);
}
}
...
...
@@ -319,7 +319,10 @@ vtkSmartPointer<vtkFloatArray> Foam::vtk::fvMeshAdaptor::convertPointField
{
for
(
const
label
meshCelli
:
addPointCellLabels
)
{
foamToVtkTuple
(
scratch
,
interpolatePointToCell
(
pfld
,
meshCelli
));
vtk
::
Tools
::
foamToVtkTuple
(
scratch
,
interpolatePointToCell
(
pfld
,
meshCelli
)
);
data
->
SetTuple
(
pointi
++
,
scratch
);
}
}
...
...
@@ -362,7 +365,7 @@ Foam::vtk::fvMeshAdaptor::convertVolFieldToVTK
vtkIdType
celli
=
0
;
for
(
const
label
meshCelli
:
cellMap
)
{
foamToVtkTuple
(
scratch
,
fld
[
meshCelli
]);
vtk
::
Tools
::
foamToVtkTuple
(
scratch
,
fld
[
meshCelli
]);
data
->
SetTuple
(
celli
++
,
scratch
);
}
...
...
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