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

Method Operator

comp/gridfunction.cpp:504–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502 }
503
504 shared_ptr<CoefficientFunction>
505 GridFunction :: Operator (shared_ptr<DifferentialOperator> diffop) const
506 {
507 shared_ptr<GridFunctionCoefficientFunction> coef;
508 auto self = dynamic_pointer_cast<GridFunction> (const_cast<GridFunction*>(this)->shared_from_this());
509
510 switch (diffop->VB())
511 {
512 case VOL:
513 coef = make_shared<GridFunctionCoefficientFunction> (self, diffop);
514 break;
515 case BND:
516 coef = make_shared<GridFunctionCoefficientFunction> (self, nullptr,diffop);
517 break;
518 case BBND:
519 coef = make_shared<GridFunctionCoefficientFunction> (self, nullptr,nullptr,diffop);
520 break;
521 case BBBND:
522 throw Exception ("there are no Operators with BBBND");
523 }
524 coef->SetDimensions(diffop->Dimensions());
525 coef->generated_from_operator = name;
526 return coef;
527 }
528
529 shared_ptr<CoefficientFunction>
530 GridFunction :: Operator (const string& name) const

Callers

nothing calls this directly

Calls 8

DimensionsMethod · 0.80
GetFESpaceFunction · 0.70
shared_from_thisMethod · 0.45
VBMethod · 0.45
UsedMethod · 0.45
GetClassNameMethod · 0.45
SupportsVBMethod · 0.45

Tested by

no test coverage detected