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

Method Update

comp/facetsurffespace.cpp:350–414  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348
349
350 void FacetSurfaceFESpace :: Update()
351 {
352 FESpace::Update();
353
354 if(print)
355 *testout << " FacetSurfaceFEspace with order " << order << " rel_order " << rel_order << " var_order " << var_order << endl;
356
357 nel = ma->GetNSE();
358 nfa = ma->GetNEdges();
359 first_edge_dof.SetSize(nfa+1);
360 first_edge_dof = 0;
361
362 // first_edge_dof.SetSize(nfa+1);
363 // first_edge_dof = nfa;
364
365 if(ma->GetDimension() == 3)
366 {
367 /*
368 for(int i = 0; i < nfa; i++)
369 {
370 first_edge_dof[i] = ndof;
371 ndof += order+1;
372 }
373 first_edge_dof[nfa] = ndof;
374 */
375 for (auto el : ma->Elements(BND))
376 for (auto edge : el.Edges())
377 first_edge_dof[edge] = order+1;
378 }
379 else if(ma->GetDimension() == 2)
380 {
381 for (auto el : ma->Elements(BND))
382 for (auto vertex : el.Vertices())
383 first_edge_dof[vertex] = 1;
384 }
385 else
386 {
387 throw Exception("Only implemented for 3d and 2d!");
388 }
389
390 size_t ndof = 0;
391 for (size_t i = 0; i < nfa; i++)
392 {
393 size_t tmp = first_edge_dof[i];
394 first_edge_dof[i] = ndof;
395 ndof += tmp;
396 }
397 first_edge_dof[nfa] = ndof;
398
399
400 SetNDof (ndof);
401 /*
402 while (ma->GetNLevels() > ndlevel.Size())
403 ndlevel.Append (ndof);
404 ndlevel.Last() = ndof;
405 */
406 UpdateCouplingDofArray();
407

Callers

nothing calls this directly

Calls 7

UpdateCouplingDofArrayFunction · 0.85
ElementsMethod · 0.80
EdgesMethod · 0.80
VerticesMethod · 0.80
UpdateFunction · 0.70
SetSizeMethod · 0.45
GetDimensionMethod · 0.45

Tested by

no test coverage detected