当前位置: 首页>>代码示例>>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;未经允许,请勿转载。