mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Updated PV3Foam reader
This commit is contained in:
@ -210,7 +210,7 @@ int vtkPV3FoamReader::RequestData
|
|||||||
if
|
if
|
||||||
(
|
(
|
||||||
(UpdateGUIOld == GetUpdateGUI())
|
(UpdateGUIOld == GetUpdateGUI())
|
||||||
|| (output->GetNumberOfDataSets(0) == 0)
|
|| (output->GetNumberOfBlocks() == 0)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
foamData_->Update(output);
|
foamData_->Update(output);
|
||||||
|
|||||||
@ -41,7 +41,9 @@ class vtkDataArraySelection;
|
|||||||
class vtkCallbackCommand;
|
class vtkCallbackCommand;
|
||||||
|
|
||||||
|
|
||||||
class VTK_IO_EXPORT vtkPV3FoamReader : public vtkMultiBlockDataSetAlgorithm
|
class VTK_IO_EXPORT vtkPV3FoamReader
|
||||||
|
:
|
||||||
|
public vtkMultiBlockDataSetAlgorithm
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
EXE_INC = \
|
|
||||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
|
||||||
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
|
|
||||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
|
||||||
-I$(ParaView_DIR) \
|
|
||||||
-I$(ParaView_DIR)/VTK \
|
|
||||||
-I$(ParaView_DIR)/VTK/Common \
|
|
||||||
-I$(ParaView_DIR)/VTK/Filtering \
|
|
||||||
-I$(ParaView_DIR)/VTK/Rendering \
|
|
||||||
-I../PV3FoamReader
|
|
||||||
|
|
||||||
LIB_LIBS = \
|
|
||||||
-lfiniteVolume \
|
|
||||||
-llagrangian \
|
|
||||||
-lmeshTools \
|
|
||||||
$(GLIBS)
|
|
||||||
@ -37,6 +37,7 @@ License
|
|||||||
// VTK includes
|
// VTK includes
|
||||||
#include "vtkCharArray.h"
|
#include "vtkCharArray.h"
|
||||||
#include "vtkDataArraySelection.h"
|
#include "vtkDataArraySelection.h"
|
||||||
|
#include "vtkDataSet.h"
|
||||||
#include "vtkFieldData.h"
|
#include "vtkFieldData.h"
|
||||||
#include "vtkMultiBlockDataSet.h"
|
#include "vtkMultiBlockDataSet.h"
|
||||||
#include "vtkRenderer.h"
|
#include "vtkRenderer.h"
|
||||||
@ -55,6 +56,69 @@ defineTypeNameAndDebug(Foam::vtkPV3Foam, 0);
|
|||||||
#include "vtkPV3FoamUpdateInformationFields.H"
|
#include "vtkPV3FoamUpdateInformationFields.H"
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::vtkPV3Foam::AddToBlock
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet* output,
|
||||||
|
unsigned int blockNo,
|
||||||
|
unsigned int datasetNo,
|
||||||
|
vtkDataSet* dataset
|
||||||
|
)
|
||||||
|
{
|
||||||
|
vtkDataObject* blockDO = output->GetBlock(blockNo);
|
||||||
|
vtkMultiBlockDataSet* block = vtkMultiBlockDataSet::SafeDownCast(blockDO);
|
||||||
|
if (blockDO && !block)
|
||||||
|
{
|
||||||
|
FatalErrorIn("Foam::vtkPV3Foam::AddToBlock")
|
||||||
|
<< "Block already has a vtkDataSet assigned to it" << nl << endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!block)
|
||||||
|
{
|
||||||
|
block = vtkMultiBlockDataSet::New();
|
||||||
|
output->SetBlock(blockNo, block);
|
||||||
|
block->Delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
block->SetBlock(datasetNo, dataset);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
vtkDataSet* Foam::vtkPV3Foam::GetDataSetFromBlock
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet* output,
|
||||||
|
unsigned int blockNo,
|
||||||
|
unsigned int datasetNo
|
||||||
|
)
|
||||||
|
{
|
||||||
|
vtkDataObject* blockDO = output->GetBlock(blockNo);
|
||||||
|
vtkMultiBlockDataSet* block = vtkMultiBlockDataSet::SafeDownCast(blockDO);
|
||||||
|
if (block)
|
||||||
|
{
|
||||||
|
return vtkDataSet::SafeDownCast(block->GetBlock(datasetNo));
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Foam::label Foam::vtkPV3Foam::GetNumberOfDataSets
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet* output,
|
||||||
|
unsigned int blockNo
|
||||||
|
)
|
||||||
|
{
|
||||||
|
vtkDataObject* blockDO = output->GetBlock(blockNo);
|
||||||
|
vtkMultiBlockDataSet* block = vtkMultiBlockDataSet::SafeDownCast(blockDO);
|
||||||
|
if (block)
|
||||||
|
{
|
||||||
|
return block->GetNumberOfBlocks();
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::vtkPV3Foam::resetCounters()
|
void Foam::vtkPV3Foam::resetCounters()
|
||||||
{
|
{
|
||||||
// Reset data size counts
|
// Reset data size counts
|
||||||
@ -481,11 +545,11 @@ void Foam::vtkPV3Foam::Update
|
|||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
Info<< "Number of data sets after update" << nl
|
Info<< "Number of data sets after update" << nl
|
||||||
<< " VOLUME = " << output->GetNumberOfDataSets(VOLUME) << nl
|
<< " VOLUME = " << GetNumberOfDataSets(output, VOLUME) << nl
|
||||||
<< " LAGRANGIAN = " << output->GetNumberOfDataSets(LAGRANGIAN)
|
<< " LAGRANGIAN = " << GetNumberOfDataSets(output, LAGRANGIAN)
|
||||||
<< nl << " CELLSET = " << output->GetNumberOfDataSets(CELLSET)
|
<< nl << " CELLSET = " << GetNumberOfDataSets(output, CELLSET)
|
||||||
<< nl << " FACESET = " << output->GetNumberOfDataSets(FACESET)
|
<< nl << " FACESET = " << GetNumberOfDataSets(output, FACESET)
|
||||||
<< nl << " POINTSET = " << output->GetNumberOfDataSets(POINTSET)
|
<< nl << " POINTSET = " << GetNumberOfDataSets(output, POINTSET)
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,7 @@ License
|
|||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Class
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
Description
|
Description
|
||||||
|
|
||||||
@ -65,6 +65,7 @@ SourceFiles
|
|||||||
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * //
|
||||||
|
|
||||||
class vtkDataArraySelection;
|
class vtkDataArraySelection;
|
||||||
|
class vtkDataSet;
|
||||||
class vtkMultiBlockDataSet;
|
class vtkMultiBlockDataSet;
|
||||||
class vtkPoints;
|
class vtkPoints;
|
||||||
class vtkPV3FoamReader;
|
class vtkPV3FoamReader;
|
||||||
@ -188,6 +189,33 @@ class vtkPV3Foam
|
|||||||
|
|
||||||
// Private Member Functions
|
// Private Member Functions
|
||||||
|
|
||||||
|
// Convenience method use to convert the readers from VTK 5
|
||||||
|
// multiblock API to the current composite data infrastructure
|
||||||
|
void AddToBlock
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet* output,
|
||||||
|
unsigned int blockNo,
|
||||||
|
unsigned int datasetNo,
|
||||||
|
vtkDataSet* dataset
|
||||||
|
);
|
||||||
|
|
||||||
|
// Convenience method use to convert the readers from VTK 5
|
||||||
|
// multiblock API to the current composite data infrastructure
|
||||||
|
vtkDataSet* GetDataSetFromBlock
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet* output,
|
||||||
|
unsigned int blockNo,
|
||||||
|
unsigned int datasetNo
|
||||||
|
);
|
||||||
|
|
||||||
|
// Convenience method use to convert the readers from VTK 5
|
||||||
|
// multiblock API to the current composite data infrastructure
|
||||||
|
label GetNumberOfDataSets
|
||||||
|
(
|
||||||
|
vtkMultiBlockDataSet* output,
|
||||||
|
unsigned int blockNo
|
||||||
|
);
|
||||||
|
|
||||||
//- Reset data counters
|
//- Reset data counters
|
||||||
void resetCounters();
|
void resetCounters();
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -102,7 +102,7 @@ void Foam::vtkPV3Foam::convertLagrangianField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* lagrangianMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* lagrangianMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(LAGRANGIAN, 0)
|
GetDataSetFromBlock(output, LAGRANGIAN, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *pointTypes = vtkFloatArray::New();
|
vtkFloatArray *pointTypes = vtkFloatArray::New();
|
||||||
@ -144,7 +144,7 @@ void Foam::vtkPV3Foam::convertLagrangianField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* lagrangianMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* lagrangianMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(LAGRANGIAN, 0)
|
GetDataSetFromBlock(output, LAGRANGIAN, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *pointScalars = vtkFloatArray::New();
|
vtkFloatArray *pointScalars = vtkFloatArray::New();
|
||||||
|
|||||||
@ -65,7 +65,8 @@ void Foam::vtkPV3Foam::convertMeshVolume
|
|||||||
vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
|
vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
|
||||||
SetName(ugrid, "internalMesh");
|
SetName(ugrid, "internalMesh");
|
||||||
addVolumeMesh(mesh, ugrid, superCells_);
|
addVolumeMesh(mesh, ugrid, superCells_);
|
||||||
output->SetDataSet(VOLUME, 0, ugrid);
|
AddToBlock(output, VOLUME, 0, ugrid);
|
||||||
|
// reader_->SetBlock(output->GetNumberOfBlocks(), ugrid);
|
||||||
selectedRegionDatasetIds_[VOLUME] = 0;
|
selectedRegionDatasetIds_[VOLUME] = 0;
|
||||||
ugrid->Delete();
|
ugrid->Delete();
|
||||||
}
|
}
|
||||||
@ -96,7 +97,7 @@ void Foam::vtkPV3Foam::convertMeshLagrangian
|
|||||||
|
|
||||||
vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
|
vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
|
||||||
addLagrangianMesh(mesh, ugrid);
|
addLagrangianMesh(mesh, ugrid);
|
||||||
output->SetDataSet(LAGRANGIAN, 0, ugrid);
|
AddToBlock(output, LAGRANGIAN, 0, ugrid);
|
||||||
selectedRegionDatasetIds_[LAGRANGIAN] = 0;
|
selectedRegionDatasetIds_[LAGRANGIAN] = 0;
|
||||||
ugrid->Delete();
|
ugrid->Delete();
|
||||||
}
|
}
|
||||||
@ -141,8 +142,8 @@ void Foam::vtkPV3Foam::convertMeshPatches
|
|||||||
const label patchId = mesh.boundaryMesh()
|
const label patchId = mesh.boundaryMesh()
|
||||||
.findPatchID(regionName);
|
.findPatchID(regionName);
|
||||||
addPatchMesh(patches[patchId], ugrid);
|
addPatchMesh(patches[patchId], ugrid);
|
||||||
const label nextId = output->GetNumberOfDataSets(VOLUME);
|
const label nextId = GetNumberOfDataSets(output, VOLUME);
|
||||||
output->SetDataSet(VOLUME, nextId, ugrid);
|
AddToBlock(output, VOLUME, nextId, ugrid);
|
||||||
selectedRegionDatasetIds_[i] = nextId;
|
selectedRegionDatasetIds_[i] = nextId;
|
||||||
ugrid->Delete();
|
ugrid->Delete();
|
||||||
}
|
}
|
||||||
@ -188,14 +189,14 @@ void Foam::vtkPV3Foam::convertMeshCellSet
|
|||||||
|
|
||||||
vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
|
vtkUnstructuredGrid* ugrid = vtkUnstructuredGrid::New();
|
||||||
SetName(ugrid, cSetName.c_str());
|
SetName(ugrid, cSetName.c_str());
|
||||||
const label nextId = output->GetNumberOfDataSets(CELLSET);
|
const label nextId = GetNumberOfDataSets(output, CELLSET);
|
||||||
addVolumeMesh
|
addVolumeMesh
|
||||||
(
|
(
|
||||||
subsetter.subMesh(),
|
subsetter.subMesh(),
|
||||||
ugrid,
|
ugrid,
|
||||||
superCellSetCells_[nextId]
|
superCellSetCells_[nextId]
|
||||||
);
|
);
|
||||||
output->SetDataSet(CELLSET, nextId, ugrid);
|
AddToBlock(output, CELLSET, nextId, ugrid);
|
||||||
selectedRegionDatasetIds_[i] = nextId;
|
selectedRegionDatasetIds_[i] = nextId;
|
||||||
ugrid->Delete();
|
ugrid->Delete();
|
||||||
}
|
}
|
||||||
@ -245,8 +246,8 @@ void Foam::vtkPV3Foam::convertMeshFaceSet
|
|||||||
fSet,
|
fSet,
|
||||||
ugrid
|
ugrid
|
||||||
);
|
);
|
||||||
const label nextId = output->GetNumberOfDataSets(FACESET);
|
const label nextId = GetNumberOfDataSets(output, FACESET);
|
||||||
output->SetDataSet(FACESET, nextId, ugrid);
|
AddToBlock(output, FACESET, nextId, ugrid);
|
||||||
selectedRegionDatasetIds_[i] = nextId;
|
selectedRegionDatasetIds_[i] = nextId;
|
||||||
ugrid->Delete();
|
ugrid->Delete();
|
||||||
}
|
}
|
||||||
@ -296,8 +297,8 @@ void Foam::vtkPV3Foam::convertMeshPointSet
|
|||||||
pSet,
|
pSet,
|
||||||
ugrid
|
ugrid
|
||||||
);
|
);
|
||||||
const label nextId = output->GetNumberOfDataSets(POINTSET);
|
label nextId = GetNumberOfDataSets(output, POINTSET);
|
||||||
output->SetDataSet(POINTSET, nextId, ugrid);
|
AddToBlock(output, POINTSET, nextId, ugrid);
|
||||||
selectedRegionDatasetIds_[i] = nextId;
|
selectedRegionDatasetIds_[i] = nextId;
|
||||||
ugrid->Delete();
|
ugrid->Delete();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ void Foam::vtkPV3Foam::convertPatchFaceField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, regioni)
|
GetDataSetFromBlock(output, VOLUME, regioni)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *cellTypes = vtkFloatArray::New();
|
vtkFloatArray *cellTypes = vtkFloatArray::New();
|
||||||
@ -87,7 +87,7 @@ void Foam::vtkPV3Foam::convertPatchFaceField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, regioni)
|
GetDataSetFromBlock(output, VOLUME, regioni)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *cellScalars = vtkFloatArray::New();
|
vtkFloatArray *cellScalars = vtkFloatArray::New();
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ void Foam::vtkPV3Foam::convertPatchPointField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, regioni)
|
GetDataSetFromBlock(output, VOLUME, regioni)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *pointTypes = vtkFloatArray::New();
|
vtkFloatArray *pointTypes = vtkFloatArray::New();
|
||||||
@ -83,7 +83,7 @@ void Foam::vtkPV3Foam::convertPatchPointField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* vtkMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, regioni)
|
GetDataSetFromBlock(output, VOLUME, regioni)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *pointScalars = vtkFloatArray::New();
|
vtkFloatArray *pointScalars = vtkFloatArray::New();
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, 0)
|
GetDataSetFromBlock(output, VOLUME, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *pointTypes = vtkFloatArray::New();
|
vtkFloatArray *pointTypes = vtkFloatArray::New();
|
||||||
@ -197,7 +197,7 @@ void Foam::vtkPV3Foam::convertPointField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, 0)
|
GetDataSetFromBlock(output, VOLUME, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *pointScalars = vtkFloatArray::New();
|
vtkFloatArray *pointScalars = vtkFloatArray::New();
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
@ -177,10 +177,10 @@ void Foam::vtkPV3Foam::convertVolField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, 0)
|
GetDataSetFromBlock(output, VOLUME, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *cellTypes = vtkFloatArray::New();
|
vtkFloatArray* cellTypes = vtkFloatArray::New();
|
||||||
cellTypes->SetNumberOfTuples(superCells_.size());
|
cellTypes->SetNumberOfTuples(superCells_.size());
|
||||||
cellTypes->SetNumberOfComponents(Type::nComponents);
|
cellTypes->SetNumberOfComponents(Type::nComponents);
|
||||||
cellTypes->Allocate(Type::nComponents*superCells_.size());
|
cellTypes->Allocate(Type::nComponents*superCells_.size());
|
||||||
@ -220,7 +220,7 @@ void Foam::vtkPV3Foam::convertVolField
|
|||||||
{
|
{
|
||||||
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
vtkUnstructuredGrid* internalMesh = vtkUnstructuredGrid::SafeDownCast
|
||||||
(
|
(
|
||||||
output->GetDataSet(VOLUME, 0)
|
GetDataSetFromBlock(output, VOLUME, 0)
|
||||||
);
|
);
|
||||||
|
|
||||||
vtkFloatArray *cellScalars = vtkFloatArray::New();
|
vtkFloatArray *cellScalars = vtkFloatArray::New();
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,8 @@ License
|
|||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
InClass
|
Class
|
||||||
Foam::vtkPV3Foam
|
vtkPV3Foam
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user