示例#1
0
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()
示例#2
0
import pyfeelpp.core as core
import sys

e = core.Environment(sys.argv)

print("pid:", e.worldComm().localRank())
print("isMasterRank:", e.isMasterRank())
示例#3
0
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()
示例#4
0
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()
示例#5
0
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()