Triggered assertion 'no weights' on a valid functional
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
UFL |
Fix Released
|
High
|
Martin Sandve Alnæs |
Bug Description
from dolfin import *
mesh = UnitSquare(10,10)
assemble(
assemble(
Traceback:
-------
Exception Traceback (most recent call last)
/home/martinal/
/home/martinal/
156 coefficients=
157 form_compiler_
--> 158 common_
159
160 # Set mesh if specified (important for functionals without a function spaces)
/home/martinal/
52 = jit(form,
53 form_compiler_
---> 54 common_cell)
55 else:
56 self._compiled_form = form
/home/martinal/
64 # Just call JIT compiler when running in serial
65 if MPI.num_processes() == 1:
---> 66 return local_jit(*args, **kwargs)
67
68 # Compile first on process 0
/home/martinal/
148 jit_compile = form_compiler.jit
149 except AttributeError:
150 raise RuntimeError, "Form compiler must implement the jit function."
151
--> 152 return jit_compile(form, parameters=p, common_
/home/martinal/
71 return jit_element(
72 else:
---> 73 return jit_form(
74
75 def jit_form(form, parameters=None, common_cell=None):
/home/martinal/
128 prefix=prefix,
129 parameters=
--> 130 common_
131
132 # Build module using Instant (through UFC)
/home/martinal/
163 # Stage 4: code generation
164 cpu_time = time()
--> 165 code = generate_code(oir, prefix, parameters)
166 _print_timing(4, time() - cpu_time)
167
/home/martinal/
74 # Generate code for integrals
75 info("Generating code for integrals")
---> 76 code_integrals = [_generate_
77
78 # Generate code for forms
/home/martinal/
198
199 # Generate code
--> 200 code = r.generate_
201
202 # Indent code (unused variables should already be removed)
/home/martinal/
51 code["initializ
52 code["destructor"] = format["do nothing"]
---> 53 code["tabulate_
54 code["tabulate_
55 code["additiona
/home/martinal/
165 # the unused transformations and tabulate the used psi tables and weights.
166 common = [remove_
--> 167 common += _tabulate_
168 name_map = ir["name_map"]
169 tables = ir["unique_tables"]
/home/martinal/
453 # FIXME: For now, raise error if we don't have weights.
454 # We might want to change this later.
--> 455 ffc_assert(
456
457 # Create name and value for weight.
/home/martinal/
44 def ffc_assert(
45 "Assert that condition is true and otherwise issue an error with given message."
---> 46 condition or error(*message)
47
48 # Set default log level
/home/martinal/
/home/martinal/
146 "Write error message and raise an exception."
147 self._log.
--> 148 raise self._exception
149
150 def begin(self, *message):
Exception: No weights.
Changed in ufl: | |
assignee: | nobody → Martin Sandve Alnæs (martinal) |
importance: | Undecided → High |
status: | Confirmed → Fix Committed |
milestone: | none → 1.1.0-alpha |
Changed in ufl: | |
status: | Fix Committed → Fix Released |
What is y? (I rather get NameError: name 'y' is not defined ;-) )