Hi Andy and Berk, Here is the error that I am receiving.
I know that it is initializing ok and failing at the first call to the co-processor. I have attached my python script output as well as my test code and adaptors. CoProcessingExample(19247,0x7fff77470180) malloc: *** mmap(size=3739605888335872) failed (error code=12) *** error: can't allocate region *** set a breakpoint in malloc_error_break to debug Operating system error: Cannot allocate memory Memory allocation failed Thanks for the help, Lucas From: Andy Bauer [[email protected]] Sent: Wednesday, March 20, 2013 9:08 AM To: Pettey . Lucas Cc: Berk Geveci; paraview [[email protected]] Subject: Re: [Paraview] CoProcessing with Fortran and ParaView 3.98 Hi Lucas, Can you share your co-processing script and any run output? There may be warnings in the output or info in the script that will help figure that out. Thanks, Andy On Wed, Mar 20, 2013 at 10:04 AM, Pettey . Lucas <[email protected]<mailto:[email protected]>> wrote: Hi Berk, Thanks for the help. I found that this example is written based on an earlier version of VTK so some of the function calls have changed. Based on your advice and some of the examples contained in the ParaView wiki, I have gotten it to compile and run. Now I just have to figure out why it isn't generating any VTK objects.... Probably something wrong with my python co-processing script. Thanks Lucas ________________________________ From: Berk Geveci [[email protected]<mailto:[email protected]>] Sent: Tuesday, March 19, 2013 6:48 PM To: Pettey . Lucas Cc: paraview [[email protected]<mailto:[email protected]>] Subject: Re: [Paraview] CoProcessing with Fortran and ParaView 3.98 You can simply delete this line: Grid->SetNumberOfScalarComponents(2); It is redundant given the following later: field->SetNumberOfComponents(2); You also need to #include <vtkSmartPointer.h>. Best, -berk On Tue, Mar 19, 2013 at 2:31 PM, Pettey . Lucas <[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>> wrote: Hello everyone, I am trying to run a simple Fortran coprocessing example with a complex data type. I am following the example here: http://en.wikibooks.org/wiki/Parallel_Spectral_Numerical_Methods/Visualization_with_ParaView_CoProcessing#ParaView_CoProcessing_Resources I have written a basic Fortran code that outputs the data in binary, opened that in ParaView, output the coprocessing script and then written the adaptor following the example in the above link. My adaptor looks like: extern "C" void createcpimagedata_(int* nx, int* ny, int* nz) { if (!ParaViewCoProcessing::GetCoProcessorData()) { vtkGenericWarningMacro("Unable to access CoProcessorData."); return; } // The simulation grid is a 2-dimensional topologically and geometrically // regular grid. In VTK/ParaView, this is considered an image data set. vtkImageData* Grid = vtkImageData::New(); // assuming dimZ == 1 for now Grid->SetDimensions(*nx, *ny, *nz); Grid->SetNumberOfScalarComponents(2); // Setting the Origin and Spacing are also options. // Name should be consistent between here, Fortran and Python client script. ParaViewCoProcessing::GetCoProcessorData()->GetInputDescriptionByName("input")->SetGrid(Grid); } // Add field(s) to the data container. // Separate from above because this will be dynamic, grid is static. // Might be an issue, VTK probably assumes row major, but // omeg probably passed column major... // by hand name mangling for fortran extern "C" void addfield_(double* scalars, char* name) { vtkCPInputDataDescription *idd = ParaViewCoProcessing::GetCoProcessorData()->GetInputDescriptionByName("input"); vtkImageData* Image = vtkImageData::SafeDownCast(idd->GetGrid()); if (!Image) { vtkGenericWarningMacro("No adaptor grid to attach field data to."); return; } // field name must match that in the fortran code. if (idd->IsFieldNeeded(name)) { vtkSmartPointer<vtkDoubleArray> field = vtkSmartPointer<vtkDoubleArray>::New(); field->SetNumberOfComponents(2); field->SetName(name); field->SetArray(scalars, 2* Image->GetNumberOfPoints(), 1); Image->GetPointData()->AddArray(field); } } I am getting some errors from the Makefile generated by Cmake: /Users/lucaspettey/codes/BEC/coprocVTK.cxx:40:38: error: too few arguments to function call, expected 2, have 1 Grid->SetNumberOfScalarComponents(2); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ /Users/lucaspettey/ParaView-git/ParaView/VTK/Common/DataModel/vtkImageData.h:298:3: note: 'SetNumberOfScalarComponents' declared here static void SetNumberOfScalarComponents( int n, vtkInformation* meta_data); ^ /Users/lucaspettey/codes/BEC/coprocVTK.cxx:67:5: error: unknown type name 'vtkSmartPointer'; did you mean 'vtkSmartPointerBase'? vtkSmartPointer<vtkDoubleArray> field = vtkSmartPointer<vtkDoubleArray>::New(); ^~~~~~~~~~~~~~~ vtkSmartPointerBase /Users/lucaspettey/ParaView-git/ParaView/VTK/Common/Core/vtkOStreamWrapper.h:36:7: note: 'vtkSmartPointerBase' declared here class vtkSmartPointerBase; ^ /Users/lucaspettey/codes/BEC/coprocVTK.cxx:67:20: error: expected unqualified-id vtkSmartPointer<vtkDoubleArray> field = vtkSmartPointer<vtkDoubleArray>::New(); ^ /Users/lucaspettey/codes/BEC/coprocVTK.cxx:68:5: error: use of undeclared identifier 'field' field->SetNumberOfComponents(2); ^ /Users/lucaspettey/codes/BEC/coprocVTK.cxx:69:5: error: use of undeclared identifier 'field' field->SetName(name); ^ /Users/lucaspettey/codes/BEC/coprocVTK.cxx:70:5: error: use of undeclared identifier 'field' field->SetArray(scalars, 2* Image->GetNumberOfPoints(), 1); ^ /Users/lucaspettey/codes/BEC/coprocVTK.cxx:71:37: error: use of undeclared identifier 'field' Image->GetPointData()->AddArray(field); ^ Any help is appreciated. Thanks, Lucas ________________________________ This electronic message transmission and any attachments that accompany it contain information from DRCĀ® (Dynamics Research Corporation) or its subsidiaries, or the intended recipient, which is privileged, proprietary, business confidential, or otherwise protected from disclosure and is the exclusive property of DRC and/or the intended recipient. The information in this email is solely intended for the use of the individual or entity that is the intended recipient. If you are not the intended recipient, any use, dissemination, distribution, retention, or copying of this communication, attachments, or substance is prohibited. If you have received this electronic transmission in error, please immediately reply to the author via email that you received the message by mistake and also promptly and permanently delete this message and all copies of this email and any attachments. We thank you for your assistance and apologize for any inconvenience. _______________________________________________ Powered by www.kitware.com<http://www.kitware.com><http://www.kitware.com> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview _______________________________________________ Powered by www.kitware.com<http://www.kitware.com> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
try: paraview.simple
except: from paraview.simple import *
# Make sure the helper methods are loaded
try:
__cp_helper_script_loaded__
except:
import vtkCoProcessorPython
exec vtkCoProcessorPython.vtkCPHelperScripts.GetPythonHelperScript()
# Global variables that will hold the pipeline for each timestep
pipeline = None
# Live visualization inside ParaView
live_visu_active = False
pv_host = "localhost"
pv_port = 22222
write_frequencies = {'input': [1]}
simulation_input_map = {'psi01_*': 'input'}
# ----------------------- Pipeline definition -----------------------
def CreatePipeline(datadescription):
class Pipeline:
global cp_views, cp_writers
RenderView1 = CreateCPView( CreateRenderView, "image_%t.png", 1, 0, 1, 1062, 591, cp_views )
RenderView1.LightSpecularColor = [1.0, 1.0, 1.0]
RenderView1.UseOutlineForLODRendering = 0
RenderView1.KeyLightAzimuth = 10.0
RenderView1.UseTexturedBackground = 0
RenderView1.UseLight = 1
RenderView1.CameraPosition = [-223.4557512364306, 123.96192517041965, 221.79065401763808]
RenderView1.FillLightKFRatio = 3.0
RenderView1.Background2 = [0.0, 0.0, 0.165]
RenderView1.FillLightAzimuth = -10.0
RenderView1.LODResolution = 0.5
RenderView1.BackgroundTexture = []
RenderView1.InteractionMode = '3D'
RenderView1.StencilCapable = 1
RenderView1.LightIntensity = 1.0
RenderView1.CameraFocalPoint = [49.50000000000002, 49.5000000000001, 49.499999999999964]
RenderView1.ImageReductionFactor = 2
RenderView1.CameraViewAngle = 30.0
RenderView1.CameraParallelScale = 85.73651497465943
RenderView1.EyeAngle = 2.0
RenderView1.HeadLightKHRatio = 3.0
RenderView1.StereoRender = 0
RenderView1.KeyLightIntensity = 0.75
RenderView1.BackLightAzimuth = 110.0
RenderView1.OrientationAxesInteractivity = 0
RenderView1.UseInteractiveRenderingForSceenshots = 0
RenderView1.UseOffscreenRendering = 0
RenderView1.Background = [0.31999694819562063, 0.3400015259021897, 0.4299992370489052]
RenderView1.UseOffscreenRenderingForScreenshots = 0
RenderView1.NonInteractiveRenderDelay = 0.0
RenderView1.CenterOfRotation = [49.5, 49.5, 49.5]
RenderView1.CameraParallelProjection = 0
RenderView1.CompressorConfig = 'vtkSquirtCompressor 0 3'
RenderView1.HeadLightWarmth = 0.5
RenderView1.MaximumNumberOfPeels = 4
RenderView1.LightDiffuseColor = [1.0, 1.0, 1.0]
RenderView1.StereoType = 'Red-Blue'
RenderView1.DepthPeeling = 1
RenderView1.BackLightKBRatio = 3.5
RenderView1.StereoCapableWindow = 1
RenderView1.CameraViewUp = [0.03685275581091174, 0.9372569456748432, -0.3466861580354853]
RenderView1.LightType = 'HeadLight'
RenderView1.LightAmbientColor = [1.0, 1.0, 1.0]
RenderView1.RemoteRenderThreshold = 20.0
RenderView1.CacheKey = 0.0
RenderView1.UseCache = 0
RenderView1.KeyLightElevation = 50.0
RenderView1.CenterAxesVisibility = 1
RenderView1.MaintainLuminance = 0
RenderView1.StillRenderImageReductionFactor = 1
RenderView1.BackLightWarmth = 0.5
RenderView1.FillLightElevation = -75.0
RenderView1.MultiSamples = 0
RenderView1.FillLightWarmth = 0.4
RenderView1.AlphaBitPlanes = 1
RenderView1.LightSwitch = 0
RenderView1.OrientationAxesVisibility = 1
RenderView1.CameraClippingRange = [173.4052007069504, 530.7667203008317]
RenderView1.BackLightElevation = 0.0
RenderView1.ViewTime = 0.0
RenderView1.OrientationAxesOutlineColor = [1.0, 1.0, 1.0]
RenderView1.LODThreshold = 5.0
RenderView1.CollectGeometryThreshold = 100.0
RenderView1.UseGradientBackground = 0
RenderView1.KeyLightWarmth = 0.6
RenderView1.OrientationAxesLabelColor = [1.0, 1.0, 1.0]
psi01_ = CreateProducer( datadescription, "input" )
Clip1 = Clip( guiName="Clip1", InsideOut=0, Scalars=['POINTS', ''], Value=95.0, UseValueAsOffset=0, Crinkleclip=0, ClipType="Scalar" )
a2_ImageFile_PiecewiseFunction = CreatePiecewiseFunction( Points=[0.0, 0.0, 0.5, 0.0, 1.0, 1.0, 0.5, 0.0] )
a2_ImageFile_PVLookupTable = GetLookupTableForArray( "ImageFile", 2, Discretize=1, RGBPoints=[95.0, 0.23, 0.299, 0.754, 100.0, 0.706, 0.016, 0.15], UseLogScale=0, VectorComponent=0, NanColor=[0.25, 0.0, 0.0], NumberOfTableValues=256, EnableOpacityMapping=0, ColorSpace='Diverging', IndexedLookup=0, VectorMode='Component', ScalarOpacityFunction=a2_ImageFile_PiecewiseFunction, HSVWrap=0, ScalarRangeInitialized=1.0, AllowDuplicateScalars=1, Annotations=[], LockScalarRange=0 )
ScalarBarWidgetRepresentation1 = CreateScalarBar( Title='ImageFile', Position2=[0.13, 0.5], TitleOpacity=1.0, TitleShadow=0, AutomaticLabelFormat=1, TitleFontSize=12, TitleColor=[1.0, 1.0, 1.0], AspectRatio=20.0, NumberOfLabels=5, ComponentTitle='X', Resizable=1, TitleFontFamily='Arial', Visibility=0, LabelFontSize=12, LabelFontFamily='Arial', TitleItalic=0, Selectable=0, LabelItalic=0, Enabled=0, LabelColor=[1.0, 1.0, 1.0], Position=[0.87, 0.25], LabelBold=0, UseNonCompositedRenderer=1, LabelOpacity=1.0, TitleBold=0, LabelFormat='%-#6.3g', Orientation='Vertical', LabelShadow=0, LookupTable=a2_ImageFile_PVLookupTable, Repositionable=1 )
GetRenderView().Representations.append(ScalarBarWidgetRepresentation1)
SetActiveSource(psi01_)
DataRepresentation1 = Show()
DataRepresentation1.CubeAxesZAxisVisibility = 1
DataRepresentation1.SelectionPointLabelColor = [0.5, 0.5, 0.5]
DataRepresentation1.SelectionPointFieldDataArrayName = 'ImageFile'
DataRepresentation1.SuppressLOD = 0
DataRepresentation1.CubeAxesXGridLines = 0
DataRepresentation1.CubeAxesYAxisTickVisibility = 1
DataRepresentation1.Position = [0.0, 0.0, 0.0]
DataRepresentation1.BackfaceRepresentation = 'Follow Frontface'
DataRepresentation1.SelectionOpacity = 1.0
DataRepresentation1.SelectionPointLabelShadow = 0
DataRepresentation1.CubeAxesYGridLines = 0
DataRepresentation1.CubeAxesZAxisTickVisibility = 1
DataRepresentation1.OrientationMode = 'Direction'
DataRepresentation1.Source.TipResolution = 6
DataRepresentation1.ScaleMode = 'No Data Scaling Off'
DataRepresentation1.Diffuse = 1.0
DataRepresentation1.SelectionUseOutline = 0
DataRepresentation1.CubeAxesZTitle = 'Z-Axis'
DataRepresentation1.Specular = 0.1
DataRepresentation1.SelectionVisibility = 1
DataRepresentation1.InterpolateScalarsBeforeMapping = 1
DataRepresentation1.CustomRangeActive = [0, 0, 0]
DataRepresentation1.Origin = [0.0, 0.0, 0.0]
DataRepresentation1.Source.TipLength = 0.35
DataRepresentation1.CubeAxesVisibility = 0
DataRepresentation1.Scale = [1.0, 1.0, 1.0]
DataRepresentation1.SelectionCellLabelJustification = 'Left'
DataRepresentation1.DiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation1.Shade = 0
DataRepresentation1.SelectionCellLabelOpacity = 1.0
DataRepresentation1.CubeAxesInertia = 1
DataRepresentation1.Source = "Arrow"
DataRepresentation1.Source.Invert = 0
DataRepresentation1.Masking = 0
DataRepresentation1.Opacity = 1.0
DataRepresentation1.LineWidth = 1.0
DataRepresentation1.MeshVisibility = 0
DataRepresentation1.Visibility = 1
DataRepresentation1.SelectionCellLabelFontSize = 18
DataRepresentation1.CubeAxesCornerOffset = 0.0
DataRepresentation1.SelectionPointLabelJustification = 'Left'
DataRepresentation1.OriginalBoundsRangeActive = [0, 0, 0]
DataRepresentation1.SelectionPointLabelVisibility = 0
DataRepresentation1.SelectOrientationVectors = ''
DataRepresentation1.CubeAxesTickLocation = 'Inside'
DataRepresentation1.BackfaceDiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation1.CubeAxesYAxisVisibility = 1
DataRepresentation1.SelectionPointLabelFontFamily = 'Arial'
DataRepresentation1.Source.ShaftResolution = 6
DataRepresentation1.CubeAxesUseDefaultYTitle = 1
DataRepresentation1.SelectScaleArray = ''
DataRepresentation1.CubeAxesYTitle = 'Y-Axis'
DataRepresentation1.ColorAttributeType = 'POINT_DATA'
DataRepresentation1.AxesOrigin = [0.0, 0.0, 0.0]
DataRepresentation1.UserTransform = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
DataRepresentation1.SpecularPower = 100.0
DataRepresentation1.Texture = []
DataRepresentation1.SelectionCellLabelShadow = 0
DataRepresentation1.AmbientColor = [1.0, 1.0, 1.0]
DataRepresentation1.MapScalars = 1
DataRepresentation1.PointSize = 2.0
DataRepresentation1.CubeAxesUseDefaultXTitle = 1
DataRepresentation1.SelectionCellLabelFormat = ''
DataRepresentation1.Scaling = 0
DataRepresentation1.StaticMode = 0
DataRepresentation1.SelectionCellLabelColor = [0.0, 1.0, 0.0]
DataRepresentation1.SliceMode = 'XY Plane'
DataRepresentation1.Source.TipRadius = 0.1
DataRepresentation1.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation1.CubeAxesXAxisTickVisibility = 1
DataRepresentation1.SelectionCellLabelVisibility = 0
DataRepresentation1.NonlinearSubdivisionLevel = 1
DataRepresentation1.CubeAxesColor = [1.0, 1.0, 1.0]
DataRepresentation1.Representation = 'Outline'
DataRepresentation1.CustomRange = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation1.CustomBounds = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation1.Orientation = [0.0, 0.0, 0.0]
DataRepresentation1.CubeAxesXTitle = 'X-Axis'
DataRepresentation1.ScalarOpacityUnitDistance = 1.7320508075688779
DataRepresentation1.BackfaceOpacity = 1.0
DataRepresentation1.SelectionPointLabelFontSize = 18
DataRepresentation1.SelectionCellFieldDataArrayName = 'vtkOriginalCellIds'
DataRepresentation1.SelectionColor = [1.0, 0.0, 1.0]
DataRepresentation1.Ambient = 0.0
DataRepresentation1.VolumeRenderingMode = 'Smart'
DataRepresentation1.CubeAxesXAxisMinorTickVisibility = 1
DataRepresentation1.ScaleFactor = 9.9
DataRepresentation1.BackfaceAmbientColor = [1.0, 1.0, 1.0]
DataRepresentation1.Slice = 0
DataRepresentation1.Source.ShaftRadius = 0.03
DataRepresentation1.ScalarOpacityFunction = []
DataRepresentation1.SelectMaskArray = ''
DataRepresentation1.SelectionLineWidth = 2.0
DataRepresentation1.CubeAxesZAxisMinorTickVisibility = 1
DataRepresentation1.CubeAxesXAxisVisibility = 1
DataRepresentation1.Interpolation = 'Gouraud'
DataRepresentation1.SelectionCellLabelFontFamily = 'Arial'
DataRepresentation1.SelectionCellLabelItalic = 0
DataRepresentation1.CubeAxesYAxisMinorTickVisibility = 1
DataRepresentation1.InterpolationType = 'Cubic'
DataRepresentation1.CubeAxesZGridLines = 0
DataRepresentation1.SelectionPointLabelFormat = ''
DataRepresentation1.SelectionPointLabelOpacity = 1.0
DataRepresentation1.UseAxesOrigin = 0
DataRepresentation1.CubeAxesFlyMode = 'Closest Triad'
DataRepresentation1.Pickable = 1
DataRepresentation1.CustomBoundsActive = [0, 0, 0]
DataRepresentation1.CubeAxesGridLineLocation = 'All Faces'
DataRepresentation1.SelectionRepresentation = 'Wireframe'
DataRepresentation1.SelectionPointLabelBold = 0
DataRepresentation1.ColorArrayName = ''
DataRepresentation1.SelectionPointLabelItalic = 0
DataRepresentation1.AllowSpecularHighlightingWithScalarColoring = 0
DataRepresentation1.SpecularColor = [1.0, 1.0, 1.0]
DataRepresentation1.CubeAxesUseDefaultZTitle = 1
DataRepresentation1.LookupTable = []
DataRepresentation1.SelectionPointSize = 5.0
DataRepresentation1.SelectionCellLabelBold = 0
DataRepresentation1.Orient = 0
SetActiveSource(Clip1)
DataRepresentation2 = Show()
DataRepresentation2.CubeAxesZAxisVisibility = 1
DataRepresentation2.SelectionPointLabelColor = [0.5, 0.5, 0.5]
DataRepresentation2.SelectionPointFieldDataArrayName = 'ImageFile'
DataRepresentation2.SuppressLOD = 0
DataRepresentation2.CubeAxesXGridLines = 0
DataRepresentation2.CubeAxesYAxisTickVisibility = 1
DataRepresentation2.Position = [0.0, 0.0, 0.0]
DataRepresentation2.BackfaceRepresentation = 'Follow Frontface'
DataRepresentation2.SelectionOpacity = 1.0
DataRepresentation2.SelectionPointLabelShadow = 0
DataRepresentation2.CubeAxesYGridLines = 0
DataRepresentation2.CubeAxesZAxisTickVisibility = 1
DataRepresentation2.OrientationMode = 'Direction'
DataRepresentation2.Source.TipResolution = 6
DataRepresentation2.ScaleMode = 'No Data Scaling Off'
DataRepresentation2.Diffuse = 1.0
DataRepresentation2.SelectionUseOutline = 0
DataRepresentation2.SelectionPointLabelFormat = ''
DataRepresentation2.CubeAxesZTitle = 'Z-Axis'
DataRepresentation2.Specular = 0.1
DataRepresentation2.SelectionVisibility = 1
DataRepresentation2.InterpolateScalarsBeforeMapping = 1
DataRepresentation2.CustomRangeActive = [0, 0, 0]
DataRepresentation2.Origin = [0.0, 0.0, 0.0]
DataRepresentation2.Source.TipLength = 0.35
DataRepresentation2.CubeAxesVisibility = 0
DataRepresentation2.Scale = [1.0, 1.0, 1.0]
DataRepresentation2.SelectionCellLabelJustification = 'Left'
DataRepresentation2.DiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation2.SelectionCellLabelOpacity = 1.0
DataRepresentation2.CubeAxesInertia = 1
DataRepresentation2.Source = "Arrow"
DataRepresentation2.Source.Invert = 0
DataRepresentation2.Masking = 0
DataRepresentation2.Opacity = 1.0
DataRepresentation2.LineWidth = 1.0
DataRepresentation2.MeshVisibility = 0
DataRepresentation2.Visibility = 1
DataRepresentation2.SelectionCellLabelFontSize = 18
DataRepresentation2.CubeAxesCornerOffset = 0.0
DataRepresentation2.SelectionPointLabelJustification = 'Left'
DataRepresentation2.OriginalBoundsRangeActive = [0, 0, 0]
DataRepresentation2.SelectionPointLabelVisibility = 0
DataRepresentation2.SelectOrientationVectors = ''
DataRepresentation2.CubeAxesTickLocation = 'Inside'
DataRepresentation2.BackfaceDiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation2.CubeAxesYAxisVisibility = 1
DataRepresentation2.SelectionPointLabelFontFamily = 'Arial'
DataRepresentation2.Source.ShaftResolution = 6
DataRepresentation2.CubeAxesUseDefaultYTitle = 1
DataRepresentation2.SelectScaleArray = ''
DataRepresentation2.CubeAxesYTitle = 'Y-Axis'
DataRepresentation2.ColorAttributeType = 'POINT_DATA'
DataRepresentation2.AxesOrigin = [0.0, 0.0, 0.0]
DataRepresentation2.UserTransform = [1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
DataRepresentation2.SpecularPower = 100.0
DataRepresentation2.Texture = []
DataRepresentation2.SelectionCellLabelShadow = 0
DataRepresentation2.AmbientColor = [1.0, 1.0, 1.0]
DataRepresentation2.MapScalars = 1
DataRepresentation2.PointSize = 2.0
DataRepresentation2.CubeAxesUseDefaultXTitle = 1
DataRepresentation2.SelectionCellLabelFormat = ''
DataRepresentation2.Scaling = 0
DataRepresentation2.StaticMode = 0
DataRepresentation2.SelectionCellLabelColor = [0.0, 1.0, 0.0]
DataRepresentation2.Source.TipRadius = 0.1
DataRepresentation2.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation2.CubeAxesXAxisTickVisibility = 1
DataRepresentation2.SelectionCellLabelVisibility = 0
DataRepresentation2.NonlinearSubdivisionLevel = 1
DataRepresentation2.CubeAxesColor = [1.0, 1.0, 1.0]
DataRepresentation2.Representation = 'Surface'
DataRepresentation2.CustomRange = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation2.CustomBounds = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation2.Orientation = [0.0, 0.0, 0.0]
DataRepresentation2.CubeAxesXTitle = 'X-Axis'
DataRepresentation2.ScalarOpacityUnitDistance = 1.967607012136069
DataRepresentation2.BackfaceOpacity = 1.0
DataRepresentation2.SelectionPointLabelFontSize = 18
DataRepresentation2.SelectionCellFieldDataArrayName = 'vtkOriginalCellIds'
DataRepresentation2.SelectionColor = [1.0, 0.0, 1.0]
DataRepresentation2.Ambient = 0.0
DataRepresentation2.CubeAxesXAxisMinorTickVisibility = 1
DataRepresentation2.ScaleFactor = 8.66025357246399
DataRepresentation2.BackfaceAmbientColor = [1.0, 1.0, 1.0]
DataRepresentation2.Source.ShaftRadius = 0.03
DataRepresentation2.ScalarOpacityFunction = a2_ImageFile_PiecewiseFunction
DataRepresentation2.SelectMaskArray = ''
DataRepresentation2.SelectionLineWidth = 2.0
DataRepresentation2.CubeAxesZAxisMinorTickVisibility = 1
DataRepresentation2.CubeAxesXAxisVisibility = 1
DataRepresentation2.Interpolation = 'Gouraud'
DataRepresentation2.SelectMapper = 'Projected tetra'
DataRepresentation2.SelectionCellLabelFontFamily = 'Arial'
DataRepresentation2.SelectionCellLabelItalic = 0
DataRepresentation2.CubeAxesYAxisMinorTickVisibility = 1
DataRepresentation2.CubeAxesZGridLines = 0
DataRepresentation2.ExtractedBlockIndex = 0
DataRepresentation2.SelectionPointLabelOpacity = 1.0
DataRepresentation2.UseAxesOrigin = 0
DataRepresentation2.CubeAxesFlyMode = 'Closest Triad'
DataRepresentation2.Pickable = 1
DataRepresentation2.CustomBoundsActive = [0, 0, 0]
DataRepresentation2.CubeAxesGridLineLocation = 'All Faces'
DataRepresentation2.SelectionRepresentation = 'Wireframe'
DataRepresentation2.SelectionPointLabelBold = 0
DataRepresentation2.ColorArrayName = 'ImageFile'
DataRepresentation2.SelectionPointLabelItalic = 0
DataRepresentation2.AllowSpecularHighlightingWithScalarColoring = 0
DataRepresentation2.SpecularColor = [1.0, 1.0, 1.0]
DataRepresentation2.CubeAxesUseDefaultZTitle = 1
DataRepresentation2.LookupTable = a2_ImageFile_PVLookupTable
DataRepresentation2.SelectionPointSize = 5.0
DataRepresentation2.SelectionCellLabelBold = 0
DataRepresentation2.Orient = 0
return Pipeline()
# ---------------------- Data Selection method ----------------------
def RequestDataDescription(datadescription):
"Callback to populate the request for current timestep"
if datadescription.GetForceOutput() == True:
for i in range(datadescription.GetNumberOfInputDescriptions()):
datadescription.GetInputDescription(i).AllFieldsOn()
datadescription.GetInputDescription(i).GenerateMeshOn()
return
for input_name in simulation_input_map.values():
LoadRequestedData(datadescription, input_name)
# ------------------------ Processing method ------------------------
def DoCoProcessing(datadescription):
"Callback to do co-processing for current timestep"
global pipeline, cp_writers, cp_views
timestep = datadescription.GetTimeStep()
# Load the Pipeline if not created yet
if not pipeline:
pipeline = CreatePipeline(datadescription)
else:
# update to the new input and time
UpdateProducers(datadescription)
# Write output data
WriteAllData(datadescription, cp_writers, timestep);
# Write image capture (Last arg: rescale lookup table)
WriteAllImages(datadescription, cp_views, timestep, True)
# Live Visualization
if live_visu_active:
DoLiveInsitu(timestep, pv_host, pv_port)
coproc.f90
Description: coproc.f90
coprocVTK.cxx
Description: coprocVTK.cxx
cproc_adaptor.f90
Description: cproc_adaptor.f90
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
