Made assembleSystem virtual and added parameter mixedFEM

git-svn-id: http://svn.sintef.no/trondheim/IFEM/trunk@1307 e10b68d5-8a6e-419e-a041-bce267b0401d
This commit is contained in:
rho 2011-11-29 13:27:04 +00:00 committed by Knut Morten Okstad
parent 24b88f6a25
commit e14ca28512
2 changed files with 9 additions and 6 deletions

View File

@ -54,6 +54,7 @@ SIMbase::SIMbase () : g2l(&myGlb2Loc)
nGlPatches = 0; nGlPatches = 0;
vizIncr = 1; vizIncr = 1;
format = 1; format = 1;
mixedFEM = false;
MPCLess::compareSlaveDofOnly = true; // to avoid multiple slave definitions MPCLess::compareSlaveDofOnly = true; // to avoid multiple slave definitions
@ -206,7 +207,7 @@ bool SIMbase::createFEMmodel ()
if (nGlPatches == 0 && nProc == 1) if (nGlPatches == 0 && nProc == 1)
nGlPatches = myModel.size(); nGlPatches = myModel.size();
return true; return true;
} }
@ -757,8 +758,7 @@ double SIMbase::solutionNorms (const Vector& x, double* inf,
{ {
if (nf == 0) nf = this->getNoSpaceDim(); if (nf == 0) nf = this->getNoSpaceDim();
for (size_t d = 0; d < nf; d++) for (size_t d = 0; d < nf; d++) {
{
ind[d] = d+1; ind[d] = d+1;
inf[d] = mySam->normInf(x,ind[d]); inf[d] = mySam->normInf(x,ind[d]);
} }

View File

@ -192,14 +192,14 @@ public:
//! \param[in] time Parameters for nonlinear/time-dependent simulations //! \param[in] time Parameters for nonlinear/time-dependent simulations
//! \param[in] pSol Previous primary solution vectors in DOF-order //! \param[in] pSol Previous primary solution vectors in DOF-order
//! \param[in] newLHSmatrix If \e false, only integrate the RHS vector //! \param[in] newLHSmatrix If \e false, only integrate the RHS vector
bool assembleSystem(const TimeDomain& time, const Vectors& pSol = Vectors(), virtual bool assembleSystem(const TimeDomain& time, const Vectors& pSol = Vectors(),
bool newLHSmatrix = true); bool newLHSmatrix = true);
//! \brief Administers assembly of the linear equation system. //! \brief Administers assembly of the linear equation system.
//! \param[in] pSol Previous primary solution vectors in DOF-order //! \param[in] pSol Previous primary solution vectors in DOF-order
//! //!
//! \details Use this version for linear/stationary problems only. //! \details Use this version for linear/stationary problems only.
bool assembleSystem(const Vectors& pSol = Vectors()) virtual bool assembleSystem(const Vectors& pSol = Vectors())
{ return this->assembleSystem(TimeDomain(),pSol); } { return this->assembleSystem(TimeDomain(),pSol); }
//! \brief Extracts the assembled load vector for inspection/visualization. //! \brief Extracts the assembled load vector for inspection/visualization.
@ -586,6 +586,9 @@ protected:
AlgEqSystem* myEqSys; //!< The actual linear equation system AlgEqSystem* myEqSys; //!< The actual linear equation system
SAMpatch* mySam; //!< Auxiliary data for FE assembly management SAMpatch* mySam; //!< Auxiliary data for FE assembly management
LinSolParams* mySolParams; //!< Input parameters for PETSc LinSolParams* mySolParams; //!< Input parameters for PETSc
// Discretization attributes
bool mixedFEM; //!< If mixed finite elements are used
}; };
#endif #endif