Skip to content

Commit eee9932

Browse files
committed
Added: Assign gravity vector to ASMsupel patch before parsing it
1 parent c14e621 commit eee9932

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/SIM/SIMsupel.C

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
//==============================================================================
1313

1414
#include "SIMsupel.h"
15-
#include "ASMbase.h"
15+
#include "ASMsupel.h"
1616
#include "ASM3D.h"
17-
#include "IntegrandBase.h"
17+
#include "HasGravityBase.h"
1818
#include "SAM.h"
1919
#include "Utilities.h"
2020
#include "IFEM.h"
@@ -105,6 +105,10 @@ ASMbase* SIMsupel::readPatch (std::istream& isp, int pchInd, const CharVec&,
105105
ASMbase* pch = ASM3D::create(ASM::SuperElm,ncmp);
106106
if (pch)
107107
{
108+
// Need to assign gravity vector before parsing superelement data
109+
HasGravityBase* itgr = dynamic_cast<HasGravityBase*>(myProblem);
110+
if (itgr && !itgr->getGravity().isZero())
111+
static_cast<ASMsupel*>(pch)->setGravity(itgr->getGravity());
108112
if (!pch->read(isp) || this->getLocalPatchIndex(pchInd+1) < 1)
109113
{
110114
delete pch;

0 commit comments

Comments
 (0)