Skip to content

Commit

Permalink
Merge pull request #12549 from KratosMultiphysics/RomApp/Change_alloc…
Browse files Browse the repository at this point in the history
…ation_size_phi_and_psi

[RomApplication] [Fast PR] Change the size allocation of phi_elemental and psi_elemental
  • Loading branch information
Marco1410 authored Jul 17, 2024
2 parents b116072 + a3811c5 commit 36aa2e7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ namespace Kratos
//assemble the elemental contribution - here is where the ROM acts
//compute the elemental reduction matrix phi_elemental
const auto& r_geom = it_el->GetGeometry();
if(phi_elemental.size1() != elem_dofs.size() || phi_elemental.size2() != mRomDofs)
phi_elemental.resize(elem_dofs.size(), mRomDofs,false);
if(phi_elemental.size1() != rhs_contribution.size() || phi_elemental.size2() != mRomDofs)
phi_elemental.resize(rhs_contribution.size(), mRomDofs,false);
RomAuxiliaryUtilities::GetPhiElemental(phi_elemental, elem_dofs, r_geom, mMapPhi);
noalias(row(matrix_residuals, k)) = prod(trans(phi_elemental), rhs_contribution); // The size of the residual will vary only when using more ROM modes, one row per condition
}
Expand Down Expand Up @@ -190,8 +190,8 @@ namespace Kratos
//assemble the elemental contribution - here is where the ROM acts
//compute the elemental reduction matrix phi_elemental
const auto& r_geom = it_el->GetGeometry();
if(psi_elemental.size1() != elem_dofs.size() || psi_elemental.size2() != mPetrovGalerkinRomDofs)
psi_elemental.resize(elem_dofs.size(), mPetrovGalerkinRomDofs,false);
if(psi_elemental.size1() != rhs_contribution.size() || psi_elemental.size2() != mPetrovGalerkinRomDofs)
psi_elemental.resize(rhs_contribution.size(), mPetrovGalerkinRomDofs,false);
RomAuxiliaryUtilities::GetPsiElemental(psi_elemental, elem_dofs, r_geom, mMapPhi);
noalias(row(matrix_residuals, k)) = prod(trans(psi_elemental), rhs_contribution); // The size of the residual will vary only when using more ROM modes, one row per condition
}
Expand Down Expand Up @@ -299,4 +299,4 @@ namespace Kratos



#endif // ROM_RESIDUALS_UTILITY_H_INCLUDED defined
#endif // ROM_RESIDUALS_UTILITY_H_INCLUDED defined

0 comments on commit 36aa2e7

Please sign in to comment.