devitocodes / devito

DSL and compiler framework for automated finite-differences and stencil computation
http://www.devitoproject.org
MIT License
537 stars 221 forks source link

Introduce devito.Zero to replace sympy.Zero in the FD layer #2332

Open FabioLuporini opened 3 months ago

FabioLuporini commented 3 months ago

this way we avoid annoying try-excepts such as

       try:
             theta = model.theta
         except AttributeError:
             theta = 0

or

if theta != 0:
    <expr>
mloubout commented 3 months ago

It's not that simple