Skip to content
Snippets Groups Projects
Commit 618c462e authored by René Heß's avatar René Heß
Browse files

Merge branch 'feature/eliminate-dimension-variable' into 'master'

Feature/eliminate dimension variable

Fixes #42

See merge request !46
parents 2e010e46 56926e17
No related branches found
No related tags found
No related merge requests found
......@@ -91,7 +91,7 @@ def name_basis(leaf_element, restriction):
@cached
def evaluate_reference_gradient(leaf_element, name, restriction):
lfs = name_leaf_lfs(leaf_element, restriction)
temporary_variable(name, shape=(name_lfs_bound(lfs), name_dimension()), decl_method=None)
temporary_variable(name, shape=(name_lfs_bound(lfs), 1, name_dimension()), decl_method=None)
declare_cache_temporary(leaf_element, restriction, name, which='Jacobian')
cache = name_localbasis_cache(leaf_element)
qp = name_quadrature_position_in_cell(restriction)
......
......@@ -187,26 +187,14 @@ def to_cell_coordinates(local, basename, restriction):
return name_in_cell_coordinates(local, basename, restriction)
@preamble
def define_dimension(name):
geo = type_geometry_wrapper()
return 'const int {} = {}::Entity::dimension;'.format(name, geo)
def name_dimension():
define_dimension("dim")
return "dim"
@preamble
def define_intersection_dimension(name):
geo = type_intersection_geometry_wrapper()
return "const int {} = {}::Geometry::mydimension;".format(name, geo)
formdata = get_global_context_value('formdata')
return formdata.geometric_dimension
def name_intersection_dimension():
define_intersection_dimension("idim")
return "idim"
formdata = get_global_context_value('formdata')
return formdata.geometric_dimension - 1
def evaluate_unit_outer_normal(name):
......
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