OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
oofem::SparseNonLinearSystemNM Class Referenceabstract

This base class is an abstraction for all numerical methods solving sparse nonlinear system of equations. More...

#include <sparsenonlinsystemnm.h>

+ Inheritance diagram for oofem::SparseNonLinearSystemNM:
+ Collaboration diagram for oofem::SparseNonLinearSystemNM:

Public Types

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...
 

Public Member Functions

 SparseNonLinearSystemNM (Domain *d, EngngModel *m)
 Constructor. More...
 
virtual ~SparseNonLinearSystemNM ()
 Destructor. More...
 
virtual NM_Status solve (SparseMtrx &K, FloatArray &R, FloatArray *R0, FloatArray &X, FloatArray &dX, FloatArray &F, const FloatArray &internalForcesEBENorm, double &s, referenceLoadInputModeType rlm, int &nite, TimeStep *tStep)=0
 Solves the given sparse linear system of equations $ s R + R_0 - F(X) = 0 $. 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 printState (FILE *outputStream)
 Prints status message of receiver to output stream. More...
 
virtual SparseLinearSystemNMgiveLinearSolver ()
 Constructs (if necessary) and returns a linear solver. More...
 
IRResultType initializeFrom (InputRecord *ir)
 
virtual void convertPertMap ()
 
virtual void applyPerturbation (FloatArray *displacement)
 
virtual const char * giveClassName () const
 
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 void reinitialize ()
 Reinitializes the receiver. More...
 
virtual void setDomain (Domain *d)
 
virtual contextIOResultType saveContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 
virtual contextIOResultType restoreContext (DataStream &stream, ContextMode mode, void *obj=NULL)
 

Protected Attributes

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

This base class is an abstraction for all numerical methods solving sparse nonlinear system of equations.

The purpose of this class is to declare the general interface to all numerical methods solving this kind of problem. This interface allows to use any suitable instance of the Numerical method class to the solve problem, and leave the whole engineering model code, including mapping, unchanged, because all instances of this class provide the common interface.

Definition at line 74 of file sparsenonlinsystemnm.h.

Member Enumeration Documentation

The following parameter allows to specify how the reference load vector is obtained from given totalLoadVector and initialLoadVector.

The initialLoadVector describes the part of loading which does not scale.

Enumerator
rlm_total 

The reference incremental load vector is defined as totalLoadVector assembled at given time.

rlm_incremental 

The reference load vector is obtained as incremental load vector at given time.

Definition at line 94 of file sparsenonlinsystemnm.h.

Constructor & Destructor Documentation

oofem::SparseNonLinearSystemNM::SparseNonLinearSystemNM ( Domain d,
EngngModel m 
)
inline

Constructor.

Definition at line 100 of file sparsenonlinsystemnm.h.

virtual oofem::SparseNonLinearSystemNM::~SparseNonLinearSystemNM ( )
inlinevirtual

Destructor.

Definition at line 102 of file sparsenonlinsystemnm.h.

Member Function Documentation

void oofem::SparseNonLinearSystemNM::applyPerturbation ( FloatArray displacement)
virtual
std :: string oofem::SparseNonLinearSystemNM::errorInfo ( const char *  func) const
inline

Error printing helper.

Definition at line 161 of file sparsenonlinsystemnm.h.

virtual const char* oofem::SparseNonLinearSystemNM::giveClassName ( ) const
inlinevirtual
virtual double oofem::SparseNonLinearSystemNM::giveCurrentStepLength ( )
inlinevirtual

Returns step length.

See also
solve For more details on the step length s.
Returns
Current step length

Reimplemented in oofem::CylindricalALM.

Definition at line 131 of file sparsenonlinsystemnm.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom().

virtual SparseLinearSystemNM* oofem::SparseNonLinearSystemNM::giveLinearSolver ( )
inlinevirtual

Constructs (if necessary) and returns a linear solver.

Public method because some problems require it for sensitivity analysis, etc. even for nonlinear problems (e.g. tangent relations in multiscale simulations).

Reimplemented in oofem::CylindricalALM, and oofem::NRSolver.

Definition at line 153 of file sparsenonlinsystemnm.h.

Referenced by oofem::NonLinearStatic::proceedStep().

virtual void oofem::SparseNonLinearSystemNM::printState ( FILE *  outputStream)
inlinevirtual

Prints status message of receiver to output stream.

Prints the message corresponding to last solve.

Parameters
outputStreamStream to print state to.

Reimplemented in oofem::NRSolver.

Definition at line 147 of file sparsenonlinsystemnm.h.

Referenced by oofem::NonLinearStatic::printOutputAt().

virtual bool oofem::SparseNonLinearSystemNM::referenceLoad ( ) const
inlinevirtual

Returns true if reference loads are used (i.e.

arc length methods).

Reimplemented in oofem::CylindricalALM.

Definition at line 141 of file sparsenonlinsystemnm.h.

virtual void oofem::SparseNonLinearSystemNM::setStepLength ( double  s)
inlinevirtual

Sets the step length.

See also
solve For more details on the step length s.
Parameters
sNew step length.

Reimplemented in oofem::CylindricalALM.

Definition at line 137 of file sparsenonlinsystemnm.h.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom().

virtual NM_Status oofem::SparseNonLinearSystemNM::solve ( SparseMtrx K,
FloatArray R,
FloatArray R0,
FloatArray X,
FloatArray dX,
FloatArray F,
const FloatArray internalForcesEBENorm,
double &  s,
referenceLoadInputModeType  rlm,
int &  nite,
TimeStep tStep 
)
pure 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.

Implemented in oofem::CylindricalALM, oofem::NRSolver, oofem::StaggeredSolver, and oofem::DynamicRelaxationSolver.

Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom(), oofem::NonLinearStatic::proceedStep(), and oofem::StationaryTransportProblem::solveYourselfAt().

Member Data Documentation

double oofem::SparseNonLinearSystemNM::deltaL
protected

Load level.

Definition at line 78 of file sparsenonlinsystemnm.h.

Referenced by oofem::NRSolver::solve().

IntArray oofem::SparseNonLinearSystemNM::igp_Map
protected

Definition at line 86 of file sparsenonlinsystemnm.h.

Referenced by applyPerturbation(), and convertPertMap().

IntArray oofem::SparseNonLinearSystemNM::igp_PertDmanDofSrcArray
protected

Definition at line 84 of file sparsenonlinsystemnm.h.

Referenced by convertPertMap(), and initializeFrom().

FloatArray oofem::SparseNonLinearSystemNM::igp_PertWeightArray
protected

Definition at line 85 of file sparsenonlinsystemnm.h.

Referenced by convertPertMap(), and initializeFrom().

FloatArray oofem::SparseNonLinearSystemNM::igp_Weight
protected

Definition at line 87 of file sparsenonlinsystemnm.h.

Referenced by applyPerturbation(), and convertPertMap().

bool oofem::SparseNonLinearSystemNM::pert_init_needed
protected

Definition at line 83 of file sparsenonlinsystemnm.h.

Referenced by applyPerturbation(), and initializeFrom().

double oofem::SparseNonLinearSystemNM::randPertAmplitude
protected

Amplitude of a random perturbation applied on the solution before the iteration process.

Definition at line 81 of file sparsenonlinsystemnm.h.

Referenced by applyPerturbation(), and initializeFrom().

int oofem::SparseNonLinearSystemNM::randSeed
protected

Definition at line 82 of file sparsenonlinsystemnm.h.

Referenced by applyPerturbation(), and initializeFrom().


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