Hi Prof. Wolfgang Bangerth,
I really appreciate for your quick reply. Now I do as what you said, using
VectorTools in setup_system(). It seems working, but there is still one
question that I always find very large values at points near boundaries,
see attached figures. Is there a way to solve this? Thanks for advance!
Have a nice day,
Mark
Code used as follows,
constraints.clear();
constraints.reinit(locally_relevant_dofs);
VectorTools::interpolate_boundary_values(dof_handler, BOUNDARY_NUM,
BoundaryValues_T<dim>(),constraints);
constraints.close();
Initial value projected by
VectorTools::project (dof_handler, constraints, QGauss<dim>(degree),
InitialValues_T<dim>(),
old_solution_T_cal);
<https://lh3.googleusercontent.com/-XqYsIGKYIy4/Wd0FDVsdz6I/AAAAAAAAACk/F0DTCvoewI8EiZg7JZs-Yp8KgUk7zaRhACLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-10%2B19-26-20.png>
<https://lh3.googleusercontent.com/-wW1-43huXAU/Wd0E4HHTDPI/AAAAAAAAACY/L6FBn5qtZQYcBmB5FkFsrwiUljvpLcfkgCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-10%2B19-26-39.png>
After 30us, Temperature distribution
<https://lh3.googleusercontent.com/-Gr0uIEKJ8hk/Wd0FJmsv1nI/AAAAAAAAACs/P7nyohwFv0wk7_sQmdKB2NV4MWsFXq02gCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-10%2B19-28-19.png>
<https://lh3.googleusercontent.com/-2qYzBzf0ADM/Wd0FH8B6YYI/AAAAAAAAACo/ByW7Hk66kHk5jOPhByZem7it3risRxPvgCLcBGAs/s1600/Screenshot%2Bfrom%2B2017-10-10%2B19-27-11.png>
在 2017年10月10日星期二 UTC+2下午5:48:57,Wolfgang Bangerth写道:
>
> On 10/10/2017 08:40 AM, Mark Ma wrote:
> >
> > I want to solve a heat equation in the time domain with distributed
> memory
> > using MPI, but the results are incorrect. In order to do so, I reference
> > tutorial step-23 for time updating method and step-40 for implementing
> MPI.
> > May I ask whether my boundary condition is right or not? Should we do
> > compress() after apply_boundary_values()? Thanks in advance!
>
> Jack -- how exactly is your solution wrong when you look at it? Do the
> boundary values look wrong? Are they correct if you run your MPI program
> with
> just one MPI process?
>
> In general, using MatrixTools::apply_boundary_values() is not the way to
> go
> with MPI programs. Rather, use a ConstraintMatrix and incorporate the
> boundary
> values into the same object as you do with hanging node constraints.
> That's
> what all of the parallel programs do, if I recall correctly.
>
> Best
> W.
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> <javascript:>
> www: http://www.math.colostate.edu/~bangerth/
>
>
--
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.