Permalink
Browse files

Merge branch 'periodic_fix' into 'master'

fix for PeriodicFESpace::GetVertexDofNrs, GetEdgeDofNrs, GetFaceDofNrs

See merge request !249
  • Loading branch information...
JSchoeberl committed Oct 6, 2017
2 parents dee0c0b + 850267c commit 17756e8f50ae515c6017f58c1c53fa2796127055
Showing with 36 additions and 6 deletions.
  1. +29 −0 comp/periodic.cpp
  2. +7 −6 comp/periodic.hpp
@@ -144,6 +144,35 @@ namespace ngcomp {
*/
}
void PeriodicFESpace :: GetDofNrs (NodeId ni, Array<DofId> & dnums) const
{
space->GetDofNrs(ni, dnums);
for (auto & d : dnums)
if (d != -1) d = dofmap[d];
}
void PeriodicFESpace :: GetVertexDofNrs (int vnr, Array<DofId> & dnums) const
{
space->GetVertexDofNrs(vnr, dnums);
for (auto & d : dnums)
if (d != -1) d = dofmap[d];
}
void PeriodicFESpace :: GetEdgeDofNrs (int ednr, Array<DofId> & dnums) const
{
space->GetEdgeDofNrs (ednr, dnums);
for (auto & d : dnums)
if (d != -1) d = dofmap[d];
}
void PeriodicFESpace :: GetFaceDofNrs (int fanr, Array<DofId> & dnums) const
{
space->GetFaceDofNrs(fanr, dnums);
for (auto & d : dnums)
if (d != -1) d = dofmap[d];
}
QuasiPeriodicFESpace :: QuasiPeriodicFESpace(shared_ptr<FESpace> fespace, const Flags & flags, shared_ptr<Array<int>> aused_idnrs, shared_ptr<Array<Complex>> afactors) :
PeriodicFESpace(fespace, flags, aused_idnrs), factors(afactors)
{
@@ -41,20 +41,21 @@ namespace ngcomp
virtual size_t GetNDofLevel (int level) const override { return space->GetNDofLevel(level); }
virtual void GetDofNrs(ElementId ei, Array<DofId> & dnums) const override;
virtual void GetDofNrs (NodeId ni, Array<DofId> & dnums) const;
virtual SymbolTable<shared_ptr<DifferentialOperator>> GetAdditionalEvaluators () const override
{ return space->GetAdditionalEvaluators (); }
[[deprecated("Use GetDofNrs(NODE_TYPE(NT_VERTEX,nr) instead")]]
virtual void GetVertexDofNrs (int vnr, Array<DofId> & dnums) const override
{ space->GetVertexDofNrs(vnr, dnums); }
virtual void GetVertexDofNrs (int vnr, Array<DofId> & dnums) const override;
//{ space->GetVertexDofNrs(vnr, dnums); }
[[deprecated("Use GetDofNrs(NODE_TYPE(NT_EDGE,nr) instead")]]
virtual void GetEdgeDofNrs (int ednr, Array<DofId> & dnums) const override
{ space->GetEdgeDofNrs (ednr, dnums); }
virtual void GetEdgeDofNrs (int ednr, Array<DofId> & dnums) const override;
//{ space->GetEdgeDofNrs (ednr, dnums); }
virtual void GetFaceDofNrs (int fanr, Array<DofId> & dnums) const override
{ space->GetFaceDofNrs(fanr, dnums); }
virtual void GetFaceDofNrs (int fanr, Array<DofId> & dnums) const override;
//{ space->GetFaceDofNrs(fanr, dnums); }
virtual void GetInnerDofNrs (int elnr, Array<DofId> & dnums) const override
{ space->GetInnerDofNrs(elnr, dnums); }

0 comments on commit 17756e8

Please sign in to comment.