-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #322 from CFD-GO/develop
Version 6.5
- Loading branch information
Showing
126 changed files
with
7,530 additions
and
2,927 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Testing the test | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- uses: CFD-GO/action_TCLB_test@master | ||
with: | ||
repository: ${{ github.repository }} | ||
ref: ${{ github.ref }} | ||
install: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 136 additions & 0 deletions
136
example/article/ThermocapillaryFlow/BubbleInteraction_catalyst.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
|
||
#-------------------------------------------------------------- | ||
|
||
# Global timestep output options | ||
timeStepToStartOutputAt=0 | ||
forceOutputAtFirstCall=False | ||
|
||
# Global screenshot output options | ||
imageFileNamePadding=0 | ||
rescale_lookuptable=False | ||
|
||
# Whether or not to request specific arrays from the adaptor. | ||
requestSpecificArrays=False | ||
|
||
# a root directory under which all Catalyst output goes | ||
rootDirectory='' | ||
|
||
# makes a cinema D index table | ||
make_cinema_table=False | ||
|
||
#-------------------------------------------------------------- | ||
# Code generated from cpstate.py to create the CoProcessor. | ||
# paraview version 5.8.0 | ||
#-------------------------------------------------------------- | ||
|
||
from paraview.simple import * | ||
from paraview import coprocessing | ||
|
||
# ----------------------- CoProcessor definition ----------------------- | ||
|
||
def CreateCoProcessor(): | ||
def _CreatePipeline(coprocessor, datadescription): | ||
class Pipeline: | ||
# state file generated using paraview version 5.8.0 | ||
|
||
# ---------------------------------------------------------------- | ||
# setup the data processing pipelines | ||
# ---------------------------------------------------------------- | ||
|
||
# trace generated using paraview version 5.8.0 | ||
# | ||
# To ensure correct image size when batch processing, please search | ||
# for and uncomment the line `# renderView*.ViewSize = [*,*]` | ||
|
||
#### disable automatic camera reset on 'Show' | ||
paraview.simple._DisableFirstRenderCameraReset() | ||
|
||
# create a new 'XML Partitioned Image Data Reader' | ||
# create a producer from a simulation input | ||
recalcitrantBubble_interaction_smooth_main_VTK_P00_00000530pvti = coprocessor.CreateProducer(datadescription, 'input') | ||
|
||
# create a new 'Cell Data to Point Data' | ||
cellDatatoPointData1 = CellDatatoPointData(Input=recalcitrantBubble_interaction_smooth_main_VTK_P00_00000530pvti) | ||
cellDatatoPointData1.CellDataArraytoprocess = ['PhaseField', 'T', 'U'] | ||
|
||
# create a new 'Iso Volume' | ||
isoVolume1 = IsoVolume(Input=cellDatatoPointData1) | ||
isoVolume1.InputScalars = ['POINTS', 'PhaseField'] | ||
isoVolume1.ThresholdRange = [0.0, 0.5] | ||
|
||
# create a new 'Connectivity' | ||
connectivity1 = Connectivity(Input=isoVolume1) | ||
|
||
# ---------------------------------------------------------------- | ||
# finally, restore active source | ||
SetActiveSource(connectivity1) | ||
# ---------------------------------------------------------------- | ||
|
||
# Now any catalyst writers | ||
cSVWriter1 = servermanager.writers.CSVWriter(Input=connectivity1) | ||
coprocessor.RegisterWriter(cSVWriter1, filename='Connectivity1_%t.csv', freq=1, paddingamount=0, DataMode='None', HeaderType='None', EncodeAppendedData=None, CompressorType='None', CompressionLevel='None') | ||
|
||
return Pipeline() | ||
|
||
class CoProcessor(coprocessing.CoProcessor): | ||
def CreatePipeline(self, datadescription): | ||
self.Pipeline = _CreatePipeline(self, datadescription) | ||
|
||
coprocessor = CoProcessor() | ||
# these are the frequencies at which the coprocessor updates. | ||
freqs = {'input': [1]} | ||
coprocessor.SetUpdateFrequencies(freqs) | ||
if requestSpecificArrays: | ||
arrays = [['PhaseField', 1], ['T', 1], ['U', 1]] | ||
coprocessor.SetRequestedArrays('input', arrays) | ||
coprocessor.SetInitialOutputOptions(timeStepToStartOutputAt,forceOutputAtFirstCall) | ||
|
||
if rootDirectory: | ||
coprocessor.SetRootDirectory(rootDirectory) | ||
|
||
if make_cinema_table: | ||
coprocessor.EnableCinemaDTable() | ||
|
||
return coprocessor | ||
|
||
|
||
#-------------------------------------------------------------- | ||
# Global variable that will hold the pipeline for each timestep | ||
# Creating the CoProcessor object, doesn't actually create the ParaView pipeline. | ||
# It will be automatically setup when coprocessor.UpdateProducers() is called the | ||
# first time. | ||
coprocessor = CreateCoProcessor() | ||
|
||
#-------------------------------------------------------------- | ||
# Enable Live-Visualizaton with ParaView and the update frequency | ||
coprocessor.EnableLiveVisualization(False, 1) | ||
|
||
# ---------------------- Data Selection method ---------------------- | ||
|
||
def RequestDataDescription(datadescription): | ||
"Callback to populate the request for current timestep" | ||
global coprocessor | ||
|
||
# setup requests for all inputs based on the requirements of the | ||
# pipeline. | ||
coprocessor.LoadRequestedData(datadescription) | ||
|
||
# ------------------------ Processing method ------------------------ | ||
|
||
def DoCoProcessing(datadescription): | ||
"Callback to do co-processing for current timestep" | ||
global coprocessor | ||
|
||
# Update the coprocessor by providing it the newly generated simulation data. | ||
# If the pipeline hasn't been setup yet, this will setup the pipeline. | ||
coprocessor.UpdateProducers(datadescription) | ||
|
||
# Write output data, if appropriate. | ||
coprocessor.WriteData(datadescription); | ||
|
||
# Write image capture (Last arg: rescale lookup table), if appropriate. | ||
coprocessor.WriteImages(datadescription, rescale_lookuptable=rescale_lookuptable, | ||
image_quality=0, padding_amount=imageFileNamePadding) | ||
|
||
# Live Visualization, if enabled. | ||
coprocessor.DoLiveVisualization(datadescription, "localhost", 22222) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.