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

Function Update

comp/hdivfes.cpp:793–829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791 }
792
793 void Update() override
794 {
795 if (ma->GetDimension() == 3)
796 {
797 size_t nfa = ma->GetNFaces();
798 SetNDof (3*nfa);
799 active_facets = BitArray(nfa);
800 active_facets.Clear();
801 for (auto el : ma->Elements(VOL))
802 for (auto fa : el.Faces())
803 active_facets.SetBit(fa);
804
805 ctofdof.SetSize(GetNDof());
806 ctofdof = WIREBASKET_DOF;
807 for (size_t i = 0; i < nfa; i++)
808 if (!active_facets.Test(i))
809 ctofdof[3*i] = ctofdof[3*i+1] = ctofdof[3*i+2] = UNUSED_DOF;
810
811 // cout << "active faces = " << endl << active_facets << endl;
812 }
813 else if (ma->GetDimension()==2)
814 {
815 size_t ned = ma->GetNEdges();
816 SetNDof (2*ned);
817 active_facets = BitArray(ned);
818 active_facets.Clear();
819 for (auto el : ma->Elements(VOL))
820 for (auto fa : el.Edges())
821 active_facets.SetBit(fa);
822
823 ctofdof.SetSize(GetNDof());
824 ctofdof = WIREBASKET_DOF;
825 for (size_t i = 0; i < ned; i++)
826 if (!active_facets.Test(i))
827 ctofdof[2*i] = ctofdof[2*i+1] = UNUSED_DOF;
828 }
829 }
830
831 // virtual void DoArchive (Archive & archive) override;
832 // virtual void UpdateCouplingDofArray() override;

Callers 15

UpdateMethod · 0.70
UpdateMethod · 0.70
DoArchiveMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70
UpdateMethod · 0.70

Calls 7

ClearMethod · 0.80
ElementsMethod · 0.80
FacesMethod · 0.80
EdgesMethod · 0.80
GetNDofFunction · 0.70
GetDimensionMethod · 0.45
SetSizeMethod · 0.45

Tested by

no test coverage detected