MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / expand_ellipse

Function expand_ellipse

fem/tensorcoefficient.cpp:343–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

341 }
342
343 pair<string,string> expand_ellipse(string signature_part, const shared_ptr<CoefficientFunction> cf,
344 const string& existing_symbols, string ellipse_symbols = "")
345 {
346 auto pos = signature_part.find("...");
347 if (pos == string::npos)
348 return {std::move(signature_part), std::move(ellipse_symbols)};
349
350 auto nnew = cf->Dimensions().Size() - (signature_part.size() - 3);
351
352 if (nnew > ellipse_symbols.size())
353 ellipse_symbols += new_index_symbols(existing_symbols + ellipse_symbols, nnew - ellipse_symbols.size());
354
355 signature_part = replace_ellipse(signature_part, pos, nnew, ellipse_symbols);
356 return {std::move(signature_part), std::move(ellipse_symbols)};
357 }
358
359 string expand_ellipses(const string& signature, const Array<shared_ptr<CoefficientFunction>>& cfs)
360 {

Callers 1

expand_ellipsesFunction · 0.85

Calls 5

new_index_symbolsFunction · 0.85
replace_ellipseFunction · 0.85
findMethod · 0.80
DimensionsMethod · 0.80
SizeMethod · 0.45

Tested by

no test coverage detected