Sean:
VectorTools::interpolate(mapping,dof_handler_DG,Functions::ConstantFunction<dim>(1.),alpha_solution);
Obviously changing the final vector for different variables.
Later, when the gradient of these terms are used the gradient calculated by
deal.ii is not 0. I do get very small values on the order of 10^(-14) and when
I account for the inverse jacobian factor the unit_gradient returns values
ranging between +/- .9x10^(-15) & +/- 2x10^(-15).
Right, and this can not be avoided. Your alpha_solution corresponds to a
function of the form
\sum_j c_j phi_j(x)
where the coefficients c_j in your case happen to all be ones. Then if you
compute the gradient of this function, it is computed as
\sum_j c_j [grad phi_j(x)]
which *should* be zero, but because grad phi_j(x) is not zero, you are adding
together things that are subject to round-off errors and so you have to expect
that the terms in the sum do not exactly cancel but are on the order of
round-off. That's of course exactly what you observe.
These seem very small but due to their values being periodic they quickly grow
and destroy stability of my simulation. Are there any known fixes for this?
This is the real problem in your program: That cannot tolerate small
perturbations. This will be true of all perturbations, not just those that
come from round-off. In other words, your algorithm is not *stable*: Small
perturbations grow without bounds. No algorithm that is not stable is useful.
You need to figure out what it is that makes your algorithm instable.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/e422430a-2578-49de-a2cf-ff6b79b99351%40colostate.edu.