Commit 0f2af420 authored by henry's avatar henry
Browse files
parents 35c9d7bb 8ce765e3
#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory
set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
case "$ParaView_VERSION" in
2*)
wmake libso vtkFoam
(
cd PVFoamReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
cd Make/$WM_OPTIONS
cmake ../..
make
)
;;
esac
fi
# ----------------------------------------------------------------- end-of-file
# Set the project/library name here. Classes should be declared as
# "class VTK_FoamReader_EXPORT vtkFoo", where PVFoamReader is the name of the
# project set here.
PROJECT(PVFoamReader)
# Set your list of sources here. Do not change the name of the
# PVFoamReader_SRCS variable.
SET(PVFoamReader_SRCS
vtkFoamReader.cxx
vtkFoamData.cxx
)
# List the kits from VTK that are needed by this project. Do not
# change the name of the PVFoamReader_LIBS variable.
SET(PVFoamReader_LIBS
vtkGraphics
)
INCLUDE_DIRECTORIES(
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
$ENV{ParaView_INST_DIR}/include
../vtkFoam/lnInclude
)
ADD_DEFINITIONS(-DWM_$ENV{WM_PRECISION_OPTION})
#-----------------------------------------------------------------------------
# Most users should not need to change anything below this line.
# Need to include class headers and the configuration header.
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})
# Import ParaView build settings.
FIND_PACKAGE(ParaView)
IF(NOT ParaView_FOUND)
MESSAGE(FATAL_ERROR "ParaView is required. Set ParaView_DIR.")
ENDIF(NOT ParaView_FOUND)
IF(NOT PARAVIEW_BUILD_SHARED_LIBS)
MESSAGE(FATAL_ERROR "ParaView must be built with BUILD_SHARED_LIBS ON.")
ENDIF(NOT PARAVIEW_BUILD_SHARED_LIBS)
INCLUDE(${PARAVIEW_USE_FILE})
# Configure output directories.
SET (LIBRARY_OUTPUT_PATH $ENV{FOAM_LIBBIN} CACHE INTERNAL
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH $ENV{FOAM_APPBIN} CACHE INTERNAL
"Single output directory for building all executables.")
# Create the configuration header.
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReaderConfigure.h.in
${PROJECT_BINARY_DIR}/vtk${PROJECT_NAME}Configure.h
@ONLY IMMEDIATE)
# Must be defined before ADD_LIBRARY for cmake version 2.3.4-20060317
LINK_DIRECTORIES($ENV{FOAM_LIBBIN})
LINK_DIRECTORIES($ENV{FOAM_USER_LIBBIN})
# Create vtk client/server wrappers for the classes.
VTK_WRAP_ClientServer(${PROJECT_NAME} PVFoamReaderCS_SRCS "${PVFoamReader_SRCS}")
# Build the package as a plugin for ParaView.
ADD_LIBRARY(${PROJECT_NAME} MODULE ${PVFoamReader_SRCS} ${PVFoamReaderCS_SRCS})
LINK_DIRECTORIES($ENV{ParaView_INST_DIR}/lib)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} vtkClientServer)
FOREACH(c ${PVFoamReader_LIBS})
TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${c}CS)
ENDFOREACH(c)
# Place the package configuration file into the build tree.
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReader.xml.in
${PROJECT_BINARY_DIR}/../${PROJECT_NAME}.xml @ONLY IMMEDIATE)
# Place the package configuration file into the build tree.
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/PVFoamReader.pvsm.in
${PROJECT_BINARY_DIR}/../${PROJECT_NAME}.pvsm @ONLY IMMEDIATE)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} OpenFOAM finiteVolume vtkFoam)
#-----------------------------------------------------------------------------
<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy
name="FoamReader"
class="vtkFoamReader">
<StringVectorProperty
name="FileName"
command="SetFileName"
number_of_elements="1">
<StringListDomain name="files"/>
</StringVectorProperty>
<IntVectorProperty
name="UpdateGUI"
command="SetUpdateGUI"
number_of_elements="1"
default_values="0">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="CacheMesh"
command="SetCacheMesh"
number_of_elements="1"
default_values="1">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="TimeStepRangeInfo"
command="GetTimeStepRange"
information_only="1">
<SimpleIntInformationHelper/>
</IntVectorProperty>
<IntVectorProperty
name="TimeStep"
command="SetTimeStep"
number_of_elements="1"
animateable="1"
default_values="0">
<IntRangeDomain name="range">
<RequiredProperties>
<Property name="TimeStepRangeInfo" function="Range"/>
</RequiredProperties>
</IntRangeDomain>
</IntVectorProperty>
<IntVectorProperty
name="TimeStepLimitsInfo"
command="GetTimeStepLimits"
information_only="1">
<SimpleIntInformationHelper/>
</IntVectorProperty>
<IntVectorProperty
name="TimeStepLimits"
command="SetTimeStepLimits"
number_of_elements="2"
default_values="2 5" >
<IntRangeDomain name="range">
<RequiredProperties>
<Property name="TimeStepLimitsInfo" function="Range"/>
</RequiredProperties>
</IntRangeDomain>
</IntVectorProperty>
<StringVectorProperty
name="TimeArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="Time"/>
</StringVectorProperty>
<StringVectorProperty
name="TimeStatus"
command="SetTimeArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="TimeArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="TimeArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<StringVectorProperty
name="RegionArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="Region"/>
</StringVectorProperty>
<StringVectorProperty
name="RegionStatus"
command="SetRegionArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="RegionArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="RegionArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<StringVectorProperty
name="VolFieldArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="VolField"/>
</StringVectorProperty>
<StringVectorProperty
name="VolFieldStatus"
command="SetVolFieldArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="VolFieldArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="VolFieldArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<StringVectorProperty
name="PointFieldArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="PointField"/>
</StringVectorProperty>
<StringVectorProperty
name="PointFieldStatus"
command="SetPointFieldArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="PointFieldArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="PointFieldArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>
<ModuleInterfaces>
<Library name="PVFoamReader"/>
<ServerManagerFile name="PVFoamReader.pvsm"/>
<Module name="FoamReader"
class="vtkPVAdvancedReaderModule"
root_name="Foam"
output="vtkDataSet"
module_type="Reader"
extensions=".foam"
file_description="Foam case">
<Source class="vtkFoamReader"/>
<LabeledToggle
label="Update GUI"
trace_name="UpdateGUI"
property="UpdateGUI"
help="To update GUI without execution toggle this Accept and Reset."/>
<LabeledToggle
label="Cache Mesh"
trace_name="CacheMesh"
property="CacheMesh"
help="Cache the FOAM mesh between GUI selection changes."/>
<Scale
property="TimeStep"
trace_name="TimeStep"
label="Time step"
display_entry="0"
display_value="1"
entry_and_label_on_top="0"
help="Select a time step."
keeps_timesteps="1"
range_source="TimeStepRange"/>
<VectorEntry
property="TimeStepLimits"
type="int"
trace_name="TimeStepLimits"
length="2"
label="Lower and Upper Times"
help="Maximum lower and upper number of time steps displayed in the selection list."/>
<ArraySelection
label_text="Time"
property="TimeStatus"
trace_name="TimeArrays"/>
<ArraySelection
label_text="Region"
property="RegionStatus"
trace_name="RegionArrays"/>
<ArraySelection
label_text="Vol Field"
property="VolFieldStatus"
trace_name="CellArrays"/>
<ArraySelection
label_text="Point Field"
property="PointFieldStatus"
trace_name="PointArrays"/>
<Documentation>
ParaView Foam reader module
</Documentation>
</Module>
</ModuleInterfaces>
<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy
name="FoamReader"
class="vtkFoamReader">
<StringVectorProperty
name="FileName"
command="SetFileName"
number_of_elements="1">
<StringListDomain name="files"/>
</StringVectorProperty>
<IntVectorProperty
name="UpdateGUI"
command="SetUpdateGUI"
number_of_elements="1"
default_values="0">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="CacheMesh"
command="SetCacheMesh"
number_of_elements="1"
default_values="1">
<BooleanDomain name="bool"/>
</IntVectorProperty>
<IntVectorProperty
name="TimeStepRangeInfo"
command="GetTimeStepRange"
information_only="1">
<SimpleIntInformationHelper/>
</IntVectorProperty>
<IntVectorProperty
name="TimeStep"
command="SetTimeStep"
number_of_elements="1"
animateable="1"
default_values="0">
<IntRangeDomain name="range">
<RequiredProperties>
<Property name="TimeStepRangeInfo" function="Range"/>
</RequiredProperties>
</IntRangeDomain>
</IntVectorProperty>
<IntVectorProperty
name="TimeStepLimitsInfo"
command="GetTimeStepLimits"
information_only="1">
<SimpleIntInformationHelper/>
</IntVectorProperty>
<IntVectorProperty
name="TimeStepLimits"
command="SetTimeStepLimits"
number_of_elements="2"
default_values="2 5" >
<IntRangeDomain name="range">
<RequiredProperties>
<Property name="TimeStepLimitsInfo" function="Range"/>
</RequiredProperties>
</IntRangeDomain>
</IntVectorProperty>
<StringVectorProperty
name="TimeArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="Time"/>
</StringVectorProperty>
<StringVectorProperty
name="TimeStatus"
command="SetTimeArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="TimeArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="TimeArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<StringVectorProperty
name="RegionArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="Region"/>
</StringVectorProperty>
<StringVectorProperty
name="RegionStatus"
command="SetRegionArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="RegionArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="RegionArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<StringVectorProperty
name="VolFieldArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="VolField"/>
</StringVectorProperty>
<StringVectorProperty
name="VolFieldStatus"
command="SetVolFieldArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="VolFieldArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="VolFieldArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
<StringVectorProperty
name="PointFieldArrayInfo"
information_only="1">
<ArraySelectionInformationHelper attribute_name="PointField"/>
</StringVectorProperty>
<StringVectorProperty
name="PointFieldStatus"
command="SetPointFieldArrayStatus"
number_of_elements="0"
repeat_command="1"
number_of_elements_per_command="2"
element_types="2 0"
information_property="PointFieldArrayInfo">
<ArraySelectionDomain name="array_list">
<RequiredProperties>
<Property name="PointFieldArrayInfo"
function="ArrayList"/>
</RequiredProperties>
</ArraySelectionDomain>
</StringVectorProperty>
</SourceProxy>
</ProxyGroup>
</ServerManagerConfiguration>
<ModuleInterfaces>
<Library name="@PROJECT_NAME@"/>
<ServerManagerFile name="@PROJECT_NAME@.pvsm"/>
<Module name="FoamReader"
class="vtkPVAdvancedReaderModule"
root_name="Foam"
output="vtkDataSet"
module_type="Reader"
extensions=".foam"
file_description="Foam case">
<Source class="vtkFoamReader"/>
<LabeledToggle
label="Update GUI"
trace_name="UpdateGUI"
property="UpdateGUI"
help="To update GUI without execution toggle this Accept and Reset."/>
<LabeledToggle
label="Cache Mesh"
trace_name="CacheMesh"
property="CacheMesh"
help="Cache the FOAM mesh between GUI selection changes."/>
<Scale
property="TimeStep"
trace_name="TimeStep"
label="Time step"
display_entry="0"
display_value="1"
entry_and_label_on_top="0"
help="Select a time step."
keeps_timesteps="1"
range_source="TimeStepRange"/>
<VectorEntry
property="TimeStepLimits"
type="int"
trace_name="TimeStepLimits"
length="2"
label="Lower and Upper Times"
help="Maximum lower and upper number of time steps displayed in the selection list."/>
<ArraySelection
label_text="Time"
property="TimeStatus"
trace_name="TimeArrays"/>
<ArraySelection
label_text="Region"
property="RegionStatus"
trace_name="RegionArrays"/>
<ArraySelection
label_text="Vol Field"
property="VolFieldStatus"
trace_name="CellArrays"/>
<ArraySelection
label_text="Point Field"
property="PointFieldStatus"
trace_name="PointArrays"/>
<Documentation>
ParaView Foam reader module
</Documentation>
</Module>
</ModuleInterfaces>
/*=========================================================================
This source has no copyright. It is intended to be copied by users
wishing to create their own ParaView plugin classes locally.
=========================================================================*/
#ifndef __vtk@PROJECT_NAME@_h
#define __vtk@PROJECT_NAME@_h
#if defined(_WIN32)
# if defined(@PROJECT_NAME@_EXPORTS)
# define VTK_@PROJECT_NAME@_EXPORT __declspec(dllexport)
# else
# define VTK_@PROJECT_NAME@_EXPORT __declspec(dllimport)
# endif
#else
# define VTK_@PROJECT_NAME@_EXPORT
#endif
#endif