https://mooseframework.inl.gov
Loading...
Searching...
No Matches
AddMetaDataGenerator.h
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#pragma once
11
12#include "MeshGenerator.h"
13
18{
19public:
21
23
24 virtual std::unique_ptr<MeshBase> generate() override;
25 virtual void generateData() override;
26
27protected:
29 std::unique_ptr<MeshBase> * _input;
31 const std::vector<std::string> _real_scalar_metadata_names;
33 const std::vector<Real> _real_scalar_metadata_values;
35 const std::vector<std::string> _uint_scalar_metadata_names;
37 const std::vector<unsigned int> _uint_scalar_metadata_values;
39 const std::vector<std::string> _int_scalar_metadata_names;
41 const std::vector<int> _int_scalar_metadata_values;
43 const std::vector<std::string> _dof_id_type_scalar_metadata_names;
45 const std::vector<dof_id_type> _dof_id_type_scalar_metadata_values;
47 const std::vector<std::string> _subdomain_id_type_scalar_metadata_names;
49 const std::vector<subdomain_id_type> _subdomain_id_type_scalar_metadata_values;
51 const std::vector<std::string> _boolean_scalar_metadata_names;
53 const std::vector<bool> _boolean_scalar_metadata_values;
55 const std::vector<std::string> _point_scalar_metadata_names;
57 const std::vector<Point> _point_scalar_metadata_values;
58
60 const std::vector<std::string> _real_vector_metadata_names;
62 const std::vector<std::vector<Real>> _real_vector_metadata_values;
64 const std::vector<std::string> _uint_vector_metadata_names;
66 const std::vector<std::vector<unsigned int>> _uint_vector_metadata_values;
68 const std::vector<std::string> _int_vector_metadata_names;
70 const std::vector<std::vector<int>> _int_vector_metadata_values;
72 const std::vector<std::string> _dof_id_type_vector_metadata_names;
74 const std::vector<std::vector<dof_id_type>> _dof_id_type_vector_metadata_values;
76 const std::vector<std::string> _subdomain_id_type_vector_metadata_names;
78 const std::vector<std::vector<subdomain_id_type>> _subdomain_id_type_vector_metadata_values;
80 const std::vector<std::string> _point_vector_metadata_names;
82 const std::vector<std::vector<Point>> _point_vector_metadata_values;
83
90 template <class T>
91 void inputChecker(const std::vector<std::string> data_names,
92 const std::vector<T> data_values,
93 const std::string param_name);
94};
This mesh generator assigns external mesh metadata to the input mesh.
const std::vector< std::string > _int_vector_metadata_names
List of mesh metadata names for the integer type vectors.
const std::vector< dof_id_type > _dof_id_type_scalar_metadata_values
List of mesh metadata values for the dof_id_type type scalars.
const std::vector< std::string > _real_vector_metadata_names
List of mesh metadata names for the Real type vectors.
const std::vector< std::string > _subdomain_id_type_scalar_metadata_names
List of mesh metadata names for the subdomain_id_type type scalars.
virtual std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
const std::vector< bool > _boolean_scalar_metadata_values
List of mesh metadata values for the boolean type scalars.
const std::vector< std::string > _point_vector_metadata_names
List of mesh metadata names for the Point type vectors.
virtual void generateData() override
Generate the mesh data.
const std::vector< std::string > _int_scalar_metadata_names
List of mesh metadata names for the integer type scalars.
std::unique_ptr< MeshBase > * _input
The input mesh to add the mesh metadata to (when not doing data-only)
const std::vector< std::string > _uint_scalar_metadata_names
List of mesh metadata names for the unsigned integer type scalars.
const std::vector< std::string > _dof_id_type_scalar_metadata_names
List of mesh metadata names for the dof_id_type type scalars.
const std::vector< std::vector< int > > _int_vector_metadata_values
List of mesh metadata values for the integer type vectors.
const std::vector< subdomain_id_type > _subdomain_id_type_scalar_metadata_values
List of mesh metadata values for the subdomain_id_type type scalars.
void inputChecker(const std::vector< std::string > data_names, const std::vector< T > data_values, const std::string param_name)
Check the sanity of a pair of input parameters.
const std::vector< unsigned int > _uint_scalar_metadata_values
List of mesh metadata values for the unsigned integer type scalars.
static InputParameters validParams()
const std::vector< std::string > _subdomain_id_type_vector_metadata_names
List of mesh metadata names for the subdomain_id_type type vectors.
const std::vector< std::vector< Point > > _point_vector_metadata_values
List of mesh metadata values for the Point type vectors.
const std::vector< std::string > _point_scalar_metadata_names
List of mesh metadata names for single Point metadata.
const std::vector< std::vector< subdomain_id_type > > _subdomain_id_type_vector_metadata_values
List of mesh metadata values for the subdomain_id_type type vectors.
const std::vector< std::string > _real_scalar_metadata_names
List of mesh metadata names for the Real type scalars.
const std::vector< std::string > _dof_id_type_vector_metadata_names
List of mesh metadata names for the dof_id_type type vectors.
const std::vector< Point > _point_scalar_metadata_values
List of mesh metadata values for single Point metadata.
const std::vector< std::vector< unsigned int > > _uint_vector_metadata_values
List of mesh metadata values for the unsigned integer type vectors.
const std::vector< std::string > _boolean_scalar_metadata_names
List of mesh metadata names for the boolean type scalars.
const std::vector< std::vector< Real > > _real_vector_metadata_values
List of mesh metadata values for the Real type vectors.
const std::vector< int > _int_scalar_metadata_values
List of mesh metadata values for the integer type scalars.
const std::vector< Real > _real_scalar_metadata_values
List of mesh metadata values for the Real type scalars.
const std::vector< std::vector< dof_id_type > > _dof_id_type_vector_metadata_values
List of mesh metadata values for the dof_id_type type vectors.
const std::vector< std::string > _uint_vector_metadata_names
List of mesh metadata names for the unsigned integer type vectors.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
MeshGenerators are objects that can modify or add to an existing mesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131