Hi Alex, I’m sorry that I didn’t find the time to contribute any further to our discussion. But I’m really glad to hear that you carried on experimenting and ultimately found a solution to the problem that you were facing. Thank you for sharing the solution with us. When I next have some time, I’ll try to look through the final code that you attached, and perhaps we can find a way to incorporate the modified function (in some form) into the library.
Best, Jean-Paul > On 4. May 2021, at 11:52, Alex Cumberworth <[email protected]> > wrote: > > I ended up getting it working, so in case anyone else is interested in doing > something similar, I have attached updated versions of the previous scripts. > I further modified set_periodicity_constraints so that it can take a function > to set the inhomogeneity based on the values of the two support points > associated with the two degrees of freedom that are being tied together, > although it would need to be modified for more general use (the functions > works on the difference of the two points, and further it uses only the > absolute value of the difference in the x-component). I have also not made > changes to allow for adaptive mesh refinement. I think this is a pretty ugly > solution to the general problem of inhomogeneous periodic boundary > constraints, but I couldn't see how to do it without modifying these > functions without largely replicating them. > > The issues mentioned in the previous post regarding > distribute_local_to_global() and AffineConstraints::distribute() stemmed from > a misunderstanding of exactly what these functions were doing, and have been > fixed. It does seem that with these constraints, SolverCG does not work as a > solver (I suppose the matrix is not symmetric anymore?), but either > SolverGMRES or the direct solver SparseDirectUMFPACK work. > > The script has also been improved based on other tutorials, and now includes > parsing for a parameter file. I tried to include an example parameter file > but I guess the mailing list has a restriction on allowable file types. > > Best, > Alex > > > -- > The deal.II project is located at http://www.dealii.org/ > <http://www.dealii.org/> > For mailing list/forum options, see > https://groups.google.com/d/forum/dealii?hl=en > <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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/dealii/0c692129-a363-4d67-98a7-8c7e04ba3892n%40googlegroups.com > > <https://groups.google.com/d/msgid/dealii/0c692129-a363-4d67-98a7-8c7e04ba3892n%40googlegroups.com?utm_medium=email&utm_source=footer>. > <modded_periodic_functions.h><solve-ring_nonlinear.cpp> -- 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/69055AE8-2C74-488A-8D7F-3CF47F051A8F%40gmail.com.
