I have used ExplicitSystem::add_variable("variables", CONSTANT,
MONOMIAL) to store my cell-centered data, and used
system.solution->add_vector() to assign values to the variables.
Now I want to write the variables into file so I can view them.
I used ExodusII_IO(mesh).write_equation_systems() to output data.
There are entries for the cell-centered variables in the file, but the
values are all zero.
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 cell-centered data? Is there something I'm missing?
Thanks for your help!
Cai Yuanwu 蔡园武
Dept. of Engineering Mechanics,
Dalian University of Technology,
Dalian 116024, China