本文整理汇总了Python中sfepy.base.base.Container类的典型用法代码示例。如果您正苦于以下问题:Python Container类的具体用法?Python Container怎么用?Python Container使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Container类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self, name, eq_map, offset):
Container.__init__(self, name=name, eq_map=eq_map, offset=offset)
self.eq_lcbc = nm.zeros((self.eq_map.n_eq,), dtype=nm.int32)
self.markers = []
self.n_transformed_dof = []
self.n_op = 0
self.ics = None
示例2: __init__
def __init__(self, equations):
Container.__init__(self, equations)
self.variables = Variables(self.collect_variables())
self.materials = Materials(self.collect_materials())
self.domain = self.get_domain()
self.active_bcs = set()
self.collect_conn_info()
示例3: __init__
def __init__(self, equations, setup=True, make_virtual=False, verbose=True):
Container.__init__(self, equations)
self.variables = Variables(self.collect_variables())
self.materials = Materials(self.collect_materials())
self.domain = self.get_domain()
self.active_bcs = set()
if setup:
self.setup(make_virtual=make_virtual, verbose=verbose)
示例4: append
def append(self, op):
Container.append(self, op)
eq = self.eq_map.eq
meq = eq[expand_nodes_to_equations(op.nodes, op.dof_names,
self.eq_map.dof_names)]
assert_(nm.all(meq >= 0))
op.treat_pbcs(meq)
self.markers.append(self.offset + self.n_op + 1)
self.eq_lcbc[meq] = self.markers[-1]
self.n_transformed_dof.append(op.n_dof)
self.n_op = len(self)
示例5: __init__
def __init__(self, name, variables, functions=None):
"""
Parameters
----------
name : str
The object name.
variables : Variables instance
The variables to be constrained.
functions : Functions instance, optional
The user functions for DOF matching and other LCBC
subclass-specific tasks.
"""
Container.__init__(self, name=name, variables=variables, functions=functions)
self.markers = []
self.n_new_dof = []
self.n_op = 0
self.ics = None
self.classes = find_subclasses(globals(), [LCBCOperator], omit_unnamed=True, name_attr="kind")
示例6: append
def append(self, obj):
Container.append(self, obj)
self.update_expression()
示例7: insert
def insert(self, ii, obj):
Container.insert(self, ii, obj)
self.update_expression()
示例8: __init__
def __init__(self, objs=None):
Container.__init__(self, objs=objs)
self.update_expression()
示例9: __init__
def __init__( self, **kwargs ):
Container.__init__( self, **kwargs )
self.cache_info = {}