Anders Logg wrote:
> On Thu, Sep 11, 2008 at 03:02:36PM +0100, Garth N. Wells wrote:
>>
>> Anders Logg wrote:
>>> On Thu, Sep 11, 2008 at 02:51:41PM +0100, Garth N. Wells wrote:
>>>> Martin Sandve Alnæs wrote:
>>>>> I don't agree, isn't the point that several DiscreteFunctions can
>>>>> share a FunctionSpace?
>>>>>
>>>> Yes, but a dof map doesn't define a function space.
>>>>
>>>> Garth
>>> I think the dof map should be in the FunctionSpace, that way several
>>> functions may share the dof map (which may take time to compute if we
>>> want to do some reordering).
>>>
>>> Two functions in the same function space share the mesh, the element
>>> and the dof map (these three define the space) but each function has
>>> its own vector.
>>>
>> My point isn't that a DofMap won't shared, it's that it's not part of 
>> the definition of a function space.
> 
> It is part of the function space if we say that a function space is
> defined by a particular basis:
> 
>   V = span{\phi_i}
> 
> To define the basis, we need the dof map.
> 

The dof map is needed to tie the finite element basis + domain (mesh) to 
a matrix/vector.

>> It always possible that two discrete functions which are equivalent can 
>> share a mesh and finite element (which defines the function space), but 
>> have different vectors and dof maps.
> 
> Is that something we will encounter much? 

Probably not, but it shows why the dof map doesn't belong in FunctionSpace.

On reflection, FunctionSpace is pretty simple, so I don't actually see 
why we need it. If we want to stress that a group of objects belong 
together in the definition of a discrete function, why not just use a 
tuple in DiscreteFunction?

Garth

It would simplify matters if
> we said that a FunctionSpace is a function space with a particular
> basis. We do that anyway if we include the finite element. Otherwise,
> we could say that (P_1)^d and BDM_1 are the same function space, but
> we think of them as different.
> 
>>> I added the FiniteElement class to avoid exposing ufc:: classes
>>> directly. We do the same for ufc::dof_map (but then we have a reason).
>>> It might not be necessary, but it looked more uniform to have
>>>
>>>   (Mesh, FiniteElement, DofMap)
>>>
>>> instead of
>>>
>>>   (Mesh, ufc::finite_element, DofMap)
>>>
>> Sure. I just can't find where FiniteElement is defined?
>>
>> Garth
> 
> I thought I had pushed it. It should be pushed now.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> DOLFIN-dev mailing list
> [email protected]
> http://www.fenics.org/mailman/listinfo/dolfin-dev


_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev

Reply via email to