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

Phase field equation derived from free energy - first draft

parent 223f12d4
No related merge requests found
from typing import Tuple from typing import Tuple
import sympy as sp import sympy as sp
from functools import partial
from pystencils.astnodes import LoopOverCoordinate from pystencils.astnodes import LoopOverCoordinate
from pystencils.cache import memorycache from pystencils.cache import memorycache
from pystencils import AssignmentCollection, Field from pystencils import Field
from pystencils.fd import Diff from pystencils.fd import Diff
from pystencils.transformations import generic_visit from pystencils.transformations import generic_visit
from .derivative import diff_args from .derivative import diff_args
...@@ -164,8 +162,10 @@ def discretize_spatial_staggered(expr, dx, stencil=fd_stencils_standard): ...@@ -164,8 +162,10 @@ def discretize_spatial_staggered(expr, dx, stencil=fd_stencils_standard):
return generic_visit(expr, visitor) return generic_visit(expr, visitor)
# -------------------------------------- special stencils -------------------------------------------------------------- # -------------------------------------- special stencils --------------------------------------------------------------
@memorycache(maxsize=1) @memorycache(maxsize=1)
def forth_order_2d_derivation() -> Tuple[FiniteDifferenceStencilDerivation.Result, ...]: def forth_order_2d_derivation() -> Tuple[FiniteDifferenceStencilDerivation.Result, ...]:
# Symmetry, isotropy and 4th order conditions are not enough to fully specify the stencil # Symmetry, isotropy and 4th order conditions are not enough to fully specify the stencil
......
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