On 07/03/2012 10:16 AM, David Knezevic wrote: > System has a public boolean called "assemble_before_solve", which is > true by default. Set that to false and then solve() won't call assemble, > e.g. see LinearImplicitSystem::solve(). You'll have to make sure to call > your assembly function yourself when appropriate though.
Or even easier is to put the stiffness matrix part of your assembly inside an "if" statement and use equation_systems.parameters to determine whether or not to do the matrix assembly. Also, if you're not changing the matrix, it's good to set "reuse_preconditioner(true)" in the System's linear_solver after the first solve. > > On 07/03/2012 08:55 AM, James J Ramsey wrote: >> I noticed that the examples generally have the stiffness matrix and >> force vector assembled in some function that becomes an argument to >> the "attach_assemble_function" method. I have a possible application >> in mind that involves using the same stiffness matrix with different >> force vectors. Is there a way that I can do this without recalculating >> the stiffness matrix each time? >> >> ------------------------------------------------------------------------------ >> Live Security Virtual Conference >> Exclusive live event will cover all the ways today's security and >> threat landscape has changed and how IT managers can respond. Discussions >> will include endpoint security, mobile security and the latest in malware >> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >> _______________________________________________ >> Libmesh-users mailing list >> Libmesh-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/libmesh-users > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Libmesh-users mailing list > Libmesh-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Libmesh-users mailing list Libmesh-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libmesh-users