On 03/06/2014 11:40 PM, John Peterson wrote:
On Thu, Mar 6, 2014 at 9:35 PM, David Knezevic
<dkneze...@seas.harvard.edu <mailto:dkneze...@seas.harvard.edu>> wrote:
On 03/06/2014 11:30 PM, John Peterson wrote:
On Thu, Mar 6, 2014 at 9:12 PM, David Knezevic
<dkneze...@seas.harvard.edu <mailto:dkneze...@seas.harvard.edu>>
wrote:
I'd like to write out element-based data to an exodus file (again
related to discontinuous visualization). There is a function
ExodusII_IO::write_element_data in ExodusII_IO, but it's not
clear to me
how to use it?
I'd like to use it in the same way as
ExodusII_IO::write_nodal_data, but
it doesn't seem to work that way. ExodusII_IO::write_element_data
doesn't even take a filename, so I'm confused about what it's
role is
supposed to be.
You can use it to write out constant monomial variables, right?
Did you need to write out some higher-order elemental data?
Yeah, I just want to write out monomial variables. I can use
write_discontinuous_exodusII for that too, but that generates a
"broken mesh", since it duplicates all the nodes to allow a
discontinuous solution. I want a discontinuous plot of monomial
variables on a non-broken mesh, so I figured
ExodusII_IO::write_element_data might the right function for that job?
Do you have a code snippet for using it to plot monomials? If I
try to call it directly, I just get an error due to the
!exio_helper->opened_for_writing assertion...
I'm not sure if we've ever used it to plot *only* monomials, we always
had some nodal data as well.
Can you call ExodusII_IO::write_timestep() followed by
ExodusII_IO::write_element_data()?
I put this at the end of the main function in systems_of_equations_ex6:
ExodusII_IO exo_io(mesh);
exo_io.write_timestep("test.exo", equation_systems, 0, 0.);
exo_io.write_element_data(equation_systems);
and I got this error:
Error writing nodal values.
Stack frames: 9
0: libMesh::print_trace(std::ostream&)
1: libMesh::MacroFunctions::report_error(char const*, int, char const*,
char const*)
2: libMesh::ExodusII_IO_Helper::write_nodal_values(int,
std::vector<double, std::allocator<double> > const&, int)
3: libMesh::ExodusII_IO::write_nodal_data(std::string const&,
std::vector<double, std::allocator<double> > const&,
std::vector<std::string, std::allocator<std::string> > const&)
4:
libMesh::MeshOutput<libMesh::MeshBase>::write_equation_systems(std::string
const&, libMesh::EquationSystems const&, std::set<std::string,
std::less<std::string>, std::allocator<std::string> > const*)
5: libMesh::ExodusII_IO::write_timestep(std::string const&,
libMesh::EquationSystems const&, int, double)
6: ./example-opt() [0x40cfa8]
7: __libc_start_main
8: ./example-opt() [0x40d32d]
[0] /home/dknez/software/libmesh-src/src/mesh/exodusII_io_helper.C, line
1699, compiled Mar 6 2014 at 17:30:11
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0
I have wanted to refactor this class for a while... it has had a ton
of stuff tacked onto it over the years without much overall organization.
I'd be happy to help with the refactoring!
David
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works.
Faster operations. Version large binaries. Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Libmesh-devel mailing list
Libmesh-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmesh-devel