Commit 706c5257 authored by Martin Bauer's avatar Martin Bauer
Browse files

Added notebook with LES Smagorinsky model

parent 327acffd
......@@ -225,6 +225,21 @@ class EquationCollection(object):
allLhs = [eq.lhs for eq in self.mainEquations]
return self.extract(allLhs)
def appendToSubexpressions(self, rhs, lhs=None, topologicalSort=True):
if lhs is None:
lhs = sp.Dummy()
eq = sp.Eq(lhs, rhs)
self.subexpressions.append(eq)
if topologicalSort:
self.topologicalSort(subexpressions=True, mainEquations=False)
return lhs
def topologicalSort(self, subexpressions=True, mainEquations=True):
if subexpressions:
self.subexpressions = sortEquationsTopologically(self.subexpressions)
if mainEquations:
self.mainEquations = sortEquationsTopologically(self.mainEquations)
def insertSubexpression(self, symbol):
newSubexpressions = []
subsDict = None
......
......@@ -4,8 +4,11 @@ These function simplify the iteration over rectangular slices, managing the mapp
global coordinates.
"""
import numpy as np
import waLBerla as wlb
from pystencils.slicing import normalizeSlice
try:
import waLBerla as wlb
except ImportError:
wlb = None
def blockIteration(blocks, ghostLayers, dim=3, accessPrefix=''):
......
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