Dear All,
I am trying to write a code to give initial condition for a vector of FullMatrix<double> objects. The initial value of each entry of each matrix is uniquely defined by the corresponding nodal location. Hence, I am looking for an easy way to iterate all nodes (including mid-side nodes) in the mesh and access their coordinates. Is there a way to do so?
I am aware of the Interpolate() function in VectorTools. However, the documentation for this function show that the input function to interpolate must have the same number of components as the number of components in the vector-valued finite element. This is not the case for me, since the initial values of the matrix are not directly linked to the DoFs of the finite element. I also considered making the entries of the matrices as extra DoFs of the finite element, then I will be able to use Interpolate() and some component masks to assign initial values. But this idea is sub-optimal, since in subsequent calculations, the values of the entries can be directly computed using other DoFs of the finite element as well as their previous values. So there's really no point posing them as additional DoFs of the finite element. Is there any suggestions on how to achieve this?
Thanks a lot for any discussions and suggestions! Your help is much appreciated!
Best,
Jimmy