| 2114 | } |
| 2115 | |
| 2116 | void L2HighOrderFESpace :: |
| 2117 | GetTraceTrans (const FESpace & tracespace, const BaseVector & in, BaseVector & out, bool avg, |
| 2118 | LocalHeap & lh) const |
| 2119 | { |
| 2120 | static Timer t("GetTraceTrans"); RegionTimer reg(t); |
| 2121 | |
| 2122 | out = 0.0; |
| 2123 | Array<short> classnr(ma->GetNE()); |
| 2124 | ma->IterateElements |
| 2125 | (VOL, lh, [&] (auto el, LocalHeap & llh) |
| 2126 | { |
| 2127 | classnr[el.Nr()] = |
| 2128 | SwitchET<ET_TRIG,ET_TET> |
| 2129 | (el.GetType(), |
| 2130 | [el] (auto et) { return ET_trait<et.ElementType()>::GetClassNr(el.Vertices()); }); |
| 2131 | }); |
| 2132 | |
| 2133 | TableCreator<size_t> creator; |
| 2134 | for ( ; !creator.Done(); creator++) |
| 2135 | for (auto i : Range(classnr)) |
| 2136 | creator.Add (classnr[i], i); |
| 2137 | Table<size_t> table = creator.MoveTable(); |
| 2138 | |
| 2139 | |
| 2140 | // size_t ne = ma->GetNE(); |
| 2141 | |
| 2142 | for (auto elclass_inds : table) |
| 2143 | { |
| 2144 | if (elclass_inds.Size() == 0) continue; |
| 2145 | |
| 2146 | ElementId ei(VOL,elclass_inds[0]); |
| 2147 | auto & felx = GetFE (ei, lh); |
| 2148 | // auto & trafo = GetMeshAccess()->GetTrafo(ei, lh); |
| 2149 | |
| 2150 | Matrix<> trace_op_x = GetTraceMatrix (felx); |
| 2151 | |
| 2152 | Matrix<> temp_x(elclass_inds.Size(), trace_op_x.Width()); |
| 2153 | Matrix<> temp_trace(elclass_inds.Size(), trace_op_x.Height()); |
| 2154 | |
| 2155 | ParallelForRange |
| 2156 | (Range(elclass_inds), |
| 2157 | [&] (IntRange myrange) |
| 2158 | { |
| 2159 | Array<DofId> dofs; |
| 2160 | |
| 2161 | // int tid = TaskManager::GetThreadId(); |
| 2162 | { |
| 2163 | for (auto i : myrange) |
| 2164 | { |
| 2165 | tracespace.GetDofNrs(ElementId(VOL,elclass_inds[i]), dofs); |
| 2166 | in.GetIndirect(dofs, temp_trace.Row(i)); |
| 2167 | } |
| 2168 | } |
| 2169 | |
| 2170 | { |
| 2171 | // temp_trace.Rows(myrange) = 0; |
| 2172 | // AddABt(temp_x.Rows(myrange), trace_op_x, temp_trace.Rows(myrange)); |
| 2173 | temp_x.Rows(myrange) = temp_trace.Rows(myrange) * trace_op_x; |
nothing calls this directly
no test coverage detected