Hi Edgar, Sorry for not responding, your email got kind of lost in my inbox.
LibMesh does support penalty BCs, some examples which use penalty BCs are: adjoints_ex1,2,4; adaptivity_ex1,2,4. It sounds like you may be interested in DirichletBoundary objects, which impose the BCs as user-defined constraints. Examples using DirichletBoundary objects are: adaptivity_ex3; adjoints_ex5,6,7; fem_system_ex1,3,4. The implementation of DirichletBoundary objects corresponds to the description you gave in your original email about modifying the matrix and rhs. -- John On Wed, May 5, 2021 at 2:50 PM edgar <edgar...@cryptolab.net> wrote: > Nevermind. I found this [1]: > > - Cons of this approach : > - Works for an interpolary finite element basis but not in > general. > - May be inefficient to change individual entries once the global > matrix is assembled. > - Need to enforce boundary conditions for a generic finite element > basis at the element stiffness matrix level. > > [1] > > https://users.oden.utexas.edu/~roystgnr/libmeshpdfs/roystgnr/sandia_libmesh.pdf > > On 2021-04-24 05:14, edgar wrote: > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > > ARE THERE QBC, NON-HOMOGENEOUS > > BC, ESSENTIAL BC BY MODIFYING EQUATIONS? > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > > > > > > Hello busy developers and scientists! I’ll try to make it short. > > > > [Logan12] calls them /nonhomogeneous boundary conditions/ (BC), > > [Ashgar05] refers to them as /essential boundary conditions by > > modifying > > equations/ and I am sure that some people call them qualifying boundary > > conditions (who?). > > > > The procedure consists, for example, from a 1D system like this (2 > > elements, 3 nodes), where nodes 1 (n1) and 3 (n3) have an imposed value > > of f and node 2 (n2) has essential (Dirichlet) BC. The global matrix of > > the system would be like this > > > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > > [ k_{1,1} k_{1,2} k_{1,3} ] [ u_{1} ] [ f_{1} ] > > [ k_{2,1} k_{2,2} k_{2,3} ] · [ u_{2} ] = [ f_{2} ] > > [ k_{3,1} k_{3,2} k_{3,3} ] [ u_{3} ] [ f_{3} ] > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > > > > The above mentioned procedure does this [Ashgar05]: > > (i) Insert 1 at the diagonal location and zero at all > > off-diagonal locations in the row corresponding to the > > specified degree of freedom. > > > > (ii) Insert the known nodal value to the corresponding > > location in the right-hand side. > > > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > > [ k_{1,1} 0 k_{1,3} ] [ u_{1} ] [ f_{1} ] > > [ 0 1 0 ] · [ u_{2} ] = [ Δ{u} ] > > [ k_{3,1} 0 k_{3,3} ] [ u_{3} ] [ f_{3} ] > > ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ > > > > I read that libMesh solves equations with a penalty method [CMISS, > > hooshi]. Does it also apply the method described above? > > > > That’s it. Thanks! > > > > > > > > [Logan05] Daryl L. Logan, A first course in the finite element method, > > (2012), Cengage Learning, Stanford, CT, U.S.A. > > > > [Ashgar05] M. Ashgar Bhatti, Fundamental finite element analysis and > > applications: with mathematica and matlab computations (2005), John > > Wiley \& Sons. > > > > [CMISS] > > <https://www.cmiss.org/openCMISS/wiki/LibmeshBoundaryConditions> > > > > [hooshi] <https://hooshi.gitlab.io/FILES/math521_libmesh.pdf> > _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users