Hello, guys.

I am doing a problem which is similar to the Sine-Gordon equation 
(Step-25). The program gets running correctly without AMR, which is the way 
of Step-25. I am using the total energy of the system as the primary 
indicator. However, when I include AMR, even only on the initial condition, 
things go wrong (total energy blows up).

The initialization part looks like this (comment the for-loop if without 
AMR):
make_mesh();
setup_system();
init();
for (unsigned int init_refine = 0; init_refine < 5; ++init_refine)
{
  refine_mesh();
 init();
}

I don't know exactly where is wrong. Maybe someone once had a similar 
problem, then please give me some ideas..

Now I am thinking that if I implement the hanging node constraints 
correctly, since for a grid without AMR, there is no hanging nodes, while 
they are introduced in with AMR. 

Specifically, I am quite confused with the two functions: condense() and 
distribute(). Here are a few questions:
1) Do they do harm if I accidentally apply them twice, or apply them when 
they are not needed? for example, 
constraints.condense(matrix, vector);
constraints.condense(matrix, vector);
or
constraints.distribute(vector);
constraints.distribute(vector);
2) It seems condense() is only used when we have assembled a linear system, 
and prepare to solve it.
constraints.condense(system_matrix, system_vector);

Thank you!

 

-- 
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.

Reply via email to