OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::StaggeredSolver Class Reference

The staggered solver will perform Newton iterations on subsets of DofIDs, in a staggered manner. More...

#include <staggeredsolver.h>

+ Inheritance diagram for oofem::StaggeredSolver:
+ Collaboration diagram for oofem::StaggeredSolver:

Public Member Functions

 StaggeredSolver (Domain *d, EngngModel *m)
 
virtual ~StaggeredSolver ()
 
virtual NM_Status solve (SparseMtrx &k, FloatArray &R, FloatArray *R0, FloatArray &X, FloatArray &dX, FloatArray &F, const FloatArray &internalForcesEBENorm, double &l, referenceLoadInputModeType rlm, int &nite, TimeStep *)
 Solves the given sparse linear system of equations $ s R + R_0 - F(X) = 0 $. More...
 
virtual IRResultType initializeFrom (InputRecord *ir)
 
virtual const char * giveClassName () const
 
virtual const char * giveInputRecordName () const
 
- Public Member Functions inherited from oofem::NRSolver
 NRSolver (Domain *d, EngngModel *m)
 
virtual ~NRSolver ()
 
virtual void printState (FILE *outputStream)
 Prints status message of receiver to output stream. More...
 
virtual void setDomain (Domain *d)
 
virtual void reinitialize ()
 Reinitializes the receiver. More...
 
virtual SparseLinearSystemNMgiveLinearSolver ()
 Constructs (if necessary) and returns a linear solver. More...
 
- Public Member Functions inherited from oofem::SparseNonLinearSystemNM
 SparseNonLinearSystemNM (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual ~SparseNonLinearSystemNM ()
 Destructor. More...
 
virtual double giveCurrentStepLength ()
 Returns step length. More...
 
virtual void setStepLength (double s)
 Sets the step length. More...
 
virtual bool referenceLoad () const
 Returns true if reference loads are used (i.e. More...
 
virtual void convertPertMap ()
 
virtual void applyPerturbation (FloatArray *displacement)
 
std::string errorInfo (const char *func) const
 Error printing helper. More...
 
- Public Member Functions inherited from oofem::NumericalMethod
 NumericalMethod (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual ~NumericalMethod ()
 Destructor. More...
 
EngngModelgiveEngngModel ()
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 

Private Member Functions

bool checkConvergenceDofIdArray (FloatArray &RT, FloatArray &F, FloatArray &rhs, FloatArray &ddX, FloatArray &X, double RRT, const FloatArray &internalForcesEBENorm, int nite, bool &errorOutOfRange, TimeStep *tStep, IntArray &dofIdArray)
 

Private Attributes

IntArray totalIdList
 
IntArray idPos
 
std::vector< CustomEquationNumberingUnknownNumberingSchemeList
 

Additional Inherited Members

- Public Types inherited from oofem::SparseNonLinearSystemNM
enum  referenceLoadInputModeType { rlm_total =0, rlm_incremental =1 }
 The following parameter allows to specify how the reference load vector is obtained from given totalLoadVector and initialLoadVector. More...
 
- Protected Types inherited from oofem::NRSolver
enum  nrsolver_ModeType { nrsolverModifiedNRM, nrsolverFullNRM, nrsolverAccelNRM }
 
- Protected Member Functions inherited from oofem::NRSolver
LineSearchNMgiveLineSearchSolver ()
 Constructs and returns a line search solver. More...
 
void initPrescribedEqs ()
 Initiates prescribed equations. More...
 
void applyConstraintsToStiffness (SparseMtrx &k)
 
void applyConstraintsToLoadIncrement (int nite, const SparseMtrx &k, FloatArray &R, referenceLoadInputModeType rlm, TimeStep *tStep)
 
bool checkConvergence (FloatArray &RT, FloatArray &F, FloatArray &rhs, FloatArray &ddX, FloatArray &X, double RRT, const FloatArray &internalForcesEBENorm, int nite, bool &errorOutOfRange)
 Determines whether or not the solution has reached convergence. More...
 
- Protected Attributes inherited from oofem::NRSolver
int nsmax
 
int minIterations
 
double minStepLength
 
nrsolver_ModeType NR_Mode
 
nrsolver_ModeType NR_OldMode
 
int NR_ModeTick
 
int MANRMSteps
 
std::unique_ptr< SparseLinearSystemNMlinSolver
 linear system solver More...
 
LinSystSolverType solverType
 linear system solver ID More...
 
SparseMtrx::SparseMtrxVersionType smConstraintVersion
 sparse matrix version, used to control constrains application to stiffness More...
 
int numberOfPrescribedDofs
 number of prescribed displacement More...
 
bool prescribedDofsFlag
 Flag indicating that some dofs are controlled under displacement control. More...
 
IntArray prescribedDofs
 Array of pairs identifying prescribed dofs (node, dof) More...
 
FloatArray prescribedDofsValues
 Array of prescribed values. More...
 
int prescribedDisplacementTF
 Load Time Function of prescribed values. More...
 
IntArray prescribedEqs
 Array of prescribed equations. More...
 
bool prescribedEqsInitFlag
 Flag indicating that prescribedEqs were initialized. More...
 
FloatArray lastReactions
 Computed reactions. They are stored in order to print them in printState method. More...
 
bool lsFlag
 Flag indicating whether to use line-search. More...
 
std::unique_ptr< LineSearchNMlinesearchSolver
 Line search solver. More...
 
bool mCalcStiffBeforeRes
 Flag indicating if the stiffness should be evaluated before the residual in the first iteration. More...
 
bool constrainedNRFlag
 Flag indicating whether to use constrained Newton. More...
 
double constrainedNRalpha
 Scale factor for dX, dX_new = alpha * dX. More...
 
int constrainedNRminiter
 Minimum number of iterations before constraint is activated. More...
 
FloatArray rtolf
 Relative unbalanced force tolerance for each group. More...
 
FloatArray rtold
 Relative iterative displacement change tolerance for each group. More...
 
FloatArray forceErrVec
 
FloatArray forceErrVecOld
 
std::map< int, double > dg_forceScale
 Optional user supplied scale of forces used in convergence check. More...
 
double maxIncAllowed
 
- Protected Attributes inherited from oofem::SparseNonLinearSystemNM
double deltaL
 Load level. More...
 
double randPertAmplitude
 Amplitude of a random perturbation applied on the solution before the iteration process. More...
 
int randSeed
 
bool pert_init_needed
 
IntArray igp_PertDmanDofSrcArray
 
FloatArray igp_PertWeightArray
 
IntArray igp_Map
 
FloatArray igp_Weight
 
- Protected Attributes inherited from oofem::NumericalMethod
Domaindomain
 Pointer to domain. More...
 
EngngModelengngModel
 Pointer to engineering model. More...
 

Detailed Description

The staggered solver will perform Newton iterations on subsets of DofIDs, in a staggered manner.

Author
Jim Brouzoulis

Definition at line 109 of file staggeredsolver.h.

Constructor & Destructor Documentation

oofem::StaggeredSolver::StaggeredSolver ( Domain d,
EngngModel m 
)

Definition at line 73 of file staggeredsolver.C.

References UnknownNumberingSchemeList.

virtual oofem::StaggeredSolver::~StaggeredSolver ( )
inlinevirtual

Definition at line 121 of file staggeredsolver.h.

Member Function Documentation

bool oofem::StaggeredSolver::checkConvergenceDofIdArray ( FloatArray RT,
FloatArray F,
FloatArray rhs,
FloatArray ddX,
FloatArray X,
double  RRT,
const FloatArray internalForcesEBENorm,
int  nite,
bool &  errorOutOfRange,
TimeStep tStep,
IntArray dofIdArray 
)
private
virtual const char* oofem::StaggeredSolver::giveClassName ( ) const
inlinevirtual

Reimplemented from oofem::NRSolver.

Definition at line 131 of file staggeredsolver.h.

virtual const char* oofem::StaggeredSolver::giveInputRecordName ( ) const
inlinevirtual

Reimplemented from oofem::NRSolver.

Definition at line 132 of file staggeredsolver.h.

References _IFT_StaggeredSolver_Name.

NM_Status oofem::StaggeredSolver::solve ( SparseMtrx K,
FloatArray R,
FloatArray R0,
FloatArray X,
FloatArray dX,
FloatArray F,
const FloatArray internalForcesEBENorm,
double &  s,
referenceLoadInputModeType  rlm,
int &  nite,
TimeStep tStep 
)
virtual

Solves the given sparse linear system of equations $ s R + R_0 - F(X) = 0 $.

Total load vector is not passed, it is defined as $ s R + R_0 $, where s is scale factor.

See also
EngngModel::updateComponent Used to update the stiffness matrix and load vector.
Parameters
KCoefficient matrix ( $\displaystyle K = \frac{\partial F}{\partial X} $; stiffness matrix).
RReference incremental RHS (incremental load).
R0Initial RHS (initial load).
XTotal solution (total displacement).
dXIncrement of solution (incremental displacements).
FInternalRhs (real internal forces).
internalForcesEBENormNorm of internal nodal forces (evaluated on element by element basis) (split into each DOF id).
sRHS scale factor (load level).
rlmReference load mode.
niteNumber of iterations needed.
tStepTime step to solve for.
Returns
NM_Status value.
Todo:
This doesn't check units, it is nonsense and must be corrected / Mikael

Reimplemented from oofem::NRSolver.

Definition at line 151 of file staggeredsolver.C.

References oofem::FloatArray::add(), oofem::FloatArray::assemble(), oofem::FloatArray::at(), oofem::FloatArray::beDifferenceOf(), oofem::DofGrouping::ddX, oofem::DofGrouping::dX, oofem::DofGrouping::fExtList, oofem::DofGrouping::fIntList, oofem::FloatArray::giveSize(), oofem::SparseMtrx::giveSubMatrix(), oofem::TimeStep::incrementStateCounter(), oofem::TimeStep::incrementSubStepNumber(), oofem::InternalRhs, oofem::ParallelContext::localNorm(), oofem::DofGrouping::locArrayList, oofem::macroScale, NM_None, NM_NoSuccess, NM_Success, oofem::NonLinearLhs, OOFEM_LOG_DEBUG, OOFEM_LOG_INFO, OOFEM_WARNING, oofem::FloatArray::resize(), oofem::DofGrouping::stiffnessMatrixList, oofem::DofGrouping::X, and oofem::FloatArray::zero().

Member Data Documentation

IntArray oofem::StaggeredSolver::idPos
private

Definition at line 113 of file staggeredsolver.h.

Referenced by initializeFrom().

IntArray oofem::StaggeredSolver::totalIdList
private

Definition at line 112 of file staggeredsolver.h.

Referenced by initializeFrom().

std :: vector< CustomEquationNumbering > oofem::StaggeredSolver::UnknownNumberingSchemeList
private

Definition at line 114 of file staggeredsolver.h.

Referenced by initializeFrom(), and StaggeredSolver().


The documentation for this class was generated from the following files:

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:41 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011