Commit fa95c1e6 authored by kgriffin's avatar kgriffin

SPH Resample Operator

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@26782 18c085ea-50e0-402c-830e-de6fd14e8384
parent 09874cd4
......@@ -953,6 +953,33 @@ SumDoubleArray(double *inArray, double *outArray, int nArray)
#endif
}
// ****************************************************************************
// Function: SumDoubleArrayInPlace
//
// Purpose:
// Allow the root proc (0) to reuse its input buffer to store the sum
// accross all procs. The input data is taken from inOutArray and then replaced
// by the output data. This method should ONLY be called by the root proc (0), all
// other procs should call SumDoubleArray.
//
// Arguments:
// inOutArray The root proc input data and also where the overall sum (output data)
// will be placed.
// nArray The number of entries in inOutArray
//
// Programmer: Kevin Griffin
// Creation: July 7, 2015
//
// ****************************************************************************
void
SumDoubleArrayInPlace(double *inOutArray, int nArray)
{
#ifdef PARALLEL
MPI_Reduce(MPI_IN_PLACE, inOutArray, nArray, MPI_DOUBLE, MPI_SUM, 0, VISIT_MPI_COMM);
#endif
}
// ****************************************************************************
......
......@@ -75,6 +75,7 @@ PIPELINE_API void SumFloatArray(float *, float *, int);
PIPELINE_API void SumDoubleAcrossAllProcessors(double&);
PIPELINE_API void SumDoubleArrayAcrossAllProcessors(double *, double *,int);
PIPELINE_API void SumDoubleArray(double *, double *,int);
PIPELINE_API void SumDoubleArrayInPlace(double *, int);
PIPELINE_API void SumIntArrayAcrossAllProcessors(int *, int *, int);
PIPELINE_API void SumLongLongArrayAcrossAllProcessors(VISIT_LONG_LONG*, VISIT_LONG_LONG*, int);
PIPELINE_API bool ThisProcessorHasMinimumValue(double);
......
......@@ -68,6 +68,9 @@
# subdir before adding it. Call VISIT_SELECTED_PLUGIN_ERROR macro if
# necessary.
#
# Kevin Griffin, Wed July 22 18:00:10 PDT 2015
# Add SPH Resample Operator
#
#****************************************************************************/
IF(NOT WIN32)
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${VISIT_PLUGIN_DIR}/operators)
......@@ -128,6 +131,7 @@ Revolve
Slice
Smooth
SphereSlice
SPHResample
Stagger
StatisticalTrends
SurfaceNormal
......
# DO NOT EDIT THIS FILE! THIS FILE IS AUTOMATICALLY GENERATED BY xml2cmake
PROJECT(SPHResample)
INCLUDE(${VISIT_SOURCE_DIR}/CMake/PluginMacros.cmake)
SET(COMMON_SOURCES
SPHResamplePluginInfo.C
SPHResampleCommonPluginInfo.C
SPHResampleAttributes.C
)
SET(LIBI_SOURCES
SPHResamplePluginInfo.C
)
SET(LIBG_SOURCES
SPHResampleGUIPluginInfo.C
QvisSPHResampleWindow.C
${COMMON_SOURCES}
)
SET(LIBG_MOC_SOURCES
QvisSPHResampleWindow.h
)
SET(LIBV_SOURCES
SPHResampleViewerEnginePluginInfo.C
SPHResampleViewerPluginInfo.C
${COMMON_SOURCES}
)
SET(LIBE_SOURCES
SPHResampleViewerEnginePluginInfo.C
SPHResampleEnginePluginInfo.C
avtSPHResampleFilter.C
${COMMON_SOURCES}
)
IF(VISIT_PYTHON_SCRIPTING)
SET(PYINCLUDES ${PYTHON_INCLUDE_PATH} ${VISIT_INCLUDE_DIR}/visitpy/visitpy)
ENDIF(VISIT_PYTHON_SCRIPTING)
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/Expressions/Abstract
${VISIT_INCLUDE_DIR}/avt/Expressions/CMFE
${VISIT_INCLUDE_DIR}/avt/Expressions/Conditional
${VISIT_INCLUDE_DIR}/avt/Expressions/Derivations
${VISIT_INCLUDE_DIR}/avt/Expressions/General
${VISIT_INCLUDE_DIR}/avt/Expressions/ImageProcessing
${VISIT_INCLUDE_DIR}/avt/Expressions/Management
${VISIT_INCLUDE_DIR}/avt/Expressions/Math
${VISIT_INCLUDE_DIR}/avt/Expressions/MeshQuality
${VISIT_INCLUDE_DIR}/avt/Expressions/TimeIterators
${VISIT_INCLUDE_DIR}/avt/FileWriter
${VISIT_INCLUDE_DIR}/avt/Filters
${VISIT_INCLUDE_DIR}/avt/IVP
${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/Plotter
${VISIT_INCLUDE_DIR}/avt/QtVisWindow
${VISIT_INCLUDE_DIR}/avt/View
${VISIT_INCLUDE_DIR}/avt/VisWindow/Colleagues
${VISIT_INCLUDE_DIR}/avt/VisWindow/Interactors
${VISIT_INCLUDE_DIR}/avt/VisWindow/Proxies
${VISIT_INCLUDE_DIR}/avt/VisWindow/Tools
${VISIT_INCLUDE_DIR}/avt/VisWindow/VisWindow
${VISIT_INCLUDE_DIR}/gui
${VISIT_INCLUDE_DIR}/mdserver/proxy
${VISIT_INCLUDE_DIR}/mdserver/rpc
${VISIT_INCLUDE_DIR}/viewer/core
${VISIT_INCLUDE_DIR}/viewer/main
${VISIT_INCLUDE_DIR}/viewer/main/ui
${VISIT_INCLUDE_DIR}/viewer/proxy
${VISIT_INCLUDE_DIR}/viewer/rpc
${VISIT_INCLUDE_DIR}/winutil
${VISIT_INCLUDE_DIR}/visit_vtk/full
${VISIT_INCLUDE_DIR}/visit_vtk/lightweight
${QT_INCLUDE_DIR}
${QT_QTCORE_INCLUDE_DIR}
${QT_QTGUI_INCLUDE_DIR}
${EAVL_INCLUDE_DIR}
${VTK_INCLUDE_DIRS}
${PYINCLUDES}
)
LINK_DIRECTORIES(${VISIT_LIBRARY_DIR} ${QT_LIBRARY_DIR} ${GLEW_LIBRARY_DIR} ${EAVL_LIBRARY_DIR} ${VTK_LIBRARY_DIRS} )
ADD_LIBRARY(ISPHResampleOperator ${LIBI_SOURCES})
TARGET_LINK_LIBRARIES(ISPHResampleOperator visitcommon)
SET(INSTALLTARGETS ISPHResampleOperator)
IF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
QT_WRAP_CPP(GSPHResampleOperator LIBG_SOURCES ${LIBG_MOC_SOURCES})
ADD_LIBRARY(GSPHResampleOperator ${LIBG_SOURCES})
TARGET_LINK_LIBRARIES(GSPHResampleOperator visitcommon gui )
ADD_LIBRARY(VSPHResampleOperator ${LIBV_SOURCES})
TARGET_LINK_LIBRARIES(VSPHResampleOperator visitcommon viewer )
SET(INSTALLTARGETS ${INSTALLTARGETS} GSPHResampleOperator VSPHResampleOperator)
IF(VISIT_PYTHON_SCRIPTING)
SET(LIBS_SOURCES
SPHResampleScriptingPluginInfo.C
PySPHResampleAttributes.C
${COMMON_SOURCES}
)
ADD_LIBRARY(SSPHResampleOperator ${LIBS_SOURCES})
TARGET_LINK_LIBRARIES(SSPHResampleOperator visitcommon visitpy ${PYTHON_LIBRARY})
SET(INSTALLTARGETS ${INSTALLTARGETS} SSPHResampleOperator)
ENDIF(VISIT_PYTHON_SCRIPTING)
IF(VISIT_JAVA)
FILE(COPY SPHResampleAttributes.java DESTINATION ${JavaClient_BINARY_DIR}/src/operators)
ADD_CUSTOM_TARGET(JavaSPHResample ALL ${Java_JAVAC_EXECUTABLE} ${VISIT_Java_FLAGS} -d ${JavaClient_BINARY_DIR} -classpath ${JavaClient_BINARY_DIR} -sourcepath ${JavaClient_BINARY_DIR} SPHResampleAttributes.java
DEPENDS JavaClient
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
ENDIF(VISIT_JAVA)
ENDIF(NOT VISIT_SERVER_COMPONENTS_ONLY AND NOT VISIT_ENGINE_ONLY AND NOT VISIT_DBIO_ONLY)
ADD_LIBRARY(ESPHResampleOperator_ser ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(ESPHResampleOperator_ser visitcommon avtexpressions_ser avtfilters_ser avtpipeline_ser )
SET(INSTALLTARGETS ${INSTALLTARGETS} ESPHResampleOperator_ser)
IF(VISIT_PARALLEL)
ADD_PARALLEL_LIBRARY(ESPHResampleOperator_par ${LIBE_SOURCES})
TARGET_LINK_LIBRARIES(ESPHResampleOperator_par visitcommon avtexpressions_par avtfilters_par avtpipeline_par )
SET(INSTALLTARGETS ${INSTALLTARGETS} ESPHResampleOperator_par)
ENDIF(VISIT_PARALLEL)
VISIT_INSTALL_OPERATOR_PLUGINS(${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_RTOD(operators ${INSTALLTARGETS})
VISIT_PLUGIN_TARGET_FOLDER(operators SPHResample ${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.
*
*****************************************************************************/
#ifndef PY_SPHRESAMPLEATTRIBUTES_H
#define PY_SPHRESAMPLEATTRIBUTES_H
#include <Python.h>
#include <SPHResampleAttributes.h>
//
// Functions exposed to the VisIt module.
//
#define SPHRESAMPLEATTRIBUTES_NMETH 26
void PySPHResampleAttributes_StartUp(SPHResampleAttributes *subj, void *data);
void PySPHResampleAttributes_CloseDown();
PyMethodDef * PySPHResampleAttributes_GetMethodTable(int *nMethods);
bool PySPHResampleAttributes_Check(PyObject *obj);
SPHResampleAttributes * PySPHResampleAttributes_FromPyObject(PyObject *obj);
PyObject * PySPHResampleAttributes_New();
PyObject * PySPHResampleAttributes_Wrap(const SPHResampleAttributes *attr);
void PySPHResampleAttributes_SetParent(PyObject *obj, PyObject *parent);
void PySPHResampleAttributes_SetDefaults(const SPHResampleAttributes *atts);
std::string PySPHResampleAttributes_GetLogString();
std::string PySPHResampleAttributes_ToString(const SPHResampleAttributes *, const char *);
PyObject * PySPHResampleAttributes_getattr(PyObject *self, char *name);
int PySPHResampleAttributes_setattr(PyObject *self, char *name, PyObject *args);
extern PyMethodDef PySPHResampleAttributes_methods[SPHRESAMPLEATTRIBUTES_NMETH];
#endif
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.
*
*****************************************************************************/
#ifndef QVISSPHRESAMPLEWINDOW_H
#define QVISSPHRESAMPLEWINDOW_H
#include <QvisOperatorWindow.h>
#include <AttributeSubject.h>
class SPHResampleAttributes;
class QLabel;
class QCheckBox;
class QLineEdit;
class QSpinBox;
class QVBox;
class QButtonGroup;
class QvisColorTableButton;
class QvisOpacitySlider;
class QvisColorButton;
class QvisLineStyleWidget;
class QvisLineWidthWidget;
class QvisVariableButton;
// ****************************************************************************
// Class: QvisSPHResampleWindow
//
// Purpose:
// Defines QvisSPHResampleWindow class.
//
// Notes: Autogenerated by xml2window.
//
// Programmer: xml2window
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
class QvisSPHResampleWindow : public QvisOperatorWindow
{
Q_OBJECT
public:
QvisSPHResampleWindow(const int type,
SPHResampleAttributes *subj,
const QString &caption = QString::null,
const QString &shortName = QString::null,
QvisNotepadArea *notepad = 0);
virtual ~QvisSPHResampleWindow();
virtual void CreateWindowContents();
protected:
void UpdateWindow(bool doAll);
virtual void GetCurrentValues(int which_widget);
private slots:
void minXProcessText();
void maxXProcessText();
void xnumProcessText();
void minYProcessText();
void maxYProcessText();
void ynumProcessText();
void minZProcessText();
void maxZProcessText();
void znumProcessText();
void tensorSupportVariableChanged(const QString &varName);
void weightVariableChanged(const QString &varName);
void RKChanged(bool val);
private:
QLineEdit *minX;
QLineEdit *maxX;
QLineEdit *xnum;
QLineEdit *minY;
QLineEdit *maxY;
QLineEdit *ynum;
QLineEdit *minZ;
QLineEdit *maxZ;
QLineEdit *znum;
QvisVariableButton *tensorSupportVariable;
QvisVariableButton *weightVariable;
QCheckBox *RK;
QLabel *minXLabel;
QLabel *maxXLabel;
QLabel *xnumLabel;
QLabel *minYLabel;
QLabel *maxYLabel;
QLabel *ynumLabel;
QLabel *minZLabel;
QLabel *maxZLabel;
QLabel *znumLabel;
QLabel *tensorSupportVariableLabel;
QLabel *weightVariableLabel;
SPHResampleAttributes *atts;
};
#endif
<?xml version="1.0"?>
<Plugin name="SPHResample" type="operator" label="SPH Resample" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false">
<Attribute name="SPHResampleAttributes" purpose="" persistent="true" keyframe="true" exportAPI="" exportInclude="">
<Field name="minX" label="Minimum X" type="float">
0.000000
</Field>
<Field name="maxX" label="Maximum X" type="float">
1.000000
</Field>
<Field name="xnum" label="X Grid Cells" type="int">
10
</Field>
<Field name="minY" label="Minimum Y" type="float">
0.000000
</Field>
<Field name="maxY" label="Maximum Y" type="float">
1.000000
</Field>
<Field name="ynum" label="Y Grid Cells" type="int">
10
</Field>
<Field name="minZ" label="Minimum Z" type="float">
0.000000
</Field>
<Field name="maxZ" label="Maximum Z" type="float">
1.000000
</Field>
<Field name="znum" label="Z Grid Cells" type="int">
10
</Field>
<Field name="tensorSupportVariable" label="Tensor Support" type="variablename" vartypes="01000001100">
H
</Field>
<Field name="weightVariable" label="Weight" type="variablename" vartypes="01000000000">
mass
</Field>
<Field name="RK" label="RK" type="bool">
false
</Field>
</Attribute>
</Plugin>
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.
*
*****************************************************************************/
#ifndef SPHRESAMPLEATTRIBUTES_H
#define SPHRESAMPLEATTRIBUTES_H
#include <string>
#include <AttributeSubject.h>
// ****************************************************************************
// Class: SPHResampleAttributes
//
// Purpose:
//
//
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: omitted
//
// Modifications:
//
// ****************************************************************************
class SPHResampleAttributes : public AttributeSubject
{
public:
// These constructors are for objects of this class
SPHResampleAttributes();
SPHResampleAttributes(const SPHResampleAttributes &obj);
protected:
// These constructors are for objects derived from this class
SPHResampleAttributes(private_tmfs_t tmfs);
SPHResampleAttributes(const SPHResampleAttributes &obj, private_tmfs_t tmfs);
public:
virtual ~SPHResampleAttributes();
virtual SPHResampleAttributes& operator = (const SPHResampleAttributes &obj);
virtual bool operator == (const SPHResampleAttributes &obj) const;
virtual bool operator != (const SPHResampleAttributes &obj) const;
private:
void Init();
void Copy(const SPHResampleAttributes &obj);
public:
virtual const std::string TypeName() const;
virtual bool CopyAttributes(const AttributeGroup *);
virtual AttributeSubject *CreateCompatible(const std::string &) const;
virtual AttributeSubject *NewInstance(bool) const;
// Property selection methods
virtual void SelectAll();
void SelectTensorSupportVariable();
void SelectWeightVariable();
// Property setting methods
void SetMinX(float minX_);
void SetMaxX(float maxX_);
void SetXnum(int xnum_);
void SetMinY(float minY_);
void SetMaxY(float maxY_);
void SetYnum(int ynum_);
void SetMinZ(float minZ_);
void SetMaxZ(float maxZ_);
void SetZnum(int znum_);
void SetTensorSupportVariable(const std::string &tensorSupportVariable_);
void SetWeightVariable(const std::string &weightVariable_);
void SetRK(bool RK_);
// Property getting methods
float GetMinX() const;
float GetMaxX() const;
int GetXnum() const;
float GetMinY() const;
float GetMaxY() const;
int GetYnum() const;
float GetMinZ() const;
float GetMaxZ() const;
int GetZnum() const;
const std::string &GetTensorSupportVariable() const;
std::string &GetTensorSupportVariable();
const std::string &GetWeightVariable() const;
std::string &GetWeightVariable();
bool GetRK() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
virtual void SetFromNode(DataNode *node);
// Keyframing methods
virtual std::string GetFieldName(int index) const;
virtual AttributeGroup::FieldType GetFieldType(int index) const;
virtual std::string GetFieldTypeName(int index) const;
virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const;
// IDs that can be used to identify fields in case statements
enum {
ID_minX = 0,
ID_maxX,
ID_xnum,
ID_minY,
ID_maxY,
ID_ynum,
ID_minZ,
ID_maxZ,
ID_znum,
ID_tensorSupportVariable,
ID_weightVariable,
ID_RK,
ID__LAST
};
private:
float minX;
float maxX;
int xnum;
float minY;
float maxY;
int ynum;
float minZ;
float maxZ;
int znum;
std::string tensorSupportVariable;
std::string weightVariable;
bool RK;
// Static class format string for type map.
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define SPHRESAMPLEATTRIBUTES_TMFS "ffiffiffissb"
#endif
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.
*
*****************************************************************************/
// ************************************************************************* //
// File: SPHResampleCommonPluginInfo.C
// ************************************************************************* //
#include <SPHResamplePluginInfo.h>
#include <SPHResampleAttributes.h>
// ****************************************************************************
// Method: SPHResampleCommonPluginInfo::AllocAttributes
//
// Purpose:
// Return a pointer to a newly allocated attribute subject.
//
// Returns: A pointer to the newly allocated attribute subject.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
AttributeSubject *
SPHResampleCommonPluginInfo::AllocAttributes()
{
return new SPHResampleAttributes;
}
// ****************************************************************************
// Method: SPHResampleCommonPluginInfo::CopyAttributes
//
// Purpose:
// Copy a SPHResample attribute subject.
//
// Arguments:
// to The destination attribute subject.
// from The source attribute subject.
//
// Programmer: generated by xml2info
// Creation: omitted
//
// ****************************************************************************
void
SPHResampleCommonPluginInfo::CopyAttributes(AttributeSubject *to,
AttributeSubject *from)
{
*((SPHResampleAttributes *) to) = *((SPHResampleAttributes *) from);
}
/*****************************************************************************
*
* 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: