libmesh icon indicating copy to clipboard operation
libmesh copied to clipboard

Nemesis output not seen in Paraview

Open AlbertoBittes opened this issue 1 year ago • 0 comments

Good afternoon, Here I try to write some results with Nemesis_IO output interface:

            output_filename = mesh_filename_without_extension + "_out";
            final_output_path = output_path / output_filename;
            std::ostringstream file_name;
            file_name << final_output_path.string() << "_"
                      << std::setw(3)
                      << std::setfill('0')
                      << std::right
                      << timeStepper->get_cumulative_substep();

            // // Write the results
            Nemesis_IO nem_output(mesh);
            std::vector<std::string> var_names;
            unsigned int var_num = system.n_vars();
            for (unsigned int i = 0; i < var_num; ++i)
            {
                var_names.push_back(system.variable_name(i));
            }
            ExplicitSystem &derived_system = equation_systems.get_system<ExplicitSystem>("DerivedQuantitiesSystem");
            var_num = derived_system.n_vars();
            for (unsigned int i = 0; i < var_num; ++i)
            {
                var_names.push_back(derived_system.variable_name(i));
            }
            nem_output.set_output_variables(var_names);

            nem_output.write_timestep(file_name.str(), equation_systems, 1, substep.get_time());
            // Empty var_names
            nem_output.write_element_data(equation_systems);

and obtain the following files:

Image

I cannot get how to read the partitioned results with paraview, to get properly the partitioning and the time series. When I try to open single blocks, the nodal results look empty (everything is fine with serial Exodus output or VTK, the proper values are printed):

Image

If I try to print Nemesis output with one processor, I get this error message from ParaView (I do not know if Nemesis IO is supposed to work only with multiple processors):

Image

I have the feeling that I am doing something not correctly here but thank you in advance for your help!

AlbertoBittes avatar Jan 20 '25 17:01 AlbertoBittes