def WriteRestartFile(self, FileName): backupfile = open(FileName + ".py", 'w') backupfile.write("from KratosMultiphysics import *\n") backupfile.write("def Restart(NODES):\n") import restart_utilities restart_utilities.PrintRestart_ScalarVariable_PyFormat( VELOCITY_X, "VELOCITY_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( VELOCITY_Y, "VELOCITY_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( VELOCITY_Z, "VELOCITY_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( PRESSURE, "PRESSURE", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DENSITY, "DENSITY", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( VISCOSITY, "VISCOSITY", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(VELOCITY_X, "VELOCITY_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(VELOCITY_Y, "VELOCITY_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(VELOCITY_Z, "VELOCITY_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(PRESSURE, "PRESSURE", self.model_part.Nodes, backupfile) backupfile.close()
def WriteRestartFile(self, FileName): backupfile = open(FileName + ".py", 'w') import restart_utilities restart_utilities.PrintRestart_ScalarVariable_PyFormat( VELOCITY_X, "VELOCITY_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( VELOCITY_Y, "VELOCITY_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( VELOCITY_Z, "VELOCITY_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( PRESSURE, "PRESSURE", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DENSITY, "DENSITY", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( VISCOSITY, "VISCOSITY", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( NODAL_H, "NODAL_H", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( IS_STRUCTURE, "IS_STRUCTURE", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( IS_BOUNDARY, "IS_BOUNDARY", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( IS_WATER, "IS_WATER", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( IS_INTERFACE, "IS_INTERFACE", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DISTANCE, "DISTANCE", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DISPLACEMENT_X, "DISPLACEMENT_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DISPLACEMENT_Y, "DISPLACEMENT_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DISPLACEMENT_Z, "DISPLACEMENT_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( DISTANCE, "DISTANCE", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( ACCELERATION_X, "ACCELERATION_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( ACCELERATION_Y, "ACCELERATION_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( ACCELERATION_Z, "ACCELERATION_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( MESH_VELOCITY_X, "MESH_VELOCITY_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( MESH_VELOCITY_Y, "MESH_VELOCITY_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( MESH_VELOCITY_Z, "MESH_VELOCITY_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( BODY_FORCE_X, "BODY_FORCE_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( BODY_FORCE_Y, "BODY_FORCE_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestart_ScalarVariable_PyFormat( BODY_FORCE_Z, "BODY_FORCE_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(VELOCITY_X, "VELOCITY_X", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(VELOCITY_Y, "VELOCITY_Y", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(VELOCITY_Z, "VELOCITY_Z", self.model_part.Nodes, backupfile) restart_utilities.PrintRestartFixity_PyFormat(PRESSURE, "PRESSURE", self.model_part.Nodes, backupfile) # restart_utilities.PrintRestart_Position_PyFormat(self.model_part.Nodes,backupfile) backupfile.close()