|
[Sponsors] |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 15, 2013, 08:12 |
|
#41 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
I've used this code and it worked just fine:
Code:
from paraview.simple import * def start_cue(self): pass def tick(self): source = FindSource("case.foam") #This works fine on ParaView 3.12.0 to 4.0.1 source.UpdatePipeline(GetAnimationScene().TimeKeeper.Time) #The array and number of components #arrayName = "U" #arrayComponents = 3 #component = -1 #options for component: -1, 0, 1 and 2 => Mag, X, Y, Z # If it's a scalar field arrayName = "p_rgh" arrayComponents = 1 component = 0 #Get the look-up table for this array lookupTable = GetLookupTableForArray(arrayName, arrayComponents) #get the access to the cellData or pointData data = source.GetCellDataInformation() #data = source.GetPointDataInformation() #get the array and the respective min-max array = data.GetArray(arrayName) dataRange = array.GetRange(component) lookupTable.LockScalarRange = 1 #Now let's hack in the range values lookupTable.RGBPoints[0] = dataRange[0] #min lookupTable.RGBPoints[4] = dataRange[1] #max def end_cue(self): pass edit: Sorry, apparently I should have looked with more attention to ParaView 4.0.1... I wrongly assumed the scales were updating correctly. Best regards, Bruno
__________________
Last edited by wyldckat; September 15, 2013 at 19:13. Reason: see "edit:"; removed accidental parasite code and fixed broken code for updating the pipeline |
|
September 15, 2013, 08:23 |
|
#42 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear Bruno I used the code as this:
Code:
p, li { white-space: pre-wrap; } from paraview.simple import * def start_cue(self): pass def tick(self): source = FindSource("case.foam") #This works on ParaView 4.0.1 source.UpdatePipeline(self.GetAnimationTime()) #This works on ParaView 3.12.0 #source.UpdatePipeline(GetAnimationScene().TimeKeeper.Time) #The array and number of components #arrayName = "U" #arrayComponents = 3 #component = -1 #options for component: -1, 0, 1 and 2 => Mag, X, Y, Z # If it's a scalar field arrayName = "p" arrayComponents = 1 component = 0 #Get the look-up table for this array lookupTable = GetLookupTableForArray(arrayName, arrayComponents) #get the access to the cellData or pointData #data = source.GetCellDataInformation() data = source.GetPointDataInformation() #get the array and the respective min-max array = data.GetArray(arrayName) dataRange = array.GetRange(component) lookupTable.LockScalarRange = 1 #Now let's hack in the range values lookupTable.RGBPoints[0] = dataRange[0] #min lookupTable.RGBPoints[4] = dataRange[1] #max def end_cue(self): pass Code:
ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 8464 vtkPOpenFOAMReader (0x3ce68c0): /home/ehsan/case.foam contains no timestep data. ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754 vtkPVCompositeDataPipeline (0x3cdf520): Algorithm vtkPOpenFOAMReader(0x3ce68c0) returned failure for request: vtkInformation (0x3cf7980) Debug: Off Modified Time: 111239 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 19 of /home/ehsan/Desktop/WR_kOmegaSST/0/T: Expected number, string or (, found Temperature ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 19 of /home/ehsan/Desktop/WR_kOmegaSST/0/U: Expected number, string or (, found Velocity ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 20 of /home/ehsan/Desktop/WR_kOmegaSST/0/k: Expected number, string or (, found turbulentK ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 20 of /home/ehsan/Desktop/WR_kOmegaSST/0/omega: Expected number, string or (, found turbulentOmega ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 19 of /home/ehsan/Desktop/WR_kOmegaSST/0/p: Expected number, string or (, found Pressure File "<string>", line 3 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 3 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax -------------------- and Bruno I want to have legends numbers with more figures like 3.12.0,it only shows like:2.1e+5,I want to have at least 5 digits after point,when I uncheck "Automatic Tick Mark Format" and change "Tick Format", upper numbers goes too small to see and I don't know how to set it so that can see better numbers.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. Last edited by wyldckat; September 15, 2013 at 09:30. |
|
September 15, 2013, 09:34 |
|
#43 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Sorry, I was in a hurry and didn't review the posted code properly. I've edited my previous post with the correct code. The bad code was this : Code:
p, li { white-space: pre-wrap; } Best regards, Bruno
__________________
|
|
September 15, 2013, 09:44 |
|
#44 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Bruno whats wrong with case.foam?why it doesn't have any tisteps?
Code:
ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 8464 vtkPOpenFOAMReader (0x3ce68c0): /home/ehsan/case.foam contains no timestep data. ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754 vtkPVCompositeDataPipeline (0x3cdf520): Algorithm vtkPOpenFOAMReader(0x3ce68c0) returned failure for request: vtkInformation (0x3cf7980) Debug: Off Modified Time: 111239 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION ALGORITHM_AFTER_FORWARD: 1 FORWARD_DIRECTION: 0 ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 19 of /home/ehsan/Desktop/WR_kOmegaSST/0/T: Expected number, string or (, found Temperature ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 19 of /home/ehsan/Desktop/WR_kOmegaSST/0/U: Expected number, string or (, found Velocity ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 20 of /home/ehsan/Desktop/WR_kOmegaSST/0/k: Expected number, string or (, found turbulentK ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 20 of /home/ehsan/Desktop/WR_kOmegaSST/0/omega: Expected number, string or (, found turbulentOmega ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 6478 vtkOpenFOAMReaderPrivate (0x5293d70): Error reading line 19 of /home/ehsan/Desktop/WR_kOmegaSST/0/p: Expected number, string or (, found Pressure File "<string>", line 3 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 3 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax File "<string>", line 2 p, li { white-space: pre-wrap; } from paraview.simple import * ^ SyntaxError: invalid syntax Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange' Traceback (most recent call last): File "<string>", line 48, in <module> File "<string>", line 36, in tick AttributeError: 'NoneType' object has no attribute 'GetRange'
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 09:55 |
Permission denied paraview path
|
#45 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear bruno I moved paraview folder to another partition in order to have more space in Ubuntu and set its new path in .bashrc,
Code:
alias paraFoam4='(. $WM_PROJECT_DIR/etc/config/unset.sh; touch case.foam && /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview --data=case.foam)' Code:
ehsan@Ehsan-com:~$ paraFoam4 bash: /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: Permission denied
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 10:04 |
|
#46 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
Quote:
Quote:
Code:
sh /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview Code:
ls -l $(which paraview) ls -l /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview Code:
-rwxr-xr-x Code:
-rw-r--r-- Bruno
__________________
|
||||
September 15, 2013, 10:30 |
|
#47 | ||
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
1)
Quote:
2) I used sh with this error: Code:
/media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: 1: ELF: not found /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: 2: @@�@@!@@@@@��@@@@����P�P����P�P��@@: not found /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: 3: : not found /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: 4: �: not found /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: 5: Syntax error: "(" unexpected Code:
ehsan@Ehsan-com:~$ paraFoam4 /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: /media/Important/wave_rotor/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: cannot execute binary file 3) Quote:
------------------------------ and how do you draw a line pointing to something or around it?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|||
September 15, 2013, 15:51 |
|
#48 | ||||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Quote:
Quote:
OK, there is a blog post of mine that explains how you can create portable partition in ext2 (or ext3 or ext4)... it's this one: Maintaining a local git repository on a portable disk image file or partition Read only the section "Preparing and using the single ext3/4 file filesystem". Keep in mind that step #3 will have to be executed every time after you've restarted your machine, in order to have access to the portable file in ext4 format. And keep in mind to do step #5, if you need to unmount the partition the file is in. As for step #4, that's where you copy the ParaView 4.0.1 files into the new portable ext4 file partition! Namely, the folder "$HOME/efmnt" is where you can put ParaView in. Quote:
Nonetheless, did you try changing the values in the group "Annotations and Tick Marks" and to press the "Apply" button whenever you make a change? Quote:
Best regards, Bruno
__________________
|
|||||
September 15, 2013, 16:50 |
|
#49 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
dear Bruno,
I moved it to Desktop again but it complains about permissions: Code:
ehsan@Ehsan-com:~/Desktop/WR_kOmegaSST$ paraFoam4 bash: /home/ehsan/Desktop/paraview/ParaView-4.0.1-Linux-64bit/bin/paraview: Permission denied
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 17:00 |
|
#50 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
You actually showed in one of the previous images where you can turn back on the execute permission! By the way, all of the files inside the folder "bin" should have the "execute" permission. You can even give this permission from the command line: Code:
chmod +x bin/*
__________________
|
||
September 15, 2013, 18:10 |
|
#51 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
now it doesn't complain about anything but the maximum doesn't change as attached images
I used the code by very little changes according to post #6: Code:
from paraview.simple import * def start_cue(self): pass def tick(self): source = FindSource("case.foam") #This works on ParaView 4.0.1 source.UpdatePipeline(self.GetAnimationTime()) #This works on ParaView 3.12.0 #source.UpdatePipeline(GetAnimationScene().TimeKeeper.Time) #The array and number of components #arrayName = "U" #arrayComponents = 3 #component = -1 #options for component: -1, 0, 1 and 2 => Mag, X, Y, Z # If it's a scalar field arrayName = "p" arrayComponents = 1 component = 0 #Get the look-up table for this array lookupTable = GetLookupTableForArray(arrayName, arrayComponents) #get the access to the cellData or pointData #data = source.GetCellDataInformation() data = source.GetPointDataInformation() #get the array and the respective min-max array = data.GetArray(arrayName) dataRange = array.GetRange(component) lookupTable.LockScalarRange = 1 #Now let's hack in the range values lookupTable.RGBPoints[0] = dataRange[0] #min lookupTable.RGBPoints[4] = dataRange[1] #max def end_cue(self): pass thanks a lot.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 18:34 |
|
#52 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
The only thing I can think of is that you might be showing the "p" field in "cell data" mode, while this script is processing the "point data". Best regards, Bruno
__________________
|
|
September 15, 2013, 18:59 |
|
#53 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
no Bruno,
its point data in both of them, it occurs when I use the python code that "automatically color scaling" doesn't take effect like 3.12.0 case.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 19:14 |
|
#54 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
it even occurs in showing results(without doing animation) after adding python code.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 19:16 |
|
#55 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Sorry, while trying to take care a lot of stuff as fast as I could, I didn't notice that the updated scales were occurring incorrectly. The source code for updating the pipeline for ParaView 3.12.0 also works for 4.0.1, namely this one: Code:
#This works fine on ParaView 3.12.0 to 4.0.1 source.UpdatePipeline(GetAnimationScene().TimeKeeper.Time) Best regards, Bruno
__________________
|
|
September 15, 2013, 19:30 |
|
#56 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
corrected,after two days having issues and engaging with animating in paraview,it seems now it is answering,
thanks bruno for paraview animating troubles.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 22:48 |
|
#57 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
in post #42 i had spoken about tick marks and... before you say about them but you thought i hadn't seen them.
The numbers in other side of the bar become too small to view as i told before,is there any way to have a better range bar?i know it may be a bug but what can do for now?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 16, 2013, 04:10 |
|
#58 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
The problem is that when you increase the font, it increases for both sizes, and it depends on whether the "Automatic Tick Mark Format" is turned on or off.
__________________
|
||
September 16, 2013, 06:54 |
|
#59 | |||
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
I had seen and tested that before posting the issue,no need to four arrows.
Quote:
Quote:
Quote:
but may be a bug as you said.can't simply do anything for that by hacking its code(if isn't too hard)?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
||||
September 17, 2013, 18:57 |
|
#60 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Sorry, but yesterday morning I was in a hurry and as soon as I didn't read anything explicitly like "changed the size of the font and nothing happened", I simply assumed the worst. The other problem is that some of the quick tests I had made at night on Sunday had given me the idea that by increasing a lot the size of the font, that the numbers on the right also increased, although very little. OK, so yesterday night I played around a bit more with the controls and didn't have time to write things here. What I discovered (which I hoped you would discover as well) - and keep in mind that this is all referenced for the standard colour legend when it appears on the right side of the 3D view - is as follows:
So, as far as I can figure out, there are two possible solutions without having to hack anything:
Anything beyond this requires these steps and around 3 to 6h of work:
Best regards, Bruno
__________________
|
|
Tags |
paraview, rescale to data range |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Automatic Data Export (ascii format) | A Kourm | FLUENT | 4 | March 7, 2021 15:08 |
Issue Writing Out Surface Data | rufuscws89 | Tecplot | 1 | May 6, 2019 14:52 |
Parallel Block Size Issue | ChiefSeaBiscuit | CONVERGE | 5 | July 22, 2016 15:03 |
[OpenFOAM] Automatic range in paraview animations | arno | ParaView | 1 | August 29, 2006 05:00 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |