Bugfix: 3D LR boundary integrals was not initialized

This commit is contained in:
Kjetil Andre Johannessen 2016-11-15 15:16:16 +01:00 committed by Arne Morten Kvarving
parent 3b08fbbcb6
commit 44781a3ee7

View File

@ -1245,19 +1245,17 @@ bool ASMu3D::integrate (Integrand& integrand, int lIndex,
std::map<char,size_t>::const_iterator iit = firstBp.find(lIndex); std::map<char,size_t>::const_iterator iit = firstBp.find(lIndex);
size_t firstp = iit == firstBp.end() ? 0 : iit->second; size_t firstp = iit == firstBp.end() ? 0 : iit->second;
int edge = LR::NONE; LR::parameterEdge edge;
if(lIndex == 1) switch(lIndex)
edge = LR::WEST; {
else if(lIndex == 2) case 1: edge = LR::WEST; break;
edge = LR::EAST; case 2: edge = LR::EAST; break;
else if(lIndex == 3) case 3: edge = LR::SOUTH; break;
edge = LR::SOUTH; case 4: edge = LR::NORTH; break;
else if(lIndex == 4) case 5: edge = LR::BOTTOM; break;
edge = LR::NORTH; case 6: edge = LR::TOP; break;
else if(lIndex == 5) default:edge = LR::NONE;
edge = LR::BOTTOM; }
else if(lIndex == 6)
edge = LR::TOP;
// fetch all elements along the chosen edge // fetch all elements along the chosen edge
std::vector<LR::Element*> edgeElms; std::vector<LR::Element*> edgeElms;
@ -1324,7 +1322,13 @@ bool ASMu3D::integrate (Integrand& integrand, int lIndex,
} }
// Initialize element quantities // Initialize element quantities
LocalIntegral* A = integrand.getLocalIntegral(fe.N.size(),fe.iel,true); LocalIntegral* A = integrand.getLocalIntegral(nBasis,fe.iel,true);
if (!integrand.initElementBou(MNPC[iEl],*A))
{
A->destruct();
ok = false;
break;
}
// --- Integration loop over all Gauss points in each direction -------- // --- Integration loop over all Gauss points in each direction --------