| 104 | |
| 105 | template <typename KERNEL> |
| 106 | shared_ptr<BaseMatrix> GenericIntegralOperator<KERNEL> :: |
| 107 | CreateMatrixFMM(LocalHeap & lh) const |
| 108 | { |
| 109 | static Timer tall("ngbem fmm setup"); RegionTimer r(tall); |
| 110 | Array<Vec<3>> xpts, ypts, xnv, ynv; |
| 111 | // IntegrationRule ir(ET_TRIG, intorder); |
| 112 | IntegrationRule ir_trig(ET_TRIG, intorder); |
| 113 | IntegrationRule ir_quad(ET_QUAD, intorder); |
| 114 | auto trial_mesh = trial_space->GetMeshAccess(); |
| 115 | auto test_mesh = test_space->GetMeshAccess(); |
| 116 | |
| 117 | Array<int> compress_trial_els(trial_mesh->GetNE(BND)); |
| 118 | Array<int> compress_test_els(test_mesh->GetNE(BND)); |
| 119 | compress_trial_els = -1; |
| 120 | compress_test_els = -1; |
| 121 | |
| 122 | int cnt = 0; |
| 123 | for (auto el : trial_mesh->Elements(BND)) |
| 124 | if (trial_space->DefinedOn(el)) |
| 125 | if (!trial_definedon || (*trial_definedon).Mask().Test(trial_mesh->GetElIndex(el))) |
| 126 | { |
| 127 | HeapReset hr(lh); |
| 128 | auto & trafo = trial_mesh->GetTrafo(el, lh); |
| 129 | // auto & mir = static_cast<MappedIntegrationRule<2,3>&>(trafo(ir, lh)); |
| 130 | auto & ir = (trafo.GetElementType() == ET_QUAD) ? ir_quad : ir_trig; |
| 131 | auto & mir = static_cast<MappedIntegrationRule<2,3>&>(trafo(ir, lh)); |
| 132 | for (auto & mip : mir) |
| 133 | { |
| 134 | xpts.Append(mip.GetPoint()); |
| 135 | xnv.Append(mip.GetNV()); |
| 136 | } |
| 137 | compress_trial_els[el.Nr()] = cnt++; |
| 138 | } |
| 139 | |
| 140 | cnt = 0; |
| 141 | for (auto el : test_mesh->Elements(BND)) |
| 142 | if (test_space->DefinedOn(el)) |
| 143 | if (!test_definedon || (*test_definedon).Mask().Test(test_mesh->GetElIndex(el))) |
| 144 | { |
| 145 | HeapReset hr(lh); |
| 146 | auto & trafo = test_mesh->GetTrafo(el, lh); |
| 147 | // auto & mir = static_cast<MappedIntegrationRule<2,3>&>(trafo(ir, lh)); |
| 148 | auto & ir = (trafo.GetElementType() == ET_QUAD) ? ir_quad : ir_trig; |
| 149 | auto & mir = static_cast<MappedIntegrationRule<2,3>&>(trafo(ir, lh)); |
| 150 | for (auto & mip : mir) |
| 151 | { |
| 152 | ypts.Append(mip.GetPoint()); |
| 153 | ynv.Append(mip.GetNV()); |
| 154 | } |
| 155 | compress_test_els[el.Nr()] = cnt++; |
| 156 | } |
| 157 | |
| 158 | auto create_eval = [&](const FESpace & fes, |
| 159 | const Array<int> & compress_els, |
| 160 | const DifferentialOperator & evaluator) |
| 161 | { |
| 162 | auto mesh = fes.GetMeshAccess(); |
| 163 | Array<short> classnr(mesh->GetNE(BND)); |
nothing calls this directly
no test coverage detected