Yes I did. I have attached the latest script.
Thank you for your valiant efforts in trying to solve this problem.
Lucas
________________________________
From: Andy Bauer [[email protected]]
Sent: Thursday, March 21, 2013 2:22 PM
To: Pettey . Lucas
Cc: paraview [[email protected]]
Subject: Re: [Paraview] CoProcessing with Fortran and ParaView 3.98
Did you also include the w.UpdatePipeline() part after the writer was created?
It won't create the file unless that's in there.
Andy
On Thu, Mar 21, 2013 at 3:17 PM, Pettey . Lucas
<[email protected]<mailto:[email protected]>> wrote:
Hi Andy,
Changing to Scalars=['POINTS','psi01'] did not change anything. I still get the
same error and blank image.
I tried adding the XMLPImageDataWriter command, but no file 'fullgrid.pvti' was
produced so I can't tell what is being populated into the grid.
I hardwired the C++ adaptor to 'psi01' rather than the character array name in
case their was a problem with the way the string was passed. I had checked that
name contained the correct characters, but I figured hardwiring would be safer
at this stage.
Anything else that you think I should try?
Thanks,
Lucas
________________________________
From: [email protected]<mailto:[email protected]>
[[email protected]<mailto:[email protected]>] on behalf
of Andy Bauer [[email protected]<mailto:[email protected]>]
Sent: Thursday, March 21, 2013 12:49 PM
To: Pettey . Lucas
Cc: paraview [[email protected]<mailto:[email protected]>]
Subject: Re: [Paraview] CoProcessing with Fortran and ParaView 3.98
I think the problem is that:
Clip1 = Clip( guiName="Clip1", InsideOut=0, Scalars=['POINTS', ''], Value=95.0,
UseValueAsOffset=0, Crinkleclip=0, ClipType="Scalar" )
Should probably have the name of the point data field set in it. Do this with
(assuming psi01 is the name of the field you want to clip with respect to:
Scalars=['POINTS', 'psi01']
My guess is that the scalar field isn't getting set properly. Try adding in:
w = XMLPImageDataWriter(Input=psi01_, FileName = 'fullgrid.pvti')
w.UpdatePipeline()
right after the CreateProducer() method to see what's in your grid.
By the way, does adding in the "//char(0)" work for converting Fortran strings
to C/C++ strings (e.g. in "call addfield(psi,"psi01"//char(0))") ? If it does,
will it also work for Fortran77? That's a neat little trick!
Andy
On Wed, Mar 20, 2013 at 5:29 PM, Pettey . Lucas
<[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>
wrote:
I have solved the C++ to Fortran array issues, but I am still not getting a
meaningful visualization. I have attached the latest files, including a
screenshot of the exported state and the resulting image that is produced by
the coprocessor.
The coprocessor is generating an error:
ERROR: In
/Users/lucaspettey/ParaView-git/ParaView/VTK/Filters/General/vtkTableBasedClipDataSet.cxx,
line 1956
vtkPVClipDataSet (0x7feaa4998550): no input scalars.
This error is not appearing at the time=0 co-process, but it is appearing each
time step the co-processor is being asked to write an image. All of the images
are the same blank axes as in the attached image0.png.
I'm not sure what to try next so any help is appreciated.
Thanks,
Lucas
________________________________________
From:
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
on behalf of Pettey . Lucas
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Sent: Wednesday, March 20, 2013 11:45 AM
To: Andy Bauer
Cc: paraview
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Subject: Re: [Paraview] CoProcessing with Fortran and ParaView 3.98
So after some troubleshooting it seems that C++ doesn't like the complex data
type the way Fortran is sending it.
The code runs when I just send a real value. Images appear, but of course they
are meaningless since it isn't the correct data. I may try passing the real and
imaginary separate. I may also look into row/column order issues although this
grid is 100x100x100 so it shouldn't affect anything.
Lucas
________________________________________
From:
[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
on behalf of Pettey . Lucas
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Sent: Wednesday, March 20, 2013 11:12 AM
To: Andy Bauer
Cc: paraview
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Subject: Re: [Paraview] CoProcessing with Fortran and ParaView 3.98
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]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>]
Sent: Wednesday, March 20, 2013 9:08 AM
To: Pettey . Lucas
Cc: Berk Geveci; paraview
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[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]><mailto:[email protected]<mailto:[email protected]>><mailto:[email protected]<mailto:[email protected]><mailto:[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]><mailto:[email protected]<mailto:[email protected]>><mailto:[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>>]
Sent: Tuesday, March 19, 2013 6:48 PM
To: Pettey . Lucas
Cc: paraview
[[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>><mailto:[email protected]<mailto:[email protected]><mailto:[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]>><mailto:[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>>><mailto:[email protected]<mailto:[email protected]><mailto:[email protected]<mailto:[email protected]>><mailto:[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><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><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><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 = True
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 = [-47.24953770216853, 123.79075290936386, 240.05679961298367]
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.49999999999998, 49.49999999999994, 49.49999999999989]
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.05622381659473036, 0.9202337344695718, -0.38730963890885534]
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 = [66.56393656951518, 427.81967725497793]
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" )
w = XMLPImageDataWriter(Input=psi01_, FileName = 'fullgrid.pvti')
w.UpdatePipeline()
Clip2 = Clip( guiName="Clip2", InsideOut=0, Scalars=['POINTS', 'psi01'], 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=[2.9781181812286377, 0.23, 0.299, 0.754, 3.6893488147419103e+19, 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='Magnitude', ScalarOpacityFunction=a2_ImageFile_PiecewiseFunction, HSVWrap=0, ScalarRangeInitialized=1.0, AllowDuplicateScalars=1, Annotations=[], LockScalarRange=0 )
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(Clip2)
DataRepresentation3 = Show()
DataRepresentation3.CubeAxesZAxisVisibility = 1
DataRepresentation3.SelectionPointLabelColor = [0.5, 0.5, 0.5]
DataRepresentation3.SelectionPointFieldDataArrayName = 'ImageFile'
DataRepresentation3.SuppressLOD = 0
DataRepresentation3.CubeAxesXGridLines = 0
DataRepresentation3.CubeAxesYAxisTickVisibility = 1
DataRepresentation3.Position = [0.0, 0.0, 0.0]
DataRepresentation3.BackfaceRepresentation = 'Follow Frontface'
DataRepresentation3.SelectionOpacity = 1.0
DataRepresentation3.SelectionPointLabelShadow = 0
DataRepresentation3.CubeAxesYGridLines = 0
DataRepresentation3.CubeAxesZAxisTickVisibility = 1
DataRepresentation3.OrientationMode = 'Direction'
DataRepresentation3.Source.TipResolution = 6
DataRepresentation3.ScaleMode = 'No Data Scaling Off'
DataRepresentation3.Diffuse = 1.0
DataRepresentation3.SelectionUseOutline = 0
DataRepresentation3.SelectionPointLabelFormat = ''
DataRepresentation3.CubeAxesZTitle = 'Z-Axis'
DataRepresentation3.Specular = 0.1
DataRepresentation3.SelectionVisibility = 1
DataRepresentation3.InterpolateScalarsBeforeMapping = 1
DataRepresentation3.CustomRangeActive = [0, 0, 0]
DataRepresentation3.Origin = [0.0, 0.0, 0.0]
DataRepresentation3.Source.TipLength = 0.35
DataRepresentation3.CubeAxesVisibility = 0
DataRepresentation3.Scale = [1.0, 1.0, 1.0]
DataRepresentation3.SelectionCellLabelJustification = 'Left'
DataRepresentation3.DiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation3.SelectionCellLabelOpacity = 1.0
DataRepresentation3.CubeAxesInertia = 1
DataRepresentation3.Source = "Arrow"
DataRepresentation3.Source.Invert = 0
DataRepresentation3.Masking = 0
DataRepresentation3.Opacity = 1.0
DataRepresentation3.LineWidth = 1.0
DataRepresentation3.MeshVisibility = 0
DataRepresentation3.Visibility = 1
DataRepresentation3.SelectionCellLabelFontSize = 18
DataRepresentation3.CubeAxesCornerOffset = 0.0
DataRepresentation3.SelectionPointLabelJustification = 'Left'
DataRepresentation3.OriginalBoundsRangeActive = [0, 0, 0]
DataRepresentation3.SelectionPointLabelVisibility = 0
DataRepresentation3.SelectOrientationVectors = ''
DataRepresentation3.CubeAxesTickLocation = 'Inside'
DataRepresentation3.BackfaceDiffuseColor = [1.0, 1.0, 1.0]
DataRepresentation3.CubeAxesYAxisVisibility = 1
DataRepresentation3.SelectionPointLabelFontFamily = 'Arial'
DataRepresentation3.Source.ShaftResolution = 6
DataRepresentation3.CubeAxesUseDefaultYTitle = 1
DataRepresentation3.SelectScaleArray = ''
DataRepresentation3.CubeAxesYTitle = 'Y-Axis'
DataRepresentation3.ColorAttributeType = 'POINT_DATA'
DataRepresentation3.AxesOrigin = [0.0, 0.0, 0.0]
DataRepresentation3.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]
DataRepresentation3.SpecularPower = 100.0
DataRepresentation3.Texture = []
DataRepresentation3.SelectionCellLabelShadow = 0
DataRepresentation3.AmbientColor = [1.0, 1.0, 1.0]
DataRepresentation3.MapScalars = 1
DataRepresentation3.PointSize = 2.0
DataRepresentation3.CubeAxesUseDefaultXTitle = 1
DataRepresentation3.SelectionCellLabelFormat = ''
DataRepresentation3.Scaling = 0
DataRepresentation3.StaticMode = 0
DataRepresentation3.SelectionCellLabelColor = [0.0, 1.0, 0.0]
DataRepresentation3.Source.TipRadius = 0.1
DataRepresentation3.EdgeColor = [0.0, 0.0, 0.5000076295109483]
DataRepresentation3.CubeAxesXAxisTickVisibility = 1
DataRepresentation3.SelectionCellLabelVisibility = 0
DataRepresentation3.NonlinearSubdivisionLevel = 1
DataRepresentation3.CubeAxesColor = [1.0, 1.0, 1.0]
DataRepresentation3.Representation = 'Surface'
DataRepresentation3.CustomRange = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation3.CustomBounds = [0.0, 1.0, 0.0, 1.0, 0.0, 1.0]
DataRepresentation3.Orientation = [0.0, 0.0, 0.0]
DataRepresentation3.CubeAxesXTitle = 'X-Axis'
DataRepresentation3.ScalarOpacityUnitDistance = 1.7278484039919895
DataRepresentation3.BackfaceOpacity = 1.0
DataRepresentation3.SelectionPointLabelFontSize = 18
DataRepresentation3.SelectionCellFieldDataArrayName = 'vtkOriginalCellIds'
DataRepresentation3.SelectionColor = [1.0, 0.0, 1.0]
DataRepresentation3.Ambient = 0.0
DataRepresentation3.CubeAxesXAxisMinorTickVisibility = 1
DataRepresentation3.ScaleFactor = 9.9
DataRepresentation3.BackfaceAmbientColor = [1.0, 1.0, 1.0]
DataRepresentation3.Source.ShaftRadius = 0.03
DataRepresentation3.ScalarOpacityFunction = a2_ImageFile_PiecewiseFunction
DataRepresentation3.SelectMaskArray = ''
DataRepresentation3.SelectionLineWidth = 2.0
DataRepresentation3.CubeAxesZAxisMinorTickVisibility = 1
DataRepresentation3.CubeAxesXAxisVisibility = 1
DataRepresentation3.Interpolation = 'Gouraud'
DataRepresentation3.SelectMapper = 'Projected tetra'
DataRepresentation3.SelectionCellLabelFontFamily = 'Arial'
DataRepresentation3.SelectionCellLabelItalic = 0
DataRepresentation3.CubeAxesYAxisMinorTickVisibility = 1
DataRepresentation3.CubeAxesZGridLines = 0
DataRepresentation3.ExtractedBlockIndex = 0
DataRepresentation3.SelectionPointLabelOpacity = 1.0
DataRepresentation3.UseAxesOrigin = 0
DataRepresentation3.CubeAxesFlyMode = 'Closest Triad'
DataRepresentation3.Pickable = 1
DataRepresentation3.CustomBoundsActive = [0, 0, 0]
DataRepresentation3.CubeAxesGridLineLocation = 'All Faces'
DataRepresentation3.SelectionRepresentation = 'Wireframe'
DataRepresentation3.SelectionPointLabelBold = 0
DataRepresentation3.ColorArrayName = 'ImageFile'
DataRepresentation3.SelectionPointLabelItalic = 0
DataRepresentation3.AllowSpecularHighlightingWithScalarColoring = 0
DataRepresentation3.SpecularColor = [1.0, 1.0, 1.0]
DataRepresentation3.CubeAxesUseDefaultZTitle = 1
DataRepresentation3.LookupTable = a2_ImageFile_PVLookupTable
DataRepresentation3.SelectionPointSize = 5.0
DataRepresentation3.SelectionCellLabelBold = 0
DataRepresentation3.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, False)
# Live Visualization
if live_visu_active:
DoLiveInsitu(timestep, pv_host, pv_port)
_______________________________________________
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