Thank you for your hints! I think that's what I want. But when I have assigned values to the variable solution, how to write them to file? I used ExodusII_IO(mesh).write_equation_systems() to output data, but the element variable data are all zero. I tried ExodusII_IO(mesh).write_discontinuous_exodusII(), it also only write out nodal data. ExodusII_IO(mesh).write_element_data(es) just says "ERROR, ExodusII file must be initialized before outputting element variables.". Is there any way to output element data? Is there something I'm missing? Thanks for your help!
------------------------------ > > Message: 3 > Date: Tue, 24 Apr 2012 11:45:09 -0400 > From: David Knezevic <[email protected]> > Subject: Re: [Libmesh-users] add_variable related to element in > ExplicitSystem > To: <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset="GB2312" > > Use a constant monomial variable: > > add_variable ("variable_name", CONSTANT, MONOMIAL); > > > > On 04/24/2012 10:13 AM, ??? wrote: > > Hello, > > We can use ExplicitSystem::add_variable to add non-solution variable to > > store my data, but this variable in based on nodes, and has size of > n_node. > > But if I want to add variable related to element, and has size of n_elem, > > how to do that? > > Thanks! > > > > - Cai Yuanwu 蔡园武 Dept. of Engineering Mechanics, Dalian University of Technology, Dalian 116024, China ------------------------------------------------------------------------------ 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 [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
