| 71 | } |
| 72 | |
| 73 | void TensorProductBilinearFormIntegrator :: ApplyYElementMatrix( |
| 74 | const FiniteElement & tpfel, |
| 75 | const ElementTransformation & tptrafo, |
| 76 | IntRange dnumsy, |
| 77 | void * axevaluations, |
| 78 | BaseMappedIntegrationRule * mirx, |
| 79 | LocalHeap & lh) const |
| 80 | { |
| 81 | const FiniteElement & fel = *static_cast<const TPHighOrderFE &>(tpfel).elements[1]; |
| 82 | const ElementTransformation & trafo = static_cast<const TPElementTransformation &>(tptrafo).GetTrafo(1); |
| 83 | ProxyUserData & xevals = *(static_cast<ProxyUserData *>(axevaluations)); |
| 84 | const IntegrationRule & ir = SelectIntegrationRule(fel.ElementType(),2*fel.Order()); |
| 85 | BaseMappedIntegrationRule & miry = trafo(ir, lh); |
| 86 | ProxyUserData ud(trial_proxies.Size(), lh); |
| 87 | const_cast<ElementTransformation&>(tptrafo).userdata = &ud; |
| 88 | // ud.lh = &lh; |
| 89 | ud.fel = &fel; |
| 90 | int nipx = mirx->Size(); |
| 91 | int nipy = miry.Size(); |
| 92 | int niptp = nipx*nipy; |
| 93 | TPMappedIntegrationRule * tpmir = new (lh) TPMappedIntegrationRule(*mirx, miry, TPIntegrationRule(niptp), tptrafo); |
| 94 | tpmir->SetFacet(0); |
| 95 | for (ProxyFunction * proxy : trial_proxies) |
| 96 | { |
| 97 | ud.AssignMemory (proxy, (*mirx).IR().Size()*ir.Size(), proxy->Dimension(), lh); |
| 98 | if(proxy->Evaluator()->BlockDim() == 1) |
| 99 | static_cast<TPDifferentialOperator*>(proxy->Evaluator().get())->ApplyY(fel,miry,ud.GetMemory(proxy), xevals.GetMemory(proxy).Cols(dnumsy),lh); |
| 100 | else |
| 101 | static_cast<TPBlockDifferentialOperator2*>(proxy->Evaluator().get())->ApplyY(fel,miry,ud.GetMemory(proxy), xevals.GetMemory(proxy).Rows(dnumsy),lh); |
| 102 | } |
| 103 | FlatMatrix<> val(niptp, 1,lh); |
| 104 | for (auto proxy : test_proxies) |
| 105 | { |
| 106 | HeapReset hr(lh); |
| 107 | FlatMatrix<> proxyvalues(niptp, proxy->Dimension(), lh); |
| 108 | for (int k = 0; k < proxy->Dimension(); k++) |
| 109 | { |
| 110 | ud.testfunction = proxy; |
| 111 | ud.test_comp = k; |
| 112 | cf -> Evaluate (*tpmir, val); |
| 113 | proxyvalues.Col(k) = val.Col(0); |
| 114 | } |
| 115 | for(int i=0,ii=0;i<nipx;i++) |
| 116 | for(int j=0;j<nipy;j++,ii++) |
| 117 | proxyvalues.Row(ii) *= (*mirx)[i].GetWeight()*miry[j].GetWeight(); |
| 118 | |
| 119 | if(proxy->Evaluator()->BlockDim() == 1) |
| 120 | static_cast<TPDifferentialOperator*>(proxy->Evaluator().get()) |
| 121 | ->ApplyYTrans(fel,miry,proxyvalues,xevals.GetMemory(proxy).Cols(dnumsy),lh); |
| 122 | else |
| 123 | static_cast<TPBlockDifferentialOperator2*>(proxy->Evaluator().get()) |
| 124 | ->ApplyYTrans(fel,miry,proxyvalues,xevals.GetMemory(proxy).Cols(dnumsy),lh); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | void TensorProductBilinearFormIntegrator :: ApplyXElementMatrixTrans( |
| 129 | const FiniteElement & fel, |
nothing calls this directly
no test coverage detected