Ok, I just pushed a fixed for this.

Johan


On Fri, Nov 8, 2013 at 9:37 AM, Martin Sandve Alnæs <[email protected]>wrote:

> Sounds good to me.
>
> Martin
> 8. nov. 2013 09:07 skrev "Anders Logg" <[email protected]> følgende:
>
>> On Thu, Nov 07, 2013 at 11:22:50PM +0100, Johan Hake wrote:
>> > Hello!
>> >
>> > In this question:
>> >
>> > http://fenicsproject.org/qa/1615/
>> > there-mapping-cell-number-local-entity-to-global-edge-index
>> >
>> > a user want to create a MeshFunction from a MeshValueCollection. The
>> following
>> > syntax is provided for that:
>> >
>> >   mesh = Mesh("test.xml")
>> >   mvc = MeshValueCollection("size_t", mesh, "sides.xml")
>> >   meshf = MeshFunction("size_t", mesh, mvc)
>> >
>> > But inside the MeshFunction::operator(const MeshValueCollection&) an
>> error is
>> > raised because the MeshValueCollection is sparse:
>> >
>> > *** Error:   Unable to assign mesh value collection to mesh function.
>> > *** Reason:  Mesh value collection does not contain all values for all
>> > entities.
>> >
>> > Is there any good reason we should not allow this?
>> >
>> > If not, I suggest we change the assignment operator so it mirrors the
>> behaviour
>> > of:
>> >
>> >   MeshFunction(Mesh, size_t, MeshDomains)
>> >
>> > creating a MeshFunction with std::numeric_limits<T>::max() as default
>> value.
>>
>> Sounds ok to me, unless there's some issue I'm not aware of.
>>
>> --
>> Anders
>> _______________________________________________
>> fenics mailing list
>> [email protected]
>> http://fenicsproject.org/mailman/listinfo/fenics
>>
>
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to