https://mooseframework.inl.gov
Loading...
Searching...
No Matches
RayTracingExodus.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10// TODO: remove ignore warnings once std::tuple<> is instantiated as a StandardType
11// Using push_parallel_vector_data with std::tuple<> leads to a -Wextra error
12// https://github.com/libMesh/TIMPI/issues/52
13#include "libmesh/ignore_warnings.h"
14#include "RayTracingExodus.h"
15#include "libmesh/restore_warnings.h"
16
17// Local includes
18#include "RayTracingStudy.h"
19
20#include "libmesh/exodusII_io.h"
21
23
26{
28 params.addClassDescription("Outputs ray segments and data as segments using the Exodus format.");
29 return params;
30}
31
33
34void
36{
37 TIME_SECTION("outputMesh", 3, "Writing Ray Mesh");
38
40 eio.set_hdf5_writing(false);
41
42 // With nodal data, we need to output these variables in write_timestep
45 // Otherwise, there's no variables to write in write_timestep
46 else
47 eio.set_output_variables(std::vector<std::string>());
48 // Write the timestep, which is the mesh + nodal vars (if any)
50
51 // This will default to write_element_data getting all available elemental vars
52 eio.set_output_variables(std::vector<std::string>());
53 // Write the elemental variables, which are the variables with the constant Ray field data
55
56 // We write a new file every time as we don't keep track of whether or not the rays change
57 ++_file_num;
58}
registerMooseObject("RayTracingApp", RayTracingExodus)
unsigned int & _file_num
Real getGlobalTimeOffset() const
MooseApp & _app
virtual Real time() override
static InputParameters validParams()
RayTracingExodus(const InputParameters &parameters)
virtual void outputMesh() override
Output the mesh - to be overridden.
Base class for outputting Ray data in a mesh format, where EDGE2 elems represent the individual Ray s...
static InputParameters validParams()
std::unique_ptr< libMesh::EquationSystems > _es
The EquationSystems.
const bool _output_data_nodal
Whether or not to output the Ray's data in a nodal, linear sense.
std::unique_ptr< MeshBase > _segment_mesh
The mesh that contains the segments.
virtual std::string filename() override
const RayTracingStudy & _study
The RayTracingStudy.
const std::vector< std::string > & rayDataNames() const
The Ray data names.
void write_timestep(const std::string &fname, const EquationSystems &es, const int timestep, const Real time, const std::set< std::string > *system_names=nullptr)
void set_output_variables(const std::vector< std::string > &output_variables, bool allow_empty=true)
void set_hdf5_writing(bool write_hdf5)
void write_element_data(const EquationSystems &es)