SIFEL/MEFEL/SRC/nssolver.cpp File Reference

#include <math.h>
#include <string.h>
#include <stdlib.h>
#include "nssolver.h"
#include "arclength.h"
#include "newtonraph.h"
#include "slopesol.h"
#include "global.h"
#include "globmat.h"
#include "backupsol.h"
#include "mechprint.h"
#include "gmatrix.h"
#include "gtopology.h"
#include "loadcase.h"
#include "dloadcase.h"
#include "intpoints.h"
#include "mathem.h"
#include "vector.h"
#include "meshtransfer.h"
#include "elemswitch.h"
#include "j2flow.h"

Go to the source code of this file.

Functions

void arclopen (long &fi, long &n, double &blambda, double &dl, double *r, double *fp)
 function restarts saved step of arclength method
void arclsave (long fi, long n, double blambda, double dl, double *r, double *fp)
 function saves actual step of arclength method
void assemble_attained_load_vector (double *fa, double *fc, double *fp, long n, double lambda, nonlinman *nlman)
 The function assembles the attained load vector fa.
long assemble_stiffness_matrix (long lcid, long i, long j, long li)
 The function assembles the stiffness matrix in dependence on the setup of the arclength method.
long check_divergency (nonlinman *nlman, matrix &lsm_a, vector &lsm_r, vector &lsm_l, long j, double norf)
 The function performs the divergency check of the inner loop if it is required in the nlman setup.
void newton_raphson_restart (long lcid)
 function restarts Newton-Raphsom method from the file (used for analysis of Hinkley)
void nonlinear_solver (long lcid, double *ra, double *fa, double *fc, double *fp, double *flc, double *flp, double ilambda, long li)
 function calls appropriate solver of system of nonlinear equations for the given load case
void solve_nonlinear_statics ()
 function calls appropriate solver for the nonlinear statics problem

Function Documentation

void arclopen ( long &  fi,
long &  n,
double &  blambda,
double &  dl,
double *  r,
double *  fp 
)

function restarts saved step of arclength method

The function restores saved step of arclength method from the text file.

Parameters:
fi - id of saved step
n - number of r components
blambda - attained load coefficient lambda
dl - legth of arc (output)
r - vector of attained displacements (output)
fp - vector of proportional load (output)
Returns:
The function returns restored values in the passed parameters.

Created by JK,

Definition at line 774 of file nssolver.cpp.

Referenced by arclength(), arclengthadapt(), arclengthrv(), arclengthrv1(), and par_solve_nonlinear_statics().

void arclsave ( long  fi,
long  n,
double  blambda,
double  dl,
double *  r,
double *  fp 
)

function saves actual step of arclength method

The function saves actual step of arclength method to the text file.

Parameters:
fi - id of saved step
n - number of r components
blambda - attained load coefficient lambda
dl - legth of arc
r - vector of attained displacements
fp - vector of proportional load
Returns:
The function does not return anything.

Created by JK,

Definition at line 706 of file nssolver.cpp.

Referenced by arclength(), arclengthadapt(), arclengthrv(), arclengthrv1(), and par_solve_nonlinear_statics().

void assemble_attained_load_vector ( double *  fa,
double *  fc,
double *  fp,
long  n,
double  lambda,
nonlinman nlman 
)

The function assembles the attained load vector fa.

The function assembles the attained load vector fa. It depends on the two load vectors fc, fp, attained load coefficient lambda and the setup specified in the nlman.

Parameters:
fa - array of components of attained load vector
fc - array of the constant load vector which is added without lambda multiplier.
fp - array of proportional load vector which is added multiplied by lambda multiplier usually. In certain cases, the vector fp has to be applied until the required value lambdar is attained and than the increasing of load level stops.
n - number of components of fa, fc and fp
lambda - attained value of the load coefficient
nlman - structure with setup of handling of lambda and lambda tresholds
Returns:
The function returns updated attained load vectro in the parameter fa.

Created by TKo, 08.2011

Definition at line 299 of file nssolver.cpp.

References addmultv(), nonlinman::check_lambdar, nonlinman::lambdar, and on.

Referenced by arclengthrv(), garclength(), gnewton_raphson(), and gnewton_raphson2().

long assemble_stiffness_matrix ( long  lcid,
long  i,
long  j,
long  li 
)

The function assembles the stiffness matrix in dependence on the setup of the arclength method.

function assembles stiffness matrix if needed

The function assembles the stiffness matrix it depends on the variable Mp->nlman->stmat for possible values (see alias.h).

Parameters:
lcid - load case id
i - index in outer loop
j - index in inner loop
li - lower index of the outer loop = number of the first outer increment li=0 if the computation starts from the initial state li>0 if the computation starts from backup
Returns:
The function returns 1 if the stiffness_matrix function has been called and zero if the content of the stiffness matrix has not been changed. Additionally, it calls functions which changes the content of the global stiffness matrix.

JK, TKo 30.8.2010

Definition at line 215 of file nssolver.cpp.

References ijth_tangent_stiff, incr_tangent_stiff, initial_stiff, nonlinman::ithstiffchange, nonlinman::jthstiffchange, Mp, probdesc::nlman, print_err(), secant_stiff, Smat, stiffness_matrix(), nonlinman::stmat, and tangent_stiff.

Referenced by arclengthrv(), garclength(), gnewton_raphson(), gnewton_raphson_one_step(), one_step_arcl(), par_gnewton_raphson_one_step(), par_gnewton_raphson_one_step_mefel(), and solve_prob_constr_phases().

long check_divergency ( nonlinman nlman,
matrix lsm_a,
vector lsm_r,
vector lsm_l,
long  j,
double  norf 
)

The function performs the divergency check of the inner loop if it is required in the nlman setup.

The function performs the divergency check of the inner loop if it is required in the nlman setup. The divergency is detected with help of the least square method where the quadratic approximaton of the error/step_id curve is performed. If the minimum of the approximing quadratic function is exceeded the divergency of the iteration process is assumed and signalized by the nonzero return value. The minimum number of steps of the inner loop is performed depending on the nlman->div_min_steps setup but at least three steps has to be performed for the correct approximation.

Parameters:
nlman - pointer to the structure with the setup of the nonlinear solver
lsm_a - matrix used for the least square method. It will be used for the storage of contributions from the particular inner loop steps.
lsm_r - right hand side for the least square method. It will be used for the storage of contributions from the particular inner loop steps.
lsm_l - left hand side vector (unknown parameters of quadratic function)
j - inner loop step id
norf - error norm (norm of unbalanced forces)
Return values:
0 - no divergency detected
1 - divergency was detected

Created by TKo, 08.2011

Definition at line 334 of file nssolver.cpp.

References nonlinman::check_div, nonlinman::div_min_steps, nonlinman::divc_err, nonlinman::divc_step, lsm_quad(), Mp, on, and probdesc::zero.

Referenced by garclength(), gnewton_raphson(), gnewton_raphson_one_step(), one_step_arcl(), par_gnewton_raphson_one_step(), and par_gnewton_raphson_one_step_mefel().

void newton_raphson_restart ( long  lcid  ) 

function restarts Newton-Raphsom method from the file (used for analysis of Hinkley)

Function solves system of nonlinear algebraic equations by Newton-Raphson method. Solved system does not contain time variable. The method retarts analysis from the saved data of the time dependent analysis. Internal data rearangement is performed with respect of solved problem in Hinkley nuclear power plant.

Parameters:
lcid - required load case id
Returns:
The function returns reached load coefficient lambda.

Created by JK, Tomas Koudelka

Definition at line 388 of file nssolver.cpp.

Referenced by nonlinear_solver().

void nonlinear_solver ( long  lcid,
double *  ra,
double *  fa,
double *  fc,
double *  fp,
double *  flc,
double *  flp,
double  ilambda,
long  li 
)

function calls appropriate solver of system of nonlinear equations for the given load case

Function calls selected solver of systems of nonlinear equation for the given load case.

Parameters:
lcid - load case id
ra - vector of attained displacements
fa - vector of attained load
fc - constant component of load vector (due to prescribed displacements + forces)
fp - proportional component of load vector (due to prescribed displacements + forces)
flc - constant component of load vector due to forces
flp - proportional component of load vector due to forces
ilambda - initial value of load coefficient lambda (used for backup restorage)
li - initial step id (used for backup restorage)
Returns:
The function does not return anything.

Created by Tomas Koudelka and JK. Rewritten by Tomas Koudelka, 09.2011

Definition at line 137 of file nssolver.cpp.

References arcl, arclg, arclrv, arclrv1, nonlinman::check_lambdar, displctrl, displctrlrv, nonlinman::errl, garclength(), gnewton_raphson2(), nonlinman::lambdar, Mp, newton, newton_raphson_restart(), newtong, newtonrestart, newtonrv1, probdesc::nlman, on, print_err(), nonlinman::tnlinsol, and yes.

Referenced by solve_nonlinear_statics().

void solve_nonlinear_statics (  ) 

function calls appropriate solver for the nonlinear statics problem

Function solves non-linear statics problems.

Created by JK, 2001 Rewritten by TKo, 09.2011

Definition at line 34 of file nssolver.cpp.

Referenced by solve_mefel_deterministic_problem().


Generated by  doxygen 1.6.2