#include "galias.h"
#include "nonlinman.h"
#include "gmatrix.h"
#include "matrix.h"
#include "vector.h"
#include <stdio.h>
Go to the source code of this file.
Defines | |
#define | quadeqcoef_log() |
Functions | |
void | adapt_psi_coeff (long i, double ddlambda, double &ddlambda0, double &psi0, double &psi) |
The function modifies the psi coefficient according to the ddlambda increment adaptively. | |
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. | |
void | determine_dlambda (double *ddr, double *u, double *v, double *ddrprev, long n, double ddlambda, double psi, double norfp, double dl, double &dlambda, long &stop, nonlinman *nlman, long lcid) |
The function computes increment of load coefficient. | |
double | displincr (double *dr1, double *dr2, long n, long lcid) |
The function computes square of the generalized norm of displacement vector. | |
double | garclength (long lcid, nonlinman *nlman, double *ra, double *fa, double *fc, double *fp, double *flc, double *flp, long li, double ilambda, answertype outres) |
The main procedure which solves the system of the nonlinear equations by the arclength method. | |
double | loadincr (double *fp, long n, double lambda, nonlinman *nlman) |
The function calculates generalized norm of the load vector. | |
double | prdisplincr (long i, long lcid) |
The function returns prescribed displacements for the i-th seleceted dof in nonlinman. | |
void | quadeqcoeff (double *ddr, double *v, long n, double ddlambda, double psi, double norfp, double dl, double &a0, double &a1, double &a2, long lcid) |
The function computes coefficiets of quadratic equation solved in the spherical arclength method. | |
void | seldofinit () |
The function initializes selected dofs used for the arclength method controling. |
#define quadeqcoef_log | ( | ) |
{\ fprintf (Out,"\n\n\n Check of quadratic equation");\ fprintf (Out,"\n norfp %15.10le",norfp);\ fprintf (Out,"\n norv %15.10le",norv);\ fprintf (Out,"\n (ddr,v) %15.10le",norddrv);\ fprintf (Out,"\n (ddr,ddr) %15.10le",norddr);\ fprintf (Out,"\n dl %15.10le",dl);\ fprintf (Out,"\n ddlambda %15.10le",ddlambda);\ fprintf (Out,"\n psi %15.10le",psi);\ fprintf (Out,"\n a2 %15.10le",a2);\ fprintf (Out,"\n a1 %15.10le",a1);\ fprintf (Out,"\n a0 %15.10le",a0);\ fprintf (Out,"\n discrim %15.10le",a1*a1-4.0*a2*a0);\ fprintf (Out,"\n\n");\ }
The macro is used for coefficient debugging of quadratic equations in the arclength method. It can be called only from the
Definition at line 18 of file arclength.h.
void adapt_psi_coeff | ( | long | i, | |
double | ddlambda, | |||
double & | ddlambda0, | |||
double & | psi0, | |||
double & | psi | |||
) |
The function modifies the psi coefficient according to the ddlambda increment adaptively.
The function modifies the psi coefficient according to the ddlambda increment adaptively. If the increment decreases comparing to the initial/reference ddlambda increment (ddlamda0) than the value should be also decreased and thus the arclength is controlled rather by the displacements than by the load. The initial/reference value of the load increment ddlambda0 and proportional coefficient psi0 are updated at the beginning of the main iteration loop and if the ddlambda changes the sign comparing to the ddlambda 0 (peak point of loading curve).
i | - step id | |
ddlambda | - actual increment of the load coefficeint lambda | |
ddlambda0 | - initial/reference value of the load coefficeint lambda increment (input/output parameter) | |
psi0 | - initial/reference value of the proportional coefficeint (input/output parameter) | |
psi | - actual value of the proportional coefficeint (input/output parameter) |
Created by Tomas Koudelka 07.2011
Definition at line 1500 of file arclength.cpp.
References sgn().
Referenced by arclengthrv(), garclength(), one_step_arcl(), and quadeqcoeff().
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.
The function assembles the stiffness matrix it depends on the variable Mp->nlman->stmat for possible values (see alias.h).
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 |
JK, TKo, 30.8.2010
The function assembles the stiffness matrix it depends on the variable Mp->nlman->stmat for possible values (see alias.h).
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 |
JK, TKo 30.8.2010
Definition at line 480 of file arclengthjk.cpp.
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().
void determine_dlambda | ( | double * | ddr, | |
double * | u, | |||
double * | v, | |||
double * | ddrprev, | |||
long | n, | |||
double | ddlambda, | |||
double | psi, | |||
double | norfp, | |||
double | dl, | |||
double & | dlambda, | |||
long & | stop, | |||
nonlinman * | nlman, | |||
long | lcid | |||
) |
The function computes increment of load coefficient.
The function determines increment of lambda (delta lambda).
ddr | - Delta r + u | |
u | - u = K^{-1}*(fa-fi) | |
v | - v = K^{-1}*fp | |
ddrprev | - Delta r (not updated by the vector u) | |
n | - number of unknowns | |
ddlambda | - Delta lambda | |
psi | - proportional coefficient between load and displacement vectors | |
norfp | - the norm of proportional vector | |
dl | - length of the arc | |
dlambda | - delta lambda (output of this function) | |
stop | - indicator of end of iteration (output of this function) | |
nlman | - pointer to structure with arclength setup (it is used for full arclength method) | |
lcid | - load case id |
Created by JK, 30.8.2010 Modified
Definition at line 1361 of file arclength.cpp.
References displincr(), nonlinman::dlam, fullmethod, linearizedmeth, maxvalue, minangle, minvalue, Mp, probdesc::nlman, nodetermination, print_err(), quadeqcoeff(), and solv_polynom_2().
Referenced by arclengthrv(), garclength(), one_step_arcl(), and quadeqcoeff().
double displincr | ( | double * | dr1, | |
double * | dr2, | |||
long | n, | |||
long | lcid | |||
) |
The function computes square of the generalized norm of displacement vector.
The function computes square of generalized norm of vector of displacemnt increments. The function returns either square of vector norm computed from the selected componets or it returns increment of distance between selected nodes. It is used in the arclength method.
dr1 | - array with components of the first vector of displacement increments | |
dr2 | - array with components of the second vector of displacement increments | |
n | - number of components of displincr array | |
lcid | - load case id |
Created by JK,
Definition at line 1192 of file arclength.cpp.
References alldofs, nonlinman::displnorm, Mp, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nonlinman::nxal, nonlinman::nyal, nonlinman::nzal, prdisplincr(), print_err(), nonlinman::probdimal, scprd(), nonlinman::seldofal, seldofs, seldofscoord, and selecnodes.
Referenced by arclength(), arclength15(), arclengthadapt(), arclengthrv(), arclengthrv1(), determine_dlambda(), garclength(), one_step_arcl(), and quadeqcoeff().
double garclength | ( | long | lcid, | |
nonlinman * | nlman, | |||
double * | ra, | |||
double * | fa, | |||
double * | fc, | |||
double * | fp, | |||
double * | flc, | |||
double * | flp, | |||
long | li, | |||
double | ilambda, | |||
answertype | outres | |||
) |
The main procedure which solves the system of the nonlinear equations by the arclength method.
The function solves system of nonlinear algebraic equations by the arc-length method. This method was modified to reach the given value lambdar of the lambda parameter. lambdar value is reached with required error errl. Only one right hand side vector is supported with respect to nonlinearity and absence of superposition. Proportional vector grows until the nial number of steps is reached.
lcid | - load case id | |
nlman | - pointer to structure conatining setup of the solver | |
ra | - vector of attained displacements | |
fa | - attained load vector | |
fc | - constant part of load vector (it is not influenced by lambda) | |
fp | - proportional part of load vector (it is increased by load coefficient lambda up to the nlman->lambdar) | |
flc | - constant component of load vector due to forces | |
flp | - proportional component of load vector due to forces | |
li | - initial value of step id (default is 0) | |
ilambda | - initial value of load coefficient (default is 0) | |
outres | - flag for performing of output of results (if yes -> print_step procedure is called for the each step) |
Created by JK, 16.8.2001 Rewritten by TKo, JK 08.2011
Definition at line 39 of file arclength.cpp.
References adapt_psi_coeff(), addmultv(), addv(), assemble_stiffness_matrix(), check_divergency(), nonlinman::check_lambdar, nonlinman::check_tot_al, compute_req_val(), copymultv(), copyv(), determine_dlambda(), displincr(), nonlinman::dlal, probdesc::dlambda, nonlinman::dlmaxal, nonlinman::dlminal, mechmat::dstep_red_mat(), nonlinman::erral, nonlinman::errl, f, fillm(), fillv(), Gtm, probdesc::hdbcont, internal_forces(), probdesc::istep, probdesc::jstep, probdesc::lambda, nonlinman::lambdar, nonlinman::max_tot_al, Mespr, Mm, Mp, Ndofm, nonlinman::nial, nonlinman::niilal, normv(), off, on, probdesc::otherstate, Out, print_err(), print_flush(), print_step(), print_step_forced(), nonlinman::psial, hdbcontr::save_stat(), Smat, slesolv::solve_system(), solver_save(), probdesc::ssle, probdesc::strainstate, probdesc::stressstate, subv(), mechmat::updateipval(), yes, and probdesc::zero.
Referenced by nonlinear_solver().
double loadincr | ( | double * | fp, | |
long | n, | |||
double | lambda, | |||
nonlinman * | nlman | |||
) |
The function calculates generalized norm of the load vector.
The function computes generalized norm of load vector. It is used in the arclength method.
fc | - array with components of constant load vector | |
n | - the number of components of displincr array | |
lambda | - attained value of the load coefficient | |
nlman | - structure with setup of handling of lambda and lambda tresholds |
Created by JK,
Definition at line 1142 of file arclength.cpp.
References addv(), alldofs, nonlinman::check_lambdar, nonlinman::displnorm, nonlinman::lambdar, loadincr(), Mp, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nullv(), off, nonlinman::seldofal, seldofs, seldofscoord, selecnodes, and ss().
Referenced by arclengthrv(), and loadincr().
double prdisplincr | ( | long | i, | |
long | lcid | |||
) |
The function returns prescribed displacements for the i-th seleceted dof in nonlinman.
The function returns in the case of prescribed displacement in the i-th selected dof from nonlinman.
i | - id of selected dof | |
lcid | - load case id |
Created by Tomas Koudelka, 5.2014
Definition at line 1261 of file arclength.cpp.
References mechbclc::lc, Mb, Mp, probdesc::nlman, loadcase::pd, and nonlinman::seldofal.
Referenced by displincr().
void quadeqcoeff | ( | double * | ddr, | |
double * | v, | |||
long | n, | |||
double | ddlambda, | |||
double | psi, | |||
double | norfp, | |||
double | dl, | |||
double & | a0, | |||
double & | a1, | |||
double & | a2, | |||
long | lcid | |||
) |
The function computes coefficiets of quadratic equation solved in the spherical arclength method.
Function computes coefficients of the quadratic equation used in the arclength method. The coefficients are computed with respect to type of load/displacement control.
ddr | - increment of load coefficient lambda for the given step | |
v | - vector of displacement increments | |
n | - total number of DOFs (i.e. size of ddr and v arrays) | |
ddlambda | - correction of increment of load coefficient lambda | |
psi | - proportional weight coeffient (swithces between load/displacement control) | |
norfp | - norm of proportional load vector | |
dl | - length of arc | |
a0 | - zero order coefficient (output) | |
a1 | - first order coefficient (output) | |
a2 | - second order coefficient (output) | |
lcid | - load case id |
Created by JK,
Definition at line 1300 of file arclength.cpp.
References alldofs, displincr(), nonlinman::displnorm, Mp, probdesc::nlman, nodesdistincr, print_err(), seldofs, seldofscoord, and selecnodes.
Referenced by arclength(), arclength15(), arclengthadapt(), arclengthrv(), arclengthrv1(), determine_dlambda(), and quadeqcoeff().
void seldofinit | ( | ) |
The function initializes selected dofs used for the arclength method controling.
The function solves system of nonlinear algebraic equations by the arc-length method. This method was modified to reach the given value lambdar of the lambda parameter. lambdar value is reached with required error errl. Only one right hand side vector is supported with respect to nonlinearity and absence of superposition. Proportional vector grows until the nial number of steps is reached.
lcid | - load case id | |
nlman | - pointer to structure conatining setup of the solver | |
ra | - vector of attained displacements | |
fa | - attained load vector | |
fc | - constant part of load vector (it is not influenced by lambda) | |
fp | - proportional part of load vector (it is increased by load coefficient lambda up to the nlman->lambdar) | |
li | - initial value of step id (default is 0) | |
ilambda | - initial value of load coefficient (default is 0) | |
outres | - flag for performing of output of results (if yes -> print_step procedure is called for the each step) |
Created by JK, 16.8.2001 Rewritten by TKo, JK 08.2011 Function performs calculation of one load/time step of the Newton-Raphson method for the given load case. Solved equation system does not contain time variable.
lcid | - load case id | |
nlman | - pointer to structure conatining setup of the solver | |
fa | - attained load vector | |
ra | - vector of attained displacements | |
fb | - residual vector or load vector increment - righthand side vector | |
dr | - vector of displacement increment - lefthand side vector | |
fb | - vector of internal forces | |
f | - auxiliary vector of actual load (call of solve_system rewrite it during solution) | |
istep | - time/load step id | |
j | - inner loop step id (output parameter, set to -1 if no inner loop was performed) | |
li | - initial value of time/load step id |
Created by Tomas Koudelka, 11.2012 The function initializes dof numbers for the particular types of displacement control. It is used in the arclength method.
Created by JK,
The function initializes dof numbers for the particular types of displacement control. It is used in the arclength method.
Created by JK,
Definition at line 1065 of file arclength.cpp.
References alldofs, nonlinman::displnorm, mechtop::give_dof(), mechtop::give_ndofn(), gtopology::gnodes, Gtm, length(), Mp, Mt, probdesc::nlman, nodesdistincr, nonlinman::nsdofal, nonlinman::nsnal, nonlinman::nxal, nonlinman::nyal, nonlinman::nzal, nonlinman::seldofal, seldofs, seldofscoord, selecnodes, nonlinman::selnodal, gnode::x, gnode::y, and gnode::z.
Referenced by par_solve_nonlinear_statics(), and solve_nonlinear_statics().