dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17177
[Question #97361]: dofmap problem for a function with two identical subspaces
New question #97361 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/97361
hi, i want to change some values of a subfunction of a mixed function with iterating over the dofs this mixed function (_uw). However, the mixed function has two subspaces which are identical.
if i want to go over the dofs of _uw[1] as
for(CellIterator cell(_fluid->mesh()); !cell.end(); ++cell) {
ufc_cell.update(*cell);
_uw->restrict(w_coeffs.get(), w_sub->element(), *cell, ufc_cell, -1);
_uw->function_space().dofmap().tabulate_dofs(cell_dofs.get(), ufc_cell, cell->index());
_uw->vector().get(w_coeffs.get(),
w_sub->dofmap().local_dimension(ufc_cell), cell_dofs.get());
for(dolfin::uint i = 0; i < cell_dims; i++)
w_coeffs[i] = w_coeffs[i] * scV_init;
_uw->vector().set(w_coeffs.get(),
w_sub->dofmap().local_dimension(ufc_cell), cell_dofs.get());
}
i thought this will change the values of _uw[1], but it will change the values of _uw[0], although i specified the second sub-element w_sub. So it should modify the values in _uw->vector() which correspond to _uw[1]. Does somebody see what i am doing wrong, or is this maybe not as supposed to be?
many thanks for the help,
patrick
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
Follow ups