from pyfeelpp import core import sys import pyfeelpptoolboxes.modelcore as modelcore e = core.Environment(sys.argv, opts=modelcore.toolboxes_options("electric")) #from pyfeelpp import discr,ts,filters from pyfeelpptoolboxes.electric import * f = electric(dim=2, orderDisp=1, worldComm=e.worldCommPtr()) f.init() f.printAndSaveInfo() f.solve() f.exportResults()
import pyfeelpp.core as core import sys e = core.Environment(sys.argv) print("pid:", e.worldComm().localRank()) print("isMasterRank:", e.isMasterRank())
from pyfeelpp import core import sys import pyfeelpp.toolboxes.modelcore as modelcore e = core.Environment(sys.argv, opts=modelcore.toolboxes_options("advection")) #from pyfeelpp import discr,ts,filters from pyfeelpp.toolboxes.advection import * f = advection(dim=2, order=1, worldComm=e.worldCommPtr()) f.init() f.printAndSaveInfo() f.solve() f.exportResults()
from pyfeelpp import core import sys import pyfeelpptoolboxes.modelcore as modelcore e = core.Environment(sys.argv, opts=modelcore.toolboxes_options("solid")) #from pyfeelpp import discr,ts,filters from pyfeelpptoolboxes.solid import * f = solid(dim=2, orderDisp=1, worldComm=e.worldCommPtr()) f.init() f.printAndSaveInfo() if f.isStationary(): f.solve() f.exportResults() else: if not f.doRestart(): f.exportResults(f.timeInitial()) while not f.timeStepBase().isFinished(): if f.worldComm().isMasterRank(): print( "============================================================\n" ) print("time simulation: ", f.time(), "s \n") print( "============================================================\n" ) f.solve() f.exportResults() f.updateTimeStep()
from pyfeelpp import core import sys import pyfeelpp.toolboxes.modelcore as modelcore e=core.Environment(sys.argv,opts=modelcore.toolboxes_options("maxwell")) #from pyfeelpp import discr,ts,filters from pyfeelpp.toolboxes.maxwell import * f=maxwell(dim=2,worldComm=e.worldCommPtr()) f.init() f.printAndSaveInfo() f.solve() f.exportResults()