Commit 05119269 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Make subexpressions optional for constructing an AssignmentCollection

When introducing new people to pystencils it's often simpler not to
differentiate between `main_assignments` and `subexpressions` in the
beginning.
Also for simple kernels subexpressions are often not needed, since
intermediate symbols can also be set in main_assignments.

Subexpression should be kept for expert users.
parent 1754ef27
Pipeline #16236 passed with stage
in 7 minutes and 45 seconds
......@@ -28,7 +28,7 @@ class AssignmentCollection:
# ------------------------------- Creation & Inplace Manipulation --------------------------------------------------
def __init__(self, main_assignments: Union[List[Assignment], Dict[sp.Expr, sp.Expr]],
subexpressions: Union[List[Assignment], Dict[sp.Expr, sp.Expr]],
subexpressions: Union[List[Assignment], Dict[sp.Expr, sp.Expr]] = {},
simplification_hints: Optional[Dict[str, Any]] = None,
subexpression_symbol_generator: Iterator[sp.Symbol] = None) -> None:
if isinstance(main_assignments, Dict):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment