I think I've caught the problem, lying on the second term of cell_rhs_cell_vel. The new code is shown below. Instead, now I'm using matrix-vector multiplication(highlight in the figure) to calculate the gradient term and keeping the old velocity term unchanged. [image: screenshot.png] Now the problem becomes, here pres_n, phi_n and phi_n_minus_1 are obtained by get_function_values at quadrature points which are the multiplication of dof_values and shape functions. But actually, only the dof values are the right thing to calculate the gradient term. So how should I do to get the dof values from locally_relevant_solution(specifically, locally_relevant_pres, locally_relevant_phi_n and locally_relevant_phi_n_minus_1).
Best, Toddy. 在2021年11月21日星期日 UTC+8 下午10:43:09<Toddy Liu> 写道: > Dear Deal.II community, > > I'm programming on modifying step 35 using Parallel computing with > multiple processors using distributed memory. In tutorials, step 35 used > the gradient operator to act from the pressure space into the velocity > space. And in diffusion_step and projection_step, the gradient operator was > used. > > But when I want to modify the program using parallel computing, the > diffusion_step has to be something like assemble_system which consists of > cell_matrix and cell_rhs, as well as projection_step. I finished my > modification but the results seems totally wrong. I think maybe the > assemble_system has something wrong. > > And my code is shown below > [image: screenshot.png] > Additionally, the cell_rhs_vel is made of the information about old > velocity(code about cell_rhs_vel shown at the top of the figure) and also > grad pressure(the code about cell_rhs_vel shown at the bottom of the > figure) , just like tutorial step35. > > So could you please help me find the problem within my code to correctly > calculate the gradient term in cell_rhs_vel? Any advice and corrections > will be appreciated! > Thank you very much. > > Best, > Toddy > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/366eb2b5-8f78-4997-88da-0c20c51b40f0n%40googlegroups.com.
