Thanks!

   std::vector<std::string> out_var(1,"c");
   std::ostringstream file_name;
   ExodusII_IO exio(mesh);
   file_name << "out-" << std::setw(5) << std::setfill('0') << 
std::right << init_timestep << ".e";
   exio.set_output_variables(out_var);
   exio.write_equation_systems (file_name.str(),eq_sys);

Em 2013-09-23 11:28, John Peterson escreveu:
> On Mon, Sep 23, 2013 at 10:21 AM, ernestol <[email protected] [1]>
> wrote:
>
>> Thanks all, it worked!
>> If someone face this question in future I did like this:
>>
>>    std::vector<std::basic_string<char> > out_var;
>>    out_var.push_back("c");
>
> The usual idiom here is to just use std::string, and in this case you
> might as well initialize it at creation time:
>
> std::vector<std::string> out_var(1, "c");
>
>  
>
>>    std::ostringstream file_name;
>>    ExodusII_IO* exio;
>>    exio = new ExodusII_IO(mesh);
>
> No reason to use dynamic memory allocation here, just create the
> object on the stack:
>
> ExodusII_IO exio(mesh);
>
>      exio->set_
>
>> ile_name appears to be empty based on the snippet of code you
>> posted.
>>
>> --
> iv>
>
> Links:
> ------
> [1] 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

Reply via email to