Hey everyone,
I have the following problem
I have a classical velocity - pressure Blockvector "soluion" and a FEsystem (initialized via
fe(FE_Q<dim>(degree + 1), dim, FE_Q<dim>(degree), 1)
For some testing I want to get the velocity compontents of solution in seperate vectors,
i.e. a vector u_x which contains the velocity values of solution in x-direction.
I am not really sure yet how to get these values.
My attempt is to use FEValues and quadrature points
u_x.reinit(n_dofs_in_one_direction);
FEValues<dim> fe_values(fe, quadrature_formula, update_values);
std::vector<Tensor<1, dim>> velocity_values(n_q_points);
const FEValuesExtractors::Vector velocities(0);
for (const auto &cell : dof_handler.active_cell_iterators())
{
fe_values.reinit(cell);
fe_values[velocities].get_function_values(solution, velocity_values);
[...]
}
With this procedure I get the vector of Tensors velocity_values, which contains the velocity-values of "solution" in every direction at the quadratue points. So now I an easily get the values of velocity_values in the x-direction at the quadrature points. But how do I get the values of u_x at the dofs?
Does somebody have an idea how to fix this, or a better way to do handle this?
Best regards
Gabriel