except: raise RuntimeError('Could not find kernels for ' + cmdLineArgs.equations) cmdArgsDict = vars(cmdLineArgs) cmdArgsDict['memLayout'] = mem_layout if cmdLineArgs.equations == 'elastic': adg = equations.ElasticADERDG(**cmdArgsDict) elif cmdLineArgs.equations == 'viscoelastic': adg = equations.ViscoelasticADERDG(**cmdArgsDict) else: adg = equations.Viscoelastic2ADERDG(**cmdArgsDict) include_tensors = set() include_tensors = set() g = Generator(arch) # Equation-specific kernels adg.addInit(g) adg.addLocal(g) adg.addNeighbor(g) adg.addTime(g) adg.add_include_tensors(include_tensors) # Common kernels include_tensors |= DynamicRupture.addKernels( NamespacedGenerator(g, namespace="dynamicRupture"), adg, cmdLineArgs.matricesDir, cmdLineArgs.dynamicRuptureMethod) Plasticity.addKernels(g, adg, cmdLineArgs.matricesDir, cmdLineArgs.PlasticityMethod) NodalBoundaryConditions.addKernels(g, adg, include_tensors,
cmdArgsDict = vars(cmdLineArgs) cmdArgsDict['memLayout'] = mem_layout if cmdLineArgs.equations == 'anisotropic': adg = equations.AnisotropicADERDG(**cmdArgsDict) elif cmdLineArgs.equations == 'elastic': adg = equations.ElasticADERDG(**cmdArgsDict) elif cmdLineArgs.equations == 'viscoelastic': adg = equations.ViscoelasticADERDG(**cmdArgsDict) elif cmdLineArgs.equations == 'viscoelastic2': adg = equations.Viscoelastic2ADERDG(**cmdArgsDict) else: adg = equations.PoroelasticADERDG(**cmdArgsDict) include_tensors = set() generator = Generator(arch) # Equation-specific kernels adg.addInit(generator) adg.addLocal(generator, targets) adg.addNeighbor(generator, targets) adg.addTime(generator, targets) adg.add_include_tensors(include_tensors) # Common kernels include_tensors.update(DynamicRupture.addKernels(NamespacedGenerator(generator, namespace="dynamicRupture"), adg, cmdLineArgs.matricesDir, cmdLineArgs.dynamicRuptureMethod, targets))