本文整理汇总了Python中sfepy.discrete.Variables.equation_mapping方法的典型用法代码示例。如果您正苦于以下问题:Python Variables.equation_mapping方法的具体用法?Python Variables.equation_mapping怎么用?Python Variables.equation_mapping使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfepy.discrete.Variables
的用法示例。
在下文中一共展示了Variables.equation_mapping方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Equations
# 需要导入模块: from sfepy.discrete import Variables [as 别名]
# 或者: from sfepy.discrete.Variables import equation_mapping [as 别名]
#.........这里部分代码省略.........
combination boundary conditions operators and the setup of
active DOF connectivities.
Parameters
----------
ts : TimeStepper instance
The time stepper.
ebcs : Conditions instance, optional
The essential (Dirichlet) boundary conditions.
epbcs : Conditions instance, optional
The periodic boundary conditions.
lcbcs : Conditions instance, optional
The linear combination boundary conditions.
functions : Functions instance, optional
The user functions for boundary conditions, materials, etc.
problem : Problem instance, optional
The problem that can be passed to user functions as a context.
active_only : bool
If True, the active DOF connectivities and matrix graph have
reduced size and are created with the reduced (active DOFs only)
numbering.
verbose : bool
If False, reduce verbosity.
Returns
-------
graph_changed : bool
The flag set to True if the current time step set of active
boundary conditions differs from the set of the previous
time step.
"""
self.variables.time_update(ts, functions, verbose=verbose)
active_bcs = self.variables.equation_mapping(ebcs, epbcs, ts, functions,
problem=problem,
active_only=active_only)
graph_changed = active_only and (active_bcs != self.active_bcs)
self.active_bcs = active_bcs
if graph_changed or not self.variables.adof_conns:
adcs = create_adof_conns(self.conn_info, self.variables.adi.indx,
active_only=active_only)
self.variables.set_adof_conns(adcs)
self.variables.setup_lcbc_operators(lcbcs, ts, functions)
for eq in self:
for term in eq.terms:
term.time_update(ts)
return graph_changed
def time_update_materials(self, ts, mode='normal', problem=None,
verbose=True):
"""
Update data materials for current time and possibly also state.
Parameters
----------
ts : TimeStepper instance
The time stepper.
mode : 'normal', 'update' or 'force'
The update mode, see
:func:`sfepy.discrete.materials.Material.time_update()`.
problem : Problem instance, optional
The problem that can be passed to user functions as a context.