Re: [deal.II] Using p-refinement with high order elements

2016-10-08 Thread Jean-Paul Pelteret
Oh, and I should say "kudos" to you for sticking with it and finding the bug yourself. I like to think that its all part of the learning experience :-) On Saturday, October 8, 2016 at 1:14:24 PM UTC+2, Deepak Gupta wrote: > > Dear JP and Wolfgang, > > Thanks for your help. I could finally

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Deepak Gupta
Thanks. Just some add on, I figured out that the replacement for the lines commented below are the ones in bold. Here it does not make sense to me why *v-1, 1 and 2 *work, rather than *v, 0 and 1* (as seen in google-group discussion)*. *May be this information is of use to you in back-tracing

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Jean-Paul Pelteret
See step-27 : VectorTools::interpolate_boundary_values (dof_handler, > 0, > ZeroFunction(), >

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Deepak Gupta
Thanks JP, I took the above points into my code except that I do not know/understand how to add boundary conditions in the constraint matrix without using the apply_boundary_values. Could you divert me to an example or discussion where this is done. Best Deepak On Fri, Oct 7, 2016 at 1:33 PM,

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Deepak Gupta
Thanks JP for the elaborate clarification. I quickly tried to test a *distributed source term* commenting out the point load function and adding the following before distribute_local_to_global: //Calculating cell_rhs for(unsigned int i = 0; i < dofs_per_cell; ++i){ const

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Jean-Paul Pelteret
Ok, so its a benchmark test not one you've come up with yourself. Fair enough... What I'm suggesting is that you implement the RHS contribution from the load within the local assembly loop. You can have a look at how the point source is implemented in VectorTools::create_point_source_vector

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Deepak Gupta
Thanks JP. Indeed a concise example should help and that is where I started. I took a scalar-valued example, however, it did not show the same problem as this one. Thus, I decided to move towards this case. I take this blame that I should have an even simpler case, and I hope I can come up soon.

Re: [deal.II] Using p-refinement with high order elements

2016-10-07 Thread Jean-Paul Pelteret
Dear Deepak, Its always easier to help debug a well document, clear and concise example. It was less about checking the implementation than understanding what the code is doing and how all of the parts interact. After all, we can only work with what you give us. Anyway, I've noticed that you

Re: [deal.II] Using p-refinement with high order elements

2016-10-06 Thread Wolfgang Bangerth
Deepak, By the way, I am constructing the cell matrices using B'DB, where B is the strain-displacement matrix and D is the constitutive relation. Then I add it to the system matrix using distribute_local_to_gobal function. Since B and D are the same for global and adaptive case, I do not

Re: [deal.II] Using p-refinement with high order elements

2016-10-06 Thread Deepak Gupta
Thanks Wolfgang for the reply. I created a small scalar example by modifying Step-6 and to my surprise, it works very well (can send if someone needs it). So, I have not figured out the error yet. I am still trying to narrow down the problem. By the way, I am constructing the cell matrices using

Re: [deal.II] Using p-refinement with high order elements

2016-10-05 Thread Wolfgang Bangerth
On 10/05/2016 09:03 AM, Deepak Gupta wrote: Since it works for the combination of p=1 and 2, I do not think hanging nodes are a problem. I looked at the hp-paper as well and do not see something that might be going wrong related to the hanging nodes. I am still trying to narrow down the