def run( self, the_case_dir, the_output_med_file, the_output_mesh_name, the_foam_time ) : """ Runs the main functionality """ an_is_ok = TFilePostProcessor.run( self, the_case_dir, the_output_med_file, the_output_mesh_name, the_foam_time ) if not an_is_ok : return False # Connect to SALOME import pysalome, VISU, visu from batchmode_salome import orb, naming_service, lcc, myStudyManager, myStudy aVisuGen = visu.Initialize( orb, naming_service, lcc, myStudyManager, myStudy, 0 ) an_output_med_file = self.get_output_med_file() print_d( "an_output_med_file = \"%s\"" % an_output_med_file ) aResult = aVisuGen.CopyAndImportFile( an_output_med_file ) a_mesh_name = self.get_output_mesh_name() print_d( "a_mesh_name = \"%s\"" % a_mesh_name ) aScalarMap = aVisuGen.ScalarMapOnField( aResult, a_mesh_name, VISU.NODE, 'Point U', 1 ) aScalarMap.SetBarOrientation( VISU.ColoredPrs3d.HORIZONTAL ) aScalarMap.SetPosition( 0.05, 0.01 ) aScalarMap.SetSize( 0.90, 0.15 ) aScalarMap.SetNbColors( 64 ) aScalarMap.SetLabels( 5 ) aViewManager = aVisuGen.GetViewManager() aView3D = aViewManager.Create3DView() aView3D.Display( aScalarMap ); aView3D.FitAll() return True
def process( self, the_foam_time = None, the_output_med_file = None ) : print_d( "the_foam_time = \"%s\", the_output_med_file = \"%s\"" % ( the_foam_time, the_output_med_file ) ) return True
def __init__( self, the_case_dir, the_output_mesh_name = None ) : print_d( "the_case_dir = \"%s\", the_output_mesh_name = \"%s\"" % ( the_case_dir, the_output_mesh_name ) ) pass