Re: [Libmesh-users] initializing variable non-zero value

2011-06-11 Thread Roy Stogner
On Sat, 11 Jun 2011, Kirk, Benjamin (JSC-EG311) wrote: > *system.solution = 1.; > > Should do the trick This will set all your degree of freedom coefficients to 1. If you're using a Lagrange basis that will set your solution value to 1 everywhere; for other bases the results will be much less

Re: [Libmesh-users] initializing variable non-zero value

2011-06-11 Thread Kirk, Benjamin (JSC-EG311)
you can simply assign a constant to your system's solution vector: http://libmesh.sourceforge.net/doxygen/classlibMesh_1_1NumericVector.php#aa2 80ed0139db9a1a4204a2b886ef60ba something like *system.solution = 1.; Should do the trick After the equation system is initialized. Really though the m

Re: [Libmesh-users] initializing variable non-zero value

2011-06-11 Thread Kirk, Benjamin (JSC-EG311)
There are a number of ways, we illustrate one in ex9. -Ben On Jun 11, 2011, at 1:43 PM, "Ataollah Mesgarnejad" wrote: > Dear all, > > Is there a way to initialize a variable that I add to my equation system with > non-zero value?? > > Best, > Ata > ---