Skip to content
Snippets Groups Projects
Commit eb5a9595 authored by Andreas Klöckner's avatar Andreas Klöckner
Browse files

Predeclare a few often-used C functions

parent a43b2e2b
No related branches found
No related tags found
No related merge requests found
......@@ -128,6 +128,12 @@ class CFunction(pymbolic.primitives.Variable):
mapper_method = "map_c_function"
sqrt = CFunction("sqrt")
exp = CFunction("exp")
sin = CFunction("sin")
cos = CFunction("cos")
# }}}
......@@ -394,7 +400,7 @@ def pseudoscalar(ambient_dim, dim=None, where=None, quadrature_tag=None):
def area_element(ambient_dim, dim=None, where=None, quadrature_tag=None):
return cse(
CFunction("sqrt")(
sqrt(
pseudoscalar(ambient_dim, dim, where, quadrature_tag=quadrature_tag)
.norm_squared()),
"area_element", cse_scope.DISCRETIZATION)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment