69 |
|
|
70 |
bool Rectangle::operator==(const AbstractDomain& other) const |
bool Rectangle::operator==(const AbstractDomain& other) const |
71 |
{ |
{ |
72 |
if (dynamic_cast<const Rectangle*>(&other)) |
const Rectangle* o=dynamic_cast<const Rectangle*>(&other); |
73 |
return this==&other; |
if (o) { |
74 |
|
return (RipleyDomain::operator==(other) && |
75 |
|
m_gNE0==o->m_gNE0 && m_gNE1==o->m_gNE1 |
76 |
|
&& m_l0==o->m_l0 && m_l1==o->m_l1 |
77 |
|
&& m_NX==o->m_NX && m_NY==o->m_NY); |
78 |
|
} |
79 |
|
|
80 |
return false; |
return false; |
81 |
} |
} |
226 |
{ |
{ |
227 |
switch (fsType) { |
switch (fsType) { |
228 |
case Nodes: |
case Nodes: |
|
case DegreesOfFreedom: //FIXME |
|
|
case ReducedDegreesOfFreedom: //FIXME |
|
229 |
return &m_nodeId[0]; |
return &m_nodeId[0]; |
230 |
|
case DegreesOfFreedom: |
231 |
|
case ReducedDegreesOfFreedom: //FIXME: reduced |
232 |
|
return &m_dofId[0]; |
233 |
case Elements: |
case Elements: |
234 |
case ReducedElements: |
case ReducedElements: |
235 |
return &m_elementId[0]; |
return &m_elementId[0]; |
972 |
} |
} |
973 |
|
|
974 |
//protected |
//protected |
975 |
|
dim_t Rectangle::getNumDOF() const |
976 |
|
{ |
977 |
|
return m_nodeDistribution[m_mpiInfo->rank+1] |
978 |
|
-m_nodeDistribution[m_mpiInfo->rank]; |
979 |
|
} |
980 |
|
|
981 |
|
//protected |
982 |
dim_t Rectangle::getNumFaceElements() const |
dim_t Rectangle::getNumFaceElements() const |
983 |
{ |
{ |
984 |
const IndexVector faces = getNumFacesPerBoundary(); |
const IndexVector faces = getNumFacesPerBoundary(); |
1037 |
} |
} |
1038 |
m_nodeDistribution[m_mpiInfo->size]=getNumDataPointsGlobal(); |
m_nodeDistribution[m_mpiInfo->size]=getNumDataPointsGlobal(); |
1039 |
|
|
1040 |
|
m_dofId.resize(getNumDOF()); |
1041 |
m_nodeId.resize(getNumNodes()); |
m_nodeId.resize(getNumNodes()); |
1042 |
|
|
1043 |
// the bottom row and left column are not owned by this rank so the |
// the bottom row and left column are not owned by this rank so the |
1075 |
#pragma omp parallel for |
#pragma omp parallel for |
1076 |
for (dim_t i1=bottom; i1<m_N1; i1++) { |
for (dim_t i1=bottom; i1<m_N1; i1++) { |
1077 |
for (dim_t i0=left; i0<m_N0; i0++) { |
for (dim_t i0=left; i0<m_N0; i0++) { |
1078 |
m_nodeId[i0+i1*m_N0] = firstId+i0-left+(i1-bottom)*(m_N0-left); |
const index_t idx=i0-left+(i1-bottom)*(m_N0-left); |
1079 |
|
m_nodeId[i0+i1*m_N0] = firstId+idx; |
1080 |
|
m_dofId[idx] = firstId+idx; |
1081 |
} |
} |
1082 |
} |
} |
1083 |
m_nodeTags.assign(getNumNodes(), 0); |
m_nodeTags.assign(getNumNodes(), 0); |