コード例 #1
0
    def __init__(self, conf, nls=None, context=None, **kwargs):

        TimeSteppingSolver.__init__(self,
                                    conf,
                                    nls=nls,
                                    context=context,
                                    **kwargs)
        self.ts = TimeStepper.from_conf(self.conf)

        nd = self.ts.n_digit
        self.stage_format =  '---- ' + \
            self.name + ' stage {}: linear system sol error {}'+ \
                             ' ----'

        format = '\n\n====== time %%e (step %%%dd of %%%dd) =====' % (nd, nd)
        self.format = format
        self.verbose = self.conf.verbose

        self.post_stage_hook = lambda x: x

        limiters = {}
        if self.conf.limiters is not None:
            limiters = self.conf.limiters
        # what if we have more fields or limiters?
        for field_name, limiter in limiters.items():
            self.post_stage_hook = limiter(context.fields[field_name],
                                           verbose=self.verbose)
コード例 #2
0
ファイル: ts_solvers.py プロジェクト: Nasrollah/sfepy
    def __init__(self, conf, **kwargs):
        TimeSteppingSolver.__init__(self, conf, **kwargs)

        self.ts = TimeStepper.from_conf(self.conf)

        nd = self.ts.n_digit
        format = '====== time %%e (step %%%dd of %%%dd) =====' % (nd, nd)

        self.format = format
コード例 #3
0
ファイル: ts_solvers.py プロジェクト: mfkiwl/sfepy
    def __init__(self, conf, **kwargs):
        TimeSteppingSolver.__init__(self, conf, **kwargs)

        self.ts = TimeStepper.from_conf(self.conf)

        nd = self.ts.n_digit
        format = '====== time %%e (step %%%dd of %%%dd) =====' % (nd, nd)

        self.format = format
コード例 #4
0
ファイル: ts_solvers.py プロジェクト: rc/sfepy
    def __init__(self, conf, nls=None, context=None, **kwargs):
        TimeSteppingSolver.__init__(self, conf, nls=nls, context=context,
                                    **kwargs)
        self.ts = TimeStepper.from_conf(self.conf)

        nd = self.ts.n_digit
        format = '====== time %%e (step %%%dd of %%%dd) =====' % (nd, nd)

        self.format = format
        self.verbose = self.conf.verbose
コード例 #5
0
    def __init__(self, conf, nls=None, context=None, **kwargs):
        TimeSteppingSolver.__init__(self, conf, nls=nls, context=context,
                                    **kwargs)
        self.ts = TimeStepper.from_conf(self.conf)

        nd = self.ts.n_digit
        format = '====== time %%e (step %%%dd of %%%dd) =====' % (nd, nd)

        self.format = format
        self.verbose = self.conf.verbose