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

Method Update

comp/normalfacetfespace.cpp:260–470  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258 }
259
260 void NormalFacetFESpace :: Update()
261 {
262 FESpace::Update();
263 if ( print )
264 *testout << "NormalFacetFESpace, order " << order << endl
265 << "rel_order " << rel_order << ", var_order " << var_order << endl;
266
267 bool first_update = GetTimeStamp() < ma->GetTimeStamp();
268 if (first_update) timestamp = NGS_Object::GetNextTimeStamp();
269
270 if ( low_order_space )
271 low_order_space -> Update();
272
273 size_t nel = ma->GetNE();
274 size_t nfacets = ma->GetNFacets();
275
276 if (first_update)
277 {
278 int p = 0;
279 if (!var_order) p = order;
280
281 order_facet.SetSize(nfacets);
282 fine_facet.SetSize(nfacets);
283
284 order_facet = p;
285 fine_facet = 0;
286
287 for (Ngs_Element el : ma->Elements<BND>())
288 if (DefinedOn(el))
289 fine_facet[el.Facets()] = true;
290#ifdef PARALLEL
291 if(var_order)
292 throw Exception("MPI + variable order for NormalFacetFESpace is not implemented.");
293#endif
294
295
296 for (size_t i = 0; i < nel; i++)
297 {
298 ElementId ei(VOL,i);
299 if (!DefinedOn (ei))
300 continue;
301 IVec<3> el_orders = ma->GetElOrders(i);
302
303 ELEMENT_TYPE eltype=ma->GetElType(ei);
304 const POINT3D * points = ElementTopology :: GetVertices (eltype);
305
306 if (ma->GetDimension() == 2)
307 {
308 auto fanums = ma->GetElEdges (ei);
309 for (int j=0;j<fanums.Size();j++)
310 fine_facet[fanums[j]] = 1;
311
312 if(var_order)
313 {
314 auto edges = ElementTopology::GetEdges (eltype);
315 for(int j=0; j<fanums.Size(); j++)
316 for(int k=0;k<2;k++)
317 if(points[edges[j][0]][k] != points[edges[j][1]][k])

Callers

nothing calls this directly

Calls 15

GetNextTimeStampFunction · 0.85
GetEdgesFunction · 0.85
GetFacesFunction · 0.85
swapFunction · 0.85
ElementIdClass · 0.85
UpdateCouplingDofArrayFunction · 0.85
FacetsMethod · 0.80
UpdateFunction · 0.70
GetTimeStampFunction · 0.70
DefinedOnFunction · 0.70
UpdateMethod · 0.45
GetNFacetsMethod · 0.45

Tested by

no test coverage detected