From: Roy Stogner <roystgnr@ic...>  20121127 20:53:38

I'd suggest Cc:ing libmeshusers on your emails; I'm probably the only main developer who can meet with you in person right now, but for simple questions there's typically decent odds of you getting a faster answer from others. On Tue, 27 Nov 2012, Ernesto Lima wrote: > After our meeting I started using libmesh and already managed to implement > the CahnHilliard equation with adapatative mesh. Nice job! > Now I tried to implement a system with 6 equations and with homogeneous > neumann boundary condition everything worked. But I need to have a dirichlet > boundary condition for one of the equations and I didn't manage to do that > until now. With the penalty method I am not able to get the correct result. Proper BCs for CahnHilliard are a bit tricky regardless of whether you handle the terms  IIRC you have to do both a zerothorfirst order BC (same as you'd have to do with a secondorder PDE) but you also have to have a secondorthird order BC to close things out. Depending on how you did the mixed formulation, handling the secondorder term as a true Dirichlet constraint may be either trivial or may require some significant coding on your part, depending on whether it ends up looking like "w = g" or "f(w) = g" for your solution laplacianlike variable "w". You should be able to get halfdecent results with the penalty method, though... if you're getting convergence plateaus or solver failures after several orders of magnitude convergence, and you can't squeak under your tolerances by tweaking the penalty epsilon, then you definitely need true Dirichlet conditions, but any more serious failures probably have a different underlying problem. > I wonder if I could meet you sometime for a little help for the bc I'm currently telecommuting and getting over a cold, but late this week (Thursday afternoon?) will probably be fine. > or if you could suggest a example of libmesh to do that. We changed practically all our previous penalty examples to use true dirichlet boundary conditions; try fem_system_ex1 for some simple constant BCs or adjoints_ex3 for a parabolic inflow. > I tried to print the system matrix and righthandside to see if I > am doing right the bc but I also didn't find how to do that in the > examples. You can spit out the right hand side with "libMesh::out << *system.rhs;". With sparse matrices using << on *system.matrix should work, but there are also more options to govern how they get printed; take a look at the _matlab, _personal, print(sparse=true) etc. options in sparse_matrix.h > Thank you for the help You're welcome,  Roy 