dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #08247
Re: DofMapSet design
On Mon, Jun 16, 2008 at 10:45:18PM +0200, Martin Sandve Alnæs wrote:
> 2008/6/16 Anders Logg <logg@xxxxxxxxx>:
> > On Mon, Jun 16, 2008 at 10:10:32PM +0200, Martin Sandve Alnæs wrote:
> >> 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.
> >
> > ok.
> >
> >> > 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.
> >
> > DofMapSet? Perhaps, but that would mean putting *functionality* into
> > UFC which we haven't done so far (except the Python boilerplate).
>
> I'm just guessing here, I imagine the vector of dofmaps for a form
> is only used in the context of assembly, and then they can be
> picked out together with other data in UFC. You or Garth put
> this vector<DofMap*> in DofMapSet in the first place, feel free
> to decide where to have it :)
It's also used in assemble.py for things like initializing Functions,
but I think this can be greatly enhanced once the DofMapSet is not
tied to a particular form.
--
Anders
Attachment:
signature.asc
Description: Digital signature
Follow ups
References