Commit 2b1795bf authored by hrchilds's avatar hrchilds

Update from July 20, 2003

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@38 18c085ea-50e0-402c-830e-de6fd14e8384
parent d4882eb3
......@@ -96,12 +96,13 @@ MILI=Mili
PDB=KullLite PDB
SAF=SAF
SAMPLES=Rect Hex
SAMRAI=SAMRAI
REQUIRED=BOV Curve2D EnSight Lines PLOT3D Point3D STL Silo Spheral VTK WavefrontOBJ
OPTIONAL=
SUBDIRS=$(REQUIRED) @DB_OPTIONAL_DIRS@ @EXODUS@ @SAF@ @HDF4@ @HDF5@ @PDB@ @MILI@
ALLSUBDIRS=$(REQUIRED) $(EXODUS) $(SAF) $(HDF4) $(HDF5) $(MILI) $(PDB) $(SAMPLES)
SUBDIRS=$(REQUIRED) @DB_OPTIONAL_DIRS@ @EXODUS@ @SAMRAI@ @SAF@ @HDF4@ @HDF5@ @PDB@ @MILI@
ALLSUBDIRS=$(REQUIRED) $(EXODUS) $(SAMRAI) $(SAF) $(HDF4) $(HDF5) $(MILI) $(PDB) $(SAMPLES)
message:
@echo
......
<?xml version="1.0"?>
<Plugin name="SAMRAI" type="database" label="SAMRAI" version="1.0" dbtype="MTMD">
<Extensions> samrai </Extensions>
<CXXFLAGS> -I/usr/apps/hdf5/serial-1.4.5-post2/include </CXXFLAGS>
<LIBS> -L/usr/apps/hdf5/serial-1.4.5-post2/lib -Wl,-Bstatic -lhdf5 -Wl,-Bdynamic </LIBS>
</Plugin>
\ No newline at end of file
#include <SAMRAIPluginInfo.h>
#include <avtSAMRAIFileFormat.h>
#include <avtMTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: SAMRAICommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a SAMRAI database.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
DatabaseType
SAMRAICommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_MTMD;
}
// ****************************************************************************
// Method: SAMRAICommonPluginInfo::GetDefaultExtensions
//
// Purpose:
// Returns the default extensions for a SAMRAI database.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
std::vector<std::string>
SAMRAICommonPluginInfo::GetDefaultExtensions()
{
std::vector<std::string> defaultExtensions;
defaultExtensions.push_back("samrai");
return defaultExtensions;
}
// ****************************************************************************
// Method: SAMRAICommonPluginInfo::SetUpSAMRAIDatabase
//
// Purpose:
// Sets up a SAMRAI database.
//
// Arguments:
// list A list of file names.
// nList The number of timesteps in list.
// nBlocks The number of blocks in the list.
//
// Returns: A SAMRAI database from list.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
avtDatabase *
SAMRAICommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
return new avtGenericDatabase(
new avtMTMDFileFormatInterface(
new avtSAMRAIFileFormat(list[0])));
}
#include <SAMRAIPluginInfo.h>
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the SAMRAI database.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
extern "C" EngineDatabasePluginInfo* GetEngineInfo()
{
return new SAMRAIEnginePluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void SAMRAIEnginePluginInfo::dummy()
{
}
#include <SAMRAIPluginInfo.h>
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the SAMRAI database.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
extern "C" MDServerDatabasePluginInfo* GetMDServerInfo()
{
return new SAMRAIMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void SAMRAIMDServerPluginInfo::dummy()
{
}
// ************************************************************************* //
// File: SAMRAIPluginInfo.C
// ************************************************************************* //
#include <SAMRAIPluginInfo.h>
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the SAMRAI database.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
extern "C" GeneralDatabasePluginInfo* GetGeneralInfo()
{
return new SAMRAIGeneralPluginInfo;
}
// ****************************************************************************
// Method: SAMRAIGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the database plugin.
//
// Returns: A pointer to the name of the database plugin.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
char *
SAMRAIGeneralPluginInfo::GetName() const
{
return "SAMRAI";
}
// ****************************************************************************
// Method: SAMRAIGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the database plugin.
//
// Returns: A pointer to the version of the database plugin.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
char *
SAMRAIGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: SAMRAIGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the database plugin.
//
// Returns: A pointer to the id of the database plugin.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// ****************************************************************************
char *
SAMRAIGeneralPluginInfo::GetID() const
{
return "SAMRAI_1.0";
}
// ****************************************************************************
// SAMRAIPluginInfo.h
// ****************************************************************************
#ifndef SAMRAI_PLUGIN_INFO_H
#define SAMRAI_PLUGIN_INFO_H
#include <DatabasePluginInfo.h>
#include <database_plugin_exports.h>
class avtDatabase;
// ****************************************************************************
// Class: SAMRAIDatabasePluginInfo
//
// Purpose:
// Classes that provide all the information about the SAMRAI plugin.
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
// Programmer: miller -- generated by xml2info
// Creation: Sun Jul 20 15:48:46 PST 2003
//
// Modifications:
//
// ****************************************************************************
class SAMRAIGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
virtual char *GetName() const;
virtual char *GetVersion() const;
virtual char *GetID() const;
};
class SAMRAICommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual SAMRAIGeneralPluginInfo
{
public:
virtual DatabaseType GetDatabaseType();
virtual std::vector<std::string> GetDefaultExtensions();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
};
class SAMRAIMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual SAMRAICommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
class SAMRAIEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual SAMRAICommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
#endif
This diff is collapsed.
// ************************************************************************* //
// avtSAMRAIFileFormat.h //
// ************************************************************************* //
#ifndef AVT_SAMRAI_FILE_FORMAT_H
#define AVT_SAMRAI_FILE_FORMAT_H
#include <avtMTMDFileFormat.h>
#include <vector>
#include <string>
#include <map>
#include <fstream.h>
#include <hdf5.h>
// ****************************************************************************
// Class: avtSAMRAIFileFormat
//
// Purpose:
// A file format reader for multi-timestep, multi-domain SAMRAI files.
//
// Programmer: Jeremy Meredith, Walter Herrera-Jimenez
// Creation: July 7, 2003
//
// ****************************************************************************
class avtSAMRAIFileFormat : public avtMTMDFileFormat
{
public:
avtSAMRAIFileFormat(const char *);
virtual ~avtSAMRAIFileFormat();
virtual const char *GetType(void) { return "SAMRAI File Format"; };
virtual void GetCycles(std::vector<int> &);
virtual int GetNTimesteps(void);
virtual vtkDataSet *ReadMesh(int, int, const char *);
virtual vtkDataSet *GetMesh(int, int, const char *);
virtual vtkDataArray *GetVar(int, int, const char *);
virtual vtkDataArray *GetVectorVar(int, int, const char *);
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *);
protected:
typedef struct {
int proc;
int cluster;
int level;
int patch_num;
} patch_map_t;
typedef struct {
std::vector<int> lower;
std::vector<int> upper;
std::vector<float> xlo;
std::vector<float> xup;
} patch_extents_t;
typedef struct {
float min;
float max;
} var_extents_t;
typedef struct {
int num_components;
int cell_centered;
} var_t;
vtkDataSet **cached_patches;
int num_timesteps;
std::string file_name;
std::string dir_name;
int dump_number;
double *xlo;
double *dx;
int *num_patches_level;
int *ratios_coarser_levels;
int *var_cell_centered;
int *var_num_components;
std::string *var_names;
std::map<std::string, var_t> var_names_num_components;
var_extents_t **var_extents;
patch_extents_t *patch_extents;
patch_map_t *patch_map;
int num_clusters;
int num_dim_problem;
int num_levels;
int num_patches;
int num_procs;
int num_vars;
double time;
void ReadMetaDataFile(hid_t &file);
unsigned int GetPatchOffset(const int level, const int patch);
};
#endif
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