Re: [Paraview] Assemble Variables into Tensor

2017-11-30 Thread Nicholas Richmond
Hi Utkarsh,

Using the script you wrote with the Programmable Filter does the job
nicely! Thanks so much for going above and beyond to help me assemble the
arrays into a tensor. Programmable Filter never occurred to me and I am now
looking forward to exploring Chapter 13 of the Paraview Guide to see what
else I can do with it.

Many thanks,
Nick Richmond

On Wed, Nov 29, 2017 at 9:56 PM, Utkarsh Ayachit <
utkarsh.ayac...@kitware.com> wrote:

> Nick,
>
> You can use the *Programmable Filter* instead with something like the
> following script as the *Script*:
>
>
> from paraview.vtk.numpy_interface import dataset_adapter as dsa
>
> import numpy
>
> def make_tensor(xx,yy,zz, xy, yz, xz):
>
>   t = numpy.vstack([xx,yy,zz,xy, yz, xz]).transpose().view(dsa.VTKArray)
>
>   t.DataSet = xx.DataSet
>
>   t.Association = xx.Association
>
>   return t
>
>
> xx = inputs[0].PointData["sigma_xx"]
>
> yy = inputs[0].PointData["sigma_yy"]
>
> zz = inputs[0].PointData["sigma_zz"]
>
> xy = inputs[0].PointData["sigma_xy"]
>
> yz = inputs[0].PointData["sigma_yz"]
>
> xz = inputs[0].PointData["sigma_xz"]
>
> output.PointData.append(make_tensor(xx,yy,zz,xy,yz,xz), "tensor")
>
>
> Utkarsh
>
> On Wed, Nov 29, 2017 at 5:01 PM, Nicholas Richmond <
> nicholas.richm...@maine.edu> wrote:
>
>> Greetings,
>>
>> I have a vtk Polygonal Mesh with six separate arrays (sigma_xx, sigma_yy,
>> sigma_zz, sigma_xy, sigma_yz, sigma_xz). I'd like to assemble these into a
>> tensor so that I may apply the Tensor Glyph filter.
>>
>> After reading that the paraview.simple.TensorGlyph
>> <https://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/paraview.simple.TensorGlyph.html>
>>  expects a symmetric tensor with the order XX, YY, ZZ, XY, YZ, XZ, I
>> tried to assemble the six separate arrays into a single array with the
>> Python Calculator, but have been unsuccessful.
>>
>> I've tried a variety of approaches, including:
>>
>> *Expression:* np.array([sigma_xx, sigma_yy, sigma_zz, sigma_xy,
>> sigma_yz, sigma_xz])
>> *Array Association:* Point Data
>>
>> I can make a vector of the normal stresses using the "make_vector"
>> function from paraview.vtk.numpy_interface.algorithms, but there is no
>> "make_tensor" function to assemble both normal and shear stresses into a
>> single symmetric tensor.
>>
>> Any guidance would be most appreciated.
>> Many thanks,
>> Nick Richmond
>>
>> ___
>> 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
>>
>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview
>>
>>
>
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Assemble Variables into Tensor

2017-11-29 Thread Nicholas Richmond
Greetings,

I have a vtk Polygonal Mesh with six separate arrays (sigma_xx, sigma_yy,
sigma_zz, sigma_xy, sigma_yz, sigma_xz). I'd like to assemble these into a
tensor so that I may apply the Tensor Glyph filter.

After reading that the paraview.simple.TensorGlyph

expects
a symmetric tensor with the order XX, YY, ZZ, XY, YZ, XZ, I tried to
assemble the six separate arrays into a single array with the Python
Calculator, but have been unsuccessful.

I've tried a variety of approaches, including:

*Expression:* np.array([sigma_xx, sigma_yy, sigma_zz, sigma_xy, sigma_yz,
sigma_xz])
*Array Association:* Point Data

I can make a vector of the normal stresses using the "make_vector" function
from paraview.vtk.numpy_interface.algorithms, but there is no "make_tensor"
function to assemble both normal and shear stresses into a single symmetric
tensor.

Any guidance would be most appreciated.
Many thanks,
Nick Richmond
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


Re: [Paraview] Compiling ParaView for Windows x64 Release

2017-08-29 Thread Nicholas Richmond
​Hi Yoshimi,

I copied the six DLLs from Qt into the Release directory and it worked!
Thank you very much for your help with this.

Best wishes,
Nick​

On Sat, Aug 26, 2017 at 4:06 AM, kenichiro yoshimi <rccm.kyosh...@gmail.com>
wrote:

> Hi Nick,
>
> You need to put the missing Qt DLLs in the same directory as
> paraview.exe built as "Release". Note that it seems to be difficult to
> know the missing DLLs' names since some of them are not displayed
> directly as warning messages. Probably the following DLLs may be
> missing:
> --
> Qt5Core.dll
> Qt5Gui.dll
> Qt5Help.dll
> Qt5Network.dll
> Qt5Sql.dll
> Qt5Widgets.dll
> ...
>
> Thanks,
> yoshimi
>
> 2017-08-26 1:37 GMT+09:00 Nicholas Richmond <nicholas.richm...@maine.edu>:
> > Greetings,
> >
> > I've been having some trouble building ParaView 5.4.1 on my system. I'm
> > hoping a Windows-savvy user might be able to lend some insight. ParaView
> > builds just fine under "Debug" mode, but when built as "Release," I get
> four
> > errors signaling that "The procedure entry point...could not be located
> in
> > the dynamic link library" for paraview.exe, vtkpqPython-pv5.4.dll,
> > vtkpwWidgets-pv5.4.dll, and vtkpqCore-pv5.4.dll.
> >
> > The debugger shows:
> >
> > Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
> > 0xC139: Entry Point Not Found.
> > Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
> > 0xC139: Entry Point Not Found.
> > Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
> > 0xC139: Entry Point Not Found.
> > Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
> > 0xC139: Entry Point Not Found.
> > The thread 0x4fcc has exited with code -1073741511 (0xc139).
> > The thread 0x6c7c has exited with code -1073741511 (0xc139).
> > The thread 0x65a0 has exited with code -1073741511 (0xc139).
> > The program '[15092] paraview.exe' has exited with code -1073741511
> > (0xc139) 'Entry Point Not Found'.
> >
> > In case it matters, the only thing I'm changing in CMake is the python
> > version (to 3).
> >
> > Any help would be most appreciated.
> > Thanks,
> > Nick
> >
> > ___
> > 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
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview
> >
>
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Compiling ParaView for Windows x64 Release

2017-08-25 Thread Nicholas Richmond
Greetings,

I've been having some trouble building ParaView 5.4.1 on my system. I'm
hoping a Windows-savvy user might be able to lend some insight. ParaView
builds just fine under "Debug" mode, but when built as "Release," I get
four errors signaling that "The procedure entry point...could not be
located in the dynamic link library" for paraview.exe,
vtkpqPython-pv5.4.dll, vtkpwWidgets-pv5.4.dll, and vtkpqCore-pv5.4.dll.

The debugger shows:

Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
0xC139: Entry Point Not Found.
Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
0xC139: Entry Point Not Found.
Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
0xC139: Entry Point Not Found.
Exception thrown at 0x7FFD18054B90 (ntdll.dll) in paraview.exe:
0xC139: Entry Point Not Found.
The thread 0x4fcc has exited with code -1073741511 (0xc139).
The thread 0x6c7c has exited with code -1073741511 (0xc139).
The thread 0x65a0 has exited with code -1073741511 (0xc139).
The program '[15092] paraview.exe' has exited with code -1073741511
(0xc139) 'Entry Point Not Found'.

In case it matters, the only thing I'm changing in CMake is the python
version (to 3).

Any help would be most appreciated.
Thanks,
Nick
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview


[Paraview] Importing paraview.simple with Python 3

2017-06-02 Thread Nicholas Richmond
​Greetings,

First things first, I'm using the most recent (RC3) Win64 ParaView 5.4
binary. I'm working on a project with Python 3.6, and I'm having difficulty
importing the paraview.simple module. Attempting to import (from
paraview.simple import *) results in the following error:

*ImportError: dynamic module does not define module export function
(PyInit_vtkCommonCorePython)*

*During handling of the above exception, another exception occurred:*

*Traceback (most recent call last):*
*  File "", line 1, in *
*  File "C:\Program Files\ParaView
5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\simple.py",
line 43, in *
*from paraview import servermanager*
*  File "C:\Program Files\ParaView
5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\servermanager.py",
line 53, in *
*from paraview import vtk*
*  File "C:\Program Files\ParaView
5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\vtk\__init__.py",
line 7, in *
*from paraview.vtk.vtkCommonCore import **
*  File "C:\Program Files\ParaView
5.4.0-RC3-Qt5-OpenGL2-Windows-64bit\bin\Lib\site-packages\paraview\vtk\vtkCommonCore.py",
line 9, in *
*from vtkCommonCorePython import **
*ImportError: dynamic module does not define module export function
(PyInit_vtkCommonCorePython)*

I saw this March 10 message from Utkarsh:

"*Python 3 is supported with 5.3 (except for ParaViewWeb components). We **have
dashboards testing it too. There still may be some leftovers, so **please
report if you catch anything that we missed.*"

Does this fall under the category of "please report if you catch anything
that we missed" or is it due to a lack of understanding on my part? I've
been able to successfully import this module when using a Python 2.7
environment, but I'm trying to stick to Python 3.6. Any insight would be
most appreciated.

Many thanks,
Nick Richmond
___
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

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview