fix solution transfer for mixed models

This commit is contained in:
Arne Morten Kvarving 2020-06-16 15:44:31 +02:00
parent 57228365dd
commit b5297e1b55
2 changed files with 5 additions and 6 deletions

View File

@ -974,10 +974,10 @@ bool ASMu2Dmx::refine (const LR::RefineData& prm, Vectors& sol)
return true;
for (Vector& solvec : sol) {
size_t ofs = 0;
for (size_t j = 0; j < m_basis.size(); j++) {
LR::extendControlPoints(m_basis[j].get(), solvec, nfx[j], ofs);
ofs += nfx[j]*nb[j];
Vector bVec;
this->extractNodeVec(solvec, bVec, 0, j+1);
LR::extendControlPoints(m_basis[j].get(), bVec, nfx[j]);
}
}
@ -1009,7 +1009,7 @@ bool ASMu2Dmx::refine (const LR::RefineData& prm, Vectors& sol)
}
size_t ofs = 0;
for (int i = sol.size()-1; i > 0; i--)
for (int i = sol.size()-1; i >= 0; i--)
for (size_t j = 0; j < m_basis.size(); ++j) {
sol[i].resize(len);
LR::contractControlPoints(m_basis[j].get(), sol[i], nfx[j], ofs);

View File

@ -1481,7 +1481,6 @@ bool SIMinput::refine (const LR::RefineData& prm, Vectors& sol)
Vectors lsols;
lsols.reserve(sol.size()*myModel.size());
size_t ngNodes = this->getNoNodes(1);
for (size_t i = 0; i < myModel.size(); i++)
{
pch = dynamic_cast<ASMunstruct*>(myModel[i]);
@ -1491,7 +1490,7 @@ bool SIMinput::refine (const LR::RefineData& prm, Vectors& sol)
Vectors lsol(sol.size());
for (size_t j = 0; j < sol.size(); j++)
myModel[i]->extractNodeVec(sol[j], lsol[j], sol[j].size()/ngNodes);
this->extractPatchSolution(sol[j], lsol[j], myModel[i]);
if (!pch->refine(prmloc,lsol))
return false;
for (const Vector& s : lsol)