12 #include "nlohmann/json.h" 22 static const std::vector<Real>
kaams_colors = {1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0,
23 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 1.0,
24 0.0, 1.0, 1.0, 0.63, 0.63, 1.0, 0.67, 0.5, 0.33,
25 1.0, 0.5, 0.75, 0.53, 0.35, 0.7, 1.0, 0.75, 0.5};
43 ": ParaviewComponentAnnotationMap can only be used with THM-based simulation.");
52 const std::vector<std::shared_ptr<Component>> & comps = thm_problem->
getComponents();
54 std::vector<Real> clrs;
55 unsigned int clr_idx = 0;
57 std::vector<std::string> anns;
58 for (
auto & comp : comps)
60 const auto & subdomains = comp->getSubdomainNames();
61 for (
auto & sn : subdomains)
72 clr_idx = clr_idx % (12 * 3);
77 json[0][
"Annotations"] = anns;
78 json[0][
"IndexedColors"] = clrs;
82 out << std::setw(4) << json << std::endl;
Specialization of FEProblem to run with component subsystem.
registerMooseObject("ThermalHydraulicsApp", ParaviewComponentAnnotationMap)
virtual const std::string & name() const
ExecFlagEnum getDefaultExecFlagEnum()
static const std::vector< Real > kaams_colors
KAAMS color profile from paraview.
FEProblemBase * _problem_ptr
static InputParameters validParams()
ParaviewComponentAnnotationMap(const InputParameters ¶meters)
std::string stringify(const T &t)
void mooseError(Args &&... args) const
const std::vector< std::shared_ptr< Component > > & getComponents()
Return list of components available in the simulation.
processor_id_type processor_id() const
virtual std::string filename()
static InputParameters validParams()
Output annotation map for paraview.
SubdomainID getSubdomainID(const SubdomainName &subdomain_name) const
const ExecFlagType EXEC_INITIAL