Subject: Re: [Ffc] [Branch ~ffc-core/ffc/dev] Rev 1518: Make symbolics work with new format.

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 22 Jan 2010 14:30:01 +0100 (CET)

I'm moving to the new format in cpp.py.
A few remarks:

'format' is a builtin function, so we should probably call it something else.

I made some changes such that 'add' -> ' + ', 'mul' -> '*'.
If one wants something more intelligent 'addition' and 'multiply' maps to the functions _add and _multiply.

Is 'float' meant to replace the old 'floating point'?
If it is, we need to handle the precision somehow, this is crucial for the regression tests.

Kristian

2010/1/22  <[email-masked]>:
> Merge authors:
>  Anders Logg (logg)
> ------------------------------------------------------------
> revno: 1518 [merge]
> committer: Kristian B. Ølgaard <[email-masked]>
> branch nick: dev
> timestamp: Fri 2010-01-22 14:20:36 +0100
> message:
>  Make symbolics work with new format.
> removed:
>  test/unit/test_symbolics.py
> added:
>  test/unit/symbolics/
>  test/unit/symbolics/testdgelastodyn.py
>  test/unit/symbolics/testelasticity2d.py
>  test/unit/symbolics/testelasticityterm.py
>  test/unit/symbolics/testelasweighted.py
>  test/unit/symbolics/testelasweighted2.py
>  test/unit/symbolics/testexpandoperations.py
>  test/unit/symbolics/testfloat.py
>  test/unit/symbolics/testfloatoperators.py
>  test/unit/symbolics/testfraction.py
>  test/unit/symbolics/testfractionoperators.py
>  test/unit/symbolics/testmixedsymbols.py
>  test/unit/symbolics/testnotfinished.py
>  test/unit/symbolics/testpoisson.py
>  test/unit/symbolics/testproduct.py
>  test/unit/symbolics/testproductoperators.py
>  test/unit/symbolics/testrealexamples.py
>  test/unit/symbolics/testreducegip.py
>  test/unit/symbolics/testreduceoperations.py
>  test/unit/symbolics/testreducevartype.py
>  test/unit/symbolics/testsum.py
>  test/unit/symbolics/testsumoperators.py
>  test/unit/symbolics/testsymbol.py
>  test/unit/symbolics/testsymbolics.py
>  test/unit/symbolics/testsymboloperators.py
> modified:
>  ffc/codegeneration.py
>  ffc/compiler.py
>  ffc/cpp.py
>  ffc/evaluatebasis.py
>  ffc/evaluatedof.py
>  ffc/log.py
>  ffc/quadrature/floatvalue.py
>  ffc/quadrature/fraction.py
>  ffc/quadrature/optimisedquadraturetransformer.py
>  ffc/quadrature/product.py
>  ffc/quadrature/reduce_operations.py
>  ffc/quadrature/sumobj.py
>  ffc/quadrature/symbol.py
>  ffc/quadrature/symbolics.py
>  ffc/tensor/tensorgenerator.py
> The size of the diff (6327 lines) is larger than your specified limit of 1000 lines
>
> --
> lp:~ffc-core/ffc/dev
> https://code.launchpad.net/~ffc-core/ffc/dev
>
> You are subscribed to branch lp:~ffc-core/ffc/dev.
> To unsubscribe from this branch go to https://code.launchpad.net/~ffc-core/ffc/dev/+edit-subscription.
>

---

From: Marie Rognes <[email-masked]>
Date: Fri, 22 Jan 2010 14:32:02 +0100

> to the functions _add and _multiply.

Have you replaced add/mul with addition/multiply elsewhere?

--
Marie

>> To unsubscribe from this branch go to 
>> https://code.launchpad.net/~ffc-core/ffc/dev/+edit-subscription.
>>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ffc
> More help   : https://help.launchpad.net/ListHelp
>

---

From: Kristian Oelgaard <[email-masked]>
Date: Fri, 22 Jan 2010 14:36:35 +0100 (CET)

> Have you replaced add/mul with addition/multiply elsewhere?

Yes, and Poisson and Elasticity compiles but I might have missed some. It should be an easy fix if it breaks something.
I did this such that 'add' does the same as __add__ in Python etc.

Kristian

---

From: Marie Rognes <[email-masked]>
Date: Fri, 22 Jan 2010 14:47:06 +0100

Kristian Oelgaard wrote:
>>> If one wants something more intelligent 'addition' and 'multiply' 
>>> maps to
>>> the functions _add and _multiply.
>>>
>>
> Yes, and Poisson and Elasticity compiles but I might have missed some. 
> It should be an easy fix if it breaks something.

Ok, great :)

--
Marie

>>> If it is, we need to handle the precision somehow, this is crucial 
>>> for the
>>> regression tests.
>>>
>>> Kristian
>>>
>>>> The size of the diff (6327 lines) is larger than your specified 
>>>> limit of
>>>> 1000 lines
>>>>
>>>> -- 
>>>> lp:~ffc-core/ffc/dev

---

From: Anders Logg <[email-masked]>
Date: Fri, 22 Jan 2010 21:28:33 +0100

> >>>'format' is a builtin function, so we should probably call it something

Yes, that would be good. Any suggestions?

--
Anders

> >>>If one wants something more intelligent 'addition' and
> >>>'multiply' maps to
> >Yes, and Poisson and Elasticity compiles but I might have missed
> >some. It should be an easy fix if it breaks something.