Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_pdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_pdata
Commits
741bc01d
Commit
741bc01d
authored
9 years ago
by
Pietro Incardona
Browse files
Options
Downloads
Patches
Plain Diff
Modify image generation script for the wiki
parent
a8104240
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vtk/Domain_decomposition.py
+6
-53
6 additions, 53 deletions
vtk/Domain_decomposition.py
with
6 additions
and
53 deletions
vtk/Domain_decomposition.py
+
6
−
53
View file @
741bc01d
...
@@ -17,12 +17,12 @@ renderView1.CameraParallelScale = 0.5843857695756589
...
@@ -17,12 +17,12 @@ renderView1.CameraParallelScale = 0.5843857695756589
# show data in view
# show data in view
dom_boxvtkDisplay
=
Show
(
dom_boxvtk
,
renderView1
)
dom_boxvtkDisplay
=
Show
(
dom_boxvtk
,
renderView1
)
WriteImage
(
"
domain.jpg
"
)
WriteImage
(
"
jpg/
domain.jpg
"
)
# change representation type
# change representation type
dom_boxvtkDisplay
.
SetRepresentationType
(
'
Surface With Edges
'
)
dom_boxvtkDisplay
.
SetRepresentationType
(
'
Surface With Edges
'
)
WriteImage
(
"
domain_decomposed.jpg
"
)
WriteImage
(
"
jpg/
domain_decomposed.jpg
"
)
# create a new 'Legacy VTK Reader'
# create a new 'Legacy VTK Reader'
vtk_partitionvtk
=
LegacyVTKReader
(
FileNames
=
[
'
Metis/vtk_partition.vtk
'
])
vtk_partitionvtk
=
LegacyVTKReader
(
FileNames
=
[
'
Metis/vtk_partition.vtk
'
])
...
@@ -74,7 +74,7 @@ transform1Display.PointSize = 5.0
...
@@ -74,7 +74,7 @@ transform1Display.PointSize = 5.0
SetActiveSource
(
vtk_partitionvtk
)
SetActiveSource
(
vtk_partitionvtk
)
# write decomposed
# write decomposed
WriteImage
(
"
domain_graph.jpg
"
)
WriteImage
(
"
jpg/
domain_graph.jpg
"
)
# set scalar coloring
# set scalar coloring
ColorBy
(
transform1Display
,
(
'
POINTS
'
,
'
id
'
))
ColorBy
(
transform1Display
,
(
'
POINTS
'
,
'
id
'
))
...
@@ -83,7 +83,7 @@ ColorBy(transform1Display, ('POINTS', 'id'))
...
@@ -83,7 +83,7 @@ ColorBy(transform1Display, ('POINTS', 'id'))
dom_boxvtkDisplay
.
SetRepresentationType
(
'
Surface
'
)
dom_boxvtkDisplay
.
SetRepresentationType
(
'
Surface
'
)
# write decomposed
# write decomposed
WriteImage
(
"
domain_graph_decomposed.jpg
"
)
WriteImage
(
"
jpg/
domain_graph_decomposed.jpg
"
)
# create a new 'Legacy VTK Reader'
# create a new 'Legacy VTK Reader'
out_subdomains_0vtk
=
LegacyVTKReader
(
FileNames
=
[
'
CartDecomposition/out_subdomains_0.vtk
'
])
out_subdomains_0vtk
=
LegacyVTKReader
(
FileNames
=
[
'
CartDecomposition/out_subdomains_0.vtk
'
])
...
@@ -97,74 +97,27 @@ out_subdomains_2vtk = LegacyVTKReader(FileNames=['CartDecomposition/out_subdomai
...
@@ -97,74 +97,27 @@ out_subdomains_2vtk = LegacyVTKReader(FileNames=['CartDecomposition/out_subdomai
# create a new 'Legacy VTK Reader'
# create a new 'Legacy VTK Reader'
out_subdomains_3vtk
=
LegacyVTKReader
(
FileNames
=
[
'
CartDecomposition/out_subdomains_3.vtk
'
])
out_subdomains_3vtk
=
LegacyVTKReader
(
FileNames
=
[
'
CartDecomposition/out_subdomains_3.vtk
'
])
# set active source
#SetActiveSource(out_subdomains_0vtk)
# get color transfer function/color map for 'data'
#dataLUT = GetColorTransferFunction('data')
#dataLUT.RGBPoints = [285.3226244096321, 0.231373, 0.298039, 0.752941, 312.3676762575527, 0.865003, 0.865003, 0.865003, 339.4127281054734, 0.705882, 0.0156863, 0.14902]
#dataLUT.ScalarRangeInitialized = 1.0
# show data in view
# show data in view
out_subdomains_3vtkDisplay
=
Show
(
out_subdomains_3vtk
,
renderView1
)
out_subdomains_3vtkDisplay
=
Show
(
out_subdomains_3vtk
,
renderView1
)
# trace defaults for the display properties.
#out_subdomains_3vtkDisplay.ColorArrayName = ['CELLS', 'data']
#out_subdomains_3vtkDisplay.LookupTable = dataLUT
#out_subdomains_3vtkDisplay.ScalarOpacityUnitDistance = 0.5153778246772277
# show color bar/color legend
#out_subdomains_3vtkDisplay.SetScalarBarVisibility(renderView1, True)
# show data in view
# show data in view
out_subdomains_1vtkDisplay
=
Show
(
out_subdomains_1vtk
,
renderView1
)
out_subdomains_1vtkDisplay
=
Show
(
out_subdomains_1vtk
,
renderView1
)
# trace defaults for the display properties.
#out_subdomains_1vtkDisplay.ColorArrayName = ['CELLS', 'data']
#out_subdomains_1vtkDisplay.LookupTable = dataLUT
#out_subdomains_1vtkDisplay.ScalarOpacityUnitDistance = 0.5153778246772277
# show color bar/color legend
#out_subdomains_1vtkDisplay.SetScalarBarVisibility(renderView1, True)
# show data in view
# show data in view
out_subdomains_2vtkDisplay
=
Show
(
out_subdomains_2vtk
,
renderView1
)
out_subdomains_2vtkDisplay
=
Show
(
out_subdomains_2vtk
,
renderView1
)
# trace defaults for the display properties.
#out_subdomains_2vtkDisplay.ColorArrayName = ['CELLS', 'data']
#out_subdomains_2vtkDisplay.LookupTable = dataLUT
#out_subdomains_2vtkDisplay.ScalarOpacityUnitDistance = 0.5153778246772277
# show color bar/color legend
#out_subdomains_2vtkDisplay.SetScalarBarVisibility(renderView1, True)
# show data in view
# show data in view
out_subdomains_0vtkDisplay
=
Show
(
out_subdomains_0vtk
,
renderView1
)
out_subdomains_0vtkDisplay
=
Show
(
out_subdomains_0vtk
,
renderView1
)
# trace defaults for the display properties.
#out_subdomains_0vtkDisplay.ColorArrayName = ['CELLS', 'data']
#out_subdomains_0vtkDisplay.LookupTable = dataLUT
#out_subdomains_0vtkDisplay.ScalarOpacityUnitDistance = 0.5153778246772277
# show color bar/color legend
#out_subdomains_0vtkDisplay.SetScalarBarVisibility(renderView1, True)
# get opacity transfer function/opacity map for 'data'
#dataPWF = GetOpacityTransferFunction('data')
#dataPWF.Points = [285.3226244096321, 0.0, 0.5, 0.0, 339.4127281054734, 1.0, 0.5, 0.0]
#dataPWF.ScalarRangeInitialized = 1
# turn off scalar coloring
# turn off scalar coloring
ColorBy
(
out_subdomains_0vtkDisplay
,
None
)
ColorBy
(
out_subdomains_0vtkDisplay
,
None
)
# set active source
#SetActiveSource(out_subdomains_1vtk)
# turn off scalar coloring
# turn off scalar coloring
ColorBy
(
out_subdomains_1vtkDisplay
,
None
)
ColorBy
(
out_subdomains_1vtkDisplay
,
None
)
# turn off scalar coloring
# turn off scalar coloring
ColorBy
(
out_subdomains_2vtkDisplay
,
None
)
ColorBy
(
out_subdomains_2vtkDisplay
,
None
)
# set active source
#SetActiveSource(out_subdomains_3vtk)
# turn off scalar coloring
# turn off scalar coloring
ColorBy
(
out_subdomains_3vtkDisplay
,
None
)
ColorBy
(
out_subdomains_3vtkDisplay
,
None
)
...
@@ -219,12 +172,12 @@ out_subdomains_3vtkDisplay.SetRepresentationType('Surface With Edges')
...
@@ -219,12 +172,12 @@ out_subdomains_3vtkDisplay.SetRepresentationType('Surface With Edges')
# hide data in view
# hide data in view
Hide
(
dom_boxvtk
,
renderView1
)
Hide
(
dom_boxvtk
,
renderView1
)
WriteImage
(
"
domain_subdomain_decomposed.jpg
"
)
WriteImage
(
"
jpg/
domain_subdomain_decomposed.jpg
"
)
# hide data in view
# hide data in view
Hide
(
transform1
,
renderView1
)
Hide
(
transform1
,
renderView1
)
WriteImage
(
"
domain_subdomain_decomposed_wg.jpg
"
)
WriteImage
(
"
jpg/
domain_subdomain_decomposed_wg.jpg
"
)
#Destroy everything
#Destroy everything
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment