| 153 | } |
| 154 | |
| 155 | void TensorProductFacetBilinearFormIntegrator :: ApplyFacetMatrix ( |
| 156 | const FiniteElement & fel, |
| 157 | int LocalFacetNr, |
| 158 | const ElementTransformation & eltrans, FlatArray<int> & ElVertices, |
| 159 | const ElementTransformation & seltrans, FlatArray<int> & SElVertices, |
| 160 | FlatVector<double> elx, FlatVector<double> ely, |
| 161 | LocalHeap & lh) const |
| 162 | { |
| 163 | int xfacet = 0; |
| 164 | if(LocalFacetNr>=10) |
| 165 | { |
| 166 | xfacet = 1; |
| 167 | LocalFacetNr-=10; |
| 168 | } |
| 169 | HeapReset hr(lh); |
| 170 | ely = 0; |
| 171 | FlatVector<> ely1(ely.Size(), lh); |
| 172 | const TPHighOrderFE & volumefel = static_cast<const TPHighOrderFE &>(fel); |
| 173 | int order_fac = volumefel.elements[xfacet]->Order(); |
| 174 | int order_vol = volumefel.elements[1-xfacet]->Order(); |
| 175 | auto eltype1 = static_cast<const TPElementTransformation &>(eltrans).GetTrafo(xfacet).GetElementType(); |
| 176 | auto etfacet = ElementTopology::GetFacetType (eltype1, LocalFacetNr); |
| 177 | auto etvol = static_cast<const TPElementTransformation &>(eltrans).GetTrafo(1-xfacet).GetElementType(); |
| 178 | ArrayMem<const IntegrationRule *,2> irs(2); |
| 179 | const IntegrationRule & ir_facet = SelectIntegrationRule(etfacet, 2*order_fac); |
| 180 | Facet2ElementTrafo transform(eltype1, ElVertices); |
| 181 | const IntegrationRule & ir_facet_vol = transform(LocalFacetNr, ir_facet, lh); |
| 182 | const IntegrationRule &ir_vol = SelectIntegrationRule(etvol,2*order_vol); |
| 183 | irs[xfacet] = &ir_facet_vol; |
| 184 | irs[1-xfacet] = &ir_vol; |
| 185 | TPIntegrationRule tpir(irs); |
| 186 | BaseMappedIntegrationRule & tpmir = eltrans(tpir, lh); |
| 187 | auto & smir = seltrans(ir_facet, lh); |
| 188 | TPMappedIntegrationRule tpsmir(tpir,eltrans); |
| 189 | tpsmir.GetIRs()[xfacet] = &smir; |
| 190 | tpsmir.GetIRs()[1-xfacet] = static_cast<TPMappedIntegrationRule &>(tpmir).GetIRs()[1-xfacet]; |
| 191 | // evaluate proxy-values |
| 192 | ProxyUserData ud(trial_proxies.Size(), lh); |
| 193 | static_cast<TPMappedIntegrationRule &>(tpmir).SetFacet(xfacet); |
| 194 | static_cast<TPMappedIntegrationRule &>(tpsmir).SetFacet(xfacet); |
| 195 | const_cast<ElementTransformation&>(eltrans).userdata = &ud; |
| 196 | const_cast<ElementTransformation&>(seltrans).userdata = &ud; |
| 197 | ud.fel = &volumefel; // necessary to check remember-map |
| 198 | // ud.lh = &lh; |
| 199 | for (ProxyFunction * proxy : trial_proxies) |
| 200 | ud.AssignMemory (proxy, tpmir.Size(), proxy->Dimension(), lh); |
| 201 | for (ProxyFunction * proxy : trial_proxies) |
| 202 | if (! (proxy->IsOther() && proxy->BoundaryValues())) |
| 203 | dynamic_cast<const TPDifferentialOperator *>(proxy->Evaluator().get())->Apply(volumefel, tpmir, elx, ud.GetMemory(proxy), lh); |
| 204 | for (ProxyFunction * proxy : trial_proxies) |
| 205 | if (proxy->IsOther() && proxy->BoundaryValues()) |
| 206 | proxy->BoundaryValues()->Evaluate (tpsmir, ud.GetMemory(proxy)); |
| 207 | static_cast<TPMappedIntegrationRule &>(tpmir).GetIRs()[xfacet]->ComputeNormalsAndMeasure (eltype1, LocalFacetNr); |
| 208 | FlatMatrixFixWidth<1> val(tpmir.Size(),lh); |
| 209 | for (auto proxy : test_proxies) |
| 210 | { |
| 211 | HeapReset hr(lh); |
| 212 | FlatMatrix<> proxyvalues(tpmir.Size(), proxy->Dimension(), lh); |
nothing calls this directly
no test coverage detected