On Tue, Aug 30, 2011 at 11:11:53AM -0700, Garth N. Wells wrote: > > > On 30/08/11 08:51, Anders Logg wrote: > > I've thought about this some more and I think that it can make sense > > to template over type, not in MeshDomains itself but in a new class > > MeshMarkers. The class MeshMarkers will be similar to MeshFunction but > > differs in that it stores markers for only a subset and the markers > > are identified by cell number and local entity number. > > Sounds good.
! -- Anders > Garth > > >Then > > MeshDomains can use MeshMarkers internally (for uint). > > > > It does not make sense to template MeshDomains itself, as that should > > be an integral part of the Mesh class and DOLFIN should interpret its > > data during assembly and setting boundary conditions. > > > >> > >> > >> On 29/08/11 10:43, Anders Logg wrote: > >>> On Mon, Aug 29, 2011 at 07:17:27AM -0700, Garth N. Wells wrote: > >>> > >>>> I had in mind that where you have 'uint subdomain' that this > > should > >>>> be templated so that any data can be attached. > >>> > >>> I thought of it but couldn't think of any good use for it > >> > >> Is that a good reason? ;) > >> > >>> so I decided > >>> to go with 'uint'. Is there a compelling reason for it or can we add > >>> it later if we should need it? > >>> > >> > >> I don't think that it would be too difficult. I've used MeshFunctions > >> with non-primitive data types, so I imagine that it could also be useful > >> on subsets of entities. > >> > >> Garth > >> > >>>> Also, since objects could > >>>> be attached to only a very small subset of mesh entities, is it > >>>> necessary to create mesh functions? What about just a map/vector of > >>>> tuples? > >>> > >>> The conversion to MeshFunctions is practical since it means we can > >>> plug it directly into the assembler which relies on MeshFunctions for > >>> checking the subdomain number of the current cell or facet. It might > >>> be possible to do it the other way around, iterate over subdomains and > >>> assemble on each, but that requires a rewrite of the assembler. > >>> > >>> For boundary conditions, the conversion is not necessary. > >>> > >>>> Garth > >>>> > >>>> > >>>> > >>>> On 29/08/11 06:27, nore...@launchpad.net wrote: > >>>>> ------------------------------------------------------------ > >>>>> revno: 6145 > >>>>> committer: Anders Logg <l...@simula.no> > >>>>> branch nick: work > >>>>> timestamp: Mon 2011-08-29 15:25:38 +0200 > >>>>> message: > >>>>> Add missing files > >>>>> added: > >>>>> dolfin/mesh/MeshDomains.cpp > >>>>> dolfin/mesh/MeshDomains.h > >>>>> > >>>>> > >>>> > >>>> > >>>> _______________________________________________ > >>>> Mailing list: https://launchpad.net/~dolfin > >>>> Post to : dolfin@lists.launchpad.net > >>>> Unsubscribe : https://launchpad.net/~dolfin > >>>> More help : https://help.launchpad.net/ListHelp > >> > _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp