Questions in defining function and variational problem
# r, c, rs, cx are the solutions of an eigenvalue solver, what is the datastructure of rx, cx? a vector?
r, c, rx, cx = eigensolver.
# rho is a new function I defined, I want to set rho = 2rx^2, is "rho.vector()[:] = 2*rx*rx" right?
rho = Function(V)
rho.vector()[:] = 2*rx*rx
# I want to solve "grad^2 V_rho = rho", do I need to interpolate rho first?
V_rho = Function(V)
b = -0.25*pi*
L = rho*v*dx
solve(b == L, V_rho, bc)
# I want to set "V_xc = (3/pi*V_
V_xc=Function(V)
V_xc = (3/pi*V_rho)**(1/3)
# Is the setting of this variational problem right? Do we need to intepolate V_rho or V_xc?
c = 0.5*inner(
All the questions are listed in the comments.
Thanks
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Houdong Hu for more information if necessary.