Skip to content
Snippets Groups Projects
Commit 9b0a7438 authored by Martin Bauer's avatar Martin Bauer
Browse files

More tests

parent 89d087b3
Branches
No related tags found
No related merge requests found
......@@ -90,14 +90,6 @@ import sympy as sp
from lbmpy.relaxationrates import get_shear_relaxation_rate
class ScalarSource(object):
def __init__(self, source):
self._source = source
def __call__(self, lb_method, **kwargs):
return [w_i * self._source for w_i in lb_method.weights]
class Simple(object):
r"""
A simple force model which introduces the following additional force term in the
......
......@@ -104,20 +104,3 @@ def create_pdf_array(size, num_directions, ghost_layers=1, layout='fzyx'):
if isinstance(layout, str):
layout = layout_string_to_tuple(layout, dim + 1)
return create_numpy_array_with_layout(size_with_gl + [num_directions], layout)
# ------------------------------------------- Add output fields to kernel ----------------------------------------------
def add_output_field_for_conserved_quantities(collision_rule, conserved_quantities_to_output_field_dict):
method = collision_rule.method
cqc = method.conserved_quantity_computation.output_equations_from_pdfs(method.pre_collision_pdf_symbols,
conserved_quantities_to_output_field_dict)
return collision_rule.new_merged(cqc)
def write_quantities_to_field(collision_rule, symbols, output_field):
if not hasattr(symbols, "__len__"):
symbols = [symbols]
eqs = [Assignment(output_field(i), s) for i, s in enumerate(symbols)]
return collision_rule.copy(collision_rule.main_assignments + eqs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment