Anders Logg wrote: > On Thu, Oct 23, 2008 at 05:39:18PM +0200, Martin Sandve Alnæs wrote: >> 2008/10/23 Garth N. Wells <[EMAIL PROTECTED]>: >>> >>> Anders Logg wrote: >>>> On Thu, Oct 23, 2008 at 05:24:54PM +0200, Anders Logg wrote: >>>>> Now that we have removed DofMapSet, how should the general assembly >>>>> interface look? We have lots of simple assemble() functions and they >>>>> all end up calling the main function which is >>>>> >>>>> void assemble(GenericTensor& A, >>>>> const ufc::form& form, >>>>> const Array<Function*>& coefficients, >>>>> const DofMapSet& dof_map_set, >>>>> const MeshFunction<uint>* cell_domains, >>>>> const MeshFunction<uint>* exterior_facet_domains, >>>>> const MeshFunction<uint>* interior_facet_domains, >>>>> bool reset_tensor = true); >>>>> >>>>> One option would be >>>>> >>>>> void assemble(GenericTensor& A, >>>>> const ufc::form& form, >>>>> const std::vector<std::tr1::shared_ptr<FunctionSpace> > >>>>> function_spaces, >>>>> const std::vector<std::tr1::shared_ptr<Function> > >>>>> coefficients, >>>>> const MeshFunction<uint>* cell_domains, >>>>> const MeshFunction<uint>* exterior_facet_domains, >>>>> const MeshFunction<uint>* interior_facet_domains, >>>>> bool reset_tensor = true); >>>> I meant >>>> >>>> void assemble(GenericTensor& A, >>>> const ufc::form& form, >>>> const std::vector<FunctionSpace&> function_spaces, >>>> const std::vector<Function&> coefficients, >>>> const MeshFunction<uint>* cell_domains, >>>> const MeshFunction<uint>* exterior_facet_domains, >>>> const MeshFunction<uint>* interior_facet_domains, >>>> bool reset_tensor = true); >>>> >>> That look better. >>> >>> Why is >>> >>> const std::vector<FunctionSpace&> function_spaces >>> >>> required in the assembler? >>> >>> Garth >> For initialized DofMaps. >> >> Another option is to just require the user to construct dolfin::Form >> objects with ufc::form and dolfin::FunctionSpaces. > > That would simplify things. I would prefer that, but it would mean > that the Assembler is not able to operate on ufc:: objects, only their > DOLFIN wrapper, but the Assembler requires wrapping of the > ufc::dof_map anyway. >
This would simplify things more than I originally anticipated since Form uses shared pointers to FunctionSpaces and Functions, and I would prefer to to pass shared pointers to assembly functions since they don't own anything anyway. Garth > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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
