def __init__(self, domain, amplitude=1, mass=0.1, tags=('qwave', ), **kwargs): DomainState.__init__(self, **struct.kwargs(locals()))
def __init__(self, geometry, material=SLIPPERY, velocity=0, tags=('obstacle', ), **kwargs): State.__init__(self, **struct.kwargs(locals()))
def __init__(self, domain, velocity=0, viscosity=0.1, name='burgers', **kwargs): DomainState.__init__(self, **struct.kwargs(locals()))
def __init__(self, data, box=None, extrapolation='boundary', name=None, **kwargs): Field.__init__(self, **struct.kwargs(locals())) self._sample_points = None
def __init__(self, function, function_args, **kwargs): fields = filter(lambda arg: isinstance(arg, Field), function_args) AnalyticField.__init__(self, _determine_rank(fields), name=function.__name__, **struct.kwargs(locals(), ignore='fields')) self.fields = tuple(fields) self.channels = _determine_component_count(function_args)
def __init__(self, name, is_data_bound, is_structure_bound, propagators=(), field_types=(), **kwargs): struct.Struct.__init__(self, **struct.kwargs(locals()))
def __init__(self, sample_points, data=1, mode='mean', point_count=None, **kwargs): Field.__init__(self, **struct.kwargs(locals(), ignore=['point_count'])) self._point_count = point_count
def __init__(self, domain, density=0.0, velocity=0.0, buoyancy_factor=0.0, tags=('fluid', 'velocityfield', 'velocity'), name='fluid', **kwargs): DomainState.__init__(self, **struct.kwargs(locals()))
def __init__(self, k, phase_offset=0, data=1.0, name='harmonic', dtype=np.float32, **kwargs): rank = math.size(k) AnalyticField.__init__(self, **struct.kwargs(locals()))
def __init__(self, center, unit_distance, maximum_value=1.0, data=1.0, name='harmonic', **kwargs): rank = math.shape(center)[-1] AnalyticField.__init__(self, **struct.kwargs(locals()))
def __init__(self, center, size, wave_vector, name='wave_packet', data=1.0, **kwargs): rank = math.staticshape(center)[-1] AnalyticField.__init__(self, **struct.kwargs(locals()))
def __init__(self, domain, valid_state=(), active=None, accessible=None, **kwargs): struct.Struct.__init__(self, **struct.kwargs(locals(), ignore='valid_state')) self._valid_state = valid_state
def __init__(self, field, targets, mode=GROW, bounds=None, tags=('effect', ), **kwargs): tags = tuple(tags) + tuple('%s_effect' % target for target in targets) State.__init__(self, **struct.kwargs(locals()))
def __init__(self, center=(0, 0), size=0, mode='RANDOM', factor=1.0, name='Seed', data=1.0, **kwargs): rank = math.staticshape(center)[-1] AnalyticField.__init__(self, **struct.kwargs(locals()))
def __init__(self, field, targets, mode=GROW, bounds=None, tags=('effect', ), **kwargs): if isinstance(targets, six.string_types): targets = [targets] tags = tuple(tags) + tuple('%s_effect' % target for target in targets) State.__init__(self, **struct.kwargs(locals()))
def __init__(self, domain, density=0.0, velocity=0.0, buoyancy_factor=0.0, tags=('fluid', 'velocityfield', 'velocity'), name='fluid', **kwargs): warnings.warn( 'Fluid is deprecated. Use a dictionary of fields instead. See the Φ-Flow 2 upgrade instructions.', DeprecationWarning) State.__init__(self, **struct.kwargs(locals()))
def __init__(self, data, box=None, extrapolation='boundary', name=None, **kwargs): """Create new CenteredGrid from array like data :param data: numerical values to be set as values of CenteredGrid (immutable) :type data: array-like :param box: numerical values describing the surrounding area of the CenteredGrid, defaults to None :type box: domain.box, optional :param extrapolation: set conditions for boundaries, defaults to 'boundary' :type extrapolation: str, optional :param name: give CenteredGrid a custom name (immutable), defaults to None :type name: string, optional """ Field.__init__(self, **struct.kwargs(locals()))
def __init__(self, resolution, boundaries=OPEN, box=None, **kwargs): """ Simulation domain that specifies size and boundary conditions. If all boundary surfaces should have the same behaviour, pass a single Material instance. To specify the boundary constants_dict per dimension or surface, pass a tuple or list with as many elements as there are spatial dimensions (highest dimension first). Each element can either be a Material, specifying the faces perpendicular to that axis, or a pair of Material holding (lower_face_material, upper_face_material). Examples: Domain(grid, OPEN) - all surfaces are open DomainBoundary(grid, boundaries=[(SLIPPY, OPEN), SLIPPY]) - creates a 2D domain with an open top and otherwise solid boundaries :param grid: Grid object or 1D tensor specifying the grid dimensions :param boundaries: Material or list of Material/Pair of Material """ struct.Struct.__init__(self, **struct.kwargs(locals()))
def __init__(self, geometries, value=1.0, name=None, flags=(), **kwargs): data = _convert_constant_to_data(value) AnalyticField.__init__(self, geometries[0].rank, **struct.kwargs(locals(), ignore='value'))
def __init__(self, data, box=None, name=None, **kwargs): Field.__init__(self, **struct.kwargs(locals()))
def __init__(self, channels=1, scale=10, smoothness=1.0, math=math.DYNAMIC_BACKEND, **kwargs): AnalyticField.__init__(self, None, **struct.kwargs(locals()))
def __init__(self, lower, upper, **kwargs): AbstractBox.__init__(self, **struct.kwargs(locals()))
def __init__(self, center, half_size, **kwargs): AbstractBox.__init__(self, **struct.kwargs(locals()))
def __init__(self, center, radius, **kwargs): Geometry.__init__(self, **struct.kwargs(locals()))
def __init__(self, rank, data=1.0, name=None, **kwargs): Field.__init__(self, **struct.kwargs(locals(), ignore='rank')) self._rank = rank
def __init__(self, data, name=None, **kwargs): if 'tags' not in kwargs: tags = [name, 'field'] if name is not None else ['field'] State.__init__(self, **struct.kwargs(locals()))
def __init__(self, **kwargs): AnalyticField.__init__(self, None, **struct.kwargs(locals()))
def __init__(self, location, strength=1.0, **kwargs): AnalyticField.__init__(self, rank=None, **struct.kwargs(locals()))
def __init__(self, value=1.0, name=None, **kwargs): data = _convert_constant_to_data(value) Field.__init__(self, **struct.kwargs(locals(), ignore='value'))
def __init__(self, name, **kwargs): struct.Struct.__init__(self, **struct.kwargs(locals()))