Added: LHS-matrix buffers for linear Newmark integration
This commit is contained in:
parent
1b58b79d5b
commit
65c36818e3
@ -74,6 +74,8 @@ public:
|
|||||||
//! \details This method is invoked once before starting the numerical
|
//! \details This method is invoked once before starting the numerical
|
||||||
//! integration over the entire spatial domain.
|
//! integration over the entire spatial domain.
|
||||||
virtual void initIntegration(const TimeDomain&, const Vector&, bool = false){}
|
virtual void initIntegration(const TimeDomain&, const Vector&, bool = false){}
|
||||||
|
//! \brief Initializes and toggles the use of left-hand-side matrix buffers.
|
||||||
|
virtual void initLHSbuffers(size_t) {}
|
||||||
//! \brief Initializes the integrand for a new result point loop.
|
//! \brief Initializes the integrand for a new result point loop.
|
||||||
//! \details This method is invoked once before starting the evaluation of
|
//! \details This method is invoked once before starting the evaluation of
|
||||||
//! the secondary solution at all result sampling points, after the converged
|
//! the secondary solution at all result sampling points, after the converged
|
||||||
|
@ -149,6 +149,8 @@ void NewmarkSIM::initPrm ()
|
|||||||
model.setIntegrationPrm(1,fabs(alpha2));
|
model.setIntegrationPrm(1,fabs(alpha2));
|
||||||
model.setIntegrationPrm(2,solveDisp ? -beta : beta);
|
model.setIntegrationPrm(2,solveDisp ? -beta : beta);
|
||||||
model.setIntegrationPrm(3,gamma);
|
model.setIntegrationPrm(3,gamma);
|
||||||
|
if (nupdat < maxit)
|
||||||
|
model.initLHSbuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -544,6 +544,13 @@ bool SIMbase::initSystem (const SIMbase* that)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SIMbase::initLHSbuffers ()
|
||||||
|
{
|
||||||
|
if (myProblem)
|
||||||
|
myProblem->initLHSbuffers(this->getNoElms());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool SIMbase::setAssociatedRHS (size_t iMat, size_t iVec)
|
bool SIMbase::setAssociatedRHS (size_t iMat, size_t iVec)
|
||||||
{
|
{
|
||||||
return myEqSys ? myEqSys->setAssociatedVector(iMat,iVec) : false;
|
return myEqSys ? myEqSys->setAssociatedVector(iMat,iVec) : false;
|
||||||
@ -945,6 +952,9 @@ bool SIMbase::assembleSystem (const TimeDomain& time, const Vectors& prevSol,
|
|||||||
if (&sysQ != myEqSys && isAssembling && mdFlag <= 1)
|
if (&sysQ != myEqSys && isAssembling && mdFlag <= 1)
|
||||||
sysQ.initialize(newLHSmatrix);
|
sysQ.initialize(newLHSmatrix);
|
||||||
|
|
||||||
|
if (isAssembling && mdFlag <= 1)
|
||||||
|
it->second->initLHSbuffers(newLHSmatrix);
|
||||||
|
|
||||||
if (!prevSol.empty())
|
if (!prevSol.empty())
|
||||||
it->second->initIntegration(time,prevSol.front(),poorConvg);
|
it->second->initIntegration(time,prevSol.front(),poorConvg);
|
||||||
|
|
||||||
|
@ -121,6 +121,9 @@ public:
|
|||||||
//! \brief Lets this simulator share equation system with \a that simulator.
|
//! \brief Lets this simulator share equation system with \a that simulator.
|
||||||
bool initSystem(const SIMbase* that);
|
bool initSystem(const SIMbase* that);
|
||||||
|
|
||||||
|
//! \brief Initializes left-hand-side element matrix buffers for integrand.
|
||||||
|
void initLHSbuffers();
|
||||||
|
|
||||||
//! \brief Associates a system vector to a system matrix.
|
//! \brief Associates a system vector to a system matrix.
|
||||||
//! \sa AlgEqSystem::setAssociatedVector
|
//! \sa AlgEqSystem::setAssociatedVector
|
||||||
//! \param[in] iMat Index of a coefficient matrix
|
//! \param[in] iMat Index of a coefficient matrix
|
||||||
|
Loading…
Reference in New Issue
Block a user