dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17744
[Question #102633]: Assembling Values into Solution Vector and Extracting Values from Solution Vector
New question #102633 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/102633
Hi
I've alluded to this problem before but the solution is not working (properly). What I'd like to do is the following (using the C++ interface):
i. I create an object for each degree of freedom (no problem).
ii. Each object generates a value (no problem).
iii. I need to assemble these values into a vector that will be passed to a pde as the initial condition (major problem).
Anders suggested the tabulate_coordinates function to obtain the coordinates of the dofs and Garth suggested the Dolfin::Set which doesn't sort the coordinates.
This works for P1 elements but for P2 elements and above, it's not quite right.
Could someone please provide a code snippet that shows how to:
1. Assemble individual values at each dof (with its coordinates) into a solution vector exactly as the pde would expect it.
2. Extract the individual values form the solution vector produced by a pde and associate it to a particular dof and its coordinates.
Much appreciated
Ted
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.