OOFEM
2.4
OOFEM.org - Object Oriented Finite Element Solver
|
This base class is an abstraction for all numerical methods solving sparse nonlinear system of equations. More...
#include <sparsenonlinsystemnm.h>
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 . 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 SparseLinearSystemNM * | giveLinearSolver () |
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... | |
EngngModel * | giveEngngModel () |
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 | |
Domain * | domain |
Pointer to domain. More... | |
EngngModel * | engngModel |
Pointer to engineering model. More... | |
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.
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.
Definition at line 94 of file sparsenonlinsystemnm.h.
|
inline |
Constructor.
Definition at line 100 of file sparsenonlinsystemnm.h.
|
inlinevirtual |
Destructor.
Definition at line 102 of file sparsenonlinsystemnm.h.
|
virtual |
Definition at line 103 of file sparsenonlinsystemnm.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), convertPertMap(), oofem::FloatArray::giveSize(), igp_Map, igp_Weight, pert_init_needed, randPertAmplitude, and randSeed.
Referenced by oofem::CylindricalALM::solve().
|
virtual |
Definition at line 80 of file sparsenonlinsystemnm.C.
References oofem::IntArray::at(), oofem::FloatArray::at(), oofem::NumericalMethod::domain, oofem::DofManager::giveDofWithID(), oofem::Dof::giveEquationNumber(), oofem::DofManager::giveLabel(), oofem::Domain::giveNode(), oofem::IntArray::giveSize(), igp_Map, igp_PertDmanDofSrcArray, igp_PertWeightArray, igp_Weight, oofem::IntArray::resize(), and oofem::FloatArray::resize().
Referenced by applyPerturbation().
|
inline |
Error printing helper.
Definition at line 161 of file sparsenonlinsystemnm.h.
|
inlinevirtual |
Reimplemented in oofem::CylindricalALM, oofem::NRSolver, oofem::StaggeredSolver, and oofem::DynamicRelaxationSolver.
Definition at line 159 of file sparsenonlinsystemnm.h.
|
inlinevirtual |
Returns step length.
Reimplemented in oofem::CylindricalALM.
Definition at line 131 of file sparsenonlinsystemnm.h.
Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom().
|
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 |
Reimplemented from oofem::NumericalMethod.
Reimplemented in oofem::StaggeredSolver.
Definition at line 44 of file sparsenonlinsystemnm.C.
References _IFT_NonLinearStatic_pert, _IFT_NonLinearStatic_pertw, _IFT_NonLinearStatic_randPertAmplitude, _IFT_NonLinearStatic_randSeed, oofem::IntArray::clear(), oofem::FloatArray::clear(), oofem::IntArray::giveSize(), oofem::FloatArray::giveSize(), igp_PertDmanDofSrcArray, igp_PertWeightArray, IR_GIVE_OPTIONAL_FIELD, oofem::IRRT_BAD_FORMAT, oofem::IRRT_OK, OOFEM_WARNING, pert_init_needed, randPertAmplitude, and randSeed.
Referenced by oofem::NRSolver::initializeFrom(), and oofem::CylindricalALM::initializeFrom().
|
inlinevirtual |
Prints status message of receiver to output stream.
Prints the message corresponding to last solve.
outputStream | Stream to print state to. |
Reimplemented in oofem::NRSolver.
Definition at line 147 of file sparsenonlinsystemnm.h.
Referenced by oofem::NonLinearStatic::printOutputAt().
|
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.
|
inlinevirtual |
Sets the step length.
s | New step length. |
Reimplemented in oofem::CylindricalALM.
Definition at line 137 of file sparsenonlinsystemnm.h.
Referenced by oofem::AdaptiveNonLinearStatic::adaptiveRemap(), and oofem::AdaptiveNonLinearStatic::initializeAdaptiveFrom().
|
pure virtual |
Solves the given sparse linear system of equations .
Total load vector is not passed, it is defined as , where s is scale factor.
K | Coefficient matrix ( ; stiffness matrix). |
R | Reference incremental RHS (incremental load). |
R0 | Initial RHS (initial load). |
X | Total solution (total displacement). |
dX | Increment of solution (incremental displacements). |
F | InternalRhs (real internal forces). |
internalForcesEBENorm | Norm of internal nodal forces (evaluated on element by element basis) (split into each DOF id). |
s | RHS scale factor (load level). |
rlm | Reference load mode. |
nite | Number of iterations needed. |
tStep | Time step to solve for. |
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().
|
protected |
Load level.
Definition at line 78 of file sparsenonlinsystemnm.h.
Referenced by oofem::NRSolver::solve().
|
protected |
Definition at line 86 of file sparsenonlinsystemnm.h.
Referenced by applyPerturbation(), and convertPertMap().
|
protected |
Definition at line 84 of file sparsenonlinsystemnm.h.
Referenced by convertPertMap(), and initializeFrom().
|
protected |
Definition at line 85 of file sparsenonlinsystemnm.h.
Referenced by convertPertMap(), and initializeFrom().
|
protected |
Definition at line 87 of file sparsenonlinsystemnm.h.
Referenced by applyPerturbation(), and convertPertMap().
|
protected |
Definition at line 83 of file sparsenonlinsystemnm.h.
Referenced by applyPerturbation(), and initializeFrom().
|
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().
|
protected |
Definition at line 82 of file sparsenonlinsystemnm.h.
Referenced by applyPerturbation(), and initializeFrom().