Nektar++
Public Member Functions | Protected Attributes | List of all members
Nektar::MultiRegions::PatchMap Class Reference

#include <SubStructuredGraph.h>

Public Member Functions

 PatchMap (void)
 
 PatchMap (const int vals)
 
 ~PatchMap (void)
 
void SetPatchMap (const int n, const int patchId, const int dofId, const unsigned int bndPatch, const NekDouble sign)
 
void SetNewLevelMap (Array< OneD, const unsigned int > numLocalBndCondPerPatch, Array< OneD, const unsigned int > numLocalIntCondPerPatch)
 
Array< OneD, const int > GetPatchId () const
 
Array< OneD, const int > GetDofId () const
 
Array< OneD, const int > GetNewLevelMap () const
 
Array< OneD, const unsigned int > IsBndDof () const
 
Array< OneD, const NekDoubleGetSign () const
 

Protected Attributes

Array< OneD, int > m_patchId
 
Array< OneD, int > m_dofId
 
Array< OneD, int > m_newLevelMap
 
Array< OneD, unsigned int > m_bndPatch
 
Array< OneD, NekDoublem_sign
 

Detailed Description

Definition at line 66 of file SubStructuredGraph.h.

Constructor & Destructor Documentation

◆ PatchMap() [1/2]

Nektar::MultiRegions::PatchMap::PatchMap ( void  )

Definition at line 70 of file SubStructuredGraph.cpp.

71{
72}

◆ PatchMap() [2/2]

Nektar::MultiRegions::PatchMap::PatchMap ( const int  vals)

Definition at line 74 of file SubStructuredGraph.cpp.

75{
76 m_patchId = Array<OneD, int>(nvals);
77 m_dofId = Array<OneD, int>(nvals);
78 m_bndPatch = Array<OneD, unsigned int>(nvals);
79 m_sign = Array<OneD, NekDouble>(nvals);
80}
Array< OneD, unsigned int > m_bndPatch
Array< OneD, NekDouble > m_sign

References m_bndPatch, m_dofId, m_patchId, and m_sign.

◆ ~PatchMap()

Nektar::MultiRegions::PatchMap::~PatchMap ( void  )

Definition at line 82 of file SubStructuredGraph.cpp.

83{
84}

Member Function Documentation

◆ GetDofId()

Array< OneD, const int > Nektar::MultiRegions::PatchMap::GetDofId ( ) const
inline

Definition at line 86 of file SubStructuredGraph.h.

87 {
88 return m_dofId;
89 }

References m_dofId.

◆ GetNewLevelMap()

Array< OneD, const int > Nektar::MultiRegions::PatchMap::GetNewLevelMap ( ) const
inline

Definition at line 91 of file SubStructuredGraph.h.

92 {
93 return m_newLevelMap;
94 }

References m_newLevelMap.

◆ GetPatchId()

Array< OneD, const int > Nektar::MultiRegions::PatchMap::GetPatchId ( ) const
inline

Definition at line 81 of file SubStructuredGraph.h.

82 {
83 return m_patchId;
84 }

References m_patchId.

◆ GetSign()

Array< OneD, const NekDouble > Nektar::MultiRegions::PatchMap::GetSign ( ) const
inline

Definition at line 101 of file SubStructuredGraph.h.

102 {
103 return m_sign;
104 }

References m_sign.

◆ IsBndDof()

Array< OneD, const unsigned int > Nektar::MultiRegions::PatchMap::IsBndDof ( ) const
inline

Definition at line 96 of file SubStructuredGraph.h.

97 {
98 return m_bndPatch;
99 }

References m_bndPatch.

◆ SetNewLevelMap()

void Nektar::MultiRegions::PatchMap::SetNewLevelMap ( Array< OneD, const unsigned int >  numLocalBndCondPerPatch,
Array< OneD, const unsigned int >  numLocalIntCondPerPatch 
)

Definition at line 95 of file SubStructuredGraph.cpp.

98{
99 int npatch = numLocalBndCondPerPatch.size();
100
101 Array<OneD, int> bndoffset(npatch + 1);
102 Array<OneD, int> intoffset(npatch + 1);
103
104 bndoffset[0] = intoffset[0] = 0;
105 for (int i = 1; i <= npatch; ++i)
106 {
107 bndoffset[i] = bndoffset[i - 1] + numLocalBndCondPerPatch[i - 1];
108 intoffset[i] = intoffset[i - 1] + numLocalIntCondPerPatch[i - 1];
109 }
110
111 m_newLevelMap = Array<OneD, int>(m_dofId.size());
112
113 for (int i = 0; i < m_dofId.size(); ++i)
114 {
115 if (m_bndPatch[i] == true)
116 {
117 m_newLevelMap[i] = bndoffset[m_patchId[i]] + m_dofId[i];
118 }
119 else
120 {
121 m_newLevelMap[i] =
122 bndoffset[npatch] + intoffset[m_patchId[i]] + m_dofId[i];
123 }
124 }
125}

References m_bndPatch, m_dofId, m_newLevelMap, and m_patchId.

◆ SetPatchMap()

void Nektar::MultiRegions::PatchMap::SetPatchMap ( const int  n,
const int  patchId,
const int  dofId,
const unsigned int  bndPatch,
const NekDouble  sign 
)

Definition at line 86 of file SubStructuredGraph.cpp.

88{
89 m_patchId[n] = patchId;
90 m_dofId[n] = dofId;
91 m_bndPatch[n] = bndPatch;
92 m_sign[n] = sign;
93}
#define sign(a, b)
return the sign(b)*a
Definition: Polylib.cpp:47

References m_bndPatch, m_dofId, m_patchId, m_sign, and sign.

Member Data Documentation

◆ m_bndPatch

Array<OneD, unsigned int> Nektar::MultiRegions::PatchMap::m_bndPatch
protected

Definition at line 110 of file SubStructuredGraph.h.

Referenced by IsBndDof(), PatchMap(), SetNewLevelMap(), and SetPatchMap().

◆ m_dofId

Array<OneD, int> Nektar::MultiRegions::PatchMap::m_dofId
protected

Definition at line 108 of file SubStructuredGraph.h.

Referenced by GetDofId(), PatchMap(), SetNewLevelMap(), and SetPatchMap().

◆ m_newLevelMap

Array<OneD, int> Nektar::MultiRegions::PatchMap::m_newLevelMap
protected

Definition at line 109 of file SubStructuredGraph.h.

Referenced by GetNewLevelMap(), and SetNewLevelMap().

◆ m_patchId

Array<OneD, int> Nektar::MultiRegions::PatchMap::m_patchId
protected

Definition at line 107 of file SubStructuredGraph.h.

Referenced by GetPatchId(), PatchMap(), SetNewLevelMap(), and SetPatchMap().

◆ m_sign

Array<OneD, NekDouble> Nektar::MultiRegions::PatchMap::m_sign
protected

Definition at line 111 of file SubStructuredGraph.h.

Referenced by GetSign(), PatchMap(), and SetPatchMap().