Code simplification: GeometricField<Type, fvPatchField, volMesh> -> VolField<Type>
Using the VolField<Type> partial specialisation of GeometricField<Type, fvPatchField, volMesh> simplifies the code and improves readability.
This commit is contained in:
@ -534,7 +534,7 @@ class vtkPVFoam
|
||||
template<class Type>
|
||||
void convertVolFieldBlock
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
const VolField<Type>&,
|
||||
autoPtr<PointField<Type>>&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
@ -545,7 +545,7 @@ class vtkPVFoam
|
||||
template<class Type>
|
||||
void convertVolInternalFieldBlock
|
||||
(
|
||||
const typename GeometricField<Type, fvPatchField, volMesh>
|
||||
const typename VolField<Type>
|
||||
::Internal&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
@ -556,7 +556,7 @@ class vtkPVFoam
|
||||
template<class Type>
|
||||
void convertVolInternalField
|
||||
(
|
||||
const typename GeometricField<Type, fvPatchField, volMesh>
|
||||
const typename VolField<Type>
|
||||
::Internal&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
@ -579,7 +579,7 @@ class vtkPVFoam
|
||||
template<class Type>
|
||||
void convertSurfaceField
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
const VolField<Type>&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
const label datasetNo,
|
||||
@ -652,7 +652,7 @@ class vtkPVFoam
|
||||
void convertPointField
|
||||
(
|
||||
const PointField<Type>&,
|
||||
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||
const VolField<Type>&,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange&,
|
||||
const label datasetNo,
|
||||
|
||||
@ -187,7 +187,7 @@ void Foam::vtkPVFoam::convertPointFieldBlock
|
||||
convertPointField
|
||||
(
|
||||
ptf,
|
||||
GeometricField<Type, fvPatchField, volMesh>::null(),
|
||||
VolField<Type>::null(),
|
||||
output,
|
||||
range,
|
||||
datasetNo,
|
||||
@ -202,7 +202,7 @@ template<class Type>
|
||||
void Foam::vtkPVFoam::convertPointField
|
||||
(
|
||||
const PointField<Type>& ptf,
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||
const VolField<Type>& tf,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
const label datasetNo,
|
||||
@ -232,7 +232,7 @@ void Foam::vtkPVFoam::convertPointField
|
||||
// Note: using the name of the original volField
|
||||
// not the name generated by the interpolation "volPointInterpolate(<name>)"
|
||||
|
||||
if (&tf != &GeometricField<Type, fvPatchField, volMesh>::null())
|
||||
if (&tf != &VolField<Type>::null())
|
||||
{
|
||||
pointData->SetName(tf.name().c_str());
|
||||
}
|
||||
@ -285,7 +285,7 @@ void Foam::vtkPVFoam::convertPointField
|
||||
// continue insertion from here
|
||||
label i = nPoints;
|
||||
|
||||
if (&tf != &GeometricField<Type, fvPatchField, volMesh>::null())
|
||||
if (&tf != &VolField<Type>::null())
|
||||
{
|
||||
forAll(addPointCellLabels, apI)
|
||||
{
|
||||
|
||||
@ -45,7 +45,7 @@ InClass
|
||||
template<class Type>
|
||||
void Foam::vtkPVFoam::convertSurfaceField
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||
const VolField<Type>& tf,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
const label datasetNo,
|
||||
|
||||
@ -59,14 +59,14 @@ void Foam::vtkPVFoam::convertVolFields
|
||||
if
|
||||
(
|
||||
iter()->headerClassName()
|
||||
!= GeometricField<Type, fvPatchField, volMesh>::typeName
|
||||
!= VolField<Type>::typeName
|
||||
)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Load field
|
||||
GeometricField<Type, fvPatchField, volMesh> tf
|
||||
VolField<Type> tf
|
||||
(
|
||||
*iter(),
|
||||
mesh
|
||||
@ -282,14 +282,14 @@ void Foam::vtkPVFoam::convertVolInternalFields
|
||||
if
|
||||
(
|
||||
iter()->headerClassName()
|
||||
!= GeometricField<Type, fvPatchField, volMesh>::Internal::typeName
|
||||
!= VolField<Type>::Internal::typeName
|
||||
)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Load field
|
||||
typename GeometricField<Type, fvPatchField, volMesh>::Internal tf
|
||||
typename VolField<Type>::Internal tf
|
||||
(
|
||||
*iter(),
|
||||
mesh
|
||||
@ -328,7 +328,7 @@ void Foam::vtkPVFoam::convertVolInternalFields
|
||||
template<class Type>
|
||||
void Foam::vtkPVFoam::convertVolFieldBlock
|
||||
(
|
||||
const GeometricField<Type, fvPatchField, volMesh>& tf,
|
||||
const VolField<Type>& tf,
|
||||
autoPtr<PointField<Type>>& ptfPtr,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
@ -370,7 +370,7 @@ void Foam::vtkPVFoam::convertVolFieldBlock
|
||||
template<class Type>
|
||||
void Foam::vtkPVFoam::convertVolInternalFieldBlock
|
||||
(
|
||||
const typename GeometricField<Type, fvPatchField, volMesh>::Internal& tf,
|
||||
const typename VolField<Type>::Internal& tf,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
const List<polyDecomp>& decompLst
|
||||
@ -398,7 +398,7 @@ void Foam::vtkPVFoam::convertVolInternalFieldBlock
|
||||
template<class Type>
|
||||
void Foam::vtkPVFoam::convertVolInternalField
|
||||
(
|
||||
const typename GeometricField<Type, fvPatchField, volMesh>::Internal& tf,
|
||||
const typename VolField<Type>::Internal& tf,
|
||||
vtkMultiBlockDataSet* output,
|
||||
const arrayRange& range,
|
||||
const label datasetNo,
|
||||
|
||||
Reference in New Issue
Block a user