Skip to content
Snippets Groups Projects
Commit 73622472 authored by Dominic Kempf's avatar Dominic Kempf
Browse files

Merge branch 'feature/volumes-as-constants' into 'master'

Feature/volumes as constants

See merge request !113
parents 914588a9 29a14307
No related branches found
No related tags found
No related merge requests found
......@@ -407,13 +407,11 @@ def to_global(local):
return prim.Variable(name)
@preamble
def define_cell_volume(name, restriction):
geo = name_cell_geometry(restriction)
temporary_variable(name, shape=())
code = "{} = {}.volume();".format(name, geo)
return quadrature_preamble(code,
assignees=frozenset({name}),
)
valuearg(name, dtype=np.float64)
return "auto {} = {}.volume();".format(name, geo)
def name_cell_volume(restriction):
......@@ -422,13 +420,11 @@ def name_cell_volume(restriction):
return name
@preamble
def define_facet_area(name):
geo = name_intersection_geometry()
temporary_variable(name, shape=())
code = "{} = {}.volume();".format(name, geo)
return quadrature_preamble(code,
assignees=frozenset({name}),
)
valuearg(name, dtype=np.float64)
return "auto {} = {}.volume();".format(name, geo)
def name_facet_area():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment