2003: 2004: 2005: 2006: 2007: 2008: 2009: 2010: 2011: 2012: 2013: Jan (4) Feb (1) Mar (9) Apr (2) May (7) Jun (1) Jul (1) Aug (4) Sep (12) Oct (8) Nov (3) Dec (4) Jan (1) Feb (21) Mar (31) Apr (10) May (12) Jun (15) Jul (4) Aug (6) Sep (5) Oct (11) Nov (43) Dec (13) Jan (25) Feb (12) Mar (49) Apr (19) May (104) Jun (60) Jul (10) Aug (42) Sep (15) Oct (12) Nov (6) Dec (4) Jan (1) Feb (6) Mar (31) Apr (17) May (5) Jun (95) Jul (38) Aug (44) Sep (6) Oct (8) Nov (21) Dec Jan (5) Feb (46) Mar (9) Apr (23) May (17) Jun (51) Jul (41) Aug (4) Sep (28) Oct (71) Nov (193) Dec (20) Jan (46) Feb (46) Mar (18) Apr (38) May (14) Jun (107) Jul (50) Aug (115) Sep (84) Oct (96) Nov (105) Dec (34) Jan (89) Feb (93) Mar (119) Apr (73) May (39) Jun (51) Jul (27) Aug (8) Sep (91) Oct (90) Nov (77) Dec (67) Jan (25) Feb (36) Mar (98) Apr (45) May (25) Jun (60) Jul (17) Aug (36) Sep (48) Oct (45) Nov (65) Dec (39) Jan (26) Feb (48) Mar (151) Apr (108) May (61) Jun (108) Jul (27) Aug (50) Sep (43) Oct (43) Nov (27) Dec (37) Jan (56) Feb (120) Mar (72) Apr (57) May (82) Jun (66) Jul (51) Aug (75) Sep (166) Oct (232) Nov (284) Dec (105) Jan (168) Feb (151) Mar (30) Apr (145) May (26) Jun (53) Jul (76) Aug (33) Sep (23) Oct (72) Nov (125) Dec (38)
S M T W T F S
1 2 3 4
(2) (3)
5 6 7 8 9 10 11
(1) (5) (5) (13)   (2)
12 13 14 15 16 17 18
(1) (7) (1) (3)
19 20 21 22 23 24 25
(1) (2) (6) (7) (2) (6)
26 27 28 29 30
(1) (5)
 libmesh-users libmesh-devel Nested Flat Threaded Ultimate Show 25 Show 50 Show 75 Show 100
 Re: [Libmesh-devel] [Libmesh-users] Adding one more equation... From: David Knezevic - 2009-04-20 01:03 Attachments: extra_dof_stuff.tar.gz OK, so I've got a simple version of this working. I've attached a patch, as well as some new files for the instantiation of FEScalar (I sent this earlier, but didn't zip it up, so it didn't make it under the 40kb limit) Some notes: - As a first cut, I used lots of hacks in dof_map.h that will only work in serial - I used Roy's idea of letting the Order of SCALAR indicate how many scalar variables we want -- I guess then it would be good to make sure that we only add one SCALAR to a system, but I haven't done that yet... - I didn't (yet) make any changes to the sparsity pattern, so adding to the last row(s) and column(s) of the matrix will be slow - Plotting the SCALAR variables gives garbage at the moment, although I guess it should be easy to change GMVIO etc to plot the constant value of the SCALAR I've attached a test example (lagrange_mult.C) for this functionality, using a Lagrange multiplier to solve a pure (homogeneous) Neumann problem, and enforcing that \int_\Omega u \dx = 5. - Dave Roy Stogner wrote: > > On Sat, 18 Apr 2009, David Knezevic wrote: > >> So, I'd really like to add this system.add_variable(foo,SCALAR) >> functionality to libMesh. I've been poking around the library, but I'm >> not really sure how to get started, so I could definitely use some >> pointers... >> >> It seems to me that the important details for this are in DofMap, for >> storing and retrieving the dof index of the scalar variable, as well as >> for setting the sparsity pattern/number of non-zeros...? > > That's right. > >> Some thoughts I've had are: >> >> - Add a new enum SCALAR to FEFamily (or alternatively, a new enum SCALAR >> to Order)? > > FEFamily. The Order would then specify how many scalars to add. > > Maybe next write an FE specialization? Something that acted > sort of like a discontinuous monomial element? That might help > avoiding the need to add special cases to a lot of loops in the > library later. > >> - Short circuit all the loops over elements for DOF counting in DofMap >> for SCALAR variables, > > If the FE claimed to have zero dofs per element, DofMap would > basically skip right over it... but I'm not sure that's an intuitive > behavior; this might be a loop you really do want a special case on. > >> and instead store the dof index of each SCALAR variable in a vector >> in DofMap? > > Right. > >> - However, I can't see where in the code one should compute the dof >> index of a SCALAR variable in the first place? > > That's all in dof_map.C. > >> - Ben, regarding setting the nonzero count and the number of rows that >> you mentioned; where is this controlled? In SparsityPattern? > > In SparseMatrix, I believe, although the code to build the sparsity > pattern is in DofMap. > --- > Roy > 

 Re: [Libmesh-devel] [Libmesh-users] Adding one more equation... From: David Knezevic - 2009-04-20 00:04 Attachments: extra_dof_patch      fe_scalar.C      fe_scalar_shape_0D.C      fe_scalar_shape_1D.C      fe_scalar_shape_2D.C      fe_scalar_shape_3D.C OK, so I've got a simple version of what we've discussed working. I've attached a patch, as well as some new files for the instantiation of FEScalar. Some notes: - As a first cut, I used lots of hacks in dof_map.h that will only work in serial - I used Roy's idea of letting the Order of SCALAR indicate how many scalar variables we want -- I guess then it would be good to make sure that we only add one SCALAR to a system, but I haven't done that yet... - I didn't (yet) make any changes to the sparsity pattern, so adding to the last row(s) and column(s) of the matrix will be slow - Plotting the SCALAR variables gives garbage at the moment, although I guess it should be easy to change GMVIO etc to plot the constant value of the SCALAR I'll attach an example program to another email since if I attach it here it puts me over the 40kb limit. - Dave Roy Stogner wrote: > > On Sat, 18 Apr 2009, David Knezevic wrote: > >> So, I'd really like to add this system.add_variable(foo,SCALAR) >> functionality to libMesh. I've been poking around the library, but I'm >> not really sure how to get started, so I could definitely use some >> pointers... >> >> It seems to me that the important details for this are in DofMap, for >> storing and retrieving the dof index of the scalar variable, as well as >> for setting the sparsity pattern/number of non-zeros...? > > That's right. > >> Some thoughts I've had are: >> >> - Add a new enum SCALAR to FEFamily (or alternatively, a new enum SCALAR >> to Order)? > > FEFamily. The Order would then specify how many scalars to add. > > Maybe next write an FE specialization? Something that acted > sort of like a discontinuous monomial element? That might help > avoiding the need to add special cases to a lot of loops in the > library later. > >> - Short circuit all the loops over elements for DOF counting in DofMap >> for SCALAR variables, > > If the FE claimed to have zero dofs per element, DofMap would > basically skip right over it... but I'm not sure that's an intuitive > behavior; this might be a loop you really do want a special case on. > >> and instead store the dof index of each SCALAR variable in a vector >> in DofMap? > > Right. > >> - However, I can't see where in the code one should compute the dof >> index of a SCALAR variable in the first place? > > That's all in dof_map.C. > >> - Ben, regarding setting the nonzero count and the number of rows that >> you mentioned; where is this controlled? In SparsityPattern? > > In SparseMatrix, I believe, although the code to build the sparsity > pattern is in DofMap. > --- > Roy >