You have to actually create an ExodusII_IO object then call that function on it... Then call write_equation_systems() on it.
Derek Sent from my iPhone > On Sep 23, 2013, at 8:50 AM, ernestol <[email protected]> wrote: > > Thanks for the answer but didnt worked here. > > First I tried > > ExodusII_IO::set_output_variables("c") > ExodusII_IO(mesh).write_equation_systems (file_name.str(),eq_sys); > > That gave me this error: > > angiogenesis.C: In function 'int main(int, char**)': > angiogenesis.C:339:47: error: no matching function for call to > 'libMesh::ExodusII_IO::set_output_variables(const char [9])' > angiogenesis.C:339:47: note: candidate is: > In file included from angiogenesis.C:44:0: > /usr/local/include/libmesh/exodusII_io.h:158:8: note: void > libMesh::ExodusII_IO::set_output_variables(const > std::vector<std::basic_string<char> >&) > /usr/local/include/libmesh/exodusII_io.h:158:8: note: no known > conversion for argument 1 from 'const char [9]' to 'const > std::vector<std::basic_string<char> >&' > angiogenesis.C:340:3: error: expected ';' before 'ExodusII_IO' > > Than I tried > > std::vector<std::basic_string<char> > out_var; > out_var.push_back("c"); > ExodusII_IO::set_output_variables(out_var); > ExodusII_IO(mesh).write_equation_systems (file_name.str(),eq_sys); > > and got > > angiogenesis.C: In function 'int main(int, char**)': > angiogenesis.C:339:44: error: cannot call member function 'void > libMesh::ExodusII_IO::set_output_variables(const > std::vector<std::basic_string<char> >&)' without object > > And also did: > > std::vector<std::basic_string<char> > out_var; > out_var.push_back("v0_tumor"); > ExodusII_IO(mesh).set_output_variables(out_var); > ExodusII_IO(mesh).write_equation_systems (file_name.str(),eq_sys); > > Which was OK to compile but when running gave me: > > Error closing Exodus file. > Stack frames: 7 > 0: libMesh::print_trace(std::ostream&) > 1: libMesh::ExodusII_IO_Helper::check_err(int, std::string) > 2: libMesh::ExodusII_IO_Helper::close() > 3: libMesh::ExodusII_IO::~ExodusII_IO() > 4: ./example-opt() [0x4131ef] > 5: __libc_start_main > 6: ./example-opt() [0x4140fd] > [0] src/mesh/exodusII_io_helper.C, line 235, compiled Jul 8 2013 at > 12:02:12 > terminate called after throwing an instance of 'libMesh::LogicError' > what(): Error in libMesh internal logic > > Any ideas? > > Thanks again > > Ernesto > > > Em 2013-09-23 09:14, Andrs, David escreveu: >> Call ExodusII_IO::set_output_variables("c") before calling >> write_equation_systems(). >> >> -- >> David >> >> On Thu, Sep 19, 2013 at 7:55 PM, ernestol <[email protected] [4]> >> wrote: >> >>> Hi all, >>> >>> Apologies if this is such a basic question but I am trying to plot >>> just >>> a subset of my system. >>> I have the variables "a", "b" and "c" but I just want to plot "c". >>> I >>> saw that this can be done but I am having some problens to figure >>> out >>> how should I pass the third argument of the function: >>> ExodusII_IO(mesh).write_equation_systems (file_name.str(),eq_sys); >>> According to the documentation is >>> virtual void write_equation_systems (const std::string &, >>> const >>> EquationSystems &, const std::set< std::string > >>> *system_names=NULL) >>> Can someone give me one example of how should I call this function >>> to >>> print just variable "c"? >>> >>> Thanks a lot for the help! >>> >>> Sincerely >>> >>> Ernesto >> >> ------------------------------------------------------------------------------ >>> LIMITED TIME SALE - Full Year of Microsoft Training For Just >>> $49.99! >>> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, >>> SharePoint >>> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power >>> Pack includes >>> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends >>> 9/20/13. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >>> [1] >>> _______________________________________________ >>> Libmesh-users mailing list >>> [email protected] [2] >>> https://lists.sourceforge.net/lists/listinfo/libmesh-users [3] >> >> >> >> Links: >> ------ >> [1] >> >> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk >> [2] mailto:[email protected] >> [3] https://lists.sourceforge.net/lists/listinfo/libmesh-users >> [4] mailto:[email protected] > > ------------------------------------------------------------------------------ > LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! > 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint > 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes > Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. > http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk > _______________________________________________ > Libmesh-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/libmesh-users ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
