當前位置: 首頁>>代碼示例>>Python>>正文


Python solvers.TimeSteppingSolver類代碼示例

本文整理匯總了Python中sfepy.solvers.solvers.TimeSteppingSolver的典型用法代碼示例。如果您正苦於以下問題:Python TimeSteppingSolver類的具體用法?Python TimeSteppingSolver怎麽用?Python TimeSteppingSolver使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了TimeSteppingSolver類的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

    def __init__( self, conf, **kwargs ):
        TimeSteppingSolver.__init__( self, conf, **kwargs )

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

        self.format = format
開發者ID:certik,項目名稱:sfepy,代碼行數:8,代碼來源:ts.py

示例2: __init__

    def __init__(self, conf, ts=None, **kwargs):
        TimeSteppingSolver.__init__( self, conf, **kwargs )

        self.ts = get_default(ts, TimeStepper.from_conf(conf))
        self.ts.is_quasistatic = conf.get_default_attr('quasistatic', False)

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

        self.format = format
開發者ID:olivierverdier,項目名稱:sfepy,代碼行數:10,代碼來源:ts.py

示例3: __init__

    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
開發者ID:rc,項目名稱:sfepy,代碼行數:10,代碼來源:ts_solvers.py

示例4: __init__

    def __init__(self, conf, **kwargs):
        TimeSteppingSolver.__init__(self, conf, **kwargs)

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

        self.adt = adt = self.conf.adt
        adt.dt0 = self.ts.get_default_time_step()
        self.ts.set_n_digit_from_min_dt(get_min_dt(adt))

        self.format = '====== time %e (dt %e, wait %d, step %d of %d) ====='

        if isinstance(self.conf.adapt_fun, basestr):
            self.adapt_time_step = self.problem.functions[self.conf.adapt_fun]

        else:
            self.adapt_time_step = self.conf.adapt_fun
開發者ID:AshitaPrasad,項目名稱:sfepy,代碼行數:16,代碼來源:ts_solvers.py

示例5: process_conf

    def process_conf(conf, kwargs):
        """
        Process configuration options.
        """
        get = make_get_conf(conf, kwargs)
        common = TimeSteppingSolver.process_conf(conf)

        return Struct(t0=get('t0', 0.0),
                      t1=get('t1', 1.0),
                      dt=get('dt', None),
                      n_step=get('n_step', 10),
                      quasistatic=get('quasistatic', False)) + common
開發者ID:AshitaPrasad,項目名稱:sfepy,代碼行數:12,代碼來源:ts_solvers.py

示例6: __init__

    def __init__(self, conf, **kwargs):
        TimeSteppingSolver.__init__(self, conf, **kwargs)

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

        get = self.conf.get
        adt = Struct(red_factor=get('dt_red_factor', 0.2),
                     red_max=get('dt_red_max', 1e-3),
                     inc_factor=get('dt_inc_factor', 1.25),
                     inc_on_iter=get('dt_inc_on_iter', 4),
                     inc_wait=get('dt_inc_wait', 5),
                     red=1.0, wait=0, dt0=0.0)
        self.adt = adt

        adt.dt0 = self.ts.get_default_time_step()
        self.ts.set_n_digit_from_min_dt(get_min_dt(adt))

        self.format = '====== time %e (dt %e, wait %d, step %d of %d) ====='

        if isinstance(self.conf.adapt_fun, basestr):
            self.adapt_time_step = self.problem.functions[self.conf.adapt_fun]

        else:
            self.adapt_time_step = self.conf.adapt_fun
開發者ID:Nasrollah,項目名稱:sfepy,代碼行數:24,代碼來源:ts_solvers.py


注:本文中的sfepy.solvers.solvers.TimeSteppingSolver類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。