Thanks for the response. I am totally open to the idea of the algorithm not being stable.
The term shown in the graph is from a fairly simple equation. It arises from the need of using the Local Discontinuous Galerkin method for a second order derivative in one of the hyperbolic equations. The equation being solved is: grad a - q = 0 where a is the variable that is equal to 1 everywhere and q is to be solved for. I try and do a strong form and end up with: \int_cell phi * q = \int_cell phi * grad a + \int_face phi*( {{a}} - a_interior ) * normal where {{a}} is the average of the values of a on the faces. This though leads to the horribly broken solution of q that has positive and negative values and jumps when it should be smooth. Is the answer to use a limiter or filter at this point? I am new to discontinuous galerkin but I haven't seen a filter or limiter being used in local discontinuous galerkin before. On Thursday, July 18, 2024 at 1:13:53 PM UTC-6 Wolfgang Bangerth wrote: > > 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: bang...@colostate.edu > 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 dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/ba6d7432-317a-492b-a322-24ffc2de83ban%40googlegroups.com.