Subject: [UFC-dev] num_arguments = rank + num_coefficients

From: Anders Logg <[email-masked]>
Date: Thu, 1 Mar 2007 11:07:31 +0100

Could we add a function num_arguments() to ufc::form?

It is always the case that num_arguments is the same as

    rank + num_coefficients

but this requires some extra knowledge and the sum above appears in
quite a few places, both in the code generation and when calling the
generated code.

/Anders

---

From: "Martin Sandve Alnæs" <[email-masked]>
Date: Thu, 1 Mar 2007 16:59:10 +0100

> quite a few places, both in the code generation and when calling the

Is that such a problem? In the assembler I store num_arguments in an
integer to begin with anyway. In the code generation we know all we
need.

If we add utility functions for this one-step operation, there are
lots of other useful functions we could add as well. Functions that
would be much more useful than this in my opinion. So for the
principle of a minimal interface I vote no.

F.ex., to get the signature of a dof_map when I have the form, I now
have to create a dof_map just to call signature() on it. That's more
overhead and inconvenience than adding two integers! So a
form::dof_map_signature() and form::finite_element_signature() would
be two examples of more helpful additions than num_arguments() in my
eyes.

martin

---

From: Anders Logg <[email-masked]>
Date: Thu, 1 Mar 2007 17:01:49 +0100

> be two examples of more helpful additions than num_arguments() in my

ok! Let's keep the interface minimal.

/Anders