Commit 30c9b13b authored by cyrush's avatar cyrush

add initial MFEM db plugin

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23703 18c085ea-50e0-402c-830e-de6fd14e8384
parent 4293ee0e
......@@ -177,6 +177,11 @@ ITAPS_LINK_DIRECTORIES(GRUMMP ${VISITHOME}/itaps/1.4/GRUMMP/0.6.5/${VISITARCH}/l
##
#VISIT_OPTION_DEFAULT(VISIT_MANTA_DIR ${VISITHOME}/manta/2540/${VISITARCH})
##
## MFEM
##
VISIT_OPTION_DEFAULT(VISIT_MFEM_DIR ${VISITHOME}/mfem/68e941f8fe/${VISITARCH})
##
## Mili
##
......
......@@ -277,6 +277,7 @@ CHECK_THIRDPARTY_DEPENDENT_PLUGINS(HDF4 Cosmos ZeusMP)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(MDSPLUS MDSplus)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(MILI Mili)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(UINTAH Uintah)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(MFEM MFEM)
IF (WIN32)
CHECK_THIRDPARTY_DEPENDENT_PLUGINS(ZLIB VCellMTMD)
ENDIF (WIN32)
......
# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake
PROJECT(MFEM)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/PluginMacros.cmake)
SET(COMMON_SOURCES
MFEMPluginInfo.C
MFEMCommonPluginInfo.C
)
SET(LIBI_SOURCES
MFEMPluginInfo.C
)
SET(LIBM_SOURCES
MFEMMDServerPluginInfo.C
${COMMON_SOURCES}
avtMFEMFileFormat.C
JSONRoot.C
)
SET(LIBE_SOURCES
MFEMEnginePluginInfo.C
${COMMON_SOURCES}
avtMFEMFileFormat.C
JSONRoot.C
)
INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}
${MFEM_INCLUDE_DIR}
${VISIT_INCLUDE_DIR}/third_party_builtin
${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
${EAVL_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${EAVL_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} ${MFEM_LIBRARY_DIR} )
ADD_LIBRARY(IMFEMDatabase ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(IMFEMDatabase visitcommon)
SET(INSTALLTARGETS IMFEMDatabase)
IF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(MMFEMDatabase ${LIBM_SOURCES} )
TARGET_LINK_LIBRARIES(MMFEMDatabase visitcommon avtdbatts avtdatabase_ser ${MFEM_LIB} )
ADD_TARGET_DEFINITIONS(MMFEMDatabase MDSERVER)
SET(INSTALLTARGETS ${INSTALLTARGETS} MMFEMDatabase)
ENDIF(NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(EMFEMDatabase_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EMFEMDatabase_ser visitcommon avtdatabase_ser avtpipeline_ser ${MFEM_LIB} )
ADD_TARGET_DEFINITIONS(EMFEMDatabase_ser ENGINE)
SET(INSTALLTARGETS ${INSTALLTARGETS} EMFEMDatabase_ser)
IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(EMFEMDatabase_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(EMFEMDatabase_par visitcommon avtdatabase_par avtpipeline_par ${MFEM_LIB} )
ADD_TARGET_DEFINITIONS(EMFEMDatabase_par ENGINE)
SET(INSTALLTARGETS ${INSTALLTARGETS} EMFEMDatabase_par)
ENDIF(VISIT_PARALLEL)
VISIT_INSTALL_DATABASE_PLUGINS(${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_RTOD(databases ${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_FOLDER(databases MFEM ${INSTALLTARGETS})
This diff is collapsed.
/*****************************************************************************
*
* Copyright (c) 2000 - 2014, 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.
*
*****************************************************************************/
// ************************************************************************* //
// JSONRoot.h //
// ************************************************************************* //
#include <string>
#include <vector>
#include <map>
#include <sstream>
// ****************************************************************************
// Method: avtMFEMFileFormat::JSONRootPath
//
// Purpose:
// Holds a file system or in db path. Will domain id to file mapping.
//
//
//
// Programmer: Cyrus Harrison
// Creation: Thu Jun 12 16:02:35 PDT 2014
//
// ****************************************************************************
class JSONRootPath
{
public:
JSONRootPath();
virtual ~JSONRootPath();
std::string Expand(int domain=0) const;
void Set(const std::string &path);
private:
std::string path;
};
// ****************************************************************************
// Method: avtMFEMFileFormat::JSONRootEntry
//
// Purpose:
// Used to hold a path and collection of tags (key, value strings pairs).
//
//
// Programmer: Cyrus Harrison
// Creation: Thu Jun 12 16:02:35 PDT 2014
//
// ****************************************************************************
class JSONRootEntry
{
public:
JSONRootEntry();
virtual ~JSONRootEntry();
JSONRootPath &Path();
void Tags(std::vector<std::string> &tag_names) const;
std::string &Tag(const std::string &tag_name);
bool HasTag(const std::string &tag_name) const;
private:
JSONRootPath path;
std::map<std::string,std::string> tags;
};
// ****************************************************************************
// Method: avtMFEMFileFormat::JSONRootDataSet
//
// Purpose:
// Holds meta data for dataset (mesh + fields).
//
//
// Programmer: Cyrus Harrison
// Creation: Thu Jun 12 16:02:35 PDT 2014
//
// ****************************************************************************
class JSONRootDataSet
{
public:
JSONRootDataSet();
virtual ~JSONRootDataSet();
int NumberOfDomains() const;
void SetNumberOfDomains(int ndomains);
JSONRootEntry &Mesh();
void Fields(std::vector<std::string> &field_names) const;
JSONRootEntry &Field(const std::string &field_name);
private:
// TODO: uint64 ...
int ndomains;
JSONRootEntry mesh;
std::map<std::string,JSONRootEntry> fields;
};
// ****************************************************************************
// Method: avtMFEMFileFormat::JSONRoot
//
// Purpose:
// Holds meta data for mulitple named datasets.
//
// Programmer: Cyrus Harrison
// Creation: Thu Jun 12 16:02:35 PDT 2014
//
// ****************************************************************************
class JSONRoot
{
public:
JSONRoot();
JSONRoot(const std::string &json_root);
virtual ~JSONRoot();
void DataSets(std::vector<std::string> &dset_names) const;
JSONRootDataSet &DataSet(const std::string &dset_name);
int NumberOfDataSets() const;
std::string ToJson();
void ToJson(std::ostringstream &oss);
private:
void ParseJSON(const std::string &json_root);
std::map<std::string,JSONRootDataSet> dsets;
};
<?xml version="1.0"?>
<Plugin name="MFEM" type="database" label="MFEM" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" dbtype="STMD" haswriter="false" hasoptions="false" filePatternsStrict="false" opensWholeDirectory="false">
<CXXFLAGS>
${MFEM_INCLUDE_DIR}
${VISIT_INCLUDE_DIR}/third_party_builtin
</CXXFLAGS>
<LDFLAGS>
${MFEM_LIBRARY_DIR}
</LDFLAGS>
<LIBS>
${MFEM_LIB}
</LIBS>
<FilePatterns>
*.mfem_root
</FilePatterns>
<Files components="M">
avtMFEMFileFormat.C
JSONRoot.C
</Files>
<Files components="E">
avtMFEMFileFormat.C
JSONRoot.C
</Files>
<Attribute name="" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude="">
</Attribute>
</Plugin>
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, 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.
*
*****************************************************************************/
#include <MFEMPluginInfo.h>
#include <avtMFEMFileFormat.h>
#include <avtSTMDFileFormatInterface.h>
#include <avtGenericDatabase.h>
// ****************************************************************************
// Method: MFEMCommonPluginInfo::GetDatabaseType
//
// Purpose:
// Returns the type of a MFEM database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
DatabaseType
MFEMCommonPluginInfo::GetDatabaseType()
{
return DB_TYPE_STMD;
}
// ****************************************************************************
// Method: MFEMCommonPluginInfo::SetupDatabase
//
// Purpose:
// Sets up a MFEM 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 MFEM database from list.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabase *
MFEMCommonPluginInfo::SetupDatabase(const char *const *list,
int nList, int nBlock)
{
avtSTMDFileFormat **ffl = new avtSTMDFileFormat*[nList];
for (int i = 0 ; i < nList ; i++)
{
ffl[i] = new avtMFEMFileFormat(list[i]);
}
avtSTMDFileFormatInterface *inter
= new avtSTMDFileFormatInterface(ffl, nList);
return new avtGenericDatabase(inter);
}
// ****************************************************************************
// Method: MFEMCommonPluginInfo::GetLicense
//
// Purpose:
// Gets the write options.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
std::string
MFEMCommonPluginInfo::GetLicense() const
{
return std::string();
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, 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.
*
*****************************************************************************/
#include <MFEMPluginInfo.h>
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the MFEM database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT EngineDatabasePluginInfo* MFEM_GetEngineInfo()
{
return new MFEMEnginePluginInfo;
}
// ****************************************************************************
// Method: MFEMEnginePluginInfo::GetWriter
//
// Purpose:
// Sets up a MFEM writer.
//
// Returns: A MFEM writer.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
avtDatabaseWriter *
MFEMEnginePluginInfo::GetWriter(void)
{
return NULL;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, 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.
*
*****************************************************************************/
#include <MFEMPluginInfo.h>
// ****************************************************************************
// Function: GetMDServerInfo
//
// Purpose:
// Return a new MDServerPluginInfo for the MFEM database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT MDServerDatabasePluginInfo* MFEM_GetMDServerInfo()
{
return new MFEMMDServerPluginInfo;
}
// this makes compilers happy... remove if we ever have functions here
void MFEMMDServerPluginInfo::dummy()
{
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2013, 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.
*
*****************************************************************************/
// ************************************************************************* //
// File: MFEMPluginInfo.C
// ************************************************************************* //
#include <MFEMPluginInfo.h>
#include <visit-config.h>
VISIT_PLUGIN_VERSION(MFEM,DBP_EXPORT)
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the MFEM database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
extern "C" DBP_EXPORT GeneralDatabasePluginInfo* MFEM_GetGeneralInfo()
{
return new MFEMGeneralPluginInfo;
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::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 *
MFEMGeneralPluginInfo::GetName() const
{
return "MFEM";
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::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 *
MFEMGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::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 *
MFEMGeneralPluginInfo::GetID() const
{
return "MFEM_1.0";
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::EnabledByDefault
//
// Purpose:
// Return true if this plugin should be enabled by default; false otherwise.
//
// Returns: true/false
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
MFEMGeneralPluginInfo::EnabledByDefault() const
{
return true;
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::HasWriter
//
// Purpose:
// Return true if this plugin has a database writer.
//
// Returns: true/false
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
MFEMGeneralPluginInfo::HasWriter() const
{
return false;
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::GetDefaultFilePatterns
//
// Purpose:
// Returns the default patterns for a MFEM database.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
std::vector<std::string>
MFEMGeneralPluginInfo::GetDefaultFilePatterns() const
{
std::vector<std::string> defaultPatterns;
defaultPatterns.push_back("*.mfem_root");
return defaultPatterns;
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::AreDefaultFilePatternsStrict
//
// Purpose:
// Returns if the file patterns for a MFEM database are
// intended to be interpreted strictly by default.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
bool
MFEMGeneralPluginInfo::AreDefaultFilePatternsStrict() const
{
return false;
}
// ****************************************************************************
// Method: MFEMGeneralPluginInfo::OpensWholeDirectory
//
// Purpose:
// Returns if the MFEM plugin opens a whole directory name
// instead of a single file.
//