Dear Daniel,

I did try it, but I cant just change the local_velocity_values from a 
std::vector<Tensor<1,dim>> to std::vector<double>. Then the 
fe_values[velocities].get_function_values function doesnt compile. So I 
commented that part out, the results you see is from the code as it is, I 
used the for loop at line 354 to get the size (which I know is wrong, but 
at least it give something).  Even if I had found the correct way to do 
this, it would not have solved my original problem.

(correct me if wrong) This method of using norm_sqr() would only produce 
the size, not the individual x,y and z components. I need the x,y and 
z components separately so I can get the size but also the difference 
between two solutions and that error of these two solutions. Hence my 
previous message. I want to be able to manipulate the vector components. 
How would I do this?

Best,
Joel


On Tuesday, September 27, 2016 at 7:38:48 PM UTC+2, Daniel Arndt wrote:
>
> Joel,
>
> Its been a week since my latest post, I was just wondering if you could 
>> help me.
>>
> Did you try what I suggested? What were the problems?
>
> Looking at the latest files you sent, local_velocity_values has still not 
> the type std::vector<Vector<double> >
> and you are still using
>
> for (unsigned int q_index=0; q_index<n_q_points; ++q_index)
>   for (unsigned int i=0; i<dofs_per_cell; ++i)
>     velocity[local_dof_indices[i]] = local_velocity_values[q_index];
>
> instead of
>
> for (unsigned int i=0; i<dofs_per_cell; ++i)
>   velocity[local_dof[indices[i]] = local_velocity_values(i).norm_sqr();
>
> This way you don't rely on any particular order of the dofs.
>
> Best,
> Daniel
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to