diff --git a/boundaries/boundaryhandling.py b/boundaries/boundaryhandling.py index 7d52c8a1b2f52ba032661f85b60c253ae2b7f30e..4f2a0c611ba41136f01fb76e924e683d41a9192c 100644 --- a/boundaries/boundaryhandling.py +++ b/boundaries/boundaryhandling.py @@ -90,10 +90,9 @@ class LbmWeightInfo(CustomCppCode): def __init__(self, lb_method): weights = [str(w.evalf()) for w in lb_method.weights] - code = "const double __attribute__((unused)) %s [] = { %s };\n" % ( - LbmWeightInfo.WEIGHTS_SYMBOL.name, ",".join(weights)) - super(LbmWeightInfo, self).__init__(code, symbols_read=set(), - symbols_defined={LbmWeightInfo.WEIGHTS_SYMBOL}) + w_sym = LbmWeightInfo.WEIGHTS_SYMBOL + code = "const double __attribute__((unused)) %s [] = { %s };\n" % (w_sym.name, ",".join(weights)) + super(LbmWeightInfo, self).__init__(code, symbols_read=set(), symbols_defined={w_sym}) def create_lattice_boltzmann_boundary_kernel(pdf_field, index_field, lb_method, boundary_functor, diff --git a/phasefield/analytical.py b/phasefield/analytical.py index 927929c551c6df15d6cef0e6002ad8e0f205c608..5328a73c6351cb7ba1c8cc6ee2668e3484c35f04 100644 --- a/phasefield/analytical.py +++ b/phasefield/analytical.py @@ -83,6 +83,7 @@ def n_phases_correction_function(c, beta, power=2): (-beta * (1 - c) ** power, c > 1), (c ** 2 * (1 - c) ** 2, True)) + def n_phases_correction_function_wrong(c, beta, power=2): return sp.Piecewise((-beta * c ** power, c < 0), (-beta * (1 - c) ** power, c > 1), diff --git a/updatekernels.py b/updatekernels.py index 1dfb9e6a94114d502f21271e68b605dabc22778e..9c562b9461a48fffc20277bea71cacb0ba6c88d4 100644 --- a/updatekernels.py +++ b/updatekernels.py @@ -58,7 +58,7 @@ def create_stream_pull_only_kernel(stencil, numpy_arr=None, src_field_name="src" if numpy_arr is None: src = Field.create_generic(src_field_name, dim, index_shape=(len(stencil),), layout=generic_layout, dtype=generic_field_type) - dst = Field.create_generic(dst_field_name, dim, index_shape=(len(stencil),), + dst = Field.create_generic(dst_field_name, dim, index_shape=(len(stencil),), layout=generic_layout, dtype=generic_field_type) else: src = Field.create_from_numpy_array(src_field_name, numpy_arr, index_dimensions=1)