Commit 782a71b1 authored by bonnell's avatar bonnell

Update OpenFOAM reader

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@21661 18c085ea-50e0-402c-830e-de6fd14e8384
parent b494bd36
......@@ -191,6 +191,7 @@ void avtMeshMetaData::Copy(const avtMeshMetaData &obj)
groupOrigin = obj.groupOrigin;
groupPieceName = obj.groupPieceName;
groupTitle = obj.groupTitle;
groupNames = obj.groupNames;
groupIds = obj.groupIds;
groupIdsBasedOnRange = obj.groupIdsBasedOnRange;
disjointElements = obj.disjointElements;
......@@ -435,6 +436,7 @@ avtMeshMetaData::operator == (const avtMeshMetaData &obj) const
(groupOrigin == obj.groupOrigin) &&
(groupPieceName == obj.groupPieceName) &&
(groupTitle == obj.groupTitle) &&
(groupNames == obj.groupNames) &&
(groupIds == obj.groupIds) &&
(groupIdsBasedOnRange == obj.groupIdsBasedOnRange) &&
(disjointElements == obj.disjointElements) &&
......@@ -628,6 +630,7 @@ avtMeshMetaData::SelectAll()
Select(ID_groupOrigin, (void *)&groupOrigin);
Select(ID_groupPieceName, (void *)&groupPieceName);
Select(ID_groupTitle, (void *)&groupTitle);
Select(ID_groupNames, (void *)&groupNames);
Select(ID_groupIds, (void *)&groupIds);
Select(ID_groupIdsBasedOnRange, (void *)&groupIdsBasedOnRange);
Select(ID_disjointElements, (void *)&disjointElements);
......@@ -1287,7 +1290,7 @@ avtMeshMetaData::Print(ostream &out, int indent) const
}
if ((int)blockNames.size() == numBlocks)
if (blockNames.size() == numBlocks)
{
Indent(out, indent);
out << "Block names: " << std::endl;
......@@ -1416,7 +1419,7 @@ avtMeshMetaData::SetAMRInfo(const std::string &levelName,
const std::vector<int> &patchesPerLevel)
{
int i;
int nlevels = (int)patchesPerLevel.size();
int nlevels = patchesPerLevel.size();
// Basic setup stuff
int numBlocks = 0;
......
......@@ -134,6 +134,7 @@ public:
ID_groupOrigin,
ID_groupPieceName,
ID_groupTitle,
ID_groupNames,
ID_groupIds,
ID_groupIdsBasedOnRange,
ID_disjointElements,
......@@ -188,6 +189,7 @@ public:
int groupOrigin;
std::string groupPieceName;
std::string groupTitle;
stringVector groupNames;
intVector groupIds;
intVector groupIdsBasedOnRange;
bool disjointElements;
......@@ -213,6 +215,6 @@ private:
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define AVTMESHMETADATA_TMFS "ssbiiiibIbiissssssbDDiisss*aiissi*i*bibbbbibFFbDibbii"
#define AVTMESHMETADATA_TMFS "ssbiiiibIbiissssssbDDiisss*aiisss*i*i*bibbbbibFFbDibbii"
#endif
......@@ -93,6 +93,8 @@
<Field name="groupTitle" label="Group titles" type="string" access="public">
groups
</Field>
<Field name="groupNames" label="Group names" type="stringVector" access="public">
</Field>
<Field name="groupIds" label="Group ids" type="intVector" access="public">
</Field>
<Field name="groupIdsBasedOnRange" label="Similar to groupIds, but do it based on ranges (for smaller memory footprint)" type="intVector" access="public">
......
......@@ -16,12 +16,18 @@ SET(LIBM_SOURCES
OpenFOAMMDServerPluginInfo.C
${COMMON_SOURCES}
avtOpenFOAMFileFormat.C
avtOpenFOAMOptions.C
visit_vtkOpenFOAMReader.cxx
visit_vtkPOpenFOAMReader.cxx
)
SET(LIBE_SOURCES
OpenFOAMEnginePluginInfo.C
${COMMON_SOURCES}
avtOpenFOAMFileFormat.C
avtOpenFOAMOptions.C
visit_vtkOpenFOAMReader.cxx
visit_vtkPOpenFOAMReader.cxx
)
INCLUDE_DIRECTORIES(
......
<?xml version="1.0"?>
<Plugin name="OpenFOAM" type="database" label="OpenFOAM" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTMD" haswriter="false" hasoptions="false" filePatternsStrict="true">
<Plugin name="OpenFOAM" type="database" label="OpenFOAM" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTMD" haswriter="false" hasoptions="true" filePatternsStrict="true" opensWholeDirectory="false">
<FilePatterns>
controlDict
</FilePatterns>
<Files components="M">
avtOpenFOAMFileFormat.C
avtOpenFOAMOptions.C
visit_vtkOpenFOAMReader.cxx
visit_vtkPOpenFOAMReader.cxx
</Files>
<Files components="E">
avtOpenFOAMFileFormat.C
avtOpenFOAMOptions.C
visit_vtkOpenFOAMReader.cxx
visit_vtkPOpenFOAMReader.cxx
</Files>
<Attribute name="" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude="">
</Attribute>
</Plugin>
......@@ -40,6 +40,7 @@
#include <avtOpenFOAMFileFormat.h>
#include <avtMTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
#include <avtOpenFOAMOptions.h>
// ****************************************************************************
// Method: OpenFOAMCommonPluginInfo::GetDatabaseType
......@@ -83,9 +84,42 @@ OpenFOAMCommonPluginInfo::SetupDatabase(const char *const *list,
avtMTMDFileFormat **ffl = new avtMTMDFileFormat*[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
{
ffl[i] = new avtOpenFOAMFileFormat(list[i*nBlock]);
ffl[i] = new avtOpenFOAMFileFormat(list[i*nBlock], readOptions);
}
avtMTMDFileFormatInterface *inter
= new avtMTMDFileFormatInterface(ffl, nTimestepGroups);
return new avtGenericDatabase(inter);
}
// ****************************************************************************
// Method: OpenFOAMCommonPluginInfo::GetReadOptions
//
// Purpose:
// Gets the read options.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
DBOptionsAttributes *
OpenFOAMCommonPluginInfo::GetReadOptions() const
{
return GetOpenFOAMReadOptions();
}
// ****************************************************************************
// Method: OpenFOAMCommonPluginInfo::GetWriteOptions
//
// Purpose:
// Gets the write options.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
DBOptionsAttributes *
OpenFOAMCommonPluginInfo::GetWriteOptions() const
{
return GetOpenFOAMWriteOptions();
}
......@@ -185,7 +185,7 @@ OpenFOAMGeneralPluginInfo::GetDefaultFilePatterns() const
bool
OpenFOAMGeneralPluginInfo::AreDefaultFilePatternsStrict() const
{
return true;
return false;
}
// ****************************************************************************
......
......@@ -82,6 +82,8 @@ class OpenFOAMCommonPluginInfo : public virtual CommonDatabasePluginInfo, public
virtual DatabaseType GetDatabaseType();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
virtual DBOptionsAttributes *GetReadOptions() const;
virtual DBOptionsAttributes *GetWriteOptions() const;
};
class OpenFOAMMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual OpenFOAMCommonPluginInfo
......
This source diff could not be displayed because it is too large. You can view the blob instead.
/*****************************************************************************
*
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// avtOpenFOAMFileFormat.h //
// avtOpenFOAMFileFormat.h //
// ************************************************************************* //
//THIS READER IS FOR DOUBLE PRECISION ONLY
//MUST DO A REOPEN UPON CHANGING TIMESTEPS TO
//REPOPULATE THE VECTORS/SCALARS LISTS
#ifndef AVT_OpenFOAM_FILE_FORMAT_H
#define AVT_OpenFOAM_FILE_FORMAT_H
#include <avtMTMDFileFormat.h>
#include <utility>
#include <map>
#include <vector>
#include <sstream>
#include <string>
#include <visitstream.h>
#include <vtkUnstructuredGrid.h>
#include <vtkIntArray.h>
#include <vtkDoubleArray.h>
#include <vtkFloatArray.h>
#include <vtkPoints.h>
#include <vtkCellData.h>
#include <vtkVertex.h>
#include <vtkHexahedron.h>
#include <vtkWedge.h>
#include <vtkPyramid.h>
#include <vtkTetra.h>
#include <vtkConvexPointSet.h>
#include <vtkTriangle.h>
#include <vtkQuad.h>
#include <vtkPolygon.h>
#include <vtkUnstructuredGrid.h>
#include <vtkObjectFactory.h>
#include <vtkDirectory.h>
#include <vectortypes.h>
#include <avtTypes.h>
class DBOptionsAttributes;
class visit_vtkPOpenFOAMReader;
class vtkStdString;
class vtkMultiBlockDataSet;
// ****************************************************************************
// Class: avtOpenFOAMFileFormat
......@@ -42,90 +62,48 @@
// Purpose:
// Reads in OpenFOAM files as a plugin to VisIt.
//
// Programmer: root -- generated by xml2avt
// Creation: Wed Jun 7 16:01:15 PST 2006
// Programmer: biagas2 -- generated by xml2avt
// Creation: Tue May 21 11:07:32 PDT 2013
//
// ****************************************************************************
typedef struct
{
int faceIndex;
bool neighborFace;
}face;
class avtOpenFOAMFileFormat : public avtMTMDFileFormat
{
public:
avtOpenFOAMFileFormat(const char *);
virtual ~avtOpenFOAMFileFormat() {;};
virtual int GetNTimesteps(void);
virtual void GetTimes(std::vector<double> &times);
virtual const char *GetType(void) { return "OpenFOAM"; };
virtual void FreeUpResources(void);
virtual vtkDataSet *GetMesh(int, int, const char *);
virtual vtkDataArray *GetVar(int, int, const char *);
virtual vtkDataArray *GetVectorVar(int, int, const char *);
virtual bool HasInvariantMetaData(void) const { return false; }; //Number of variables dynamic
virtual bool HasInvariantSIL(void) const { return false; }; //Number of Domains dynamic
virtual void ActivateTimestep(int);
avtOpenFOAMFileFormat(const char *, DBOptionsAttributes *);
virtual ~avtOpenFOAMFileFormat() {;};
virtual void GetTimes(std::vector<double> &);
virtual int GetNTimesteps(void);
protected:
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
virtual const char *GetType(void) { return "OpenFOAM"; };
virtual void FreeUpResources(void);
//Members
bool CreateFaces;
bool FirstVar;
bool FirstVectorVar;
std::string Path;
std::string PathPrefix;
int NumberOfTimeSteps;
int StartFace;
int NFaces;
double * Steps;
vtkFloatArray * TempData;
std::vector< std::string > PolyMeshPointsDir;
std::vector< std::string > PolyMeshFacesDir;
vtkPoints * Points;
vtkIdType NumFaces;
vtkIdType NumPoints;
vtkIntArray * FaceOwner;
vtkIntArray * FaceNeighbor;
vtkIdType NumCells;
std::vector< std::vector<int> > FacePoints;
std::vector< std::vector<int> > FacesOwnerCell;
std::vector< std::vector<int> > FacesNeighborCell;
std::vector< std::vector<face> > FacesOfCell;
int NumBlocks;
int NumBoundaries;
int NumPointZones;
int NumFaceZones;
int NumCellZones;
//create temporary vectors
std::vector< std::string > BoundaryNames;
std::vector< std::string > PointZoneNames;
std::vector< std::string > FaceZoneNames;
std::vector< std::string > CellZoneNames;
std::vector< std::string > ScalarNames;
std::vector< std::string > VectorNames;
virtual vtkDataSet *GetMesh(int, int, const char *);
virtual vtkDataArray *GetVar(int, int, const char *);
virtual vtkDataArray *GetVectorVar(int, int, const char *);
// Number of variables dynamic
virtual bool HasInvariantMetaData(void) const { return true; }
// Number of Domains dynamic
virtual bool HasInvariantSIL(void) const { return true; }
virtual void ActivateTimestep(int);
//Methods
double ControlDictDataParser(std::string); //Parser ControlDict Entries
void ReadControlDict(); //Read the ControlDict File
void ReadFacesFile(std::string); //Read the faces into a vector
void GetPoints(int); //Read the Points File
void ReadOwnerFile(std::string); //read the owner faces into a vector
void ReadNeighborFile(std::string); //read the neighbor faces into a vector
void CombineOwnerNeigbor(); //Create a vector of cell faces
vtkUnstructuredGrid * MakeInternalMesh(); //calls the functions to create internal mesh
void PopulatePolyMeshDirArrays(); //Creates a vector that tells you at what time step the points and faces file reside
std::string GetDataType(std::string, std::string); //Parses the files to quickly find out what type of variables you have for the meta data
vtkFloatArray * GetInternalVariableAtTimestep( std::string, int); //Returns the values a requested variable for the internal mesh
vtkFloatArray * GetBoundaryVariableAtTimestep(int, std::string, int); //Returns the values a requested variable for the boundary meshed
std::vector< std::string > GatherBlocks(std::string, int); //creates a vector of all the blocks in a region
vtkUnstructuredGrid * GetBoundaryMesh(int, int); //returns a requested boundary mesh
vtkUnstructuredGrid * GetPointZoneMesh(int, int); //returns a requested point zone mesh
vtkUnstructuredGrid * GetCellZoneMesh(int, int); //returns a requested cell zone mesh
vtkUnstructuredGrid * GetFaceZoneMesh(int, int); //returns a requested face zone mesh
protected:
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *, int);
void SelectPatchArray(int, const std::string &);
avtVarType OpenFOAMClassNameToVarType(const vtkStdString &cn);
void AddVarToMetaData(avtVarType, avtDatabaseMetaData *,
std::string, std::string,
avtCentering);
vtkDataArray *ReadVar(int, int, const char *);
vtkDataSet *GetBlock(vtkMultiBlockDataSet *);
visit_vtkPOpenFOAMReader *reader;
doubleVector timeSteps;
bool convertCellToPoint;
bool readZones;
int currentTimeStep;
std::string currentMesh;
std::string currentPatch;
};
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// avtOpenFOAMOptions.C //
// ************************************************************************* //
#include <avtOpenFOAMOptions.h>
#include <DBOptionsAttributes.h>
#include <string>
#include <vector>
// ****************************************************************************
// Function: GetOpenFOAMReadOptions
//
// Purpose:
// Creates the options for OpenFOAM readers.
//
// Important Note:
// The code below sets up empty options. If your format
// does not require read options, no modifications are
// necessary.
//
// Programmer: biagas2 -- generated by xml2avt
// Creation: Tue May 21 11:07:32 PDT 2013
//
// ****************************************************************************
DBOptionsAttributes *
GetOpenFOAMReadOptions(void)
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
rv->SetEnum("Case Type", 1);
std::vector<std::string> caseType;
caseType.push_back("Decomposed");
caseType.push_back("Reconstructed");
rv->SetEnumStrings("Case Type", caseType);
rv->SetBool("Convert Cell Data To Point Data", false);
rv->SetBool("Read Zones", false);
#if 0
rv->SetBool("Positions in 1.3 Format", false);
#endif
return rv;
}
// ****************************************************************************
// Function: GetOpenFOAMWriteOptions
//
// Purpose:
// Creates the options for OpenFOAM writers.
//
// Important Note:
// The code below sets up empty options. If your format
// does not require write options, no modifications are
// necessary.
//
// Programmer: biagas2 -- generated by xml2avt
// Creation: Tue May 21 11:07:32 PDT 2013
//
// ****************************************************************************
DBOptionsAttributes *
GetOpenFOAMWriteOptions(void)
{
DBOptionsAttributes *rv = new DBOptionsAttributes;
return rv;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// avtOpenFOAMOptions.h //
// ************************************************************************* //
#ifndef AVT_OpenFOAM_OPTIONS_H
#define AVT_OpenFOAM_OPTIONS_H
class DBOptionsAttributes;
#include <string>
// ****************************************************************************
// Functions: avtOpenFOAMOptions
//
// Purpose:
// Creates the options for OpenFOAM readers and/or writers.
//
// Programmer: biagas2 -- generated by xml2avt
// Creation: Tue May 21 11:07:32 PDT 2013
//
// ****************************************************************************
DBOptionsAttributes *GetOpenFOAMReadOptions(void);
DBOptionsAttributes *GetOpenFOAMWriteOptions(void);
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/*=========================================================================
Program: Visualization Toolkit
Module: visit_vtkPOpenFOAMReader.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME visit_vtkPOpenFOAMReader - reads a decomposed dataset in OpenFOAM format
// .SECTION Description
// visit_vtkPOpenFOAMReader creates a multiblock dataset. It reads
// parallel-decomposed mesh information and time dependent data. The
// polyMesh folders contain mesh information. The time folders contain
// transient data for the cells. Each folder can contain any number of
// data files.
// .SECTION Thanks
// This class was developed by Takuya Oshima at Niigata University,
// Japan (oshima@eng.niigata-u.ac.jp).
#ifndef __visit_vtkPOpenFOAMReader_h
#define __visit_vtkPOpenFOAMReader_h
#include "visit_vtkOpenFOAMReader.h"
class vtkDataArraySelection;
class visit_vtkPOpenFOAMReader : public visit_vtkOpenFOAMReader
{
public:
//BTX
enum caseType { DECOMPOSED_CASE = 0, RECONSTRUCTED_CASE = 1 };
//ETX
static visit_vtkPOpenFOAMReader *New();
vtkTypeMacro(visit_vtkPOpenFOAMReader, visit_vtkOpenFOAMReader);
void PrintSelf(ostream &os, vtkIndent indent);
// Description:
// Set and get case type. 0 = decomposed case, 1 = reconstructed case.
void SetCaseType(const int t);
vtkGetMacro(CaseType, caseType);
protected:
visit_vtkPOpenFOAMReader();
~visit_vtkPOpenFOAMReader();
int RequestInformation(vtkInformation *, vtkInformationVector **,
vtkInformationVector *);
int RequestData(vtkInformation *, vtkInformationVector **,
vtkInformationVector *);
private:
caseType CaseType;
unsigned long MTimeOld;
int MaximumNumberOfPieces;
int NumProcesses;
int ProcessId;
visit_vtkPOpenFOAMReader(const visit_vtkPOpenFOAMReader &); // Not implemented.
void operator=(const visit_vtkPOpenFOAMReader &); // Not implemented.
void GatherMetaData();
void BroadcastStatus(int &);
void Broadcast(vtkStringArray *);
void AllGather(vtkStringArray *);
void AllGather(vtkDataArraySelection *);
};
#endif
......@@ -68,7 +68,14 @@ enhancements and bug-fixes that were added to this release.</p>
<li>Reading and exporting of PLY files is now supported in both serial, and parallel. Additionaly, PLY files may be exported using a colormap to export out colors.</li>
<li>Reading GMV files that encoded polygons in a general cell now works.</li>
<li>Added a GHOST (Geophysical High Order Suite for Turbulence) file format reader.</li>
<li></li>
<li>The OpenFOAM reader has been updated to support newer OpenFOAM conventions, including Lagrangian clouds and multi-region data. Sub-meshes are now presented separately, instead of as selectable subsets together with internalMesh, to reduce duplication of plotted data. The are three File Open options:
<ul>
<li>Case Type: <i>Reconstructed (default) or Decomposed</i></li>
<li>Convert Cell Data To Point Data:<i> true or false (default)</i></li>
<li>Read Zones: <i> true or false (default)</i></li>
</ul>
The <i>Read Zones</i> option will make available (if present in the data) <i> cellZones, faceZones</i> and <i>pointZones</i> meshes.
</li>
<li></li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment