[deal.II] Re: Output nodal scalar

2017-08-25 Thread Jean-Paul Pelteret
Yes, thats correct :-) The book link that you mention outlines the problem exactly as I understand it, and I interpret it in the same way as you've mentioned. On Friday, August 25, 2017 at 4:30:19 PM UTC+2, Jie Cheng wrote: > > Dear Jean-Paul > > Now I understand why the heuristic method is less

[deal.II] Re: Output nodal scalar

2017-08-25 Thread Jie Cheng
Dear Jean-Paul Now I understand why the heuristic method is less preferable and have a better sense of the least square method in this context. Like a simple linear regression > , the > least-squares method will minimise the err

[deal.II] Re: Output nodal scalar

2017-08-25 Thread Jean-Paul Pelteret
Dear Jie, > it seems that the L2-projection method also evaluates the stress tensor at > the quadrature points and then finds the cell-averaged stress. The only > difference compared with the heuristic method is that it solves AX = Y > where A is mass matrix, Y is integration of cell-averaged

[deal.II] Re: Output nodal scalar

2017-08-24 Thread Jie Cheng
Thank you Jean-Paul. I did not hear about L2-projection method before, but it seems that the L2-projection method also evaluates the stress tensor at the quadrature points and then finds the cell-averaged stress. The only difference compared with the heuristic method is that it solves AX = Y wh

[deal.II] Re: Output nodal scalar

2017-08-24 Thread Jean-Paul Pelteret
There's also the MeshWorker framework which has some integrators that can help. But I don't know how that works so I can't help you further other than to point it out to you. On Thursday, August 24, 2017 at 6:3

[deal.II] Re: Output nodal scalar

2017-08-24 Thread Jean-Paul Pelteret
I can't think of any off of the top of my head, but I think that MatrixCreator::create_mass_matrix() plus VectorTools::create_right_hand_side()

[deal.II] Re: Output nodal scalar

2017-08-24 Thread Jie Cheng
Jean-Paul Any examples programming-wise? Like a deal.II manual/tutorial... Jie On Thursday, August 24, 2017 at 11:27:40 AM UTC-4, Jean-Paul Pelteret wrote: > > Hi Jie, > > Sure, we used it in this paper > >> @Article{vogel2014a-preprint, >> author= {Vogel, F. and Pelteret, J-P. V. and Kaes

[deal.II] Re: Output nodal scalar

2017-08-24 Thread Jean-Paul Pelteret
Hi Jie, Sure, we used it in this paper > @Article{vogel2014a-preprint, > author= {Vogel, F. and Pelteret, J-P. V. and Kaessmair, S. and > Steinmann, P.}, > title = {Magnetic force and torque on particles subject to a > magnetic field}, > journal = {European Journal of Mechanics

[deal.II] Re: Output nodal scalar

2017-08-24 Thread Jie Cheng
Hi Jean-Paul Thanks for your help! The specific add_data_vector() function you shared does solve my problem! For your second suggestion on L2-smoothing, I'd like to give it a try. Can you please point me to some detailed references? Examples or documentations would be great! Jie On Thursday,

[deal.II] Re: Output nodal scalar

2017-08-23 Thread Jean-Paul Pelteret
Dear Jie, I'm glad to hear that you managed to find a solution to your problem and for posting what it was. Two quick points: 1. There's actually another add_data_vector() member functio

[deal.II] Re: Output nodal scalar

2017-08-23 Thread Jie Cheng
Update: I switched to my old trick of nodal averaging method: take the average of the values at quadrature points, then add this average to the vertex dofs. And if a vertex is shared by n cells, divide the values at the related dofs by n. I am happy with the results because they look quite smoo