本文整理匯總了Python中sfepy.discrete.Variables.get_lcbc_operator方法的典型用法代碼示例。如果您正苦於以下問題:Python Variables.get_lcbc_operator方法的具體用法?Python Variables.get_lcbc_operator怎麽用?Python Variables.get_lcbc_operator使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類sfepy.discrete.Variables
的用法示例。
在下文中一共展示了Variables.get_lcbc_operator方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Equations
# 需要導入模塊: from sfepy.discrete import Variables [as 別名]
# 或者: from sfepy.discrete.Variables import get_lcbc_operator [as 別名]
#.........這裏部分代碼省略.........
Set data (vectors of DOF values) of variables.
Parameters
----------
data : array
The dictionary of {variable_name : data vector}.
step : int, optional
The time history step, 0 (default) = current.
ignore_unknown : bool, optional
Ignore unknown variable names if `data` is a dict.
"""
self.variables.set_data(data, step=step,
ignore_unknown=ignore_unknown)
def apply_ebc(self, vec, force_values=None):
"""
Apply essential (Dirichlet) boundary conditions to a state vector.
"""
self.variables.apply_ebc(vec, force_values=force_values)
def apply_ic(self, vec, force_values=None):
"""
Apply initial conditions to a state vector.
"""
self.variables.apply_ic(vec, force_values=force_values)
def state_to_output(self, vec, fill_value=None, var_info=None,
extend=True):
return self.variables.state_to_output(vec,
fill_value=fill_value,
var_info=var_info,
extend=extend)
def get_lcbc_operator(self):
return self.variables.get_lcbc_operator()
def evaluate(self, names=None, mode='eval', dw_mode='vector',
term_mode=None, asm_obj=None):
"""
Evaluate the equations.
Parameters
----------
mode : one of 'eval', 'el_avg', 'qp', 'weak'
The evaluation mode.
names : str or sequence of str, optional
Evaluate only equations of the given name(s).
Returns
-------
out : dict or result
The evaluation result. In 'weak' mode it is the
`asm_obj`. Otherwise, it is a dict of results with equation names
as keys or a single result for a single equation.
"""
if names is None:
eqs = self
single = (len(eqs) == 1)
else:
single = isinstance(names, str)
if single:
names = [names]
eqs = [self[eq] for eq in names]