17 #include "libmesh/vector_value.h" 18 #include "libmesh/point.h" 30 return "**START YAML DATA**\n";
36 return "**END YAML DATA**\n";
44 const std::string & search_string,
47 std::ostringstream oss;
48 std::string
indent(depth * 2,
' ');
50 for (
auto & iter : params)
52 std::string
name = iter.first;
54 if (params.isPrivate(iter.first) ||
name ==
"active" ||
55 (search_string !=
"" && search_string != iter.first) ||
haveSeenIt(prefix, iter.first))
61 seenIt(prefix, iter.first);
64 std::string required = params.isParamRequired(iter.first) ?
"Yes" :
"No";
67 oss <<
indent <<
" required: " << required <<
"\n";
68 oss <<
indent <<
" default: !!str ";
71 if (params.isParamValid(iter.first))
78 std::ostringstream toss;
82 std::string tmp_str = toss.str();
83 for (
auto & ch : tmp_str)
87 oss <<
"\"" << tmp_str <<
"\"";
91 else if (params.hasDefaultCoupledValue(iter.first))
92 oss << params.defaultCoupledValue(iter.first);
94 std::string doc = params.getDocString(iter.first);
98 <<
indent <<
" cpp_type: " << params.type(iter.first) <<
"\n" 99 <<
indent <<
" group_name: ";
100 std::string group_name = params.getGroupName(iter.first);
101 if (!group_name.empty())
102 oss <<
"'" << group_name <<
"'";
105 oss <<
indent <<
" doc_unit: ";
106 std::string doc_unit = params.getDocUnit(iter.first);
107 if (!doc_unit.empty())
108 oss <<
"'" << doc_unit <<
"'";
117 if (params.have_parameter<std::vector<MooseEnum>>(
name))
120 oss <<
indent <<
" description: |\n " <<
indent << doc << std::endl;
126 template <
typename T>
130 const std::string &
indent)
132 oss <<
indent <<
" options: " << param.getRawNames() <<
'\n';
133 const auto & docs = param.getItemDocumentation();
136 oss <<
indent <<
" option_docs:\n";
137 for (
const auto & doc : docs)
139 oss <<
indent <<
" - name: " << doc.first.name() <<
"\n";
140 oss <<
indent <<
" description: |\n";
141 oss <<
indent <<
" " << doc.second <<
"\n";
149 std::string
indent(depth * 2,
' ');
151 return indent +
" subblocks:\n";
157 std::ostringstream oss;
158 std::string
indent(depth * 2,
' ');
160 std::string docEscaped = doc;
164 oss <<
indent <<
" description: |\n" <<
indent <<
" " << docEscaped <<
"\n";
165 oss <<
indent <<
" parameters:\n";
173 return std::string();
178 std::ostringstream & output,
179 const std::iterator_traits<InputParameters::iterator>::value_type & p)
184 InputParameters::Parameter<Point> * ptr0 =
dynamic_cast<InputParameters::Parameter<Point> *
>(val);
187 InputParameters::Parameter<RealVectorValue> * ptr1 =
188 dynamic_cast<InputParameters::Parameter<RealVectorValue> *
>(val);
192 output << ptr0->get().operator()(0) <<
" " << ptr0->get().operator()(1) <<
" " 193 << ptr0->get().operator()(2);
197 output << ptr1->get().operator()(0) <<
" " << ptr1->get().operator()(1) <<
" " 198 << ptr1->get().operator()(2);
202 p.second->print(output);
std::string name(const ElemQuality q)
std::string indent(unsigned int spaces)
Create empty string for indenting.
A MultiMooseEnum object to hold "execute_on" flags.
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
bool haveSeenIt(const std::string &prefix, const std::string &item) const
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
void seenIt(const std::string &prefix, const std::string &item)
void escape(std::string &str)
This function will escape all of the standard C++ escape characters so that they can be printed...