Subject: [Syfi-dev] [HG syfi] fix to make sfc work with dolfin,

From: [email-masked] (SyFi)
Date: Wed, 25 Mar 2009 18:18:21 +0100 (CET)

One or more new changesets pushed to the primary SyFi repository.
A short summary of the last three changesets is included below.

changeset:   434:8c5f42a6fbbba2585e8948b8e6203b9d991b9cb7
tag:         tip
user:        "Kent-Andre Mardal <[email-masked]>"
date:        Wed Mar 25 18:18:17 2009 +0100
files:       scripts/sfc site-packages/newsfc/jit.py
description:
fix to make sfc work with dolfin,
replace
(self._compiled_form, self.form_data) = jit(form, options)
with
(self._compiled_form, module, self.form_data) = jit(form, options)

(module is never used in dolfin, but could be nice to have )

changeset:   433:41ea2efcfa57f722bdbe862426a3eb9f8db37b6a
user:        "Martin Sandve Alnæs <[email-masked]>"
date:        Wed Mar 25 17:50:06 2009 +0100
files:       examples/newsolvers/ElectroMechanics/cpp/functions.h examples/newsolvers/ElectroMechanics/cpp/main.cpp examples/newsolvers/HyperElasticitySVK/cpp/HyperElasticitySVK.ufl site-packages/newsfc/jit.py
description:
Attempt at getting classnames of elements in jit with no form.

changeset:   432:78ff74db2c5e0b8aefadfcbd5448ac0722cebd98
parent:      431:1e93630fe0b6becdc77b2250f3b53398e41e2f05
parent:      430:1501c2bea794147abd7d6ad397ed4613deb9013a
user:        "Kent-Andre Mardal <[email-masked]>"
date:        Wed Mar 25 15:02:56 2009 +0100
files:       
description:
merge

----------------------------------------------------------------------
For more details, visit http://www.fenics.org/hg/syfi

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Wed, 25 Mar 2009 23:41:29 +0100

This should rather be fixed in dolfin and ffc instead.

1) The module isn't needed, the module can always
be obtained from compiled_form.__module__.

2) We don't need to return the form_data either,
since it can be obtained from ufl_form.form_data()
(it's attached there the first time it is computed).

So we can just return the compiled module.

I want to do it this way:

single_compiled_form = jit(single_ufl_form)
single_compiled_element = jit(single_ufl_element)
compiled_object_list = jit(ufl_object_list)

where single_compiled_element is a
tuple(single_compiled_finite_element, single_compiled_dof_map)

and compiled_object_list is an ordered list matching the
ufl_object_list where each item can be either a single ufl form or element.

Martin

2009/3/25 SyFi <[email-masked]>

> files:       examples/newsolvers/ElectroMechanics/cpp/functions.h
> examples/newsolvers/ElectroMechanics/cpp/main.cpp
> examples/newsolvers/HyperElasticitySVK/cpp/HyperElasticitySVK.ufl
> site-packages/newsfc/jit.py
> description:
> _______________________________________________
> SyFi-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/syfi-dev
>
>

---

From: Anders Logg <[email-masked]>
Date: Thu, 26 Mar 2009 00:20:03 +0100

> ufl_object_list where each item can be either a single ufl form or element.

Sounds good. But does this need to be done *now* or can it wait until
we've moved the JIT compilation to a common module in UFC?

I'm hoping we can make a new release of FFC pretty soon with
experimental support for UFL and then make cleanups and fixes
for the next release (and remove .form support).

There will be a few things to do like using ufl.load_forms, using
dolfin_utils for generating DOLFIN code and changing the JIT
interface. It would be practical if those could wait until after the
release.

-- 
Anders

---

From: Martin Sandve Alnæs <[email-masked]>
Date: Thu, 26 Mar 2009 00:30:01 +0100

Ok. It's only a few places in test scripts I need to update for this.

Martin

2009/3/26 Anders Logg <[email-masked]>

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAknKvCMACgkQTuwUCDsYZdHZwwCbBiYVvWyT345+TLjSII03TNzl
> V2gAn2jQuzElX4vzNiLRDk77cmPQwPaj
> =kYLB
> -----END PGP SIGNATURE-----
>