Hello everyone,
I believe this is a relatively dumb question, but I seem to struggle with this basic concept.
I would like to be able to set-up an initial condition by fixing the value of the DOF themselves by using their x,y(,z) position with a ParsedFuction.
Generally, I set the initial condition by using an L2 projection of the function (for complex function and higher order element I know this is more appropriate).
However, for some stuff I would like to be able to fix the value of the DOF directly.
My issue is, through the doxygen, I have not found a way to loop through the DOF and to extract their position, even more when I have high order element or when I have a multiplicity (say velocity-vector + pressure).
What I would be looking into doing would be something similar to :
loop over local DOF;
get DOF position
get DOF component (u[0], u[1], u[2], p)
calculate parsed function using the point
set the value of the DOF
end
Is it something that is possible? This is a weird way of iterating since I know we always loop over the cells. Maybe there is a way to achieve this by looping over the cells and then looping over the DOF of the cells? This would be slightly redundant, but I do not care since I am doing this only once.
Thank you for everything!
Bruno