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

Method GetIntegrator

comp/fespace.cpp:1315–1357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1313 }
1314
1315 shared_ptr<BilinearFormIntegrator> FESpace :: GetIntegrator (VorB vb) const
1316 {
1317 if (integrator[vb])
1318 return integrator[vb];
1319
1320 /*
1321 auto single_evaluator = flux_evaluator;
1322 if (dynamic_pointer_cast<BlockDifferentialOperator>(single_evaluator))
1323 single_evaluator = dynamic_pointer_cast<BlockDifferentialOperator>(single_evaluator)->BaseDiffOp();
1324
1325 auto trial = make_shared<ProxyFunction>(false, false, single_evaluator,
1326 nullptr, nullptr, nullptr, nullptr, nullptr);
1327 auto test = make_shared<ProxyFunction>(true, false, single_evaluator,
1328 nullptr, nullptr, nullptr, nullptr, nullptr);
1329 fluxbli = make_shared<SymbolicBilinearFormIntegrator> (InnerProduct(trial,test), vb, false);
1330 single_fluxbli = fluxbli;
1331 */
1332 auto evaluator = GetEvaluator(vb);
1333 if (!evaluator) return nullptr;
1334
1335 bool is_block = false;
1336 int block_dim;
1337 auto block_evaluator = dynamic_pointer_cast<BlockDifferentialOperator> (evaluator);
1338 if (block_evaluator)
1339 {
1340 is_block = true;
1341 block_dim = block_evaluator->BlockDim();
1342 evaluator = block_evaluator->BaseDiffOp();
1343 }
1344 auto trial = make_shared<ProxyFunction>(nullptr, // dynamic_pointer_cast<FESpace>(const_cast<FESpace*>(this)->shared_from_this()),
1345 false, IsComplex(), evaluator,
1346 nullptr, nullptr, nullptr, nullptr, nullptr);
1347 auto test = make_shared<ProxyFunction>(nullptr, // dynamic_pointer_cast<FESpace>(const_cast<FESpace*>(this)->shared_from_this()),
1348 true, false, evaluator,
1349 nullptr, nullptr, nullptr, nullptr, nullptr);
1350 shared_ptr<BilinearFormIntegrator> bli =
1351 make_shared<SymbolicBilinearFormIntegrator> (InnerProduct(trial,test), vb, VOL);
1352
1353 if (is_block)
1354 bli = make_shared<BlockBilinearFormIntegrator> (bli, block_dim);
1355 const_cast<shared_ptr<BilinearFormIntegrator>&> (integrator[vb]) = bli;
1356 return bli;
1357 }
1358
1359
1360

Callers

nothing calls this directly

Calls 4

GetEvaluatorFunction · 0.70
IsComplexFunction · 0.70
InnerProductFunction · 0.50
BaseDiffOpMethod · 0.45

Tested by

no test coverage detected