Hello Prof. Bangerth,
Thank you very much for your reply. That solves the problem.
I am still unclear about several points.
Suppose we need to solve some PDE about some function u(r). Following the
weak form of an equation, we obtain and solve a linear system (A*x=b). What
we really solve are the coefficients U_j (this corresponds to the vector x
in the linear system). Thus I am assuming that the solution vector
(normally denoted as "system_solution" in the Tutorials) is really the
vector U_j.
The function u(r) = \sum_j U_j Q(r)_j, where Q(r)_j are the base functions.
For a certain point in the real space, denoted as r0, the value of the
function u should be u(r_0) = \sum_j U_j Q(r_0)_j.
Thus, when I loop over the elements of the solution vector, that is, a loop
like
for(unsigned int i=0; i<dof_handler.n_dofs(), ++i){
system_solution(i) = /*some code*/; //each i corresponds to a support
point
}
That modifies the coefficients U_j.
If I want to limit the value of u(r) in the range [0,1], for example. Let's
say, in a "discrete" version, my aim is to limit u(r) at every support
point in the range [0,1]. However, if I do the above loop, and limit
system_solution(i) in the range [0,1], how would that help to limit u(r),
since u(r) is a sum (u(r) = \sum_j U_j Q(r)_j). It looks like there are
some properties concerning the base functions and support points? Is it
some general properties for base functions?
I am new in FEM and might miss some points while reading the tutorials.
Thank you for your time!
Best,
Yiyang
On Monday, September 18, 2017 at 1:56:35 PM UTC-5, Wolfgang Bangerth wrote:
>
> On 09/18/2017 11:39 AM, Yiyang Zhang wrote:
> > I am following, e.g. Step-15, to solve a nonlinear system with Newton
> > method.
> >
> > The system is with the scalar potential V(phi)=(phi^2-1)^2.
> >
> > The solution satisfies the boundary condition phi=1 at infinity, such
> > that the total energy is finite.
> > Actually, we expect phi goes from 0 to 1 when the when the coordinate
> > goes from center to infinity. phi should never exceeds 1.
>
> That may be true for the *exact* solution of the PDE. But is it also
> true for the *discrete* solution?
>
>
> > However, when I do Newton iteration, phi always exceeds 1 near the
> > boundary (my early description is wrong, it is not a local minima...),
> > then things blow up...
> >
> > Previously, I also solved such problems in 1D with finite difference.
> > the field will also blow up at some point. In that case, after every
> > iteration, I examine the values of the field at each discretized point.
> > Wherever it exceed 1, I will manually replace it with 1. That will solve
> > the problem.
> >
> > Thus I wonder if I can do the same thing in dealii.
>
> Yes, you can do that. You just have to loop over the elements of your
> solution vector and reset values that are too large or too small.
>
> But you may lose the quadratic convergence of the Newton method this way
> (because the solution at the end of this step no longer satisfies the
> Newton update condition du=-J(u)^-1 F(u) ).
>
> 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.