Allow min,max,std::* in Expressions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
DOLFIN |
Fix Released
|
Undecided
|
Johan Hake |
Bug Description
The attached patch makes it possible to use min(x,y) and max(x,y) in compiled expressions.
Also, it makes symbols like "std::min" ignored, so that if functions that are not treated specially are needed, they can be accessed through the namespace.
Joachim Haga (jobh) wrote : | #1 |
Johan Hake (johan-hake) wrote : | #2 |
Joachim Haga (jobh) wrote : Re: [Bug 1010865] Re: Allow min,max,std::* in Expressions | #3 |
Means:
1/ Allow ':' as part of symbol name in parsing, so that "std::max" is
parsed as a single token instead of ["std", "max"]
2/ Don't consider symbols with "::" in them as variables.
The purpose is to allow the use of namespace qualifiers in expressions.
Next time I miss something (like min/max in this case), I'll just write
"std::max" instead of creating a bug report.
-j.
On 11 June 2012 08:18, Johan Hake <email address hidden> wrote:
> What do you mean with:
>
> "Also, it makes symbols like "std::min" ignored, so that if functions
> that are not
> treated specially are needed, they can be accessed through the
> namespace."
>
> --
> You received this bug notification because you are a member of DOLFIN
> Team, which is subscribed to DOLFIN.
> https:/
>
> Title:
> Allow min,max,std::* in Expressions
>
> Status in DOLFIN:
> New
>
> Bug description:
> The attached patch makes it possible to use min(x,y) and max(x,y) in
> compiled expressions.
>
> Also, it makes symbols like "std::min" ignored, so that if functions
> that are not treated specially are needed, they can be accessed
> through the namespace.
>
> To manage notifications about this bug go to:
> https:/
>
Johan Hake (johan-hake) wrote : | #4 |
On 06/11/2012 08:55 AM, Joachim Haga wrote:
> Means:
>
> 1/ Allow ':' as part of symbol name in parsing, so that "std::max" is
> parsed as a single token instead of ["std", "max"]
>
> 2/ Don't consider symbols with "::" in them as variables.
>
> The purpose is to allow the use of namespace qualifiers in expressions.
> Next time I miss something (like min/max in this case), I'll just write
> "std::max" instead of creating a bug report.
We have intentionally not allowed this, as it will make the interface
more busy. It might be a good idea though, but not fully convinced. The
problem is to keep the possibilities to
Expression(
concise and not too powerful. As the number of extra magic things we
_could_ put in there easily can explode.
Your:
- "pow", "sqrt", "ceil", "fabs", "floor", "fmod"]
+ "pow", "sqrt", "ceil", "fabs", "floor", "fmod",
+ "min", "max"]
will fix your original problem, right?
Johan
>
> -j.
>
>
> On 11 June 2012 08:18, Johan Hake<email address hidden> wrote:
>
>> What do you mean with:
>>
>> "Also, it makes symbols like "std::min" ignored, so that if functions
>> that are not
>> treated specially are needed, they can be accessed through the
>> namespace."
>>
>> --
>> You received this bug notification because you are a member of DOLFIN
>> Team, which is subscribed to DOLFIN.
>> https:/
>>
>> Title:
>> Allow min,max,std::* in Expressions
>>
>> Status in DOLFIN:
>> New
>>
>> Bug description:
>> The attached patch makes it possible to use min(x,y) and max(x,y) in
>> compiled expressions.
>>
>> Also, it makes symbols like "std::min" ignored, so that if functions
>> that are not treated specially are needed, they can be accessed
>> through the namespace.
>>
>> To manage notifications about this bug go to:
>> https:/
>>
>
Joachim Haga (jobh) wrote : | #5 |
>
> > Next time I miss something (like min/max in this case), I'll just write
> > "std::max" instead of creating a bug report.
>
> We have intentionally not allowed this, as it will make the interface
> more busy. It might be a good idea though, but not fully convinced.
>
No strong opinion. But if you want to be convinced: The complexity is
completely decided by the user. It will not become necessary or usual to
use namespace qualifiers. It just makes them work.
Your:
>
> - "pow", "sqrt", "ceil", "fabs", "floor", "fmod"]
> + "pow", "sqrt", "ceil", "fabs", "floor", "fmod",
> + "min", "max"]
>
> will fix your original problem, right?
Yes.
-j.
Martin Sandve Alnæs (martinal) wrote : | #6 |
On 11 June 2012 09:40, Joachim Haga <email address hidden> wrote:
>>
>> > Next time I miss something (like min/max in this case), I'll just write
>> > "std::max" instead of creating a bug report.
>>
>> We have intentionally not allowed this, as it will make the interface
>> more busy. It might be a good idea though, but not fully convinced.
>>
>
> No strong opinion. But if you want to be convinced: The complexity is
> completely decided by the user. It will not become necessary or usual to
> use namespace qualifiers. It just makes them work.
I don't see any problem with this.
Martin
Johan Hake (johan-hake) wrote : | #7 |
On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
>>>
>>>> Next time I miss something (like min/max in this case), I'll just write
>>>> "std::max" instead of creating a bug report.
>>>
>>> We have intentionally not allowed this, as it will make the interface
>>> more busy. It might be a good idea though, but not fully convinced.
>>>
>>
>> No strong opinion. But if you want to be convinced: The complexity is
>> completely decided by the user. It will not become necessary or usual to
>> use namespace qualifiers. It just makes them work.
>
> I don't see any problem with this.
Me neither, but I wonder if we should expand the functionality while at
it. For now there are only a few hard coded headers available for a
user, <cmath> and surprise surprise <complex>.
Should we make it possible to link other external libraries or home
brewed for that case, to the generation of compiled expressions? This
particular feature has come up a couple of times, in particular request
for the different boost functions.
To be able to make this as powerful as we need we could expose the
relevant instant.build kwargs:
local_
include_
to the Expression interface via:
configure = dict(
Expression(
Then the user need to provide any non system paths manually.
Johan
Martin Sandve Alnæs (martinal) wrote : | #8 |
On 11 June 2012 10:18, Johan Hake <email address hidden> wrote:
> On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
>> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
>>>>
>>>>> Next time I miss something (like min/max in this case), I'll just write
>>>>> "std::max" instead of creating a bug report.
>>>>
>>>> We have intentionally not allowed this, as it will make the interface
>>>> more busy. It might be a good idea though, but not fully convinced.
>>>>
>>>
>>> No strong opinion. But if you want to be convinced: The complexity is
>>> completely decided by the user. It will not become necessary or usual to
>>> use namespace qualifiers. It just makes them work.
>>
>> I don't see any problem with this.
>
> Me neither, but I wonder if we should expand the functionality while at
> it. For now there are only a few hard coded headers available for a
> user, <cmath> and surprise surprise <complex>.
>
> Should we make it possible to link other external libraries or home
> brewed for that case, to the generation of compiled expressions? This
> particular feature has come up a couple of times, in particular request
> for the different boost functions.
>
> To be able to make this as powerful as we need we could expose the
> relevant instant.build kwargs:
>
> local_headers=[], system_headers=[],
> include_dirs=['.'], library_dirs=[], libraries=[],
>
> to the Expression interface via:
>
> configure = dict(
> local_headers=
> system_
> include_
> library_
> libraries=
>
> Expression(somestr, configure=
>
> Then the user need to provide any non system paths manually.
>
> Johan
That would be nice. Can it be made working with full expression class
code as well? E.g.
e = Expression(
configure=
An additional idea: if cppcode is a single line and
matches "*.h", we can load cppcode from a file.
Then we can edit the cppcode with proper editor language support...
Third idea:
e = Expression(
// with myexpr.h containing both class and configuration in comment:
/*
configure = dict(
*/
class MyExpr: public ...
{ ... };
This way
- the cppfile can be a single parameter to any script
- the python script is not polluted with C++ build info
- the build configuration is coupled with the code it configures
Martin
Johan Hake (johan-hake) wrote : | #9 |
On 06/11/2012 10:51 AM, Martin Sandve Alnæs wrote:
> On 11 June 2012 10:18, Johan Hake<email address hidden> wrote:
>> On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
>>> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
>>>>>
>>>>>> Next time I miss something (like min/max in this case), I'll just write
>>>>>> "std::max" instead of creating a bug report.
>>>>>
>>>>> We have intentionally not allowed this, as it will make the interface
>>>>> more busy. It might be a good idea though, but not fully convinced.
>>>>>
>>>>
>>>> No strong opinion. But if you want to be convinced: The complexity is
>>>> completely decided by the user. It will not become necessary or usual to
>>>> use namespace qualifiers. It just makes them work.
>>>
>>> I don't see any problem with this.
>>
>> Me neither, but I wonder if we should expand the functionality while at
>> it. For now there are only a few hard coded headers available for a
>> user,<cmath> and surprise surprise<complex>.
>>
>> Should we make it possible to link other external libraries or home
>> brewed for that case, to the generation of compiled expressions? This
>> particular feature has come up a couple of times, in particular request
>> for the different boost functions.
>>
>> To be able to make this as powerful as we need we could expose the
>> relevant instant.build kwargs:
>>
>> local_headers=[], system_headers=[],
>> include_dirs=['.'], library_dirs=[], libraries=[],
>>
>> to the Expression interface via:
>>
>> configure = dict(
>> local_headers=
>> system_
>> include_
>> library_
>> libraries=
>>
>> Expression(somestr, configure=
>>
>> Then the user need to provide any non system paths manually.
>>
>> Johan
>
> That would be nice. Can it be made working with full expression class
> code as well? E.g.
>
> e = Expression(
> configure=
But of course!
Also FYI there is no need for a kwarg in Expression:
cppcode=
just pass some_code and you will be fine.
> An additional idea: if cppcode is a single line and
> matches "*.h", we can load cppcode from a file.
> Then we can edit the cppcode with proper editor language support...
>
> Third idea:
> e = Expression(
> // with myexpr.h containing both class and configuration in comment:
> /*
> configure = dict(
> local_headers=
> system_
> include_
> library_
> libraries=
> */
> class MyExpr: public ...
> { ... };
Neat, but that was a heck of a lot of magic... And it needs some
thorough unit testing if implemented. We have to think about how to
implement this properly, as it need to work for the
compile_
> This way
> - the cppfile can be a single parameter to any script
Which you also can d...
Martin Sandve Alnæs (martinal) wrote : | #10 |
On 11 June 2012 11:18, Johan Hake <email address hidden> wrote:
> On 06/11/2012 10:51 AM, Martin Sandve Alnæs wrote:
>> On 11 June 2012 10:18, Johan Hake<email address hidden> wrote:
>>> On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
>>>> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
>>>>>>
>>>>>>> Next time I miss something (like min/max in this case), I'll just write
>>>>>>> "std::max" instead of creating a bug report.
>>>>>>
>>>>>> We have intentionally not allowed this, as it will make the interface
>>>>>> more busy. It might be a good idea though, but not fully convinced.
>>>>>>
>>>>>
>>>>> No strong opinion. But if you want to be convinced: The complexity is
>>>>> completely decided by the user. It will not become necessary or usual to
>>>>> use namespace qualifiers. It just makes them work.
>>>>
>>>> I don't see any problem with this.
>>>
>>> Me neither, but I wonder if we should expand the functionality while at
>>> it. For now there are only a few hard coded headers available for a
>>> user,<cmath> and surprise surprise<complex>.
>>>
>>> Should we make it possible to link other external libraries or home
>>> brewed for that case, to the generation of compiled expressions? This
>>> particular feature has come up a couple of times, in particular request
>>> for the different boost functions.
>>>
>>> To be able to make this as powerful as we need we could expose the
>>> relevant instant.build kwargs:
>>>
>>> local_headers=[], system_headers=[],
>>> include_dirs=['.'], library_dirs=[], libraries=[],
>>>
>>> to the Expression interface via:
>>>
>>> configure = dict(
>>> local_headers=
>>> system_
>>> include_
>>> library_
>>> libraries=
>>>
>>> Expression(somestr, configure=
>>>
>>> Then the user need to provide any non system paths manually.
>>>
>>> Johan
>>
>> That would be nice. Can it be made working with full expression class
>> code as well? E.g.
>>
>> e = Expression(
>> configure=
>
> But of course!
>
> Also FYI there is no need for a kwarg in Expression:
>
> cppcode=some_code
>
> just pass some_code and you will be fine.
>
>> An additional idea: if cppcode is a single line and
>> matches "*.h", we can load cppcode from a file.
>> Then we can edit the cppcode with proper editor language support...
>>
>> Third idea:
>> e = Expression(
>> // with myexpr.h containing both class and configuration in comment:
>> /*
>> configure = dict(
>> local_headers=
>> system_
>> include_
>> library_
>> libraries=
>> */
>> class MyExpr: public ...
>> { ... };
>
> Neat, but that was a heck of a lot of magic... And it needs some
> thorough unit testing if implemented. We have to think about how to
> implement this properly, as ...
Johan Hake (johan-hake) wrote : | #11 |
On 06/11/2012 11:48 AM, Martin Sandve Alnæs wrote:
> On 11 June 2012 11:18, Johan Hake<email address hidden> wrote:
>> On 06/11/2012 10:51 AM, Martin Sandve Alnæs wrote:
>>> On 11 June 2012 10:18, Johan Hake<email address hidden> wrote:
>>>> On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
>>>>> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
>>>>>>>
>>>>>>>> Next time I miss something (like min/max in this case), I'll just write
>>>>>>>> "std::max" instead of creating a bug report.
>>>>>>>
>>>>>>> We have intentionally not allowed this, as it will make the interface
>>>>>>> more busy. It might be a good idea though, but not fully convinced.
>>>>>>>
>>>>>>
>>>>>> No strong opinion. But if you want to be convinced: The complexity is
>>>>>> completely decided by the user. It will not become necessary or usual to
>>>>>> use namespace qualifiers. It just makes them work.
>>>>>
>>>>> I don't see any problem with this.
>>>>
>>>> Me neither, but I wonder if we should expand the functionality while at
>>>> it. For now there are only a few hard coded headers available for a
>>>> user,<cmath> and surprise surprise<complex>.
>>>>
>>>> Should we make it possible to link other external libraries or home
>>>> brewed for that case, to the generation of compiled expressions? This
>>>> particular feature has come up a couple of times, in particular request
>>>> for the different boost functions.
>>>>
>>>> To be able to make this as powerful as we need we could expose the
>>>> relevant instant.build kwargs:
>>>>
>>>> local_headers=[], system_headers=[],
>>>> include_dirs=['.'], library_dirs=[], libraries=[],
>>>>
>>>> to the Expression interface via:
>>>>
>>>> configure = dict(
>>>> local_headers=
>>>> system_
>>>> include_
>>>> library_
>>>> libraries=
>>>>
>>>> Expression(somestr, configure=
>>>>
>>>> Then the user need to provide any non system paths manually.
>>>>
>>>> Johan
>>>
>>> That would be nice. Can it be made working with full expression class
>>> code as well? E.g.
>>>
>>> e = Expression(
>>> configure=
>>
>> But of course!
>>
>> Also FYI there is no need for a kwarg in Expression:
>>
>> cppcode=some_code
>>
>> just pass some_code and you will be fine.
>>
>>> An additional idea: if cppcode is a single line and
>>> matches "*.h", we can load cppcode from a file.
>>> Then we can edit the cppcode with proper editor language support...
>>>
>>> Third idea:
>>> e = Expression(
>>> // with myexpr.h containing both class and configuration in comment:
>>> /*
>>> configure = dict(
>>> local_headers=
>>> system_
>>> include_
>>> library_
>>> libraries=
>>> */
>>> class MyExpr: public ...
>>> { ... };
>>
>> Neat, but...
Anders Logg (logg) wrote : | #12 |
On Mon, Jun 11, 2012 at 10:55:07AM -0000, Johan Hake wrote:
> On 06/11/2012 11:48 AM, Martin Sandve Alnæs wrote:
> > On 11 June 2012 11:18, Johan Hake<email address hidden> wrote:
> >> On 06/11/2012 10:51 AM, Martin Sandve Alnæs wrote:
> >>> On 11 June 2012 10:18, Johan Hake<email address hidden> wrote:
> >>>> On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
> >>>>> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
> >>>>>>>
> >>>>>>>> Next time I miss something (like min/max in this case), I'll just write
> >>>>>>>> "std::max" instead of creating a bug report.
> >>>>>>>
> >>>>>>> We have intentionally not allowed this, as it will make the interface
> >>>>>>> more busy. It might be a good idea though, but not fully convinced.
> >>>>>>>
> >>>>>>
> >>>>>> No strong opinion. But if you want to be convinced: The complexity is
> >>>>>> completely decided by the user. It will not become necessary or usual to
> >>>>>> use namespace qualifiers. It just makes them work.
> >>>>>
> >>>>> I don't see any problem with this.
> >>>>
> >>>> Me neither, but I wonder if we should expand the functionality while at
> >>>> it. For now there are only a few hard coded headers available for a
> >>>> user,<cmath> and surprise surprise<complex>.
> >>>>
> >>>> Should we make it possible to link other external libraries or home
> >>>> brewed for that case, to the generation of compiled expressions? This
> >>>> particular feature has come up a couple of times, in particular request
> >>>> for the different boost functions.
> >>>>
> >>>> To be able to make this as powerful as we need we could expose the
> >>>> relevant instant.build kwargs:
> >>>>
> >>>> local_headers=[], system_headers=[],
> >>>> include_dirs=['.'], library_dirs=[], libraries=[],
> >>>>
> >>>> to the Expression interface via:
> >>>>
> >>>> configure = dict(
> >>>> local_headers=
> >>>> system_
> >>>> include_
> >>>> library_
> >>>> libraries=
> >>>>
> >>>> Expression(somestr, configure=
> >>>>
> >>>> Then the user need to provide any non system paths manually.
> >>>>
> >>>> Johan
> >>>
> >>> That would be nice. Can it be made working with full expression class
> >>> code as well? E.g.
> >>>
> >>> e = Expression(
> >>> configure=
> >>
> >> But of course!
> >>
> >> Also FYI there is no need for a kwarg in Expression:
> >>
> >> cppcode=some_code
> >>
> >> just pass some_code and you will be fine.
> >>
> >>> An additional idea: if cppcode is a single line and
> >>> matches "*.h", we can load cppcode from a file.
> >>> Then we can edit the cppcode with proper editor language support...
> >>>
> >>> Third idea:
> >>> e = Expression(
> >>> // with myexpr.h containing both class and configuration in comment:
> >>> /*
> >>> configure = dict(
> >>> local_headers=
> >>> system_
> >>> ...
Johan Hake (johan-hake) wrote : | #13 |
On 06/11/2012 02:27 PM, Anders Logg wrote:
> On Mon, Jun 11, 2012 at 10:55:07AM -0000, Johan Hake wrote:
>> On 06/11/2012 11:48 AM, Martin Sandve Alnæs wrote:
>>> On 11 June 2012 11:18, Johan Hake<email address hidden> wrote:
>>>> On 06/11/2012 10:51 AM, Martin Sandve Alnæs wrote:
>>>>> On 11 June 2012 10:18, Johan Hake<email address hidden> wrote:
>>>>>> On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
>>>>>>> On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
>>>>>>>>>
>>>>>>>>>> Next time I miss something (like min/max in this case), I'll just write
>>>>>>>>>> "std::max" instead of creating a bug report.
>>>>>>>>>
>>>>>>>>> We have intentionally not allowed this, as it will make the interface
>>>>>>>>> more busy. It might be a good idea though, but not fully convinced.
>>>>>>>>>
>>>>>>>>
>>>>>>>> No strong opinion. But if you want to be convinced: The complexity is
>>>>>>>> completely decided by the user. It will not become necessary or usual to
>>>>>>>> use namespace qualifiers. It just makes them work.
>>>>>>>
>>>>>>> I don't see any problem with this.
>>>>>>
>>>>>> Me neither, but I wonder if we should expand the functionality while at
>>>>>> it. For now there are only a few hard coded headers available for a
>>>>>> user,<cmath> and surprise surprise<complex>.
>>>>>>
>>>>>> Should we make it possible to link other external libraries or home
>>>>>> brewed for that case, to the generation of compiled expressions? This
>>>>>> particular feature has come up a couple of times, in particular request
>>>>>> for the different boost functions.
>>>>>>
>>>>>> To be able to make this as powerful as we need we could expose the
>>>>>> relevant instant.build kwargs:
>>>>>>
>>>>>> local_headers=[], system_headers=[],
>>>>>> include_dirs=['.'], library_dirs=[], libraries=[],
>>>>>>
>>>>>> to the Expression interface via:
>>>>>>
>>>>>> configure = dict(
>>>>>> local_headers=
>>>>>> system_
>>>>>> include_
>>>>>> library_
>>>>>> libraries=
>>>>>>
>>>>>> Expression(somestr, configure=
>>>>>>
>>>>>> Then the user need to provide any non system paths manually.
>>>>>>
>>>>>> Johan
>>>>>
>>>>> That would be nice. Can it be made working with full expression class
>>>>> code as well? E.g.
>>>>>
>>>>> e = Expression(
>>>>> configure=
>>>>
>>>> But of course!
>>>>
>>>> Also FYI there is no need for a kwarg in Expression:
>>>>
>>>> cppcode=some_code
>>>>
>>>> just pass some_code and you will be fine.
>>>>
>>>>> An additional idea: if cppcode is a single line and
>>>>> matches "*.h", we can load cppcode from a file.
>>>>> Then we can edit the cppcode with proper editor language support...
>>>>>
>>>>> Third idea:
>>>>> e = Expression(
>>>>> // with myexpr.h containing both class and configuration in comment:
>>>>> /*
>>>>> configure = dict(
>>>>> local_headers=
>>>>> ...
Anders Logg (logg) wrote : | #14 |
On Mon, Jun 11, 2012 at 03:12:07PM +0200, Johan Hake wrote:
> On 06/11/2012 02:27 PM, Anders Logg wrote:
> >On Mon, Jun 11, 2012 at 10:55:07AM -0000, Johan Hake wrote:
> >>On 06/11/2012 11:48 AM, Martin Sandve Alnæs wrote:
> >>>On 11 June 2012 11:18, Johan Hake<email address hidden> wrote:
> >>>>On 06/11/2012 10:51 AM, Martin Sandve Alnæs wrote:
> >>>>>On 11 June 2012 10:18, Johan Hake<email address hidden> wrote:
> >>>>>>On 06/11/2012 09:52 AM, Martin Sandve Alnæs wrote:
> >>>>>>>On 11 June 2012 09:40, Joachim Haga<email address hidden> wrote:
> >>>>>>>>>
> >>>>>>>>>>Next time I miss something (like min/max in this case), I'll just write
> >>>>>>>
> >>>>>>>>>
> >>>>>>>>>We have intentionally not allowed this, as it will make the interface
> >>>>>>>>>more busy. It might be a good idea though, but not fully convinced.
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>No strong opinion. But if you want to be convinced: The complexity is
> >>>>>>>>completely decided by the user. It will not become necessary or usual to
> >>>>>>>>use namespace qualifiers. It just makes them work.
> >>>>>>>
> >>>>>>>I don't see any problem with this.
> >>>>>>
> >>>>>>Me neither, but I wonder if we should expand the functionality while at
> >>>>>>it. For now there are only a few hard coded headers available for a
> >>>>>>user,<cmath> and surprise surprise<complex>.
> >>>>>>
> >>>>>>Should we make it possible to link other external libraries or home
> >>>>>>brewed for that case, to the generation of compiled expressions? This
> >>>>>>particular feature has come up a couple of times, in particular request
> >>>>>>for the different boost functions.
> >>>>>>
> >>>>>>To be able to make this as powerful as we need we could expose the
> >>>>>>relevant instant.build kwargs:
> >>>>>>
> >>>>>> local_headers=[], system_headers=[],
> >>>>>> include_dirs=['.'], library_dirs=[], libraries=[],
> >>>>>>
> >>>>>>to the Expression interface via:
> >>>>>>
> >>>>>> configure = dict(
> >>>>>> local_headers=
> >>>>>> system_
> >>>>>> include_
> >>>>>> library_
> >>>>>> libraries=
> >>>>>>
> >>>>>> Expression(somestr, configure=
> >>>>>>
> >>>>>>Then the user need to provide any non system paths manually.
> >>>>>>
> >>>>>>Johan
> >>>>>
> >>>>>That would be nice. Can it be made working with full expression class
> >>>>>code as well? E.g.
> >>>>>
> >>>>>e = Expression(
> >>>>>configure=
> >>>>
> >>>>But of course!
> >>>>
> >>>>Also FYI there is no need for a kwarg in Expression:
> >>>>
> >>>> cppcode=some_code
> >>>>
> >>>>just pass some_code and you will be fine.
> >>>>
> >>>>>An additional idea: if cppcode is a single line and
> >>>>>matches "*.h", we can load cppcode from a file.
> >>>>>Then we can edit the cppcode with proper editor language support...
> >>>>>
> >>>>>Third idea:
> >>>>>e = Expression(
> >>>>>// with myexpr.h contain...
Changed in dolfin: | |
assignee: | nobody → Johan Hake (johan-hake) |
status: | New → In Progress |
status: | In Progress → Confirmed |
status: | Confirmed → In Progress |
Changed in dolfin: | |
status: | In Progress → Fix Committed |
Johan Hake (johan-hake) wrote : | #15 |
I have now applied the patch. Will work on some of the other improvements suggested here.
Changed in dolfin: | |
milestone: | none → 1.0.1 |
Changed in dolfin: | |
status: | Fix Committed → Fix Released |
What do you mean with:
"Also, it makes symbols like "std::min" ignored, so that if functions that are not
treated specially are needed, they can be accessed through the namespace."