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

Reply via email to