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

Method GenerateCode

fem/coefficient.cpp:6536–6555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6534};
6535
6536 void VectorialCoefficientFunction::GenerateCode(Code &code, FlatArray<int> inputs, int index) const
6537 {
6538 int input = 0;
6539 int input_index = 0;
6540 // code.Declare (code.res_type, index, Dimensions());
6541 code.Declare (index, Dimensions(), IsComplex());
6542 for (int i = 0; i < Dimension(); i++)
6543 {
6544 auto cfi = ci[input];
6545 code.body += Var(index, i, this->Dimensions())
6546 .Assign(Var(inputs[input], input_index, cfi->Dimensions()), false);
6547 input_index++;
6548 if (input_index == cfi->Dimension() )
6549 {
6550 input++;
6551 input_index = 0;
6552 }
6553 }
6554
6555 }
6556
6557
6558 shared_ptr<CoefficientFunction>

Callers 1

GenerateProgramMethod · 0.45

Calls 8

DimensionsFunction · 0.85
VarFunction · 0.85
DeclareMethod · 0.80
DimensionsMethod · 0.80
IsComplexFunction · 0.70
DimensionFunction · 0.70
AssignMethod · 0.45
DimensionMethod · 0.45

Tested by

no test coverage detected