MCPcopy Create free account
hub / github.com/Cantera/cantera / newInterface

Function newInterface

src/base/Interface.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35shared_ptr<Interface> newInterface(const string& infile,
36 const string& name, const vector<string>& adjacent)
37{
38 auto sol = newSolution(infile, name, "default", adjacent);
39 auto iface = std::dynamic_pointer_cast<Interface>(sol);
40 if (!iface) {
41 auto rootNode = AnyMap::fromYamlFile(infile);
42 AnyMap& phaseNode = rootNode["phases"].getMapWhere("name", name);
43 throw InputFileError("newInterface", phaseNode,
44 "Phase definition does not define a surface phase");
45 }
46 return iface;
47}
48
49shared_ptr<Interface> newInterface(const string& infile,
50 const string& name, const vector<shared_ptr<Solution>>& adjacent)

Callers 7

TESTFunction · 0.85
TESTFunction · 0.85
TESTFunction · 0.85
testProblemFunction · 0.85
mainFunction · 0.85
soln_newInterfaceFunction · 0.85

Calls 2

newSolutionFunction · 0.85
InputFileErrorClass · 0.85

Tested by 2

TESTFunction · 0.68