OOFEM 3.0
Loading...
Searching...
No Matches
oofem::CylindricalALM Class Reference

#include <calmls.h>

Inheritance diagram for oofem::CylindricalALM:
Collaboration diagram for oofem::CylindricalALM:

Public Member Functions

 CylindricalALM (Domain *d, EngngModel *m)
virtual ~CylindricalALM ()
ConvergedReason solve (SparseMtrx &K, FloatArray &R, FloatArray *R0, FloatArray &X, FloatArray &dX, FloatArray &F, const FloatArray &internalForcesEBENorm, double &ReachedLambda, referenceLoadInputModeType rlm, int &nite, TimeStep *) override
double giveCurrentStepLength () override
void setStepLength (double s) override
void initializeFrom (InputRecord &ir) override
bool referenceLoad () const override
void saveContext (DataStream &stream, ContextMode mode) override
void restoreContext (DataStream &stream, ContextMode mode) override
void setDomain (Domain *d) override
void reinitialize () override
const char * giveClassName () const override
const char * giveInputRecordName () const
SparseLinearSystemNMgiveLinearSolver () override
Public Member Functions inherited from oofem::SparseNonLinearSystemNM
 SparseNonLinearSystemNM (Domain *d, EngngModel *m)
 Constructor.
virtual ~SparseNonLinearSystemNM ()
 Destructor.
virtual void printState (FILE *outputStream)
void initializeFrom (InputRecord &ir) override
virtual void convertPertMap ()
virtual void applyPerturbation (FloatArray *displacement)
std::string errorInfo (const char *func) const
 Error printing helper.
Public Member Functions inherited from oofem::NumericalMethod
 NumericalMethod (Domain *d, EngngModel *m)
virtual ~NumericalMethod ()
 Destructor.
EngngModelgiveEngngModel ()

Protected Types

enum  calm_ControlType { calm_hpc_off = 0 , calm_hpc_on , calml_hpc }
 CALM mode type; determines the calm step length control. More...
enum  calm_NR_ModeType { calm_modifiedNRM , calm_fullNRM , calm_accelNRM }
 Controlling mode of Newton-Raphson Method. More...
enum  RootSelectionType { RST_Cos =0 , RST_Dot =1 }
typedef std ::set< DofIDItem__DofIDSet

Protected Member Functions

void convertHPCMap ()
int computeDeltaLambda (double &deltaLambda, const FloatArray &dX, const FloatArray &deltaXt, const FloatArray &deltaX_, const FloatArray &R, double RR, double eta, double deltaL, double DeltaLambda0, int neq)
void search (int istep, FloatArray &prod, FloatArray &eta, double amp, double maxeta, double mineta, int &status)
bool checkConvergence (const FloatArray &R, const FloatArray *R0, const FloatArray &F, const FloatArray &X, const FloatArray &ddX, double Lambda, double RR0, double RR, double drProduct, const FloatArray &internalForcesEBENorm, int nite, bool &errorOutOfRange)
 Evaluates the convergence criteria.
void do_lineSearch (FloatArray &X, const FloatArray &XInitial, const FloatArray &deltaX_, const FloatArray &deltaXt, const FloatArray &dXm1, FloatArray &dX, FloatArray &ddX, const FloatArray &R, const FloatArray *R0, const FloatArray &F, double &DeltaLambda, double &DeltaLambdam1, double &deltaLambda, double &Lambda, double &ReachedLambda, double RR, double &drProduct, TimeStep *tStep)
 Perform line search optimization of step length.

Protected Attributes

int nsmax
int maxRestarts
double Psi
double deltaL
double minStepLength
double maxStepLength
int solved
int numberOfRequiredIterations
calm_NR_ModeType calm_NR_Mode
calm_NR_ModeType calm_NR_OldMode
int calm_NR_ModeTick
int calm_MANRMSteps
int minIterations
 Minimum hard number of iteration.s.
int calm_hpc_init
 Variables for HyperPlaneControl.
calm_ControlType calm_Control
FloatArray calm_HPCWeights
IntArray calm_HPCIndirectDofMask
 Array containing equation numbers of dofs under indirect control.
IntArray calm_HPCDmanDofSrcArray
 Input array containing dofmanagers and corresponding dof numbers under indirect control.
FloatArray calm_HPCDmanWeightSrcArray
 Input array of dofman weights (for hpcmode 2).
std ::unique_ptr< SparseLinearSystemNMlinSolver
 Linear system solver.
LinSystSolverType solverType
 linear system solver ID.
int lsFlag
 Line search flag.
double ls_tolerance
 Line search tolerance.
double amplifFactor
 Line search amplification factor.
double maxEta
 Line search parameters (limits).
double minEta
int nccdg
 Number of convergence criteria dof groups.
std ::vector< __DofIDSetccDofGroups
 Convergence criteria dof groups.
FloatArray rtolf
 Relative unbalanced force tolerance for each group.
FloatArray rtold
 Relative iterative displacement change tolerance for each group.
ParallelContextparallel_context
 Parallel context for computing norms, dot products and such.
RootSelectionType rootselectiontype
 Root selection type.
FloatArray old_dX
 previous increment of dX, needed by root selection type 1
Protected Attributes inherited from oofem::SparseNonLinearSystemNM
double deltaL =0.0
 Load level.
double randPertAmplitude =0.0
 Amplitude of a random perturbation applied on the solution before the iteration process.
int randSeed =0
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.
EngngModelengngModel
 Pointer to engineering model.

Additional Inherited Members

Public Types inherited from oofem::SparseNonLinearSystemNM
enum  referenceLoadInputModeType { rlm_total =0 , rlm_incremental =1 }

Detailed Description

Implementation of sparse nonlinear solver with indirect control. It uses Cylindrical Arc-Length Method algorithm.

DESCRIPTION : Perform solution of non-linear problem in the form Kt * deltaR = g where g is defined as g = g(Lambda,X) = Lambda* R - F(X). During iteration process, we want g became zero vector.

This method uses Modified Newton Raphson iteration scheme

If we solve non-linear static we can interpret symbols as follows:

Kt - tangential stiffness dX - increment of displacements g - vector of unbalanced forces (at the end should be zero one) Lambda - Load level Rt - Quasi Total Load vector Rt = R0 + Lambda*R X - total displacement vector F(X) - Nodal representation of (real) internal forces. Psi - control parameter (=0. means displacement control) Bergan_k0 - variable used to compute bergan's parameters of current stiffness. calm_NR_Mode - variable controlling the mode of NRM (ModifiedNR, Full NRM (stiffness update after each iteration), Modified Accelerated NRM (we perform iteration with stiffness matrix updated only after calm_MANRMSteps) calm_NR_OldMode - variable containing the old mode of NRM, which will be restored after calm_NR_ModeTick iterations. calm_NR_ModeTick - see calm_NR_OldMode. calm_MANRMSteps - if calm_NR_Mode == calm_accelNRM, it specifies, that new updated stiffness matrix is assembled after calm_MANRMSteps. calm_Control - variable indicating the ALM control. calm_HPCIndirectDofMask - Mask, telling which dofs are used for HPC. calm_HPCWeights - dofs weights in constrain.

Tasks:

  • solving problem: solveYourselfAt.
  • returning results (increment of displacement, reached level of loading and so on)

Variable description :

  • K(N,N) = Stiffness matrix (assumed positive definite)
  • dX(N) = Iterative increment of displacement
  • Rt = "quasi" total load vector
  • R0 = Fixed (Initial) load vector
  • deltaL = Step length
  • deltaLambda = Increment of load level
  • Psi = Determines loading or displacement control
  • dX = Current total increment
  • F = Nodal representation of (real) internal forces
  • DeltaLambda = Current total increment of load level
  • Lambda = Total load level
  • RTOL= Convergence tolerance
  • NSMAX = Maximum number of sweeps allowed

OUTPUT : (after call solveYourselfAt)

  • dX = Reached displacement increment
  • Lambda = Total load level
  • nite = Number of iterations required to fulfill balance
  • status = NM_status with flags set to reached state

Definition at line 146 of file calmls.h.

Member Typedef Documentation

◆ __DofIDSet

typedef std :: set< DofIDItem > oofem::CylindricalALM::__DofIDSet
protected

Definition at line 163 of file calmls.h.

Member Enumeration Documentation

◆ calm_ControlType

CALM mode type; determines the calm step length control.

Enumerator
calm_hpc_off 

Full ALM with quadratic constrain and all dofs.

calm_hpc_on 

Full ALM with quadratic constrain, taking into account only selected dofs.

calml_hpc 

Linearized ALM (only displacements), taking into account only selected dofs with given weight.

Definition at line 150 of file calmls.h.

◆ calm_NR_ModeType

Controlling mode of Newton-Raphson Method.

Enumerator
calm_modifiedNRM 

Keeps the old tangent.

calm_fullNRM 

Updates the tangent every iteration.

calm_accelNRM 

Updates the tangent after a few steps.

Definition at line 157 of file calmls.h.

◆ RootSelectionType

Type characterizing how the roots of the quadratic equation for the arc-length parameter are selected 0 – cosinus based criterion 1 – dot product based criterion

Enumerator
RST_Cos 
RST_Dot 

Definition at line 219 of file calmls.h.

Constructor & Destructor Documentation

◆ CylindricalALM()

oofem::CylindricalALM::CylindricalALM ( Domain * d,
EngngModel * m )

References CylindricalALM(), and solve().

Referenced by CylindricalALM().

◆ ~CylindricalALM()

oofem::CylindricalALM::~CylindricalALM ( )
virtual

Definition at line 103 of file calmls.C.

Member Function Documentation

◆ checkConvergence()

bool oofem::CylindricalALM::checkConvergence ( const FloatArray & R,
const FloatArray * R0,
const FloatArray & F,
const FloatArray & X,
const FloatArray & ddX,
double Lambda,
double RR0,
double RR,
double drProduct,
const FloatArray & internalForcesEBENorm,
int nite,
bool & errorOutOfRange )
protected

◆ computeDeltaLambda()

int oofem::CylindricalALM::computeDeltaLambda ( double & deltaLambda,
const FloatArray & dX,
const FloatArray & deltaXt,
const FloatArray & deltaX_,
const FloatArray & R,
double RR,
double eta,
double deltaL,
double DeltaLambda0,
int neq )
protected

◆ convertHPCMap()

◆ do_lineSearch()

void oofem::CylindricalALM::do_lineSearch ( FloatArray & X,
const FloatArray & XInitial,
const FloatArray & deltaX_,
const FloatArray & deltaXt,
const FloatArray & dXm1,
FloatArray & dX,
FloatArray & ddX,
const FloatArray & R,
const FloatArray * R0,
const FloatArray & F,
double & DeltaLambda,
double & DeltaLambdam1,
double & deltaLambda,
double & Lambda,
double & ReachedLambda,
double RR,
double & drProduct,
TimeStep * tStep )
protected

◆ giveClassName()

const char * oofem::CylindricalALM::giveClassName ( ) const
inlineoverridevirtual

Reimplemented from oofem::SparseNonLinearSystemNM.

Definition at line 256 of file calmls.h.

◆ giveCurrentStepLength()

double oofem::CylindricalALM::giveCurrentStepLength ( )
inlineoverridevirtual

Returns step length.

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

Reimplemented from oofem::SparseNonLinearSystemNM.

Definition at line 238 of file calmls.h.

References deltaL.

◆ giveInputRecordName()

const char * oofem::CylindricalALM::giveInputRecordName ( ) const
inline

Definition at line 257 of file calmls.h.

References _IFT_CylindricalALM_Name.

◆ giveLinearSolver()

SparseLinearSystemNM * oofem::CylindricalALM::giveLinearSolver ( )
overridevirtual

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 from oofem::SparseNonLinearSystemNM.

Definition at line 977 of file calmls.C.

References oofem::classFactory, oofem::NumericalMethod::domain, oofem::NumericalMethod::engngModel, linSolver, OOFEM_ERROR, and solverType.

Referenced by initializeFrom(), and solve().

◆ initializeFrom()

void oofem::CylindricalALM::initializeFrom ( InputRecord & ir)
overridevirtual

◆ referenceLoad()

bool oofem::CylindricalALM::referenceLoad ( ) const
inlineoverridevirtual

Returns true if reference loads are used (i.e. arc length methods).

Reimplemented from oofem::SparseNonLinearSystemNM.

Definition at line 241 of file calmls.h.

◆ reinitialize()

void oofem::CylindricalALM::reinitialize ( )
inlineoverridevirtual

Reinitializes the receiver. This is used, when topology of problem has changed (for example after adaptive refinement or load transfer in parallel applications). This is necessary for numerical methods, that cache some data between solution steps and that may depend on domain or problem topology. The caching of data by receiver is intended only for speeding up the calculation, but numerical method must be always able to generate this data again. This method clears receiver cached data dependent on topology, when it changes.

Reimplemented from oofem::NumericalMethod.

Definition at line 250 of file calmls.h.

References calm_hpc_init, and linSolver.

◆ restoreContext()

void oofem::CylindricalALM::restoreContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Reimplemented from oofem::NumericalMethod.

Definition at line 968 of file calmls.C.

References oofem::CIO_IOERR, deltaL, oofem::DataStream::read(), and THROW_CIOERR.

◆ saveContext()

void oofem::CylindricalALM::saveContext ( DataStream & stream,
ContextMode mode )
overridevirtual

Reimplemented from oofem::NumericalMethod.

Definition at line 959 of file calmls.C.

References oofem::CIO_IOERR, deltaL, THROW_CIOERR, and oofem::DataStream::write().

◆ search()

void oofem::CylindricalALM::search ( int istep,
FloatArray & prod,
FloatArray & eta,
double amp,
double maxeta,
double mineta,
int & status )
protected

Definition at line 1149 of file calmls.C.

References oofem::FloatArray::at(), and oofem::max().

Referenced by do_lineSearch().

◆ setDomain()

void oofem::CylindricalALM::setDomain ( Domain * d)
inlineoverridevirtual

Reimplemented from oofem::NumericalMethod.

Definition at line 244 of file calmls.h.

References oofem::NumericalMethod::domain, and linSolver.

◆ setStepLength()

void oofem::CylindricalALM::setStepLength ( double s)
inlineoverridevirtual

Sets the step length.

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

Reimplemented from oofem::SparseNonLinearSystemNM.

Definition at line 239 of file calmls.h.

References deltaL.

◆ solve()

ConvergedReason oofem::CylindricalALM::solve ( SparseMtrx & K,
FloatArray & R,
FloatArray * R0,
FloatArray & X,
FloatArray & dX,
FloatArray & F,
const FloatArray & internalForcesEBENorm,
double & s,
referenceLoadInputModeType rlm,
int & nite,
TimeStep * tStep )
overridevirtual

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

Implements oofem::SparseNonLinearSystemNM.

Definition at line 108 of file calmls.C.

References oofem::FloatArray::add(), oofem::FloatArray::at(), calm_accelNRM, calm_Control, CALM_DEFAULT_NRM_TICKS, calm_fullNRM, calm_hpc_init, calm_hpc_off, calm_hpc_on, calm_HPCIndirectDofMask, calm_HPCWeights, calm_MANRMSteps, calm_NR_Mode, calm_NR_ModeTick, calm_NR_OldMode, CALM_RESET_STEP_REDUCE, calml_hpc, checkConvergence(), oofem::FloatArray::clear(), computeDeltaLambda(), convertHPCMap(), oofem::CR_CONVERGED, oofem::CR_DIVERGED_ITS, oofem::CR_UNKNOWN, deltaL, do_lineSearch(), oofem::NumericalMethod::domain, oofem::NumericalMethod::engngModel, giveLinearSolver(), oofem::TimeStep::giveNumber(), oofem::FloatArray::giveSize(), oofem::TimeStep::incrementStateCounter(), oofem::TimeStep::incrementSubStepNumber(), oofem::InternalRhs, linSolver, lsFlag, maxRestarts, maxStepLength, minIterations, minStepLength, nccdg, oofem::NonLinearLhs, nsmax, numberOfRequiredIterations, old_dX, OOFEM_ERROR, OOFEM_LOG_INFO, OOFEM_WARNING, parallel_context, Psi, oofem::FloatArray::resize(), rootselectiontype, RST_Cos, oofem::sgn(), solved, oofem::FloatArray::subtract(), oofem::FloatArray::times(), oofem::Vec2(), and oofem::FloatArray::zero().

Referenced by CylindricalALM().

Member Data Documentation

◆ amplifFactor

double oofem::CylindricalALM::amplifFactor
protected

Line search amplification factor.

Definition at line 198 of file calmls.h.

Referenced by do_lineSearch(), and initializeFrom().

◆ calm_Control

calm_ControlType oofem::CylindricalALM::calm_Control
protected

Definition at line 179 of file calmls.h.

Referenced by computeDeltaLambda(), convertHPCMap(), initializeFrom(), and solve().

◆ calm_hpc_init

int oofem::CylindricalALM::calm_hpc_init
protected

Variables for HyperPlaneControl.

Definition at line 178 of file calmls.h.

Referenced by initializeFrom(), reinitialize(), and solve().

◆ calm_HPCDmanDofSrcArray

IntArray oofem::CylindricalALM::calm_HPCDmanDofSrcArray
protected

Input array containing dofmanagers and corresponding dof numbers under indirect control.

Definition at line 184 of file calmls.h.

Referenced by convertHPCMap(), and initializeFrom().

◆ calm_HPCDmanWeightSrcArray

FloatArray oofem::CylindricalALM::calm_HPCDmanWeightSrcArray
protected

Input array of dofman weights (for hpcmode 2).

Definition at line 186 of file calmls.h.

Referenced by convertHPCMap(), and initializeFrom().

◆ calm_HPCIndirectDofMask

IntArray oofem::CylindricalALM::calm_HPCIndirectDofMask
protected

Array containing equation numbers of dofs under indirect control.

Definition at line 182 of file calmls.h.

Referenced by computeDeltaLambda(), convertHPCMap(), and solve().

◆ calm_HPCWeights

FloatArray oofem::CylindricalALM::calm_HPCWeights
protected

Definition at line 180 of file calmls.h.

Referenced by computeDeltaLambda(), convertHPCMap(), initializeFrom(), and solve().

◆ calm_MANRMSteps

int oofem::CylindricalALM::calm_MANRMSteps
protected

Definition at line 172 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ calm_NR_Mode

calm_NR_ModeType oofem::CylindricalALM::calm_NR_Mode
protected

Definition at line 170 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ calm_NR_ModeTick

int oofem::CylindricalALM::calm_NR_ModeTick
protected

Definition at line 171 of file calmls.h.

Referenced by solve().

◆ calm_NR_OldMode

calm_NR_ModeType oofem::CylindricalALM::calm_NR_OldMode
protected

Definition at line 170 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ ccDofGroups

std :: vector< __DofIDSet > oofem::CylindricalALM::ccDofGroups
protected

Convergence criteria dof groups.

Definition at line 206 of file calmls.h.

Referenced by checkConvergence(), and initializeFrom().

◆ deltaL

double oofem::CylindricalALM::deltaL
protected

◆ linSolver

std :: unique_ptr< SparseLinearSystemNM > oofem::CylindricalALM::linSolver
protected

Linear system solver.

Definition at line 189 of file calmls.h.

Referenced by giveLinearSolver(), reinitialize(), setDomain(), and solve().

◆ ls_tolerance

double oofem::CylindricalALM::ls_tolerance
protected

Line search tolerance.

Definition at line 196 of file calmls.h.

Referenced by do_lineSearch(), and initializeFrom().

◆ lsFlag

int oofem::CylindricalALM::lsFlag
protected

Line search flag.

Definition at line 194 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ maxEta

double oofem::CylindricalALM::maxEta
protected

Line search parameters (limits).

Definition at line 200 of file calmls.h.

Referenced by do_lineSearch(), and initializeFrom().

◆ maxRestarts

int oofem::CylindricalALM::maxRestarts
protected

Definition at line 166 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ maxStepLength

double oofem::CylindricalALM::maxStepLength
protected

Definition at line 168 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ minEta

double oofem::CylindricalALM::minEta
protected

Definition at line 200 of file calmls.h.

Referenced by do_lineSearch().

◆ minIterations

int oofem::CylindricalALM::minIterations
protected

Minimum hard number of iteration.s.

Definition at line 175 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ minStepLength

double oofem::CylindricalALM::minStepLength
protected

Definition at line 168 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ nccdg

int oofem::CylindricalALM::nccdg
protected

Number of convergence criteria dof groups.

Definition at line 204 of file calmls.h.

Referenced by checkConvergence(), initializeFrom(), and solve().

◆ nsmax

int oofem::CylindricalALM::nsmax
protected

Definition at line 165 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ numberOfRequiredIterations

int oofem::CylindricalALM::numberOfRequiredIterations
protected

Definition at line 169 of file calmls.h.

Referenced by initializeFrom(), and solve().

◆ old_dX

FloatArray oofem::CylindricalALM::old_dX
protected

previous increment of dX, needed by root selection type 1

Definition at line 227 of file calmls.h.

Referenced by solve().

◆ parallel_context

ParallelContext* oofem::CylindricalALM::parallel_context
protected

Parallel context for computing norms, dot products and such.

Definition at line 212 of file calmls.h.

Referenced by checkConvergence(), computeDeltaLambda(), convertHPCMap(), do_lineSearch(), and solve().

◆ Psi

double oofem::CylindricalALM::Psi
protected

Definition at line 167 of file calmls.h.

Referenced by computeDeltaLambda(), initializeFrom(), and solve().

◆ rootselectiontype

RootSelectionType oofem::CylindricalALM::rootselectiontype
protected

Root selection type.

Definition at line 225 of file calmls.h.

Referenced by computeDeltaLambda(), initializeFrom(), and solve().

◆ rtold

FloatArray oofem::CylindricalALM::rtold
protected

Relative iterative displacement change tolerance for each group.

Definition at line 210 of file calmls.h.

Referenced by checkConvergence(), and initializeFrom().

◆ rtolf

FloatArray oofem::CylindricalALM::rtolf
protected

Relative unbalanced force tolerance for each group.

Definition at line 208 of file calmls.h.

Referenced by checkConvergence(), and initializeFrom().

◆ solved

int oofem::CylindricalALM::solved
protected

Definition at line 169 of file calmls.h.

Referenced by solve().

◆ solverType

LinSystSolverType oofem::CylindricalALM::solverType
protected

linear system solver ID.

Definition at line 191 of file calmls.h.

Referenced by giveLinearSolver(), and initializeFrom().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011