Subject: [FFC-dev] Assembling multiple forms

From: "Ostien, Jakob T" <[email-masked]>
Date: Thu, 24 Jul 2008 13:39:36 -0600

Hi all,

I have a form that generates a ~8.0 MB header file, partly because I have terms on the domain, interior_facets, and exterior_facets.  I am already using the FFC options to use the quadrature representation and -fno_evaluate_basis and -fno_evaluate_basis_derivatives.

First off, I haven't really been paying attention to the lists, but I thought I saw some talk about separating out the implementation from the header.  If so, what are the options for doing that.

Second, I thought a possible work around would be to overload the assemble function to accept multiple forms for assembly into a tensor.  One obvious decomposition are separate forms for domains, int_facets, and ext_facets (meaning a header file for each).  I haven't really looked and generating the sparsity pattern correctly might be tricky (I don't know), but it could work for me.  I'd rather try something more general than hacking my local version until it works (which is what I usually do).

Anyone have any thoughts, a good work around, or even a solution for this?

Jake

---

From: Anders Logg <[email-masked]>
Date: Tue, 19 Aug 2008 19:21:47 +0200

> Anyone have any thoughts, a good work around, or even a solution for this?

(Sorry for the very late reply.)

I think the best solution is to add a flag to the form compiler that
tells it to generate separate headers and implementation. Dag Lindbo
and Andy Terrel were discussing this before the summer.

There is support for doing this in the UFC templates that FFC uses.
We currently use the format strings foo_combined, but there are also
format strings named foo_header and foo_implementation that could be
used.

It shouldn't be hard to do this. Look in the file ufcformat.py in FFC
where you find the code that actually writes all generated code to
file according to the UFC interface. One should be able to modify this
to write things either as a single header file or as separate files.

-- 
Anders