Comment 10 for bug 1090272

Revision history for this message
Johan Hake (johan-hake) wrote : Re: [Bug 1090272] [NEW] Change index type names

On 12/19/2012 06:26 PM, Anders Logg wrote:
> On Wed, Dec 19, 2012 at 04:35:14PM -0000, Garth Wells wrote:
>> On Wed, Dec 19, 2012 at 4:22 PM, Anders Logg <email address hidden> wrote:
>>> When this is done and the buildbot runs fine with size_t, should we
>>> also add back "uint" as an alias for "size_t" in the Python interface?
>>>
>>
>> It will be removed eventually, so I'm thinking better removed sooner
>> rather than later.
>
> Maybe, considering "uint" is just as cryptic as "size_t". Could we do
> something else to simplify the creation of size_t-valued
> MeshFunctions? 99% of all cases where a MeshFunction is used it will
> be size_t-valued.
>
> One suggestion would be this:
>
> f = MeshFunction(mesh, dim=3, type="double")
> f = FacetFunction(mesh, type="double")
> f = FacetFunction(mesh) # type defaults to size_t

I tend to agree, but it is not that important to me. It could be more
confusing for users to remove it than keeping it.

johan