You can subscribe to this list here.
2003 
_{Jan}

_{Feb}

_{Mar}

_{Apr}

_{May}

_{Jun}

_{Jul}

_{Aug}

_{Sep}
(2) 
_{Oct}
(2) 
_{Nov}
(27) 
_{Dec}
(31) 

2004 
_{Jan}
(6) 
_{Feb}
(15) 
_{Mar}
(33) 
_{Apr}
(10) 
_{May}
(46) 
_{Jun}
(11) 
_{Jul}
(21) 
_{Aug}
(15) 
_{Sep}
(13) 
_{Oct}
(23) 
_{Nov}
(1) 
_{Dec}
(8) 
2005 
_{Jan}
(27) 
_{Feb}
(57) 
_{Mar}
(86) 
_{Apr}
(23) 
_{May}
(37) 
_{Jun}
(34) 
_{Jul}
(24) 
_{Aug}
(17) 
_{Sep}
(50) 
_{Oct}
(24) 
_{Nov}
(10) 
_{Dec}
(60) 
2006 
_{Jan}
(47) 
_{Feb}
(46) 
_{Mar}
(127) 
_{Apr}
(19) 
_{May}
(26) 
_{Jun}
(62) 
_{Jul}
(47) 
_{Aug}
(51) 
_{Sep}
(61) 
_{Oct}
(42) 
_{Nov}
(50) 
_{Dec}
(33) 
2007 
_{Jan}
(60) 
_{Feb}
(55) 
_{Mar}
(77) 
_{Apr}
(102) 
_{May}
(82) 
_{Jun}
(102) 
_{Jul}
(169) 
_{Aug}
(117) 
_{Sep}
(80) 
_{Oct}
(37) 
_{Nov}
(51) 
_{Dec}
(43) 
2008 
_{Jan}
(71) 
_{Feb}
(94) 
_{Mar}
(98) 
_{Apr}
(125) 
_{May}
(54) 
_{Jun}
(119) 
_{Jul}
(60) 
_{Aug}
(111) 
_{Sep}
(118) 
_{Oct}
(125) 
_{Nov}
(119) 
_{Dec}
(94) 
2009 
_{Jan}
(109) 
_{Feb}
(38) 
_{Mar}
(93) 
_{Apr}
(88) 
_{May}
(29) 
_{Jun}
(57) 
_{Jul}
(53) 
_{Aug}
(48) 
_{Sep}
(68) 
_{Oct}
(151) 
_{Nov}
(23) 
_{Dec}
(35) 
2010 
_{Jan}
(84) 
_{Feb}
(60) 
_{Mar}
(184) 
_{Apr}
(112) 
_{May}
(60) 
_{Jun}
(90) 
_{Jul}
(23) 
_{Aug}
(70) 
_{Sep}
(119) 
_{Oct}
(27) 
_{Nov}
(47) 
_{Dec}
(54) 
2011 
_{Jan}
(22) 
_{Feb}
(19) 
_{Mar}
(92) 
_{Apr}
(93) 
_{May}
(35) 
_{Jun}
(91) 
_{Jul}
(32) 
_{Aug}
(61) 
_{Sep}
(7) 
_{Oct}
(69) 
_{Nov}
(81) 
_{Dec}
(23) 
2012 
_{Jan}
(64) 
_{Feb}
(95) 
_{Mar}
(35) 
_{Apr}
(36) 
_{May}
(63) 
_{Jun}
(98) 
_{Jul}
(70) 
_{Aug}
(171) 
_{Sep}
(149) 
_{Oct}
(64) 
_{Nov}
(67) 
_{Dec}
(126) 
2013 
_{Jan}
(108) 
_{Feb}
(104) 
_{Mar}
(171) 
_{Apr}
(133) 
_{May}
(108) 
_{Jun}
(100) 
_{Jul}
(93) 
_{Aug}
(126) 
_{Sep}
(74) 
_{Oct}
(59) 
_{Nov}
(145) 
_{Dec}
(93) 
2014 
_{Jan}
(38) 
_{Feb}
(45) 
_{Mar}
(26) 
_{Apr}
(41) 
_{May}
(125) 
_{Jun}
(70) 
_{Jul}
(61) 
_{Aug}
(66) 
_{Sep}
(60) 
_{Oct}
(110) 
_{Nov}
(27) 
_{Dec}
(30) 
2015 
_{Jan}
(43) 
_{Feb}
(67) 
_{Mar}
(71) 
_{Apr}
(92) 
_{May}
(39) 
_{Jun}
(15) 
_{Jul}
(46) 
_{Aug}
(63) 
_{Sep}
(84) 
_{Oct}
(82) 
_{Nov}
(69) 
_{Dec}
(45) 
2016 
_{Jan}
(92) 
_{Feb}
(91) 
_{Mar}
(148) 
_{Apr}
(43) 
_{May}
(58) 
_{Jun}
(117) 
_{Jul}
(92) 
_{Aug}
(140) 
_{Sep}
(49) 
_{Oct}
(33) 
_{Nov}
(85) 
_{Dec}
(40) 
2017 
_{Jan}
(41) 
_{Feb}
(36) 
_{Mar}
(49) 
_{Apr}
(41) 
_{May}
(73) 
_{Jun}
(51) 
_{Jul}
(12) 
_{Aug}
(69) 
_{Sep}
(26) 
_{Oct}
(43) 
_{Nov}
(75) 
_{Dec}
(13) 
S  M  T  W  T  F  S 



1

2

3
(13) 
4
(10) 
5

6
(1) 
7
(4) 
8
(4) 
9
(1) 
10
(5) 
11
(1) 
12

13

14
(5) 
15
(2) 
16

17
(2) 
18

19

20

21
(4) 
22
(8) 
23
(16) 
24
(6) 
25
(12) 
26
(4) 
27
(5) 
28
(2) 
29
(1) 
30
(2) 
31



From: David Knezevic <dknezevic@se...>  20130130 13:41:14

If you want u=0 somewhere you have to impose that as a BC... what BCs did you impose? But actually, sounds like u0=10 might be the right lifting function in your case, in which case the Laplace problem is unnecessary. (No need to email the list about this now I think; let's take this discussion offlist) David On 01/30/2013 04:17 AM, Kyunghoon Lee wrote: > Hi David, > > Based on your comments, I solved \Laplacian u = 0 to with an inhomogeneous > Dirichlet BC (e.g. u = 10 at the left end) and found the solution u is 10 > all over the domain (because of diffusion). I expected to get u such that > u = 10 at the left end and u = 0 elsewhere so that I can use it as a lift > function. I wonder what you intended is to use u, which is 10 for the > whole domain, by checking whether it belongs to the inhomogeneous Dirichlet > BC or not. > > K. Lee. > > On Mon, Jan 28, 2013 at 12:42 PM, Kyunghoon Lee > <aeronova.mailing@...>wrote: > >> Thanks for the comments. I'm not sure whether I can pull it off, but I'll >> try. >> >> K. Lee. >> >> >> On Mon, Jan 28, 2013 at 5:25 AM, David Knezevic < >> dknezevic@...> wrote: >> >>> Hi K, >>> >>> It doesn't matter how you get the lift function. If you can construct u0 >>> "by hand" then that's fine, but it may not always be so easy, e.g. if >>> the domain is nontrivial. Solving a laplace problem will work in >>> general. To do this just follow introduction_ex4 (which already has >>> nonhomogeneous Dirichlet BCs). >>> >>> Re this: >>> >>> On 01/26/2013 07:23 PM, Kyunghoon Lee wrote: >>>> Overall it looks like a nested problem  solving a Laplace equation >>>> inside of a reduced basis model construction. I wonder if you'd suggest >>>> some relevant examples/codes regarding the lift function creation. >>> Well, you solve the Laplace problem (as in introduction_ex4), store the >>> result, then do the RB stuff. >>> >>> David >>> >>> >>> >>> >>> >>>> Best, >>>> K. Lee. >>>> >>>> On Sun, Jan 27, 2013 at 1:43 AM, David Knezevic >>>> <dknezevic@...>wrote: >>>> >>>>> To create the lift function, probably the simplest thing to do is solve >>>>> a Laplace equation (\Laplacian u = 0) with the Dirichlet boundary >>>>> conditions that you want, and then use the solution as your u0. This >>>>> process is called "elliptic lifting" since the Laplace equation is an >>>>> elliptic PDE. >>>>> >>>>> Then to assemble a(u0,v), you need to do something like what you wrote. >>>>> But the code can be simplified a bit; you don't need to compute Ke and >>>>> then multiply. You can just get the gradient of u0 directly (by >>>>> multiplying the coefficients of u0 with c.interior_gradient) and then >>>>> integrate. >>>>> >>>>> David >>>>> >>>>> >>>>> >>>>> On 01/26/2013 06:14 AM, Kyunghoon Lee wrote: >>>>>> Thanks for the reply. Now I'd appreciate if you'd help me with the >>>>>> implementation of a(u0,v). I was thinking of computing Ke*u0 where >>> Ke is >>>>>> the stiffness matrix and u0 is the lift function as below: >>>>>> >>>>>> //inhomogeneous Dirichlet BC >>>>>> struct IDBCAssembly : ElemAssembly { >>>>>> >>>>>> short unsigned int sbd_id; >>>>>> IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) >>> {} >>>>>> virtual void interior_assembly(FEMContext &c) { >>>>>> >>>>>> const unsigned int u_var = 0; >>>>>> const std::vector<Real> &JxW = >>>>>> c.element_fe_var[u_var]>get_JxW(); >>>>>> const std::vector<std::vector<RealGradient> >& dphi = >>>>>> c.element_fe_var[u_var]>get_dphi(); >>>>>> >>>>>> const unsigned int n_u_dofs = >>>>> c.dof_indices_var[u_var].size(); >>>>>> unsigned int n_qpoints = c.element_qrule>n_points(); >>>>>> >>>>>> // stiffness matrix Ke >>>>>> std::vector<std::vector<Number> > Ke(n_u_dofs, >>>>>> std::vector<Number>(n_u_dofs)); >>>>>> for (unsigned int qp=0; qp != n_qpoints; qp++) >>>>>> for (unsigned int i=0; i != n_u_dofs; i++) >>>>>> for (unsigned int j=0; j != n_u_dofs; j++) >>>>>> Ke[i][j] += JxW[qp] * dphi[j][qp] * >>> dphi[i][qp]; >>>>>> // lift function u0 >>>>>> std::vector<Number> u0(n_u_dofs, 0.0); >>>>>> >>>>>> // multiply stiffness matrix by lift function >>>>>> for (unsigned int qp=0; qp != n_qpoints; qp++) >>>>>> for (unsigned int i=0; i != n_u_dofs; i++) >>>>>> for (unsigned int j=0; j != n_u_dofs; j++) >>>>>> c.elem_residual(i) += Ke[i][j] * u0[j]; >>>>>> } // end of interior_assembly >>>>>> }; >>>>>> >>>>>> However, I'm not sure of how to create the lift function u0 such that >>> it >>>>>> has values for given boundary ID and zeros for elsewhere. I think I >>> need >>>>>> to the following: >>>>>> >>>>>> iterate nodes >>>>>> if node belongs to the given boundary ID, set u0(i) = u0_given; >>> otherwise >>>>>> u(i) = 0.0 >>>>>> >>>>>> but I'm not sure of how to check whether a node is associated with >>>>> boundary >>>>>> ID. Can you help me with this problem, plz? (or are there examples >>>>> related >>>>>> to this issue?) >>>>>> >>>>>> Best, >>>>>> K. Lee. >>>>>> >>>>>> >>>>>> On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic < >>>>> dknezevic@... >>>>>>> wrote: >>>>>>> Yep, that's right, use the RB method to solve for u'. >>>>>>> >>>>>>> Note that you put a(u0,v) on the righthand side, since u0 is known >>>>>>> (it's the "lifting function"). >>>>>>> >>>>>>> David >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: >>>>>>>> Thanks for clearing it up. Then I guess we just solve for u' >>>>>>>> >>>>>>>> a(u',v) + a(u0,v) = f(v) >>>>>>>> >>>>>>>> and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then >>>>> restore u >>>>>>>> by u = u' + u0. >>>>>>>> >>>>>>>> K. Lee. >>>>>>>> >>>>>>>> On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < >>>>>>> dknezevic@... >>>>>>>>> wrote: >>>>>>>>> Hi K, >>>>>>>>> >>>>>>>>> heterogeneously_constrain_element_matrix_and_vector is not >>> relevant to >>>>>>>>> Reduced Basis stuff. For Reduced Basis formulations, you have to >>>>>>>>> transform the problem using a lifting function so that it has zero >>>>>>>>> Dirichlet BC's  this is essential since you want your Reduced >>> Basis >>>>>>>>> space to be a vector space, i.e. it must contain 0 (which would be >>> not >>>>>>>>> be the case with nonzero Dirichlet BCs). This lifting function >>>>> approach >>>>>>>>> is what you described in your email already, so that's fine. >>>>>>>>> >>>>>>>>> Once you've transformed your problem using a lifting function, then >>>>> you >>>>>>>>> just proceed as normal, e.g. as in reduced_basis_ex1. The only >>> trick >>>>> is >>>>>>>>> you have to add your lifting function back on at the end to >>> recover u >>>>>>>>> from u'. >>>>>>>>> >>>>>>>>> David >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: >>>>>>>>>> Hi all, >>>>>>>>>> >>>>>>>>>> In my previous email regarding inhomogeneous Dirichlet boundary >>>>>>>>> conditions, >>>>>>>>>> David suggested using >>>>>>> heterogenously_constrain_element_matrix_and_vector >>>>>>>>> in >>>>>>>>>> introduction_ex4, but I'm not sure of how to deal with >>> inhomogeneous >>>>>>>>>> Dirichlet BCs in connection with reduced basis models. Suppose we >>>>>>> have a >>>>>>>>>> simple steady state heat conduction model whose BCs are u = T on >>>>> \Gamma >>>>>>>>> and >>>>>>>>>> u = 0 on the rest surfaces. After variable change, we solve >>>>>>>>>> >>>>>>>>>> a(u',v) = f(v)  a(u0,v) >>>>>>>>>> >>>>>>>>>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; >>> and 2) >>>>>>> u0 >>>>>>>>> = >>>>>>>>>> T on \Gamma and u0 = zero on the rest surfaces. I thought we >>> build >>>>> the >>>>>>>>> LHS >>>>>>>>>> then call attach_F_assembly to attach it, but in that case, I'm >>> not >>>>>>> sure >>>>>>>>>> how heterogenously_constrain_element_matrix_and_vector can be >>> used. >>>>> Or >>>>>>>>>> should we attach a(u',v) and f(v) as usual then call >>>>>>>>>> heterogenously_constrain_element_matrix_and_vector to impose  >>>>> a(u0,v) >>>>>>> on >>>>>>>>>> the LHS? I'd appreciate if someone can briefly describe how the >>>>>>> function >>>>>>>>>> work. >>>>>>>>>> >>>>>>>>>> Regards, >>>>>>>>>> K. Lee. >>>>>>>>>> >>>  >>>>>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, >>> CSS, >>>>>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >>>>> current >>>>>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>>>>>> _______________________________________________ >>>>>>>>>> Libmeshusers mailing list >>>>>>>>>> Libmeshusers@... >>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>  >>>>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, >>> CSS, >>>>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >>>>> current >>>>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>>>>> _______________________________________________ >>>>>>>>> Libmeshusers mailing list >>>>>>>>> Libmeshusers@... >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>>>>>> >>>  >>>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, >>> CSS, >>>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >>> current >>>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>>>> _______________________________________________ >>>>>>>> Libmeshusers mailing list >>>>>>>> Libmeshusers@... >>>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>>>> >>>  >>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >>> current >>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>>> _______________________________________________ >>>>>>> Libmeshusers mailing list >>>>>>> Libmeshusers@... >>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>>>> >>>  >>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >>> current >>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>> _______________________________________________ >>>>>> Libmeshusers mailing list >>>>>> Libmeshusers@... >>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>> >>>>> >>>  >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>> http://p.sf.net/sfu/learnnowd2d >>>>> _______________________________________________ >>>>> Libmeshusers mailing list >>>>> Libmeshusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>> >>>  >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>> MVPs and experts. ON SALE this month only  learn more at: >>>> http://p.sf.net/sfu/learnnowd2d >>>> _______________________________________________ >>>> Libmeshusers mailing list >>>> Libmeshusers@... >>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>> >>> >>>  >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only  learn more at: >>> http://p.sf.net/sfu/learnnowd2d >>> _______________________________________________ >>> Libmeshusers mailing list >>> Libmeshusers@... >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>> >> >  > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Kyunghoon Lee <aeronova.mailing@gm...>  20130130 09:17:43

Hi David, Based on your comments, I solved \Laplacian u = 0 to with an inhomogeneous Dirichlet BC (e.g. u = 10 at the left end) and found the solution u is 10 all over the domain (because of diffusion). I expected to get u such that u = 10 at the left end and u = 0 elsewhere so that I can use it as a lift function. I wonder what you intended is to use u, which is 10 for the whole domain, by checking whether it belongs to the inhomogeneous Dirichlet BC or not. K. Lee. On Mon, Jan 28, 2013 at 12:42 PM, Kyunghoon Lee <aeronova.mailing@...>wrote: > Thanks for the comments. I'm not sure whether I can pull it off, but I'll > try. > > K. Lee. > > > On Mon, Jan 28, 2013 at 5:25 AM, David Knezevic < > dknezevic@...> wrote: > >> Hi K, >> >> It doesn't matter how you get the lift function. If you can construct u0 >> "by hand" then that's fine, but it may not always be so easy, e.g. if >> the domain is nontrivial. Solving a laplace problem will work in >> general. To do this just follow introduction_ex4 (which already has >> nonhomogeneous Dirichlet BCs). >> >> Re this: >> >> On 01/26/2013 07:23 PM, Kyunghoon Lee wrote: >> > Overall it looks like a nested problem  solving a Laplace equation >> > inside of a reduced basis model construction. I wonder if you'd suggest >> > some relevant examples/codes regarding the lift function creation. >> >> Well, you solve the Laplace problem (as in introduction_ex4), store the >> result, then do the RB stuff. >> >> David >> >> >> >> >> >> > >> > Best, >> > K. Lee. >> > >> > On Sun, Jan 27, 2013 at 1:43 AM, David Knezevic >> > <dknezevic@...>wrote: >> > >> >> To create the lift function, probably the simplest thing to do is solve >> >> a Laplace equation (\Laplacian u = 0) with the Dirichlet boundary >> >> conditions that you want, and then use the solution as your u0. This >> >> process is called "elliptic lifting" since the Laplace equation is an >> >> elliptic PDE. >> >> >> >> Then to assemble a(u0,v), you need to do something like what you wrote. >> >> But the code can be simplified a bit; you don't need to compute Ke and >> >> then multiply. You can just get the gradient of u0 directly (by >> >> multiplying the coefficients of u0 with c.interior_gradient) and then >> >> integrate. >> >> >> >> David >> >> >> >> >> >> >> >> On 01/26/2013 06:14 AM, Kyunghoon Lee wrote: >> >>> Thanks for the reply. Now I'd appreciate if you'd help me with the >> >>> implementation of a(u0,v). I was thinking of computing Ke*u0 where >> Ke is >> >>> the stiffness matrix and u0 is the lift function as below: >> >>> >> >>> //inhomogeneous Dirichlet BC >> >>> struct IDBCAssembly : ElemAssembly { >> >>> >> >>> short unsigned int sbd_id; >> >>> IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) >> {} >> >>> >> >>> virtual void interior_assembly(FEMContext &c) { >> >>> >> >>> const unsigned int u_var = 0; >> >>> const std::vector<Real> &JxW = >> >>> c.element_fe_var[u_var]>get_JxW(); >> >>> const std::vector<std::vector<RealGradient> >& dphi = >> >>> c.element_fe_var[u_var]>get_dphi(); >> >>> >> >>> const unsigned int n_u_dofs = >> >> c.dof_indices_var[u_var].size(); >> >>> unsigned int n_qpoints = c.element_qrule>n_points(); >> >>> >> >>> // stiffness matrix Ke >> >>> std::vector<std::vector<Number> > Ke(n_u_dofs, >> >>> std::vector<Number>(n_u_dofs)); >> >>> for (unsigned int qp=0; qp != n_qpoints; qp++) >> >>> for (unsigned int i=0; i != n_u_dofs; i++) >> >>> for (unsigned int j=0; j != n_u_dofs; j++) >> >>> Ke[i][j] += JxW[qp] * dphi[j][qp] * >> dphi[i][qp]; >> >>> >> >>> // lift function u0 >> >>> std::vector<Number> u0(n_u_dofs, 0.0); >> >>> >> >>> // multiply stiffness matrix by lift function >> >>> for (unsigned int qp=0; qp != n_qpoints; qp++) >> >>> for (unsigned int i=0; i != n_u_dofs; i++) >> >>> for (unsigned int j=0; j != n_u_dofs; j++) >> >>> c.elem_residual(i) += Ke[i][j] * u0[j]; >> >>> } // end of interior_assembly >> >>> }; >> >>> >> >>> However, I'm not sure of how to create the lift function u0 such that >> it >> >>> has values for given boundary ID and zeros for elsewhere. I think I >> need >> >>> to the following: >> >>> >> >>> iterate nodes >> >>> if node belongs to the given boundary ID, set u0(i) = u0_given; >> otherwise >> >>> u(i) = 0.0 >> >>> >> >>> but I'm not sure of how to check whether a node is associated with >> >> boundary >> >>> ID. Can you help me with this problem, plz? (or are there examples >> >> related >> >>> to this issue?) >> >>> >> >>> Best, >> >>> K. Lee. >> >>> >> >>> >> >>> On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic < >> >> dknezevic@... >> >>>> wrote: >> >>>> Yep, that's right, use the RB method to solve for u'. >> >>>> >> >>>> Note that you put a(u0,v) on the righthand side, since u0 is known >> >>>> (it's the "lifting function"). >> >>>> >> >>>> David >> >>>> >> >>>> >> >>>> >> >>>> On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: >> >>>>> Thanks for clearing it up. Then I guess we just solve for u' >> >>>>> >> >>>>> a(u',v) + a(u0,v) = f(v) >> >>>>> >> >>>>> and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then >> >> restore u >> >>>>> by u = u' + u0. >> >>>>> >> >>>>> K. Lee. >> >>>>> >> >>>>> On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < >> >>>> dknezevic@... >> >>>>>> wrote: >> >>>>>> Hi K, >> >>>>>> >> >>>>>> heterogeneously_constrain_element_matrix_and_vector is not >> relevant to >> >>>>>> Reduced Basis stuff. For Reduced Basis formulations, you have to >> >>>>>> transform the problem using a lifting function so that it has zero >> >>>>>> Dirichlet BC's  this is essential since you want your Reduced >> Basis >> >>>>>> space to be a vector space, i.e. it must contain 0 (which would be >> not >> >>>>>> be the case with nonzero Dirichlet BCs). This lifting function >> >> approach >> >>>>>> is what you described in your email already, so that's fine. >> >>>>>> >> >>>>>> Once you've transformed your problem using a lifting function, then >> >> you >> >>>>>> just proceed as normal, e.g. as in reduced_basis_ex1. The only >> trick >> >> is >> >>>>>> you have to add your lifting function back on at the end to >> recover u >> >>>>>> from u'. >> >>>>>> >> >>>>>> David >> >>>>>> >> >>>>>> >> >>>>>> >> >>>>>> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: >> >>>>>>> Hi all, >> >>>>>>> >> >>>>>>> In my previous email regarding inhomogeneous Dirichlet boundary >> >>>>>> conditions, >> >>>>>>> David suggested using >> >>>> heterogenously_constrain_element_matrix_and_vector >> >>>>>> in >> >>>>>>> introduction_ex4, but I'm not sure of how to deal with >> inhomogeneous >> >>>>>>> Dirichlet BCs in connection with reduced basis models. Suppose we >> >>>> have a >> >>>>>>> simple steady state heat conduction model whose BCs are u = T on >> >> \Gamma >> >>>>>> and >> >>>>>>> u = 0 on the rest surfaces. After variable change, we solve >> >>>>>>> >> >>>>>>> a(u',v) = f(v)  a(u0,v) >> >>>>>>> >> >>>>>>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; >> and 2) >> >>>> u0 >> >>>>>> = >> >>>>>>> T on \Gamma and u0 = zero on the rest surfaces. I thought we >> build >> >> the >> >>>>>> LHS >> >>>>>>> then call attach_F_assembly to attach it, but in that case, I'm >> not >> >>>> sure >> >>>>>>> how heterogenously_constrain_element_matrix_and_vector can be >> used. >> >> Or >> >>>>>>> should we attach a(u',v) and f(v) as usual then call >> >>>>>>> heterogenously_constrain_element_matrix_and_vector to impose  >> >> a(u0,v) >> >>>> on >> >>>>>>> the LHS? I'd appreciate if someone can briefly describe how the >> >>>> function >> >>>>>>> work. >> >>>>>>> >> >>>>>>> Regards, >> >>>>>>> K. Lee. >> >>>>>>> >> >> >>  >> >>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, >> CSS, >> >>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> >> current >> >>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> >>>>>>> MVPs and experts. ON SALE this month only  learn more at: >> >>>>>>> http://p.sf.net/sfu/learnnowd2d >> >>>>>>> _______________________________________________ >> >>>>>>> Libmeshusers mailing list >> >>>>>>> Libmeshusers@... >> >>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >>>>>> >> >> >>  >> >>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, >> CSS, >> >>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> >> current >> >>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> >>>>>> MVPs and experts. ON SALE this month only  learn more at: >> >>>>>> http://p.sf.net/sfu/learnnowd2d >> >>>>>> _______________________________________________ >> >>>>>> Libmeshusers mailing list >> >>>>>> Libmeshusers@... >> >>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >>>>>> >> >> >>  >> >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, >> CSS, >> >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> current >> >>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> >>>>> MVPs and experts. ON SALE this month only  learn more at: >> >>>>> http://p.sf.net/sfu/learnnowd2d >> >>>>> _______________________________________________ >> >>>>> Libmeshusers mailing list >> >>>>> Libmeshusers@... >> >>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >>>> >> >>>> >> >> >>  >> >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> current >> >>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> >>>> MVPs and experts. ON SALE this month only  learn more at: >> >>>> http://p.sf.net/sfu/learnnowd2d >> >>>> _______________________________________________ >> >>>> Libmeshusers mailing list >> >>>> Libmeshusers@... >> >>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >>>> >> >> >>  >> >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> current >> >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> >>> MVPs and experts. ON SALE this month only  learn more at: >> >>> http://p.sf.net/sfu/learnnowd2d >> >>> _______________________________________________ >> >>> Libmeshusers mailing list >> >>> Libmeshusers@... >> >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >> >> >> >> >> >>  >> >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> >> MVPs and experts. ON SALE this month only  learn more at: >> >> http://p.sf.net/sfu/learnnowd2d >> >> _______________________________________________ >> >> Libmeshusers mailing list >> >> Libmeshusers@... >> >> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >> >> > >>  >> > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> > MVPs and experts. ON SALE this month only  learn more at: >> > http://p.sf.net/sfu/learnnowd2d >> > _______________________________________________ >> > Libmeshusers mailing list >> > Libmeshusers@... >> > https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >> >> >>  >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> MVPs and experts. ON SALE this month only  learn more at: >> http://p.sf.net/sfu/learnnowd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> > > 
From: Jens Lohne Eftang <jleftang@gm...>  20130129 16:25:09

Thanks; I'm happy with the way I do things now but at the very least I'll provide a misc example. How do I contribute that? Jens On 01/26/2013 09:17 AM, Roy Stogner wrote: > > On Fri, 25 Jan 2013, Jens Lohne Eftang wrote: > >> So I want to have an EquationSystems that holds two systems, one that is >> read from file, and one that is not. >> >> I tried a couple of things: >> >> Read system from file, then adding another system, then init() >> >> and >> >> add a system, then init(), and then read from file. >> >> None of this works and seems to, when I print_info(), duplicate the >> number of dofs in whatever system is inited twice. Also, if I add a >> vector to this system the size of that vector is twice as large as it >> should be. > >> What does seem to work is to first add a system, and then read from >> file, and not call init() at all. Is this the right way to do this? I >> guess it makes sense since read() also initializes ... > > I'd have said that the right ways to do things would be either the way > you ended up doing things, or read(), then add_system(), then > reinit(). I highly doubt we support that latter option currently, but > we've changed things in the past to add similar support for > addingvectorsafterinit, addingmatricesafterinit... I don't have > time to add similar support myself at the moment but I'd be willing to > help if you wanted to work on a patch. > > On the other hand, if the way you're doing things now works then that > should be fine. I'd still suggest contributing a short miscellaneous > example program that exercises that functionality, though; it's merely > good luck that it's working now and you might not want to rely on > continued good luck alone to prevent regressions. >  > Roy 
From: Kyunghoon Lee <aeronova.mailing@gm...>  20130128 04:42:22

Thanks for the comments. I'm not sure whether I can pull it off, but I'll try. K. Lee. On Mon, Jan 28, 2013 at 5:25 AM, David Knezevic <dknezevic@...>wrote: > Hi K, > > It doesn't matter how you get the lift function. If you can construct u0 > "by hand" then that's fine, but it may not always be so easy, e.g. if > the domain is nontrivial. Solving a laplace problem will work in > general. To do this just follow introduction_ex4 (which already has > nonhomogeneous Dirichlet BCs). > > Re this: > > On 01/26/2013 07:23 PM, Kyunghoon Lee wrote: > > Overall it looks like a nested problem  solving a Laplace equation > > inside of a reduced basis model construction. I wonder if you'd suggest > > some relevant examples/codes regarding the lift function creation. > > Well, you solve the Laplace problem (as in introduction_ex4), store the > result, then do the RB stuff. > > David > > > > > > > > > Best, > > K. Lee. > > > > On Sun, Jan 27, 2013 at 1:43 AM, David Knezevic > > <dknezevic@...>wrote: > > > >> To create the lift function, probably the simplest thing to do is solve > >> a Laplace equation (\Laplacian u = 0) with the Dirichlet boundary > >> conditions that you want, and then use the solution as your u0. This > >> process is called "elliptic lifting" since the Laplace equation is an > >> elliptic PDE. > >> > >> Then to assemble a(u0,v), you need to do something like what you wrote. > >> But the code can be simplified a bit; you don't need to compute Ke and > >> then multiply. You can just get the gradient of u0 directly (by > >> multiplying the coefficients of u0 with c.interior_gradient) and then > >> integrate. > >> > >> David > >> > >> > >> > >> On 01/26/2013 06:14 AM, Kyunghoon Lee wrote: > >>> Thanks for the reply. Now I'd appreciate if you'd help me with the > >>> implementation of a(u0,v). I was thinking of computing Ke*u0 where Ke > is > >>> the stiffness matrix and u0 is the lift function as below: > >>> > >>> //inhomogeneous Dirichlet BC > >>> struct IDBCAssembly : ElemAssembly { > >>> > >>> short unsigned int sbd_id; > >>> IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) {} > >>> > >>> virtual void interior_assembly(FEMContext &c) { > >>> > >>> const unsigned int u_var = 0; > >>> const std::vector<Real> &JxW = > >>> c.element_fe_var[u_var]>get_JxW(); > >>> const std::vector<std::vector<RealGradient> >& dphi = > >>> c.element_fe_var[u_var]>get_dphi(); > >>> > >>> const unsigned int n_u_dofs = > >> c.dof_indices_var[u_var].size(); > >>> unsigned int n_qpoints = c.element_qrule>n_points(); > >>> > >>> // stiffness matrix Ke > >>> std::vector<std::vector<Number> > Ke(n_u_dofs, > >>> std::vector<Number>(n_u_dofs)); > >>> for (unsigned int qp=0; qp != n_qpoints; qp++) > >>> for (unsigned int i=0; i != n_u_dofs; i++) > >>> for (unsigned int j=0; j != n_u_dofs; j++) > >>> Ke[i][j] += JxW[qp] * dphi[j][qp] * > dphi[i][qp]; > >>> > >>> // lift function u0 > >>> std::vector<Number> u0(n_u_dofs, 0.0); > >>> > >>> // multiply stiffness matrix by lift function > >>> for (unsigned int qp=0; qp != n_qpoints; qp++) > >>> for (unsigned int i=0; i != n_u_dofs; i++) > >>> for (unsigned int j=0; j != n_u_dofs; j++) > >>> c.elem_residual(i) += Ke[i][j] * u0[j]; > >>> } // end of interior_assembly > >>> }; > >>> > >>> However, I'm not sure of how to create the lift function u0 such that > it > >>> has values for given boundary ID and zeros for elsewhere. I think I > need > >>> to the following: > >>> > >>> iterate nodes > >>> if node belongs to the given boundary ID, set u0(i) = u0_given; > otherwise > >>> u(i) = 0.0 > >>> > >>> but I'm not sure of how to check whether a node is associated with > >> boundary > >>> ID. Can you help me with this problem, plz? (or are there examples > >> related > >>> to this issue?) > >>> > >>> Best, > >>> K. Lee. > >>> > >>> > >>> On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic < > >> dknezevic@... > >>>> wrote: > >>>> Yep, that's right, use the RB method to solve for u'. > >>>> > >>>> Note that you put a(u0,v) on the righthand side, since u0 is known > >>>> (it's the "lifting function"). > >>>> > >>>> David > >>>> > >>>> > >>>> > >>>> On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: > >>>>> Thanks for clearing it up. Then I guess we just solve for u' > >>>>> > >>>>> a(u',v) + a(u0,v) = f(v) > >>>>> > >>>>> and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then > >> restore u > >>>>> by u = u' + u0. > >>>>> > >>>>> K. Lee. > >>>>> > >>>>> On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < > >>>> dknezevic@... > >>>>>> wrote: > >>>>>> Hi K, > >>>>>> > >>>>>> heterogeneously_constrain_element_matrix_and_vector is not relevant > to > >>>>>> Reduced Basis stuff. For Reduced Basis formulations, you have to > >>>>>> transform the problem using a lifting function so that it has zero > >>>>>> Dirichlet BC's  this is essential since you want your Reduced > Basis > >>>>>> space to be a vector space, i.e. it must contain 0 (which would be > not > >>>>>> be the case with nonzero Dirichlet BCs). This lifting function > >> approach > >>>>>> is what you described in your email already, so that's fine. > >>>>>> > >>>>>> Once you've transformed your problem using a lifting function, then > >> you > >>>>>> just proceed as normal, e.g. as in reduced_basis_ex1. The only trick > >> is > >>>>>> you have to add your lifting function back on at the end to recover > u > >>>>>> from u'. > >>>>>> > >>>>>> David > >>>>>> > >>>>>> > >>>>>> > >>>>>> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: > >>>>>>> Hi all, > >>>>>>> > >>>>>>> In my previous email regarding inhomogeneous Dirichlet boundary > >>>>>> conditions, > >>>>>>> David suggested using > >>>> heterogenously_constrain_element_matrix_and_vector > >>>>>> in > >>>>>>> introduction_ex4, but I'm not sure of how to deal with > inhomogeneous > >>>>>>> Dirichlet BCs in connection with reduced basis models. Suppose we > >>>> have a > >>>>>>> simple steady state heat conduction model whose BCs are u = T on > >> \Gamma > >>>>>> and > >>>>>>> u = 0 on the rest surfaces. After variable change, we solve > >>>>>>> > >>>>>>> a(u',v) = f(v)  a(u0,v) > >>>>>>> > >>>>>>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and > 2) > >>>> u0 > >>>>>> = > >>>>>>> T on \Gamma and u0 = zero on the rest surfaces. I thought we build > >> the > >>>>>> LHS > >>>>>>> then call attach_F_assembly to attach it, but in that case, I'm not > >>>> sure > >>>>>>> how heterogenously_constrain_element_matrix_and_vector can be used. > >> Or > >>>>>>> should we attach a(u',v) and f(v) as usual then call > >>>>>>> heterogenously_constrain_element_matrix_and_vector to impose  > >> a(u0,v) > >>>> on > >>>>>>> the LHS? I'd appreciate if someone can briefly describe how the > >>>> function > >>>>>>> work. > >>>>>>> > >>>>>>> Regards, > >>>>>>> K. Lee. > >>>>>>> > >> >  > >>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, > CSS, > >>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills > >> current > >>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>>>>>> MVPs and experts. ON SALE this month only  learn more at: > >>>>>>> http://p.sf.net/sfu/learnnowd2d > >>>>>>> _______________________________________________ > >>>>>>> Libmeshusers mailing list > >>>>>>> Libmeshusers@... > >>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >>>>>> > >> >  > >>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, > CSS, > >>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills > >> current > >>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>>>>> MVPs and experts. ON SALE this month only  learn more at: > >>>>>> http://p.sf.net/sfu/learnnowd2d > >>>>>> _______________________________________________ > >>>>>> Libmeshusers mailing list > >>>>>> Libmeshusers@... > >>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >>>>>> > >> >  > >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills > current > >>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>>>> MVPs and experts. ON SALE this month only  learn more at: > >>>>> http://p.sf.net/sfu/learnnowd2d > >>>>> _______________________________________________ > >>>>> Libmeshusers mailing list > >>>>> Libmeshusers@... > >>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >>>> > >>>> > >> >  > >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills > current > >>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>>> MVPs and experts. ON SALE this month only  learn more at: > >>>> http://p.sf.net/sfu/learnnowd2d > >>>> _______________________________________________ > >>>> Libmeshusers mailing list > >>>> Libmeshusers@... > >>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >>>> > >> >  > >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>> MVPs and experts. ON SALE this month only  learn more at: > >>> http://p.sf.net/sfu/learnnowd2d > >>> _______________________________________________ > >>> Libmeshusers mailing list > >>> Libmeshusers@... > >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >> > >> > >> >  > >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >> MVPs and experts. ON SALE this month only  learn more at: > >> http://p.sf.net/sfu/learnnowd2d > >> _______________________________________________ > >> Libmeshusers mailing list > >> Libmeshusers@... > >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >> > > >  > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > > MVPs and experts. ON SALE this month only  learn more at: > > http://p.sf.net/sfu/learnnowd2d > > _______________________________________________ > > Libmeshusers mailing list > > Libmeshusers@... > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: Roy Stogner <roystgnr@ic...>  20130128 00:10:42

On Sun, 27 Jan 2013, Roy Stogner wrote: > > On Sun, 27 Jan 2013, Paul T. Bauman wrote: > >> I see the docs say that MeshBase::point_locator() is a deprecated function. >> Is there an alternative to this function that's not deprecated? I have a >> need for exactly this functionality  locating an element at specific point >> (actually a handful of points) that isn't known until run time. > > There's some "sublocator" function in there that's threadsafe > > Sorry can't be more specific, leaving in a hurry Okay, sorry, back. Check out the use of MeshBase::sub_point_locator() in constructing periodic boundary conditions for a good example. The trick is to first call that method *outside* of any threaded code so that the threadunsafe construction of the master locator occurs, then you can call it from any thread and get a sublocator. If you reinit() and it changes the mesh then you'll have to reconstruct the master locator afterwards.  Roy 
From: Roy Stogner <roystgnr@ic...>  20130127 22:31:22

On Sun, 27 Jan 2013, Paul T. Bauman wrote: > I see the docs say that MeshBase::point_locator() is a deprecated function. > Is there an alternative to this function that's not deprecated? I have a > need for exactly this functionality  locating an element at specific point > (actually a handful of points) that isn't known until run time. There's some "sublocator" function in there that's threadsafe Sorry can't be more specific, leaving in a hurry  Roy 
From: David Knezevic <dknezevic@se...>  20130127 21:25:51

Hi K, It doesn't matter how you get the lift function. If you can construct u0 "by hand" then that's fine, but it may not always be so easy, e.g. if the domain is nontrivial. Solving a laplace problem will work in general. To do this just follow introduction_ex4 (which already has nonhomogeneous Dirichlet BCs). Re this: On 01/26/2013 07:23 PM, Kyunghoon Lee wrote: > Overall it looks like a nested problem  solving a Laplace equation > inside of a reduced basis model construction. I wonder if you'd suggest > some relevant examples/codes regarding the lift function creation. Well, you solve the Laplace problem (as in introduction_ex4), store the result, then do the RB stuff. David > > Best, > K. Lee. > > On Sun, Jan 27, 2013 at 1:43 AM, David Knezevic > <dknezevic@...>wrote: > >> To create the lift function, probably the simplest thing to do is solve >> a Laplace equation (\Laplacian u = 0) with the Dirichlet boundary >> conditions that you want, and then use the solution as your u0. This >> process is called "elliptic lifting" since the Laplace equation is an >> elliptic PDE. >> >> Then to assemble a(u0,v), you need to do something like what you wrote. >> But the code can be simplified a bit; you don't need to compute Ke and >> then multiply. You can just get the gradient of u0 directly (by >> multiplying the coefficients of u0 with c.interior_gradient) and then >> integrate. >> >> David >> >> >> >> On 01/26/2013 06:14 AM, Kyunghoon Lee wrote: >>> Thanks for the reply. Now I'd appreciate if you'd help me with the >>> implementation of a(u0,v). I was thinking of computing Ke*u0 where Ke is >>> the stiffness matrix and u0 is the lift function as below: >>> >>> //inhomogeneous Dirichlet BC >>> struct IDBCAssembly : ElemAssembly { >>> >>> short unsigned int sbd_id; >>> IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) {} >>> >>> virtual void interior_assembly(FEMContext &c) { >>> >>> const unsigned int u_var = 0; >>> const std::vector<Real> &JxW = >>> c.element_fe_var[u_var]>get_JxW(); >>> const std::vector<std::vector<RealGradient> >& dphi = >>> c.element_fe_var[u_var]>get_dphi(); >>> >>> const unsigned int n_u_dofs = >> c.dof_indices_var[u_var].size(); >>> unsigned int n_qpoints = c.element_qrule>n_points(); >>> >>> // stiffness matrix Ke >>> std::vector<std::vector<Number> > Ke(n_u_dofs, >>> std::vector<Number>(n_u_dofs)); >>> for (unsigned int qp=0; qp != n_qpoints; qp++) >>> for (unsigned int i=0; i != n_u_dofs; i++) >>> for (unsigned int j=0; j != n_u_dofs; j++) >>> Ke[i][j] += JxW[qp] * dphi[j][qp] * dphi[i][qp]; >>> >>> // lift function u0 >>> std::vector<Number> u0(n_u_dofs, 0.0); >>> >>> // multiply stiffness matrix by lift function >>> for (unsigned int qp=0; qp != n_qpoints; qp++) >>> for (unsigned int i=0; i != n_u_dofs; i++) >>> for (unsigned int j=0; j != n_u_dofs; j++) >>> c.elem_residual(i) += Ke[i][j] * u0[j]; >>> } // end of interior_assembly >>> }; >>> >>> However, I'm not sure of how to create the lift function u0 such that it >>> has values for given boundary ID and zeros for elsewhere. I think I need >>> to the following: >>> >>> iterate nodes >>> if node belongs to the given boundary ID, set u0(i) = u0_given; otherwise >>> u(i) = 0.0 >>> >>> but I'm not sure of how to check whether a node is associated with >> boundary >>> ID. Can you help me with this problem, plz? (or are there examples >> related >>> to this issue?) >>> >>> Best, >>> K. Lee. >>> >>> >>> On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic < >> dknezevic@... >>>> wrote: >>>> Yep, that's right, use the RB method to solve for u'. >>>> >>>> Note that you put a(u0,v) on the righthand side, since u0 is known >>>> (it's the "lifting function"). >>>> >>>> David >>>> >>>> >>>> >>>> On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: >>>>> Thanks for clearing it up. Then I guess we just solve for u' >>>>> >>>>> a(u',v) + a(u0,v) = f(v) >>>>> >>>>> and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then >> restore u >>>>> by u = u' + u0. >>>>> >>>>> K. Lee. >>>>> >>>>> On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < >>>> dknezevic@... >>>>>> wrote: >>>>>> Hi K, >>>>>> >>>>>> heterogeneously_constrain_element_matrix_and_vector is not relevant to >>>>>> Reduced Basis stuff. For Reduced Basis formulations, you have to >>>>>> transform the problem using a lifting function so that it has zero >>>>>> Dirichlet BC's  this is essential since you want your Reduced Basis >>>>>> space to be a vector space, i.e. it must contain 0 (which would be not >>>>>> be the case with nonzero Dirichlet BCs). This lifting function >> approach >>>>>> is what you described in your email already, so that's fine. >>>>>> >>>>>> Once you've transformed your problem using a lifting function, then >> you >>>>>> just proceed as normal, e.g. as in reduced_basis_ex1. The only trick >> is >>>>>> you have to add your lifting function back on at the end to recover u >>>>>> from u'. >>>>>> >>>>>> David >>>>>> >>>>>> >>>>>> >>>>>> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: >>>>>>> Hi all, >>>>>>> >>>>>>> In my previous email regarding inhomogeneous Dirichlet boundary >>>>>> conditions, >>>>>>> David suggested using >>>> heterogenously_constrain_element_matrix_and_vector >>>>>> in >>>>>>> introduction_ex4, but I'm not sure of how to deal with inhomogeneous >>>>>>> Dirichlet BCs in connection with reduced basis models. Suppose we >>>> have a >>>>>>> simple steady state heat conduction model whose BCs are u = T on >> \Gamma >>>>>> and >>>>>>> u = 0 on the rest surfaces. After variable change, we solve >>>>>>> >>>>>>> a(u',v) = f(v)  a(u0,v) >>>>>>> >>>>>>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) >>>> u0 >>>>>> = >>>>>>> T on \Gamma and u0 = zero on the rest surfaces. I thought we build >> the >>>>>> LHS >>>>>>> then call attach_F_assembly to attach it, but in that case, I'm not >>>> sure >>>>>>> how heterogenously_constrain_element_matrix_and_vector can be used. >> Or >>>>>>> should we attach a(u',v) and f(v) as usual then call >>>>>>> heterogenously_constrain_element_matrix_and_vector to impose  >> a(u0,v) >>>> on >>>>>>> the LHS? I'd appreciate if someone can briefly describe how the >>>> function >>>>>>> work. >>>>>>> >>>>>>> Regards, >>>>>>> K. Lee. >>>>>>> >>  >>>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> current >>>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>>> _______________________________________________ >>>>>>> Libmeshusers mailing list >>>>>>> Libmeshusers@... >>>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>>> >>  >>>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills >> current >>>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>>> http://p.sf.net/sfu/learnnowd2d >>>>>> _______________________________________________ >>>>>> Libmeshusers mailing list >>>>>> Libmeshusers@... >>>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>>>> >>  >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>> http://p.sf.net/sfu/learnnowd2d >>>>> _______________________________________________ >>>>> Libmeshusers mailing list >>>>> Libmeshusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>> >>>> >>  >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>> MVPs and experts. ON SALE this month only  learn more at: >>>> http://p.sf.net/sfu/learnnowd2d >>>> _______________________________________________ >>>> Libmeshusers mailing list >>>> Libmeshusers@... >>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>> >>  >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only  learn more at: >>> http://p.sf.net/sfu/learnnowd2d >>> _______________________________________________ >>> Libmeshusers mailing list >>> Libmeshusers@... >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >> >>  >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> MVPs and experts. ON SALE this month only  learn more at: >> http://p.sf.net/sfu/learnnowd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Paul T. Bauman <ptbauman@gm...>  20130127 19:30:21

All, I see the docs say that MeshBase::point_locator() is a deprecated function. Is there an alternative to this function that's not deprecated? I have a need for exactly this functionality  locating an element at specific point (actually a handful of points) that isn't known until run time. Thanks, Paul 
From: Roy Stogner <roystgnr@ic...>  20130127 14:51:52

On Sat, 26 Jan 2013, Saurabh Srivastava wrote: > I recently switched to Libmesh 0.9xx and after quite some tweaks I was able to compile my code, > however I am baffled to witness the following when my program is run,,, > > EquationSystems > n_systems()=1 > System #0, "NavierStokes" > Type "TransientLinearImplicit" > Variables={ "u" "v" } "p" > Finite Element Types="HIERARCHIC", "JACOBI_20_00" "L2_HIERARCHIC", "JACOBI_20_00" > Infinite Element Mapping="CARTESIAN" "CARTESIAN" > Approximation Orders="THIRD", "THIRD" "SECOND", "THIRD" > n_dofs()=290 > n_local_dofs()=290 > > what intrigues me is "Jacobi_20_000" I only inserted 'u' 'v' and 'p' as Hierarchich and > L2_Hierarchic and hence not sure why those extra FE types are being picked? looks like they > correspond to infinite element types! while I have none implemented in my code. You have no infinite elements, but the EquationSystems doesn't know that. It's just telling you the approximation it would use if it were to run across any infinite elements in your Mesh.  Roy 
From: Kyunghoon Lee <aeronova.mailing@gm...>  20130127 00:23:18

Hi David, I'm afraid creating a lift function is much more complicated than I thought. I'm not sure why we need to solve a Laplace equation since we already know what the lift function looks like  some values on the nodes of the inhomogeneous Dirichlet BC and zeros elsewhere. I guess it would be much easier to directly set up a lift function by checking whether a node belongs to the inhomogeneous Dirichlet BC. Is this because we cannot create a lift function in that way? Anyway, If I follow what you suggest, I guess I need to do the following steps. 1. obtain u0 by solving a Laplace equation with inhomogeneous Dirichlet BC  maybe I can refer to introduction_ex3 for solving a Laplace equation, but somehow I need to deal with inhomogeneous Dirichlet BC by using heterogeneously_constrain_element_matrix_and_vector ? 2. assemble a(u0,v) by integrating the gradient of u0 Overall it looks like a nested problem  solving a Laplace equation inside of a reduced basis model construction. I wonder if you'd suggest some relevant examples/codes regarding the lift function creation. Best, K. Lee. On Sun, Jan 27, 2013 at 1:43 AM, David Knezevic <dknezevic@...>wrote: > To create the lift function, probably the simplest thing to do is solve > a Laplace equation (\Laplacian u = 0) with the Dirichlet boundary > conditions that you want, and then use the solution as your u0. This > process is called "elliptic lifting" since the Laplace equation is an > elliptic PDE. > > Then to assemble a(u0,v), you need to do something like what you wrote. > But the code can be simplified a bit; you don't need to compute Ke and > then multiply. You can just get the gradient of u0 directly (by > multiplying the coefficients of u0 with c.interior_gradient) and then > integrate. > > David > > > > On 01/26/2013 06:14 AM, Kyunghoon Lee wrote: > > Thanks for the reply. Now I'd appreciate if you'd help me with the > > implementation of a(u0,v). I was thinking of computing Ke*u0 where Ke is > > the stiffness matrix and u0 is the lift function as below: > > > > //inhomogeneous Dirichlet BC > > struct IDBCAssembly : ElemAssembly { > > > > short unsigned int sbd_id; > > IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) {} > > > > virtual void interior_assembly(FEMContext &c) { > > > > const unsigned int u_var = 0; > > const std::vector<Real> &JxW = > > c.element_fe_var[u_var]>get_JxW(); > > const std::vector<std::vector<RealGradient> >& dphi = > > c.element_fe_var[u_var]>get_dphi(); > > > > const unsigned int n_u_dofs = > c.dof_indices_var[u_var].size(); > > unsigned int n_qpoints = c.element_qrule>n_points(); > > > > // stiffness matrix Ke > > std::vector<std::vector<Number> > Ke(n_u_dofs, > > std::vector<Number>(n_u_dofs)); > > for (unsigned int qp=0; qp != n_qpoints; qp++) > > for (unsigned int i=0; i != n_u_dofs; i++) > > for (unsigned int j=0; j != n_u_dofs; j++) > > Ke[i][j] += JxW[qp] * dphi[j][qp] * dphi[i][qp]; > > > > // lift function u0 > > std::vector<Number> u0(n_u_dofs, 0.0); > > > > // multiply stiffness matrix by lift function > > for (unsigned int qp=0; qp != n_qpoints; qp++) > > for (unsigned int i=0; i != n_u_dofs; i++) > > for (unsigned int j=0; j != n_u_dofs; j++) > > c.elem_residual(i) += Ke[i][j] * u0[j]; > > } // end of interior_assembly > > }; > > > > However, I'm not sure of how to create the lift function u0 such that it > > has values for given boundary ID and zeros for elsewhere. I think I need > > to the following: > > > > iterate nodes > > if node belongs to the given boundary ID, set u0(i) = u0_given; otherwise > > u(i) = 0.0 > > > > but I'm not sure of how to check whether a node is associated with > boundary > > ID. Can you help me with this problem, plz? (or are there examples > related > > to this issue?) > > > > Best, > > K. Lee. > > > > > > On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic < > dknezevic@... > >> wrote: > >> Yep, that's right, use the RB method to solve for u'. > >> > >> Note that you put a(u0,v) on the righthand side, since u0 is known > >> (it's the "lifting function"). > >> > >> David > >> > >> > >> > >> On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: > >>> Thanks for clearing it up. Then I guess we just solve for u' > >>> > >>> a(u',v) + a(u0,v) = f(v) > >>> > >>> and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then > restore u > >>> by u = u' + u0. > >>> > >>> K. Lee. > >>> > >>> On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < > >> dknezevic@... > >>>> wrote: > >>>> Hi K, > >>>> > >>>> heterogeneously_constrain_element_matrix_and_vector is not relevant to > >>>> Reduced Basis stuff. For Reduced Basis formulations, you have to > >>>> transform the problem using a lifting function so that it has zero > >>>> Dirichlet BC's  this is essential since you want your Reduced Basis > >>>> space to be a vector space, i.e. it must contain 0 (which would be not > >>>> be the case with nonzero Dirichlet BCs). This lifting function > approach > >>>> is what you described in your email already, so that's fine. > >>>> > >>>> Once you've transformed your problem using a lifting function, then > you > >>>> just proceed as normal, e.g. as in reduced_basis_ex1. The only trick > is > >>>> you have to add your lifting function back on at the end to recover u > >>>> from u'. > >>>> > >>>> David > >>>> > >>>> > >>>> > >>>> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: > >>>>> Hi all, > >>>>> > >>>>> In my previous email regarding inhomogeneous Dirichlet boundary > >>>> conditions, > >>>>> David suggested using > >> heterogenously_constrain_element_matrix_and_vector > >>>> in > >>>>> introduction_ex4, but I'm not sure of how to deal with inhomogeneous > >>>>> Dirichlet BCs in connection with reduced basis models. Suppose we > >> have a > >>>>> simple steady state heat conduction model whose BCs are u = T on > \Gamma > >>>> and > >>>>> u = 0 on the rest surfaces. After variable change, we solve > >>>>> > >>>>> a(u',v) = f(v)  a(u0,v) > >>>>> > >>>>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) > >> u0 > >>>> = > >>>>> T on \Gamma and u0 = zero on the rest surfaces. I thought we build > the > >>>> LHS > >>>>> then call attach_F_assembly to attach it, but in that case, I'm not > >> sure > >>>>> how heterogenously_constrain_element_matrix_and_vector can be used. > Or > >>>>> should we attach a(u',v) and f(v) as usual then call > >>>>> heterogenously_constrain_element_matrix_and_vector to impose  > a(u0,v) > >> on > >>>>> the LHS? I'd appreciate if someone can briefly describe how the > >> function > >>>>> work. > >>>>> > >>>>> Regards, > >>>>> K. Lee. > >>>>> > >> >  > >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills > current > >>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>>>> MVPs and experts. ON SALE this month only  learn more at: > >>>>> http://p.sf.net/sfu/learnnowd2d > >>>>> _______________________________________________ > >>>>> Libmeshusers mailing list > >>>>> Libmeshusers@... > >>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >>>> > >>>> > >> >  > >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills > current > >>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>>> MVPs and experts. ON SALE this month only  learn more at: > >>>> http://p.sf.net/sfu/learnnowd2d > >>>> _______________________________________________ > >>>> Libmeshusers mailing list > >>>> Libmeshusers@... > >>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >>>> > >> >  > >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>> MVPs and experts. ON SALE this month only  learn more at: > >>> http://p.sf.net/sfu/learnnowd2d > >>> _______________________________________________ > >>> Libmeshusers mailing list > >>> Libmeshusers@... > >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >> > >> > >> >  > >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >> MVPs and experts. ON SALE this month only  learn more at: > >> http://p.sf.net/sfu/learnnowd2d > >> _______________________________________________ > >> Libmeshusers mailing list > >> Libmeshusers@... > >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >> > > >  > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > > MVPs and experts. ON SALE this month only  learn more at: > > http://p.sf.net/sfu/learnnowd2d > > _______________________________________________ > > Libmeshusers mailing list > > Libmeshusers@... > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: David Knezevic <dknezevic@se...>  20130126 17:43:12

To create the lift function, probably the simplest thing to do is solve a Laplace equation (\Laplacian u = 0) with the Dirichlet boundary conditions that you want, and then use the solution as your u0. This process is called "elliptic lifting" since the Laplace equation is an elliptic PDE. Then to assemble a(u0,v), you need to do something like what you wrote. But the code can be simplified a bit; you don't need to compute Ke and then multiply. You can just get the gradient of u0 directly (by multiplying the coefficients of u0 with c.interior_gradient) and then integrate. David On 01/26/2013 06:14 AM, Kyunghoon Lee wrote: > Thanks for the reply. Now I'd appreciate if you'd help me with the > implementation of a(u0,v). I was thinking of computing Ke*u0 where Ke is > the stiffness matrix and u0 is the lift function as below: > > //inhomogeneous Dirichlet BC > struct IDBCAssembly : ElemAssembly { > > short unsigned int sbd_id; > IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) {} > > virtual void interior_assembly(FEMContext &c) { > > const unsigned int u_var = 0; > const std::vector<Real> &JxW = > c.element_fe_var[u_var]>get_JxW(); > const std::vector<std::vector<RealGradient> >& dphi = > c.element_fe_var[u_var]>get_dphi(); > > const unsigned int n_u_dofs = c.dof_indices_var[u_var].size(); > unsigned int n_qpoints = c.element_qrule>n_points(); > > // stiffness matrix Ke > std::vector<std::vector<Number> > Ke(n_u_dofs, > std::vector<Number>(n_u_dofs)); > for (unsigned int qp=0; qp != n_qpoints; qp++) > for (unsigned int i=0; i != n_u_dofs; i++) > for (unsigned int j=0; j != n_u_dofs; j++) > Ke[i][j] += JxW[qp] * dphi[j][qp] * dphi[i][qp]; > > // lift function u0 > std::vector<Number> u0(n_u_dofs, 0.0); > > // multiply stiffness matrix by lift function > for (unsigned int qp=0; qp != n_qpoints; qp++) > for (unsigned int i=0; i != n_u_dofs; i++) > for (unsigned int j=0; j != n_u_dofs; j++) > c.elem_residual(i) += Ke[i][j] * u0[j]; > } // end of interior_assembly > }; > > However, I'm not sure of how to create the lift function u0 such that it > has values for given boundary ID and zeros for elsewhere. I think I need > to the following: > > iterate nodes > if node belongs to the given boundary ID, set u0(i) = u0_given; otherwise > u(i) = 0.0 > > but I'm not sure of how to check whether a node is associated with boundary > ID. Can you help me with this problem, plz? (or are there examples related > to this issue?) > > Best, > K. Lee. > > > On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic <dknezevic@... >> wrote: >> Yep, that's right, use the RB method to solve for u'. >> >> Note that you put a(u0,v) on the righthand side, since u0 is known >> (it's the "lifting function"). >> >> David >> >> >> >> On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: >>> Thanks for clearing it up. Then I guess we just solve for u' >>> >>> a(u',v) + a(u0,v) = f(v) >>> >>> and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then restore u >>> by u = u' + u0. >>> >>> K. Lee. >>> >>> On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < >> dknezevic@... >>>> wrote: >>>> Hi K, >>>> >>>> heterogeneously_constrain_element_matrix_and_vector is not relevant to >>>> Reduced Basis stuff. For Reduced Basis formulations, you have to >>>> transform the problem using a lifting function so that it has zero >>>> Dirichlet BC's  this is essential since you want your Reduced Basis >>>> space to be a vector space, i.e. it must contain 0 (which would be not >>>> be the case with nonzero Dirichlet BCs). This lifting function approach >>>> is what you described in your email already, so that's fine. >>>> >>>> Once you've transformed your problem using a lifting function, then you >>>> just proceed as normal, e.g. as in reduced_basis_ex1. The only trick is >>>> you have to add your lifting function back on at the end to recover u >>>> from u'. >>>> >>>> David >>>> >>>> >>>> >>>> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: >>>>> Hi all, >>>>> >>>>> In my previous email regarding inhomogeneous Dirichlet boundary >>>> conditions, >>>>> David suggested using >> heterogenously_constrain_element_matrix_and_vector >>>> in >>>>> introduction_ex4, but I'm not sure of how to deal with inhomogeneous >>>>> Dirichlet BCs in connection with reduced basis models. Suppose we >> have a >>>>> simple steady state heat conduction model whose BCs are u = T on \Gamma >>>> and >>>>> u = 0 on the rest surfaces. After variable change, we solve >>>>> >>>>> a(u',v) = f(v)  a(u0,v) >>>>> >>>>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) >> u0 >>>> = >>>>> T on \Gamma and u0 = zero on the rest surfaces. I thought we build the >>>> LHS >>>>> then call attach_F_assembly to attach it, but in that case, I'm not >> sure >>>>> how heterogenously_constrain_element_matrix_and_vector can be used. Or >>>>> should we attach a(u',v) and f(v) as usual then call >>>>> heterogenously_constrain_element_matrix_and_vector to impose  a(u0,v) >> on >>>>> the LHS? I'd appreciate if someone can briefly describe how the >> function >>>>> work. >>>>> >>>>> Regards, >>>>> K. Lee. >>>>> >>  >>>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>>> MVPs and experts. ON SALE this month only  learn more at: >>>>> http://p.sf.net/sfu/learnnowd2d >>>>> _______________________________________________ >>>>> Libmeshusers mailing list >>>>> Libmeshusers@... >>>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>> >>>> >>  >>>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>>> MVPs and experts. ON SALE this month only  learn more at: >>>> http://p.sf.net/sfu/learnnowd2d >>>> _______________________________________________ >>>> Libmeshusers mailing list >>>> Libmeshusers@... >>>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >>>> >>  >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only  learn more at: >>> http://p.sf.net/sfu/learnnowd2d >>> _______________________________________________ >>> Libmeshusers mailing list >>> Libmeshusers@... >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >> >>  >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> MVPs and experts. ON SALE this month only  learn more at: >> http://p.sf.net/sfu/learnnowd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Roy Stogner <roystgnr@ic...>  20130126 14:17:31

On Fri, 25 Jan 2013, Jens Lohne Eftang wrote: > So I want to have an EquationSystems that holds two systems, one that is > read from file, and one that is not. > > I tried a couple of things: > > Read system from file, then adding another system, then init() > > and > > add a system, then init(), and then read from file. > > None of this works and seems to, when I print_info(), duplicate the > number of dofs in whatever system is inited twice. Also, if I add a > vector to this system the size of that vector is twice as large as it > should be. > What does seem to work is to first add a system, and then read from > file, and not call init() at all. Is this the right way to do this? I > guess it makes sense since read() also initializes ... I'd have said that the right ways to do things would be either the way you ended up doing things, or read(), then add_system(), then reinit(). I highly doubt we support that latter option currently, but we've changed things in the past to add similar support for addingvectorsafterinit, addingmatricesafterinit... I don't have time to add similar support myself at the moment but I'd be willing to help if you wanted to work on a patch. On the other hand, if the way you're doing things now works then that should be fine. I'd still suggest contributing a short miscellaneous example program that exercises that functionality, though; it's merely good luck that it's working now and you might not want to rely on continued good luck alone to prevent regressions.  Roy 
From: Kyunghoon Lee <aeronova.mailing@gm...>  20130126 11:14:22

Thanks for the reply. Now I'd appreciate if you'd help me with the implementation of a(u0,v). I was thinking of computing Ke*u0 where Ke is the stiffness matrix and u0 is the lift function as below: //inhomogeneous Dirichlet BC struct IDBCAssembly : ElemAssembly { short unsigned int sbd_id; IDBCAssembly(short unsigned int sbd_id_in) : sbd_id(sbd_id_in) {} virtual void interior_assembly(FEMContext &c) { const unsigned int u_var = 0; const std::vector<Real> &JxW = c.element_fe_var[u_var]>get_JxW(); const std::vector<std::vector<RealGradient> >& dphi = c.element_fe_var[u_var]>get_dphi(); const unsigned int n_u_dofs = c.dof_indices_var[u_var].size(); unsigned int n_qpoints = c.element_qrule>n_points(); // stiffness matrix Ke std::vector<std::vector<Number> > Ke(n_u_dofs, std::vector<Number>(n_u_dofs)); for (unsigned int qp=0; qp != n_qpoints; qp++) for (unsigned int i=0; i != n_u_dofs; i++) for (unsigned int j=0; j != n_u_dofs; j++) Ke[i][j] += JxW[qp] * dphi[j][qp] * dphi[i][qp]; // lift function u0 std::vector<Number> u0(n_u_dofs, 0.0); // multiply stiffness matrix by lift function for (unsigned int qp=0; qp != n_qpoints; qp++) for (unsigned int i=0; i != n_u_dofs; i++) for (unsigned int j=0; j != n_u_dofs; j++) c.elem_residual(i) += Ke[i][j] * u0[j]; } // end of interior_assembly }; However, I'm not sure of how to create the lift function u0 such that it has values for given boundary ID and zeros for elsewhere. I think I need to the following: iterate nodes if node belongs to the given boundary ID, set u0(i) = u0_given; otherwise u(i) = 0.0 but I'm not sure of how to check whether a node is associated with boundary ID. Can you help me with this problem, plz? (or are there examples related to this issue?) Best, K. Lee. On Fri, Jan 25, 2013 at 12:38 PM, David Knezevic <dknezevic@... > wrote: > Yep, that's right, use the RB method to solve for u'. > > Note that you put a(u0,v) on the righthand side, since u0 is known > (it's the "lifting function"). > > David > > > > On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: > > Thanks for clearing it up. Then I guess we just solve for u' > > > > a(u',v) + a(u0,v) = f(v) > > > > and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then restore u > > by u = u' + u0. > > > > K. Lee. > > > > On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic < > dknezevic@... > >> wrote: > >> Hi K, > >> > >> heterogeneously_constrain_element_matrix_and_vector is not relevant to > >> Reduced Basis stuff. For Reduced Basis formulations, you have to > >> transform the problem using a lifting function so that it has zero > >> Dirichlet BC's  this is essential since you want your Reduced Basis > >> space to be a vector space, i.e. it must contain 0 (which would be not > >> be the case with nonzero Dirichlet BCs). This lifting function approach > >> is what you described in your email already, so that's fine. > >> > >> Once you've transformed your problem using a lifting function, then you > >> just proceed as normal, e.g. as in reduced_basis_ex1. The only trick is > >> you have to add your lifting function back on at the end to recover u > >> from u'. > >> > >> David > >> > >> > >> > >> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: > >>> Hi all, > >>> > >>> In my previous email regarding inhomogeneous Dirichlet boundary > >> conditions, > >>> David suggested using > heterogenously_constrain_element_matrix_and_vector > >> in > >>> introduction_ex4, but I'm not sure of how to deal with inhomogeneous > >>> Dirichlet BCs in connection with reduced basis models. Suppose we > have a > >>> simple steady state heat conduction model whose BCs are u = T on \Gamma > >> and > >>> u = 0 on the rest surfaces. After variable change, we solve > >>> > >>> a(u',v) = f(v)  a(u0,v) > >>> > >>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) > u0 > >> = > >>> T on \Gamma and u0 = zero on the rest surfaces. I thought we build the > >> LHS > >>> then call attach_F_assembly to attach it, but in that case, I'm not > sure > >>> how heterogenously_constrain_element_matrix_and_vector can be used. Or > >>> should we attach a(u',v) and f(v) as usual then call > >>> heterogenously_constrain_element_matrix_and_vector to impose  a(u0,v) > on > >>> the LHS? I'd appreciate if someone can briefly describe how the > function > >>> work. > >>> > >>> Regards, > >>> K. Lee. > >>> > >> >  > >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >>> MVPs and experts. ON SALE this month only  learn more at: > >>> http://p.sf.net/sfu/learnnowd2d > >>> _______________________________________________ > >>> Libmeshusers mailing list > >>> Libmeshusers@... > >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >> > >> > >> >  > >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >> MVPs and experts. ON SALE this month only  learn more at: > >> http://p.sf.net/sfu/learnnowd2d > >> _______________________________________________ > >> Libmeshusers mailing list > >> Libmeshusers@... > >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > >> > > >  > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > > MVPs and experts. ON SALE this month only  learn more at: > > http://p.sf.net/sfu/learnnowd2d > > _______________________________________________ > > Libmeshusers mailing list > > Libmeshusers@... > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: Peter Zajac <peterzajac1@gm...>  20130126 05:35:35

Dear All, After analyzing both of the matrices (A and B) in matlab as John suggested, I found my B matrix had an empty row (as pointed out in the error message). Position of the row is related to the size of the mesh and type of element: using QUAD8: 2x2 mesh  B has an empty row at 18 from 21 dif: 3 3x3 mesh  B has an empty row at 34 from 40 dif: 6 4x4 mesh  B has an empty row at 56 from 65 dif: 9 5x5 mesh  B has an empty row at 84 from 96 dif: 12 using QUAD9 Quad9 2x2 mesh  B.m has an empty row at 21 from 25 dif: 4 3x3 mesh  B.m has an empty row at 31 from 49 dif: 8 .. I must be forgetting to add something when imposing the PBCs, If anyone sees it please let me know. Thank you Peter On Fri, Jan 25, 2013 at 4:48 AM, Nachiket Gokhale <gokhalen@...>wrote: > You might want to try using MUMPS for LU factorization. It is robust. > Petsc and SlepC make using it very easy. > > > > > On Jan 24, 2013, at 10:12 PM, David Knezevic <dknezevic@...> > wrote: > > > Hi Peter, > > > > You're using SLEPc, right? Have you tried using the LAPACK eigensolver > > via SLEPc (this tends to be very robust, but it treats the matrices as > > dense so only works for small problems). To do this, use the command > > line option: > > > > eps_type lapack > > > > David > > > > > > > > On 01/24/2013 03:29 PM, Peter Zajac wrote: > >> Hi Roy, > >> > >> after constraining the matrices I get the correct eigenvalues and > >> wavefunctions  thank you for helping me solve the problem. > >> > >> There is one last thing I wanted to ask. When I run the code now (with > the > >> constrains), despite obtaining the correct results I get the following > >> error message: > >> > >> [0]PETSC ERROR:  Error Message > >>  > >> [0]PETSC ERROR: Detected zero pivot in LU factorization: > >> see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! > >> [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in > >> permuted ordering 20! > >> [0]PETSC ERROR: > >>  > >> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 > 11:26:24 > >> CDT 2012 > >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. > >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > >> [0]PETSC ERROR: See docs/index.html for manual pages. > >> [0]PETSC ERROR: > >>  > >> [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter > Thu > >> Jan 24 09:25:57 2013 > >> [0]PETSC ERROR: Libraries linked from > >> /home/peter/petsc3.3p3/archlinux2cdebug/lib > >> [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 > >> [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 > >> [0]PETSC ERROR: > >>  > >> [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in > >> src/mat/impls/aij/seq/aijfact.c > >> [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in > >> src/mat/interface/matrix.c > >> [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c > >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > >> [0]PETSC ERROR: PCSetUp_Redundant() line 176 in > >> src/ksp/pc/impls/redundant/redundant.c > >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > >> [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c > >> [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c > >> [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c > >> [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c > >> [0]PETSC ERROR: SlepcAbs() line 486 in > >> "unknowndirectory/"src/solvers/slepc_eigen_solver.C > >> application called MPI_Abort(comm=0x84000000, 71)  process 0 > >> > >> According to the PETSC documentation zero pivot does not always mean the > >> matrix is singular and since I am getting the correct results I am > ignoring > >> the error. Could my ignorance in this case cause a serious problem in > the > >> future I should be aware of? > >> > >> thank you again > >> > >> best > >> > >> Peter Zajac > >> Computational Science Research Center > >> San Diego > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@... > >wrote: > >> > >>> On Wed, 23 Jan 2013, Peter Zajac wrote: > >>> > >>> I am not applying the constraint matrices inside the assemble_mass() > >>>> function. How exactly should I do that? > >>>> > >>> See the constrain_element_* calls in the example codes. They're > >>> usually important in the context of hanging node constraints, but the > >>> periodic boundary constraints work the same way. (and any > >>> DirichletBoundaries work nearly the same way, if you're currently > >>> using penalty Dirichlet BCs and want to switch) > >>>  > >>> Roy > >>> > >> >  > >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > >> MVPs and experts. ON SALE this month only  learn more at: > >> http://p.sf.net/sfu/learnnowd2d > >> _______________________________________________ > >> Libmeshusers mailing list > >> Libmeshusers@... > >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > > > > > > >  > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > > MVPs and experts. ON SALE this month only  learn more at: > > http://p.sf.net/sfu/learnnowd2d > > _______________________________________________ > > Libmeshusers mailing list > > Libmeshusers@... > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: Jens Lohne Eftang <jleftang@gm...>  20130125 22:41:17

Re this: So I want to have an EquationSystems that holds two systems, one that is read from file, and one that is not. I tried a couple of things: Read system from file, then adding another system, then init() and add a system, then init(), and then read from file. None of this works and seems to, when I print_info(), duplicate the number of dofs in whatever system is inited twice. Also, if I add a vector to this system the size of that vector is twice as large as it should be. What does seem to work is to first add a system, and then read from file, and not call init() at all. Is this the right way to do this? I guess it makes sense since read() also initializes ... Best, Jens On 01/25/2013 02:02 PM, Jens Lohne Eftang wrote: > This was not quite accurate ... it should be: > > It seems that if I have an EquationSystems es and do es.read( ... ) > followed by es.init() followed by es.print_info(), the n_dofs in the > read system are counted twice. > > I know that read also does initialization, but I want to add more > systems to es, and hence I need to call es.init() after I've added > these additional systems. > > Any idea? > > Best, > Jens > > On 01/25/2013 02:00 PM, Jens Lohne Eftang wrote: >> All, >> >> It seems that if I have an EquationSystems es and do es.read( ... ) >> followed by es.init() or es.reinit() followed by es.print_info(), the >> n_dofs in the read system are counted twice. >> >> I know that read also does initialization, but I want to add more >> systems to es, and hence I need to call es.init() or es.reinit() >> after I've added these additional systems. >> >> Any idea? >> >> Best, >> Jens > 
From: Kirk, Benjamin (JSCEG311) <benjamin.kirk1@na...>  20130125 19:24:55

On Jan 25, 2013, at 1:12 PM, Jens Lohne Eftang <jleftang@...> wrote: > Has the default ordering changed from "vector component major" to "node > major" recently? The reason I ask is that if I loop over nodes in a mesh > and print out the indices for variable 0 in a scalar system and variable > 0 in a vector system (with 3 components) I get > > 0 0 > 1 3 > 2 6 > > etc ... > > > Best, > Jens This is the ordering required by the recent VariableGroups. If you rely on the old ordering, you can prevent your system from discovering variable groups via system.identify_variable_groups (false); Ben 
From: Jens Lohne Eftang <jleftang@gm...>  20130125 19:09:52

Hi all, Just a quick question related to dof ordering for vector problems: Has the default ordering changed from "vector component major" to "node major" recently? The reason I ask is that if I loop over nodes in a mesh and print out the indices for variable 0 in a scalar system and variable 0 in a vector system (with 3 components) I get 0 0 1 3 2 6 etc ... Best, Jens 
From: Jens Lohne Eftang <jleftang@gm...>  20130125 18:59:19

This was not quite accurate ... it should be: It seems that if I have an EquationSystems es and do es.read( ... ) followed by es.init() followed by es.print_info(), the n_dofs in the read system are counted twice. I know that read also does initialization, but I want to add more systems to es, and hence I need to call es.init() after I've added these additional systems. Any idea? Best, Jens On 01/25/2013 02:00 PM, Jens Lohne Eftang wrote: > All, > > It seems that if I have an EquationSystems es and do es.read( ... ) > followed by es.init() or es.reinit() followed by es.print_info(), the > n_dofs in the read system are counted twice. > > I know that read also does initialization, but I want to add more > systems to es, and hence I need to call es.init() or es.reinit() after > I've added these additional systems. > > Any idea? > > Best, > Jens 
From: Jens Lohne Eftang <jleftang@gm...>  20130125 18:57:38

All, It seems that if I have an EquationSystems es and do es.read( ... ) followed by es.init() or es.reinit() followed by es.print_info(), the n_dofs in the read system are counted twice. I know that read also does initialization, but I want to add more systems to es, and hence I need to call es.init() or es.reinit() after I've added these additional systems. Any idea? Best, Jens 
From: Nachiket Gokhale <gokhalen@gm...>  20130125 12:48:31

You might want to try using MUMPS for LU factorization. It is robust. Petsc and SlepC make using it very easy. On Jan 24, 2013, at 10:12 PM, David Knezevic <dknezevic@...> wrote: > Hi Peter, > > You're using SLEPc, right? Have you tried using the LAPACK eigensolver > via SLEPc (this tends to be very robust, but it treats the matrices as > dense so only works for small problems). To do this, use the command > line option: > > eps_type lapack > > David > > > > On 01/24/2013 03:29 PM, Peter Zajac wrote: >> Hi Roy, >> >> after constraining the matrices I get the correct eigenvalues and >> wavefunctions  thank you for helping me solve the problem. >> >> There is one last thing I wanted to ask. When I run the code now (with the >> constrains), despite obtaining the correct results I get the following >> error message: >> >> [0]PETSC ERROR:  Error Message >>  >> [0]PETSC ERROR: Detected zero pivot in LU factorization: >> see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! >> [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in >> permuted ordering 20! >> [0]PETSC ERROR: >>  >> [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 >> CDT 2012 >> [0]PETSC ERROR: See docs/changes/index.html for recent updates. >> [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. >> [0]PETSC ERROR: See docs/index.html for manual pages. >> [0]PETSC ERROR: >>  >> [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter Thu >> Jan 24 09:25:57 2013 >> [0]PETSC ERROR: Libraries linked from >> /home/peter/petsc3.3p3/archlinux2cdebug/lib >> [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 >> [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 >> [0]PETSC ERROR: >>  >> [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in >> src/mat/impls/aij/seq/aijfact.c >> [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in >> src/mat/interface/matrix.c >> [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c >> [0]PETSC ERROR: PCSetUp_Redundant() line 176 in >> src/ksp/pc/impls/redundant/redundant.c >> [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c >> [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c >> [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c >> [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c >> [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c >> [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c >> [0]PETSC ERROR: SlepcAbs() line 486 in >> "unknowndirectory/"src/solvers/slepc_eigen_solver.C >> application called MPI_Abort(comm=0x84000000, 71)  process 0 >> >> According to the PETSC documentation zero pivot does not always mean the >> matrix is singular and since I am getting the correct results I am ignoring >> the error. Could my ignorance in this case cause a serious problem in the >> future I should be aware of? >> >> thank you again >> >> best >> >> Peter Zajac >> Computational Science Research Center >> San Diego >> >> >> >> >> >> >> >> >> >> >> >> >> On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@...>wrote: >> >>> On Wed, 23 Jan 2013, Peter Zajac wrote: >>> >>> I am not applying the constraint matrices inside the assemble_mass() >>>> function. How exactly should I do that? >>>> >>> See the constrain_element_* calls in the example codes. They're >>> usually important in the context of hanging node constraints, but the >>> periodic boundary constraints work the same way. (and any >>> DirichletBoundaries work nearly the same way, if you're currently >>> using penalty Dirichlet BCs and want to switch) >>>  >>> Roy >>> >>  >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> MVPs and experts. ON SALE this month only  learn more at: >> http://p.sf.net/sfu/learnnowd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: David Knezevic <dknezevic@se...>  20130125 04:38:13

Yep, that's right, use the RB method to solve for u'. Note that you put a(u0,v) on the righthand side, since u0 is known (it's the "lifting function"). David On 01/24/2013 11:34 PM, Kyunghoon Lee wrote: > Thanks for clearing it up. Then I guess we just solve for u' > > a(u',v) + a(u0,v) = f(v) > > and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then restore u > by u = u' + u0. > > K. Lee. > > On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic <dknezevic@... >> wrote: >> Hi K, >> >> heterogeneously_constrain_element_matrix_and_vector is not relevant to >> Reduced Basis stuff. For Reduced Basis formulations, you have to >> transform the problem using a lifting function so that it has zero >> Dirichlet BC's  this is essential since you want your Reduced Basis >> space to be a vector space, i.e. it must contain 0 (which would be not >> be the case with nonzero Dirichlet BCs). This lifting function approach >> is what you described in your email already, so that's fine. >> >> Once you've transformed your problem using a lifting function, then you >> just proceed as normal, e.g. as in reduced_basis_ex1. The only trick is >> you have to add your lifting function back on at the end to recover u >> from u'. >> >> David >> >> >> >> On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: >>> Hi all, >>> >>> In my previous email regarding inhomogeneous Dirichlet boundary >> conditions, >>> David suggested using heterogenously_constrain_element_matrix_and_vector >> in >>> introduction_ex4, but I'm not sure of how to deal with inhomogeneous >>> Dirichlet BCs in connection with reduced basis models. Suppose we have a >>> simple steady state heat conduction model whose BCs are u = T on \Gamma >> and >>> u = 0 on the rest surfaces. After variable change, we solve >>> >>> a(u',v) = f(v)  a(u0,v) >>> >>> where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) u0 >> = >>> T on \Gamma and u0 = zero on the rest surfaces. I thought we build the >> LHS >>> then call attach_F_assembly to attach it, but in that case, I'm not sure >>> how heterogenously_constrain_element_matrix_and_vector can be used. Or >>> should we attach a(u',v) and f(v) as usual then call >>> heterogenously_constrain_element_matrix_and_vector to impose  a(u0,v) on >>> the LHS? I'd appreciate if someone can briefly describe how the function >>> work. >>> >>> Regards, >>> K. Lee. >>> >>  >>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only  learn more at: >>> http://p.sf.net/sfu/learnnowd2d >>> _______________________________________________ >>> Libmeshusers mailing list >>> Libmeshusers@... >>> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >> >>  >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow  3,200 stepbystep video tutorials by Microsoft >> MVPs and experts. ON SALE this month only  learn more at: >> http://p.sf.net/sfu/learnnowd2d >> _______________________________________________ >> Libmeshusers mailing list >> Libmeshusers@... >> https://lists.sourceforge.net/lists/listinfo/libmeshusers >> >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Kyunghoon Lee <aeronova.mailing@gm...>  20130125 04:34:30

Thanks for clearing it up. Then I guess we just solve for u' a(u',v) + a(u0,v) = f(v) and attach assemblies a(u',v), a(u0,v), and f(v) as usual, then restore u by u = u' + u0. K. Lee. On Fri, Jan 25, 2013 at 12:17 PM, David Knezevic <dknezevic@... > wrote: > Hi K, > > heterogeneously_constrain_element_matrix_and_vector is not relevant to > Reduced Basis stuff. For Reduced Basis formulations, you have to > transform the problem using a lifting function so that it has zero > Dirichlet BC's  this is essential since you want your Reduced Basis > space to be a vector space, i.e. it must contain 0 (which would be not > be the case with nonzero Dirichlet BCs). This lifting function approach > is what you described in your email already, so that's fine. > > Once you've transformed your problem using a lifting function, then you > just proceed as normal, e.g. as in reduced_basis_ex1. The only trick is > you have to add your lifting function back on at the end to recover u > from u'. > > David > > > > On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: > > Hi all, > > > > In my previous email regarding inhomogeneous Dirichlet boundary > conditions, > > David suggested using heterogenously_constrain_element_matrix_and_vector > in > > introduction_ex4, but I'm not sure of how to deal with inhomogeneous > > Dirichlet BCs in connection with reduced basis models. Suppose we have a > > simple steady state heat conduction model whose BCs are u = T on \Gamma > and > > u = 0 on the rest surfaces. After variable change, we solve > > > > a(u',v) = f(v)  a(u0,v) > > > > where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) u0 > = > > T on \Gamma and u0 = zero on the rest surfaces. I thought we build the > LHS > > then call attach_F_assembly to attach it, but in that case, I'm not sure > > how heterogenously_constrain_element_matrix_and_vector can be used. Or > > should we attach a(u',v) and f(v) as usual then call > > heterogenously_constrain_element_matrix_and_vector to impose  a(u0,v) on > > the LHS? I'd appreciate if someone can briefly describe how the function > > work. > > > > Regards, > > K. Lee. > > >  > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > > MVPs and experts. ON SALE this month only  learn more at: > > http://p.sf.net/sfu/learnnowd2d > > _______________________________________________ > > Libmeshusers mailing list > > Libmeshusers@... > > https://lists.sourceforge.net/lists/listinfo/libmeshusers > > > >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers > 
From: David Knezevic <dknezevic@se...>  20130125 04:18:10

Hi K, heterogeneously_constrain_element_matrix_and_vector is not relevant to Reduced Basis stuff. For Reduced Basis formulations, you have to transform the problem using a lifting function so that it has zero Dirichlet BC's  this is essential since you want your Reduced Basis space to be a vector space, i.e. it must contain 0 (which would be not be the case with nonzero Dirichlet BCs). This lifting function approach is what you described in your email already, so that's fine. Once you've transformed your problem using a lifting function, then you just proceed as normal, e.g. as in reduced_basis_ex1. The only trick is you have to add your lifting function back on at the end to recover u from u'. David On 01/24/2013 11:10 PM, Kyunghoon Lee wrote: > Hi all, > > In my previous email regarding inhomogeneous Dirichlet boundary conditions, > David suggested using heterogenously_constrain_element_matrix_and_vector in > introduction_ex4, but I'm not sure of how to deal with inhomogeneous > Dirichlet BCs in connection with reduced basis models. Suppose we have a > simple steady state heat conduction model whose BCs are u = T on \Gamma and > u = 0 on the rest surfaces. After variable change, we solve > > a(u',v) = f(v)  a(u0,v) > > where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) u0 = > T on \Gamma and u0 = zero on the rest surfaces. I thought we build the LHS > then call attach_F_assembly to attach it, but in that case, I'm not sure > how heterogenously_constrain_element_matrix_and_vector can be used. Or > should we attach a(u',v) and f(v) as usual then call > heterogenously_constrain_element_matrix_and_vector to impose  a(u0,v) on > the LHS? I'd appreciate if someone can briefly describe how the function > work. > > Regards, > K. Lee. >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 
From: Kyunghoon Lee <aeronova.mailing@gm...>  20130125 04:11:06

Hi all, In my previous email regarding inhomogeneous Dirichlet boundary conditions, David suggested using heterogenously_constrain_element_matrix_and_vector in introduction_ex4, but I'm not sure of how to deal with inhomogeneous Dirichlet BCs in connection with reduced basis models. Suppose we have a simple steady state heat conduction model whose BCs are u = T on \Gamma and u = 0 on the rest surfaces. After variable change, we solve a(u',v) = f(v)  a(u0,v) where 1) u' = u  T on \Gamma and u' = u on the rest surfaces; and 2) u0 = T on \Gamma and u0 = zero on the rest surfaces. I thought we build the LHS then call attach_F_assembly to attach it, but in that case, I'm not sure how heterogenously_constrain_element_matrix_and_vector can be used. Or should we attach a(u',v) and f(v) as usual then call heterogenously_constrain_element_matrix_and_vector to impose  a(u0,v) on the LHS? I'd appreciate if someone can briefly describe how the function work. Regards, K. Lee. 
From: David Knezevic <dknezevic@se...>  20130125 03:12:38

Hi Peter, You're using SLEPc, right? Have you tried using the LAPACK eigensolver via SLEPc (this tends to be very robust, but it treats the matrices as dense so only works for small problems). To do this, use the command line option: eps_type lapack David On 01/24/2013 03:29 PM, Peter Zajac wrote: > Hi Roy, > > after constraining the matrices I get the correct eigenvalues and > wavefunctions  thank you for helping me solve the problem. > > There is one last thing I wanted to ask. When I run the code now (with the > constrains), despite obtaining the correct results I get the following > error message: > > [0]PETSC ERROR:  Error Message >  > [0]PETSC ERROR: Detected zero pivot in LU factorization: > see http://www.mcs.anl.gov/petsc/documentation/faq.html#ZeroPivot! > [0]PETSC ERROR: Empty row in matrix: row in original ordering 1223 in > permuted ordering 20! > [0]PETSC ERROR: >  > [0]PETSC ERROR: Petsc Release Version 3.3.0, Patch 3, Wed Aug 29 11:26:24 > CDT 2012 > [0]PETSC ERROR: See docs/changes/index.html for recent updates. > [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. > [0]PETSC ERROR: See docs/index.html for manual pages. > [0]PETSC ERROR: >  > [0]PETSC ERROR: ./femvib on a archlinu named peterVirtualBox by peter Thu > Jan 24 09:25:57 2013 > [0]PETSC ERROR: Libraries linked from > /home/peter/petsc3.3p3/archlinux2cdebug/lib > [0]PETSC ERROR: Configure run at Fri Nov 23 19:14:06 2012 > [0]PETSC ERROR: Configure options downloadf2cblaslapack=1 > [0]PETSC ERROR: >  > [0]PETSC ERROR: MatLUFactorSymbolic_SeqAIJ() line 334 in > src/mat/impls/aij/seq/aijfact.c > [0]PETSC ERROR: MatLUFactorSymbolic() line 2750 in > src/mat/interface/matrix.c > [0]PETSC ERROR: PCSetUp_LU() line 135 in src/ksp/pc/impls/factor/lu/lu.c > [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: PCSetUp_Redundant() line 176 in > src/ksp/pc/impls/redundant/redundant.c > [0]PETSC ERROR: PCSetUp() line 832 in src/ksp/pc/interface/precon.c > [0]PETSC ERROR: KSPSetUp() line 278 in src/ksp/ksp/interface/itfunc.c > [0]PETSC ERROR: STSetUp_Shift() line 94 in src/st/impls/shift/shift.c > [0]PETSC ERROR: STSetUp() line 280 in src/st/interface/stsolve.c > [0]PETSC ERROR: EPSSetUp() line 204 in src/eps/interface/setup.c > [0]PETSC ERROR: EPSSolve() line 109 in src/eps/interface/solve.c > [0]PETSC ERROR: SlepcAbs() line 486 in > "unknowndirectory/"src/solvers/slepc_eigen_solver.C > application called MPI_Abort(comm=0x84000000, 71)  process 0 > > According to the PETSC documentation zero pivot does not always mean the > matrix is singular and since I am getting the correct results I am ignoring > the error. Could my ignorance in this case cause a serious problem in the > future I should be aware of? > > thank you again > > best > > Peter Zajac > Computational Science Research Center > San Diego > > > > > > > > > > > > > On Wed, Jan 23, 2013 at 11:33 AM, Roy Stogner <roystgnr@...>wrote: > >> On Wed, 23 Jan 2013, Peter Zajac wrote: >> >> I am not applying the constraint matrices inside the assemble_mass() >>> function. How exactly should I do that? >>> >> See the constrain_element_* calls in the example codes. They're >> usually important in the context of hanging node constraints, but the >> periodic boundary constraints work the same way. (and any >> DirichletBoundaries work nearly the same way, if you're currently >> using penalty Dirichlet BCs and want to switch) >>  >> Roy >> >  > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow  3,200 stepbystep video tutorials by Microsoft > MVPs and experts. ON SALE this month only  learn more at: > http://p.sf.net/sfu/learnnowd2d > _______________________________________________ > Libmeshusers mailing list > Libmeshusers@... > https://lists.sourceforge.net/lists/listinfo/libmeshusers 