本文整理汇总了Python中sfepy.discrete.Variables.make_full_vec方法的典型用法代码示例。如果您正苦于以下问题:Python Variables.make_full_vec方法的具体用法?Python Variables.make_full_vec怎么用?Python Variables.make_full_vec使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sfepy.discrete.Variables
的用法示例。
在下文中一共展示了Variables.make_full_vec方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Equations
# 需要导入模块: from sfepy.discrete import Variables [as 别名]
# 或者: from sfepy.discrete.Variables import make_full_vec [as 别名]
#.........这里部分代码省略.........
return matrix
def init_time(self, ts):
pass
def advance(self, ts):
for eq in self:
for term in eq.terms:
term.advance(ts)
self.variables.advance(ts)
##
# Interface to self.variables.
def create_state_vector(self):
return self.variables.create_state_vector()
def create_stripped_state_vector(self):
return self.variables.create_stripped_state_vector()
def strip_state_vector(self, vec, follow_epbc=False):
"""
Strip a full vector by removing EBC dofs.
Notes
-----
If 'follow_epbc' is True, values of EPBC master dofs are not simply
thrown away, but added to the corresponding slave dofs, just like when
assembling. For vectors with state (unknown) variables it should be set
to False, for assembled vectors it should be set to True.
"""
return self.variables.strip_state_vector(vec, follow_epbc=follow_epbc)
def make_full_vec(self, svec, force_value=None):
"""
Make a full DOF vector satisfying E(P)BCs from a reduced DOF
vector.
"""
return self.variables.make_full_vec(svec, force_value)
def set_variables_from_state(self, vec, step=0):
"""
Set data (vectors of DOF values) of variables.
Parameters
----------
data : array
The state vector.
step : int
The time history step, 0 (default) = current.
"""
self.variables.set_data(vec, step=step)
def get_state_parts(self, vec=None):
"""
Return parts of a state vector corresponding to individual state
variables.
Parameters
----------
vec : array, optional
The state vector. If not given, then the data stored in the
variables are returned instead.
Returns
-------