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

Function FindCacheCF

fem/coefficient.cpp:7805–7818  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7803
7804
7805Array<CoefficientFunction*> FindCacheCF (CoefficientFunction & func)
7806{
7807 Array<CoefficientFunction*> cachecf;
7808 func.TraverseTree
7809 ( [&] (CoefficientFunction & nodecf)
7810 {
7811 if (dynamic_cast<CacheCoefficientFunction*> (&nodecf))
7812 {
7813 if (cachecf.Contains(&nodecf)) return;
7814 cachecf.Append (&nodecf);
7815 }
7816 });
7817 return cachecf;
7818}
7819
7820
7821void PrecomputeCacheCF (const Array<CoefficientFunction*> & cachecfs, BaseMappedIntegrationRule & mir,

Calls 3

ContainsMethod · 0.80
TraverseTreeMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected