...
 
Commits (2)
......@@ -249,7 +249,7 @@ def generate_local_decomposition():
cases = []
for faceid in range(2**world_dimension()):
cases.append(" case {0}: copy_exterior_boundary_faceid{0}(eg, x, y); break;".format(faceid))
block = block[:len(block)//2] + cases + block[len(block)//2:]
block = block[:len(block) // 2] + cases + block[len(block) // 2:]
return block
def copy_exterior_boundary_faceid(faceid):
......@@ -319,7 +319,7 @@ def coarse_basis_size():
def define_local_basis_eval(name):
basis_size = coarse_basis_size()
rf = type_floatingpoint()
globalarg(name, shape=(basis_size, 1),managed=False)
globalarg(name, shape=(basis_size, 1), managed=False)
return "mutable std::vector<Dune::FieldVector<{}, 1>> {} = " \
"std::vector<Dune::FieldVector<{}, 1>>({});".format(rf, name, rf, basis_size)
......@@ -453,6 +453,3 @@ def generate_restriction():
add_patterns()
return [knl]
......@@ -503,7 +503,8 @@ def type_constraintsassembler(is_dirichlet):
def main_type_subgfs(treepath):
include_file('dune/pdelab/gridfunctionspace/subspace.hh', filetag='driver')
gfs = main_type_trial_gfs()
return "Dune::PDELab::GridFunctionSubSpace<{}, Dune::TypeTree::TreePath<{}> >".format(gfs, ', '.join(str(t) for t in treepath))
indices = ", ".join("Dune::index_constant<{}>".format(t) for t in treepath)
return "Dune::PDELab::GridFunctionSubSpace<{}, Dune::TypeTree::HybridTreePath<{}> >".format(gfs, indices)
@preamble(section="driverblock", kernel="main")
......