Skip to content

Commit

Permalink
changed: force field projections for mixed multi-patch
Browse files Browse the repository at this point in the history
the nodal averaging code in SIMbase::project uses the global
node number and this breaks since since these are for all
bases, not just basis 1.
  • Loading branch information
akva2 committed Jun 21, 2024
1 parent 6ad5dd9 commit 93cfb72
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/ASM/LR/ASMu2D.C
Original file line number Diff line number Diff line change
Expand Up @@ -2464,9 +2464,6 @@ Field* ASMu2D::getProjectedField (const Vector& coefs) const

Fields* ASMu2D::getProjectedFields (const Vector& coefs, size_t) const
{
if (!this->separateProjectionBasis())
return nullptr;

size_t ncmp = coefs.size() / this->getNoProjectionNodes();
if (ncmp*this->getNoProjectionNodes() == coefs.size())
return new LRSplineFields2D(this->getBasis(ASM::PROJECTION_BASIS),
Expand Down
3 changes: 0 additions & 3 deletions src/ASM/LR/ASMu3D.C
Original file line number Diff line number Diff line change
Expand Up @@ -2006,9 +2006,6 @@ Field* ASMu3D::getProjectedField (const Vector& coefs) const

Fields* ASMu3D::getProjectedFields (const Vector& coefs, size_t) const
{
if (!this->separateProjectionBasis())
return nullptr;

size_t ncmp = coefs.size() / this->getNoProjectionNodes();
if (ncmp*this->getNoProjectionNodes() == coefs.size())
return new LRSplineFields3D(this->getBasis(ASM::PROJECTION_BASIS),coefs,ncmp);
Expand Down
5 changes: 5 additions & 0 deletions src/SIM/SIMbase.C
Original file line number Diff line number Diff line change
Expand Up @@ -2362,6 +2362,11 @@ bool SIMbase::evalSecondarySolution (Matrix& field, int pindx) const

bool SIMbase::fieldProjections () const
{
// Forced for mixed multi-patch models as the nodal averaging
// in SIMbase::project() fails.
if (myModel.size() > 1 && myModel[0]->getNoBasis() > 1)
return true;

for (const ASMbase* pch : myModel)
if (pch->separateProjectionBasis())
return true;
Expand Down

0 comments on commit 93cfb72

Please sign in to comment.