MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / registerVariables

Method registerVariables

Src/Base/Parser/AMReX_Parser.cpp:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void
84Parser::registerVariables (Vector<std::string> const& vars)
85{
86 if (m_data && m_data->m_host_executor != nullptr) {
87 throw std::runtime_error("amrex::Parser::registerVariables: cannot modify variables after compile()");
88 }
89
90 m_vars = vars;
91 if (m_data && m_data->m_parser) {
92 m_data->m_nvars = static_cast<int>(vars.size());
93 for (int i = 0; i < m_data->m_nvars; ++i) {
94 parser_regvar(m_data->m_parser, vars[i].c_str(), i);
95 }
96 }
97}
98
99void
100Parser::registerUserFn1 (std::string const& name, ParserUserFn1 fh, ParserUserFn1 fd)

Callers 11

test_parserFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
AmrCoreAdvMethod · 0.45
test1Function · 0.45
test3Function · 0.45
test4Function · 0.45
mainFunction · 0.45
BuildFunction · 0.45
pp_make_parserFunction · 0.45

Calls 2

parser_regvarFunction · 0.85
sizeMethod · 0.45

Tested by 2

test_parserFunction · 0.36