Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Libmesh-users] Saving calculated quantity

 Re: [Libmesh-users] Saving calculated quantity From: Benjamin S. Kirk - 2003-12-24 13:18:48 ```I will be taking a few days vacation after Christmas, and I will start=20 coding up the improved system support that I've been hyping up for a=20 while. That should make this a lot simpler. What you can do in the meantime is add another *system* with some=20 variables that will be used for plotting purposes. If you don't provide=20 an assemble function for this system there should be no linear solve. Also, sometimes it is useful to have a linear solve to compute your=20 post-processing variables. For instance, if you have a C0 solution then=20 the stresses aren't uniquely defined at the nodes, but you can solve an=20 L2 projection system to get a smooth stress field. Something like this: es.add_system("Post-Processing"); es("Post-Processing").add_variable("stress"); ... Then assemble the L2 projection system like this: compute du/dx phi(i)*phi(j) =3D phi(i)*du/dx and solve it in a standard way. This type of system will be trivially easy to solve since it is SPD=20 (just a mass matrix). Let me know if you have any more questions. -Ben Martin L=FCthi wrote: >John > >John Peterson writes: > > Martin L=3DFCthi writes: > > > Is there an easy way to output calculated quantities to the GMV ou= tp=3D > > ut > > > files? I want to calculate e.g. stresses (or some other quantitiy > > > which is not a system variable), and hav it appear in the output f= il=3D > > e. > > You might add it as a "dummy" system variable which is just > > computed via a post-processing step. Then it could be written > > out as normal to gmv. > >Thanks for the answer. There is a problem with this. If I add the >variable the beginning, the system gives a null solution (because the >variable is not used in the element loop). Adding it after just before >the write command results in some runtime error messages. > >I was thinking about using an additional vector with >system.add_vector. > >Best, Martin > > >------------------------------------------------------- >This SF.net email is sponsored by: IBM Linux Tutorials. >Become an expert in LINUX or just sharpen your skills. Sign up for IBM'= s >Free Linux Tutorials. Learn everything from the bash shell to sys admin. >Click now! http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick >_______________________________________________ >Libmesh-users mailing list >Libmesh-users@... >https://lists.sourceforge.net/lists/listinfo/libmesh-users > =20 > ```

 [Libmesh-users] Saving calculated quantity From: - 2003-12-23 20:35:26 ```Hi Is there an easy way to output calculated quantities to the GMV output files? I want to calculate e.g. stresses (or some other quantitiy which is not a system variable), and hav it appear in the output file. Thanks, Martin ```
 [Libmesh-users] Saving calculated quantity From: John Peterson - 2003-12-23 21:20:44 ```Martin L=FCthi writes: > Is there an easy way to output calculated quantities to the GMV outp= ut > files? I want to calculate e.g. stresses (or some other quantitiy > which is not a system variable), and hav it appear in the output fil= e. You might add it as a "dummy" system variable which is just computed via a post-processing step. Then it could be written out as normal to gmv. -John ```
 [Libmesh-users] Saving calculated quantity From: - 2003-12-24 01:18:09 ```John John Peterson writes: > Martin L=FCthi writes: > > Is there an easy way to output calculated quantities to the GMV outp= > ut > > files? I want to calculate e.g. stresses (or some other quantitiy > > which is not a system variable), and hav it appear in the output fil= > e. > You might add it as a "dummy" system variable which is just > computed via a post-processing step. Then it could be written > out as normal to gmv. Thanks for the answer. There is a problem with this. If I add the variable the beginning, the system gives a null solution (because the variable is not used in the element loop). Adding it after just before the write command results in some runtime error messages. I was thinking about using an additional vector with system.add_vector. Best, Martin ```
 Re: [Libmesh-users] Saving calculated quantity From: Benjamin S. Kirk - 2003-12-24 13:18:48 ```I will be taking a few days vacation after Christmas, and I will start=20 coding up the improved system support that I've been hyping up for a=20 while. That should make this a lot simpler. What you can do in the meantime is add another *system* with some=20 variables that will be used for plotting purposes. If you don't provide=20 an assemble function for this system there should be no linear solve. Also, sometimes it is useful to have a linear solve to compute your=20 post-processing variables. For instance, if you have a C0 solution then=20 the stresses aren't uniquely defined at the nodes, but you can solve an=20 L2 projection system to get a smooth stress field. Something like this: es.add_system("Post-Processing"); es("Post-Processing").add_variable("stress"); ... Then assemble the L2 projection system like this: compute du/dx phi(i)*phi(j) =3D phi(i)*du/dx and solve it in a standard way. This type of system will be trivially easy to solve since it is SPD=20 (just a mass matrix). Let me know if you have any more questions. -Ben Martin L=FCthi wrote: >John > >John Peterson writes: > > Martin L=3DFCthi writes: > > > Is there an easy way to output calculated quantities to the GMV ou= tp=3D > > ut > > > files? I want to calculate e.g. stresses (or some other quantitiy > > > which is not a system variable), and hav it appear in the output f= il=3D > > e. > > You might add it as a "dummy" system variable which is just > > computed via a post-processing step. Then it could be written > > out as normal to gmv. > >Thanks for the answer. There is a problem with this. If I add the >variable the beginning, the system gives a null solution (because the >variable is not used in the element loop). Adding it after just before >the write command results in some runtime error messages. > >I was thinking about using an additional vector with >system.add_vector. > >Best, Martin > > >------------------------------------------------------- >This SF.net email is sponsored by: IBM Linux Tutorials. >Become an expert in LINUX or just sharpen your skills. Sign up for IBM'= s >Free Linux Tutorials. Learn everything from the bash shell to sys admin. >Click now! http://ads.osdn.com/?ad_id=3D1278&alloc_id=3D3371&op=3Dclick >_______________________________________________ >Libmesh-users mailing list >Libmesh-users@... >https://lists.sourceforge.net/lists/listinfo/libmesh-users > =20 > ```