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

Function getMethodsForDirection

tests/unit/include/test_derivs.cxx:174–189  ·  view source on GitHub ↗

Get all the available methods for this direction and turn it from a collection of strings to a collection of tuples of the direction, order, and strings so that the test fixture knows which direction we're using

Source from the content-addressed store, hash-verified

172// order, and strings so that the test fixture knows which direction
173// we're using
174auto getMethodsForDirection(DERIV derivative_order, DIRECTION direction)
175 -> std::vector<std::tuple<DIRECTION, DERIV, std::string>> {
176
177 auto available_methods = DerivativeStore<Field3D>::getInstance().getAvailableMethods(
178 derivative_order, direction);
179
180 // Method names together with the current direction and derivative type
181 std::vector<std::tuple<DIRECTION, DERIV, std::string>> methods{};
182
183 std::transform(std::begin(available_methods), std::end(available_methods),
184 std::back_inserter(methods), [&](std::string method) {
185 return std::make_tuple(direction, derivative_order, method);
186 });
187
188 return methods;
189};
190
191// Returns the method out of the direction/order/method tuple for
192// printing the test name

Callers 1

test_derivs.cxxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected