Commit cba14546 authored by apletzer's avatar apletzer

+ support for high order fields, contribution form John Loverich <loverich@txcorp.com>


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22796 18c085ea-50e0-402c-830e-de6fd14e8384
parent 6fc7ff09
......@@ -39,6 +39,7 @@ VsAttribute.C
VsFile.C
VsReader.C
VsStaggeredField.C
HighOrderUnstructuredData.C
)
SET(LIBE_SOURCES
......@@ -67,6 +68,7 @@ VsDataset.C
VsAttribute.C
VsFile.C
VsReader.C
HighOrderUnstructuredData.C
)
INCLUDE_DIRECTORIES(
......
......@@ -25,7 +25,7 @@
HighOrderUnstructuredData::HighOrderUnstructuredData() {
VsLog::initialize(DebugStream::Stream3(), DebugStream::Stream4(),
DebugStream::Stream5());
DebugStream::Stream5());
VsLog::debugLog() << CLASSFUNCLINE << " " << "entering" << std::endl;
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
......@@ -49,6 +49,10 @@ public:
size_t getNumSpatialDims() const;
size_t getNumTopologicalDims() const;
virtual bool isHighOrder() const;
virtual std::string getSubCellLocationsDatasetName() const;
virtual VsDataset* getSubCellLocationsDataset() const;
static VsMesh* buildObject(VsDataset* dataset);
static VsMesh* buildObject(VsGroup* group);
......@@ -64,13 +68,16 @@ public:
virtual bool hasTransform() const;
virtual std::string getTransformName() const;
virtual std::string getTransformedMeshName() const;
protected:
VsMesh(VsObject* object);
virtual bool initialize() = 0;
bool initializeRoot();
void getStringAttribute(std::string attName, std::string* value) const;
/** Number of nodes per cell **/
size_t nodesPerCell;
/** The spatial dimensionality */
size_t numSpatialDims;
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
......@@ -6,7 +6,7 @@
*
* @brief Implementation reader of data for VSH5 schema
*
* @version $Id: VsReader.cpp 64 2013-04-24 21:09:55Z pletzer $
* @version $Id: VsReader.cpp 178 2014-01-31 22:33:46Z loverich $
*
* Copyright &copy; 2007-2008, Tech-X Corporation
* See LICENSE file for conditions of use.
......
......@@ -27,6 +27,7 @@ std::string VsSchema::numSpatialDimsAtt_deprecated = "numSpatialDims";
std::string VsSchema::spatialIndicesAtt = "vsSpatialIndices";
std::string VsSchema::labelsAtt = "vsLabels";
std::string VsSchema::axisLabelsAtt = "vsAxisLabels";
std::string VsSchema::VsSubCellLocationsAtt = "vsSubCellLocations";
std::string VsSchema::varKey = "variable";
std::string VsSchema::varWithMeshKey = "variableWithMesh";
......
......@@ -31,6 +31,8 @@ struct VsSchema {
static std::string spatialIndicesAtt;
static std::string labelsAtt;
static std::string axisLabelsAtt;
static std::string VsSubCellLocationsAtt;
static std::string varKey;
static std::string vsVarsKey;
static std::string varWithMeshKey;
......@@ -81,6 +83,7 @@ struct VsSchema {
struct Unstructured {
static std::string key;
static std::string defaultPolygonsName; //polygons
static std::string defaultPolyhedraName; //polyhedra
static std::string defaultPointsName; //points
......
......@@ -23,6 +23,44 @@ VsUnstructuredMesh::VsUnstructuredMesh(VsGroup* group):VsMesh(group) {
VsUnstructuredMesh::~VsUnstructuredMesh() {
}
/**
* Need to search through all possible cell types and figure out which one
* is being used. Currently assumes only one cell type is being used.
*/
VsDataset* VsUnstructuredMesh::getCellInfo()
{
VsDataset* connectivityMeta = 0;
// For now users can have only one connectivity dataset.
connectivityMeta = getLinesDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getPolygonsDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getTrianglesDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getQuadrilateralsDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getPolyhedraDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getTetrahedralsDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getPyramidsDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getPrismsDataset();
if(connectivityMeta!=NULL) return connectivityMeta;
connectivityMeta = getHexahedralsDataset();
return connectivityMeta;
}
//Tweak for Nautilus
std::string VsUnstructuredMesh::getNodeCorrectionDatasetName() const {
return makeCanonicalName(getFullName(), "localToGlobalNodeMapping");
......
......@@ -21,19 +21,21 @@ class VsUnstructuredMesh: public VsMesh {
public:
virtual ~VsUnstructuredMesh();
size_t getNumPoints() const;
size_t getNumCells() const;
virtual size_t getNumPoints() const;
virtual size_t getNumCells() const;
static VsUnstructuredMesh* buildUnstructuredMesh(VsGroup* group);
virtual bool isUnstructuredMesh() const { return true; }
virtual std::string getKind() const;
bool isUnstructuredMesh() const { return true; }
std::string getKind() const;
//Tweak for Nautilus
bool hasNodeCorrectionData() const;
std::string getNodeCorrectionDatasetName() const;
//end tweak
VsDataset* getCellInfo();
bool usesSplitPoints() const;
std::string getPointsDatasetName() const;
std::string getPointsDatasetName(int i) const;
......@@ -63,13 +65,18 @@ public:
virtual void getCellDims(std::vector<int>& dims) const;
private:
protected:
VsUnstructuredMesh(VsGroup* group);
virtual bool initialize();
size_t numPoints;
size_t numCells;
bool splitPoints;
std::vector<std::string> cellTypes;
private:
};
#endif /* VSUNSTRUCTUREDMESH_H_ */
......@@ -312,7 +312,7 @@ size_t VsVariable::getNumComps() const{
size_t res = 0;
// For unstructured meshes
if (meshMeta->isUnstructuredMesh()) {
if (meshMeta->isUnstructuredMesh() ) {
if ((meshDims.size() != 1) && (meshDims.size() != 2)) {
VsLog::debugLog() << "VsVariable::getNumComps(): error: dataset '" << getFullName() <<
"' does not have 1 or 2 dimensions. Number of components unknown." <<
......
This diff is collapsed.
......@@ -25,6 +25,7 @@
#include <avtSTMDFileFormat.h>
#include <hdf5.h>
#include <visit-hdf5.h>
#include "HighOrderUnstructuredData.h"
#include <string>
#include <vector>
......@@ -112,6 +113,35 @@ class avtVsFileFormat: public avtSTMDFileFormat {
*/
virtual vtkDataArray* GetVar(int domain, const char* varname);
/**
* Get variable in the case when it is stored on a node by node basis per cell. This
* is needed for discontinuous Galerkin data.
* @param meta is the variable of interest
* @param component is the component of interest
*/
virtual vtkDataArray* NodalVar(VsVariable* meta, std::string requestedName, int component);
/**
* Get a variable that is "standard". A standard variable is a variable that
* is stored on cell centers, cell vertices or edges. It does not include
* discontinuous Galerkin type data (or likely other high order data).
*/
virtual vtkDataArray* StandardVar(int domain, const char* requestedName);
/**
* Determine if the name is a component of a larger vector
* @param name is the name of the variable
* @param componentIndex is the index of that variable (returned).
*/
virtual bool nameIsComponent(std::string& name, int& componentIndex);
/**
* Check to see if the name has been transformed to a different name for
* display
* @param name is the name of the variable
*/
virtual bool isTransformedName(std::string& name);
/**
* Free up any resources created by this object.
*/
......@@ -168,7 +198,23 @@ class avtVsFileFormat: public avtSTMDFileFormat {
/** Ensure data has been read **/
void LoadData();
/**
* This is not the best way to do this. In fact every type of mesh should
* have a separate class and then there would be a pointer to the type selected.
* Since I only have one class that uses this approach I'm doing it this way.
*/
HighOrderUnstructuredData thisData;
private:
/**
* Get the meta data for a variable given a name.
* @domain is the domain of interest
* @requestedName is the full name of the variable
* @componentIndex is the component we are requesting
*/
VsVariable* getVariableMeta(int domain, std::string requestedName, int &componentIndex);
/**
* A counter to track the number of avtVsFileFormat objects in existence
*/
......@@ -205,8 +251,10 @@ class avtVsFileFormat: public avtSTMDFileFormat {
vtkDataSet* getStructuredMesh(VsStructuredMesh*, bool, int*, int*, int*);
vtkDataSet* getUnstructuredMesh(VsUnstructuredMesh*, bool, int*, int*, int*);
vtkDataSet* getPointMesh(VsVariableWithMesh*, bool, int*, int*, int*, bool);
vtkDataSet* getHighOrderUnstructuredMesh(VsUnstructuredMesh*, bool, int*, int*, int*);
vtkDataSet* getCurve(int domain, const std::string& name);
/**
* Each type of object is added to the database with a separate method
* for neatness.
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, Lawrence Livermore National Security, LLC
* Copyright (c) 2000 - 2012, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
......
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