Thread Previous • Date Previous • Date Next • Thread Next |
Anders Logg wrote:
On Thu, Oct 23, 2008 at 04:44:22PM +0100, Garth N. Wells wrote:Anders Logg wrote:On Thu, Oct 23, 2008 at 04:29:16PM +0100, Garth N. Wells wrote: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? GarthWe need to get the DofMaps for the test and trial spaces. The coefficients (Functions) know their FunctionSpaces and thus their DofMaps, but the ufc::form does not now this (but dolfin::Form does).Why not pass std::vector<DofMap&> dof_maps then? GarthYes, why not. Is there a reason the assembler should need to be initialized for a certain mesh? Do we reuse the mesh or any data between assemblies?
No.I guess we did it to avoid passing the mesh every time we re-assembled a nonlinear or time dependent problem. I guess we don't need the mesh at all now since it's contained in the FunctionSpace. Therefore we probably should have
const std::vector<FunctionSpace&> function_spaces instead of const std::vector<DofMap&> dof_mapsWe can have a check in the assembler that all FunctionSpaces have the same mesh.
Garth
------------------------------------------------------------------------ _______________________________________________ DOLFIN-dev mailing list DOLFIN-dev@xxxxxxxxxx http://www.fenics.org/mailman/listinfo/dolfin-dev
Thread Previous • Date Previous • Date Next • Thread Next |