How to set FFC options from python?

Asked by Jan Blechta

FEniCS book on p. 232 says that these FFC options
  -f eliminate_zeros, -f simplify_expressions,
  -f precompute_ip_const and -f precompute_basis_const
can be set in the options dictionary. I can't see it in
  parameters['form_compiler']

Question information

Language:
English Edit question
Status:
Answered
For:
DOLFIN Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Johan Hake (johan-hake) said :
#1

The parameters included in form_compiler was meant to be general form
compiler parameters, which all form compiler could implement. Special
parameters for a particular form compiler need to be passed either
directly to the assembler through the form_compiler kwargs or you could
also try add it to parameters.

  parameters.form_compiler.add("simplify_expressions", False)

It is untested and I am not sure, however, the logic in the
jitcompiler.py allows this. If you are not able to pass these parameters
consider reporting it as an issue.

Johan

On 04/16/2013 09:16 PM, Jan Blechta wrote:
> New question #226839 on DOLFIN:
> https://answers.launchpad.net/dolfin/+question/226839
>
> FEniCS book on p. 232 says that these FFC options
> -f eliminate_zeros, -f simplify_expressions,
> -f precompute_ip_const and -f precompute_basis_const
> can be set in the options dictionary. I can't see it in
> parameters['form_compiler']
>

Revision history for this message
Martin Sandve Alnæs (martinal) said :
#2

Nope, we never standardized the form compiler arguments.

Revision history for this message
Anders Logg (logg) said :
#3

FEniCS no longer uses Launchapd for Questions & Answers. Please
consult the documentation on the FEniCS web page for where and
how to (re)post your question: http://fenicsproject.org/support/

Revision history for this message
Anders Logg (logg) said :
#4

FEniCS no longer uses Launchapd for Questions & Answers. Please
consult the documentation on the FEniCS web page for where and
how to (re)post your question: http://fenicsproject.org/support/

Can you help with this problem?

Provide an answer of your own, or ask Jan Blechta for more information if necessary.

To post a message you must log in.