diff --git a/lbstep.py b/lbstep.py index 8ce5ed3d15a9ec717fe1c872a19d895083ae1b91..c85f2ced83e48e3823652df62cceb9e2c474207f 100644 --- a/lbstep.py +++ b/lbstep.py @@ -120,8 +120,10 @@ class LatticeBoltzmannStep: # -- Boundary Handling & Synchronization --- stencil_name = method_parameters['stencil'] - self._sync_src = data_handling.synchronization_function([self._pdf_arr_name], stencil_name, target) - self._sync_tmp = data_handling.synchronization_function([self._tmp_arr_name], stencil_name, target) + self._sync_src = data_handling.synchronization_function([self._pdf_arr_name], stencil_name, target, + stencil_restricted=True) + self._sync_tmp = data_handling.synchronization_function([self._tmp_arr_name], stencil_name, target, + stencil_restricted=True) self._boundary_handling = LatticeBoltzmannBoundaryHandling(self.method, self._data_handling, self._pdf_arr_name, name=name + "_boundary_handling", diff --git a/moments.py b/moments.py index 0bc25c85a739bbfa8b19d6c0aa5f507a61778fce..ae824615325cb0c4c3c1c537b02e8a9fa145f6e5 100644 --- a/moments.py +++ b/moments.py @@ -464,13 +464,16 @@ def moment_equality_table(stencil, discrete_equilibrium=None, continuous_equilib Creates a table showing which moments of a discrete stencil/equilibrium coincide with the corresponding continuous moments - :param stencil: list of stencil velocities - :param discrete_equilibrium: list of sympy expr to compute discrete equilibrium for each direction, if left - to default the standard discrete Maxwellian equilibrium is used - :param continuous_equilibrium: continuous equilibrium, if left to default, the continuous Maxwellian is used - :param max_order: compare moments up to this order (number of rows in table) - :param truncate_order: moments are considered equal if they match up to this order - :return: Object to display in an Jupyter notebook + Args: + stencil: list of stencil velocities + discrete_equilibrium: list of sympy expr to compute discrete equilibrium for each direction, if left + to default the standard discrete Maxwellian equilibrium is used + continuous_equilibrium: continuous equilibrium, if left to default, the continuous Maxwellian is used + max_order: compare moments up to this order (number of rows in table) + truncate_order: moments are considered equal if they match up to this order + + Returns: + Object to display in an Jupyter notebook """ import ipy_table from lbmpy.continuous_distribution_measures import continuous_moment @@ -535,10 +538,11 @@ def moment_equality_table_by_stencil(name_to_stencil_dict, moments, truncate_ord Creates a table for display in IPython notebooks that shows which moments agree between continuous and discrete equilibrium, group by stencils - :param name_to_stencil_dict: dict from stencil name to stencil - :param moments: sequence of moments to compare - assumes that permutations have similar properties - so just one representative is shown labeled with its multiplicity - :param truncate_order: compare up to this order + Args: + name_to_stencil_dict: dict from stencil name to stencil + moments: sequence of moments to compare - assumes that permutations have similar properties + so just one representative is shown labeled with its multiplicity + truncate_order: compare up to this order """ import ipy_table from lbmpy.maxwellian_equilibrium import discrete_maxwellian_equilibrium