dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #08233
Re: DofMapSet design
2008/6/16 Anders Logg <logg@xxxxxxxxx>:
> On Mon, Jun 16, 2008 at 09:46:23PM +0200, Martin Sandve Alnæs wrote:
>> 2008/6/16 Anders Logg <logg@xxxxxxxxx>:
>> > On Mon, Jun 16, 2008 at 07:06:20PM +0200, Martin Sandve Alnæs wrote:
>> >> I think DofMapSet should be independent of the form it was initialized with.
>> >> I believe the sharing of a single set of dofmaps among different forms is one
>> >> of the key tasks of this class, and that the vector with form argument dofmaps
>> >> should rather be obtained on demand:
>> >
>> > Agree.
>> >
>> >> // Get vector of dofmaps (possibly not unique) for each argument of form
>> >> dofmapvector = dofmapset.getDofMaps(form);
>> >
>> > What does this function do?
>>
>> Gets a vector<DofMap*> with length equal to form.rank() +
>> form.num_coefficients(),
>> where each DofMap* is the same if the signature is the same.
>> In other words, constructs and returns what is currently a member:
>>
>> // Array of dof maps for current form
>> std::vector<DofMap*> dof_map_set;
>>
>> but on the fly for a given form such that DofMapSet isn't
>> associated with any particular form.
>
> ok, now I understand what you mean. But I would suggest
>
> DofMap& dof_map = dofmapset.extractDofMap(form, i);
Agree, that was the second function I suggested.
> Or are we going to pass around Arrays of DofMaps?
It was just a convenience function to replace the existing
functionality, but this functionality should probably rather
be in UFC or something.
--
Martin
Follow ups
References