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

Method Update

comp/fespace.cpp:438–515  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436 }
437
438 void FESpace :: Update()
439 {
440 if (print)
441 {
442 *testout << "Update FESpace, type = " << typeid(*this).name() << endl;
443 *testout << "name = " << name << endl;
444 }
445
446 /*
447 for (int i = 0; i < specialelements.Size(); i++)
448 delete specialelements[i];
449 specialelements.SetSize(0);
450 */
451
452 ma->UpdateBuffers(); // is free if netgen-mesh did not change
453 int dim = ma->GetDimension();
454
455 dirichlet_vertex.SetSize (ma->GetNV());
456 dirichlet_edge.SetSize (ma->GetNEdges());
457 if (dim == 3)
458 dirichlet_face.SetSize (ma->GetNFaces());
459
460 dirichlet_vertex = false;
461 dirichlet_edge = false;
462 dirichlet_face = false;
463
464 /*
465 {
466 if (dirichlet_boundaries.Size())
467 for (Ngs_Element ngel : ma->Elements(BND)) // .OmpSplit())
468 if (dirichlet_boundaries[ngel.GetIndex()])
469 {
470 dirichlet_vertex[ngel.Vertices()] = true;
471 if (dim >= 2)
472 dirichlet_edge[ngel.Edges()] = true;
473 if (dim == 3)
474 dirichlet_face[ngel.Faces()[0]] = true;
475 }
476 }
477 */
478 for (auto vb : { BND, BBND, BBBND })
479 {
480 auto & dc = dirichlet_constraints[int(vb)];
481 if (dc.Size())
482 for (Ngs_Element ngel : ma->Elements(vb))
483 if (dc[ngel.GetIndex()])
484 {
485 dirichlet_vertex[ngel.Vertices()] = true;
486 // if (dim >= 2)
487 if (dim-vb >= 1)
488 dirichlet_edge[ngel.Edges()] = true;
489 // if (dim == 3)
490 if (dim-vb >= 2)
491 dirichlet_face[ngel.Faces()[0]] = true;
492 }
493 }
494
495

Callers

nothing calls this directly

Calls 15

GetNextTimeStampFunction · 0.85
IsRegularDofFunction · 0.85
UpdateCouplingDofArrayFunction · 0.85
ElementsMethod · 0.80
VerticesMethod · 0.80
EdgesMethod · 0.80
FacesMethod · 0.80
ClearMethod · 0.80
FacetsMethod · 0.80
UpdateFunction · 0.70
GetTimeStampFunction · 0.70
DefinedOnFunction · 0.70

Tested by

no test coverage detected