Commit 299a16df authored by js9's avatar js9

adding GULP trajectory file format reader


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11869 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4f3dfc8f
......@@ -200,6 +200,7 @@ EnSight
ExtrudedVol
Fluent
GGCM
GULP
Gadget
Image
LAMMPS
......
# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake
PROJECT(GULP)
SET(COMMON_SOURCES
GULPPluginInfo.C
GULPCommonPluginInfo.C
)
SET(LIBI_SOURCES
GULPPluginInfo.C
)
SET(LIBM_SOURCES
GULPMDServerPluginInfo.C
${COMMON_SOURCES}
avtGULPFileFormat.C
)
SET(LIBE_SOURCES
GULPEnginePluginInfo.C
${COMMON_SOURCES}
avtGULPFileFormat.C
)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${VISIT_COMMON_INCLUDES}
${VISIT_INCLUDE_DIR}/avt/DBAtts/MetaData
${VISIT_INCLUDE_DIR}/avt/DBAtts/SIL
${VISIT_INCLUDE_DIR}/avt/Database/Database
${VISIT_INCLUDE_DIR}/avt/Database/Formats
${VISIT_INCLUDE_DIR}/avt/Database/Ghost
${VISIT_INCLUDE_DIR}/avt/FileWriter
${VISIT_INCLUDE_DIR}/avt/Filters
${VISIT_INCLUDE_DIR}/avt/MIR/Base
${VISIT_INCLUDE_DIR}/avt/MIR/Tet
${VISIT_INCLUDE_DIR}/avt/MIR/Zoo
${VISIT_INCLUDE_DIR}/avt/Math
${VISIT_INCLUDE_DIR}/avt/Pipeline/AbstractFilters
${VISIT_INCLUDE_DIR}/avt/Pipeline/Data
${VISIT_INCLUDE_DIR}/avt/Pipeline/Pipeline
${VISIT_INCLUDE_DIR}/avt/Pipeline/Sinks
${VISIT_INCLUDE_DIR}/avt/Pipeline/Sources
${VISIT_INCLUDE_DIR}/avt/VisWindow/VisWindow
${VISIT_INCLUDE_DIR}/visit_vtk/full
${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${VTK_INCLUDE_DIRS}
)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} )
ADD_LIBRARY(IGULPDatabase ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(IGULPDatabase visitcommon)
SET(INSTALLTARGETS IGULPDatabase)
IF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(MGULPDatabase ${LIBM_SOURCES} )
TARGET_LINK_LIBRARIES(MGULPDatabase visitcommon avtdbatts avtdatabase_ser )
ADD_TARGET_DEFINITIONS(MGULPDatabase MDSERVER)
SET(INSTALLTARGETS ${INSTALLTARGETS} MGULPDatabase)
ENDIF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(EGULPDatabase_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EGULPDatabase_ser visitcommon avtdatabase_ser avtpipeline_ser )
ADD_TARGET_DEFINITIONS(EGULPDatabase_ser ENGINE)
SET(INSTALLTARGETS ${INSTALLTARGETS} EGULPDatabase_ser)
IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(EGULPDatabase_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EGULPDatabase_par visitcommon avtdatabase_par avtpipeline_par )
ADD_TARGET_DEFINITIONS(EGULPDatabase_par ENGINE)
SET(INSTALLTARGETS ${INSTALLTARGETS} EGULPDatabase_par)
ENDIF(VISIT_PARALLEL)
VISIT_INSTALL_DATABASE_PLUGINS(${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_PREFIX(${INSTALLTARGETS})
<?xml version="1.0"?>
<Plugin name="GULP" type="database" label="GULP" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="MTSD" haswriter="false" hasoptions="false" filePatternsStrict="false" opensWholeDirectory="false">
<FilePatterns>
*.trg
</FilePatterns>
<Attribute name="" purpose="" persistent="false" keyframe="true" exportAPI="" exportInclude="">
</Attribute>
</Plugin>
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* 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.
*
*****************************************************************************/
#include <GULPPluginInfo.h>
#include <avtGULPFileFormat.h>
#include <avtMTSDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: GULPCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a GULP database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
DatabaseType
GULPCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_MTSD;
}
// ****************************************************************************
// Method: GULPCommonPluginInfo::SetupDatabase
//
// Purpose:
// Sets up a GULP 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 GULP database from list.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabase *
GULPCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
int nTimestepGroups = nList / nBlock;
avtMTSDFileFormat ***ffl = new avtMTSDFileFormat**[nTimestepGroups];
for (int i = 0 ; i < nTimestepGroups ; i++)
{
ffl[i] = new avtMTSDFileFormat*[nBlock];
for (int j = 0 ; j < nBlock ; j++)
{
ffl[i][j] = new avtGULPFileFormat(list[i*nBlock + j]);
}
}
avtMTSDFileFormatInterface *inter
= new avtMTSDFileFormatInterface(ffl, nTimestepGroups, nBlock);
return new avtGenericDatabase(inter);
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* 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.
*
*****************************************************************************/
#include <GULPPluginInfo.h>
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the GULP database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT EngineDatabasePluginInfo* GULP_GetEngineInfo()
{
return new GULPEnginePluginInfo;
}
// ****************************************************************************
// Method: GULPEnginePluginInfo::GetWriter
//
// Purpose:
// Sets up a GULP writer.
//
// Returns: A GULP writer.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabaseWriter *
GULPEnginePluginInfo::GetWriter(void)
{
return NULL;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* 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.
*
*****************************************************************************/
#include <GULPPluginInfo.h>
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the GULP database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT MDServerDatabasePluginInfo* GULP_GetMDServerInfo()
{
return new GULPMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void GULPMDServerPluginInfo::dummy()
{
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// File: GULPPluginInfo.C
// ************************************************************************* //
#include <GULPPluginInfo.h>
#include <visit-config.h>
extern "C" DBP_EXPORT const char *GULPVisItPluginVersion = VISIT_VERSION;
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the GULP database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT GeneralDatabasePluginInfo* GULP_GetGeneralInfo()
{
return new GULPGeneralPluginInfo;
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the database plugin.
//
// Returns: A pointer to the name of the database plugin.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
const char *
GULPGeneralPluginInfo::GetName() const
{
return "GULP";
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the database plugin.
//
// Returns: A pointer to the version of the database plugin.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
const char *
GULPGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the database plugin.
//
// Returns: A pointer to the id of the database plugin.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
const char *
GULPGeneralPluginInfo::GetID() const
{
return "GULP_1.0";
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::EnabledByDefault
//
// Purpose:
// Return true if this plugin should be enabled by default; false otherwise.
//
// Returns: true/false
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
GULPGeneralPluginInfo::EnabledByDefault() const
{
return true;
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::HasWriter
//
// Purpose:
// Return true if this plugin has a database writer.
//
// Returns: true/false
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
GULPGeneralPluginInfo::HasWriter() const
{
return false;
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::GetDefaultFilePatterns
//
// Purpose:
// Returns the default patterns for a GULP database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
std::vector<std::string>
GULPGeneralPluginInfo::GetDefaultFilePatterns() const
{
std::vector<std::string> defaultPatterns;
defaultPatterns.push_back("*.trg");
return defaultPatterns;
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::AreDefaultFilePatternsStrict
//
// Purpose:
// Returns if the file patterns for a GULP database are
// intended to be interpreted strictly by default.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
GULPGeneralPluginInfo::AreDefaultFilePatternsStrict() const
{
return false;
}
// ****************************************************************************
// Method: GULPGeneralPluginInfo::OpensWholeDirectory
//
// Purpose:
// Returns if the GULP plugin opens a whole directory name
// instead of a single file.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
GULPGeneralPluginInfo::OpensWholeDirectory() const
{
return false;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* 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.
*
*****************************************************************************/
// ****************************************************************************
// GULPPluginInfo.h
// ****************************************************************************
#ifndef GULP_PLUGIN_INFO_H
#define GULP_PLUGIN_INFO_H
#include <DatabasePluginInfo.h>
#include <database_plugin_exports.h>
class avtDatabase;
class avtDatabaseWriter;
// ****************************************************************************
// Class: GULPDatabasePluginInfo
//
// Purpose:
// Classes that provide all the information about the GULP plugin.
// Portions are separated into pieces relevant to the appropriate
// components of VisIt.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
class GULPGeneralPluginInfo : public virtual GeneralDatabasePluginInfo
{
public:
virtual const char *GetName() const;
virtual const char *GetVersion() const;
virtual const char *GetID() const;
virtual bool EnabledByDefault() const;
virtual bool HasWriter() const;
virtual std::vector<std::string> GetDefaultFilePatterns() const;
virtual bool AreDefaultFilePatternsStrict() const;
virtual bool OpensWholeDirectory() const;
};
class GULPCommonPluginInfo : public virtual CommonDatabasePluginInfo, public virtual GULPGeneralPluginInfo
{
public:
virtual DatabaseType GetDatabaseType();
virtual avtDatabase *SetupDatabase(const char * const *list,
int nList, int nBlock);
};
class GULPMDServerPluginInfo : public virtual MDServerDatabasePluginInfo, public virtual GULPCommonPluginInfo
{
public:
// this makes compilers happy... remove if we ever have functions here
virtual void dummy();
};
class GULPEnginePluginInfo : public virtual EngineDatabasePluginInfo, public virtual GULPCommonPluginInfo
{
public:
virtual avtDatabaseWriter *GetWriter(void);
};
#endif
This diff is collapsed.
This diff is collapsed.
/*****************************************************************************
*
* Copyright (c) 2000 - 2010, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-400124
* 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.
*
*****************************************************************************/
// ************************************************************************* //
// avtGULPFileFormat.h //
// ************************************************************************* //
#ifndef AVT_GULP_FILE_FORMAT_H
#define AVT_GULP_FILE_FORMAT_H
#include <avtMTSDFileFormat.h>
// ****************************************************************************
// Class: avtGULPFileFormat
//
// Purpose:
// Reads in GULP files as a plugin to VisIt.
//
// Programmer: Jeremy Meredith
// Creation: June 22, 2010
//
// ****************************************************************************
class avtGULPFileFormat : public avtMTSDFileFormat
{
public:
avtGULPFileFormat(const char *filename);
virtual ~avtGULPFileFormat() {;};
virtual int GetNTimesteps(void);
virtual bool ReturnsValidTime() const { return true; };
virtual void GetTimes(std::vector<double> &t);
virtual const char *GetType(void) { return "GULP"; };
virtual void FreeUpResources(void);
virtual vtkDataSet *GetMesh(int, const char *);
virtual vtkDataArray *GetVar(int, const char *);
protected:
virtual void PopulateDatabaseMetaData(avtDatabaseMetaData *);
std::vector<istream::pos_type> file_positions;
ifstream in;
std::string filename;
bool md_read;
int ntimesteps;
int current_timestep;
int natoms;
int dimension;
std::vector<double> times;
std::vector<float> x;
std::vector<float> y;
std::vector<float> z;
std::vector<float> vx;
<