MCPcopy Create free account
hub / github.com/boutproject/BOUT-dev / clone

Method clone

tests/unit/sys/test_expressionparser.cxx:42–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 : a(std::move(a)), b(std::move(b)) {}
41
42 std::shared_ptr<FieldGenerator>
43 clone(const std::list<std::shared_ptr<FieldGenerator>> args) override {
44 if (args.size() != 2) {
45 throw ParseException(
46 "Incorrect number of arguments to increment function. Expecting 2, got {:d}",
47 args.size());
48 }
49
50 return std::make_shared<BinaryGenerator>(args.front(), args.back());
51 }
52 BoutReal generate(const Context& ctx) override {
53 return a->generate(ctx) + b->generate(ctx);
54 }

Callers 1

TEST_FFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected