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

Method DoArchive

fem/coefficient.cpp:6791–6826  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6789
6790
6791 void DoArchive(Archive& ar) override
6792 {
6793 CoefficientFunction::DoArchive(ar);
6794 ar.Shallow(cf);
6795 if(ar.Input())
6796 {
6797 cf -> TraverseTree
6798 ([&] (CoefficientFunction & stepcf)
6799 {
6800 if (!steps.Contains(&stepcf))
6801 {
6802 steps.Append (&stepcf);
6803 // timers.Append (new Timer(string("CompiledCF")+typeid(stepcf).name()));
6804 dim.Append (stepcf.Dimension());
6805 is_complex.Append (stepcf.IsComplex());
6806 }
6807 });
6808 totdim = 0;
6809 for (int d : dim) totdim += d;
6810 inputs = DynamicTable<int> (steps.Size());
6811 max_inputsize = 0;
6812
6813 cf -> TraverseTree
6814 ([&] (CoefficientFunction & stepcf)
6815 {
6816 int mypos = steps.Pos (&stepcf);
6817 if (!inputs[mypos].Size())
6818 {
6819 Array<shared_ptr<CoefficientFunction>> in = stepcf.InputCoefficientFunctions();
6820 max_inputsize = max2(in.Size(), max_inputsize);
6821 for (auto incf : in)
6822 inputs.Add (mypos, steps.Pos(incf.get()));
6823 }
6824 });
6825 }
6826 }
6827
6828
6829 virtual shared_ptr<CoefficientFunction>

Callers

nothing calls this directly

Calls 10

ContainsMethod · 0.80
AddMethod · 0.80
DoArchiveFunction · 0.70
TraverseTreeMethod · 0.45
AppendMethod · 0.45
DimensionMethod · 0.45
IsComplexMethod · 0.45
SizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected