-
Notifications
You must be signed in to change notification settings - Fork 9
/
ArcLengthDriver.h
79 lines (64 loc) · 2.89 KB
/
ArcLengthDriver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
// $Id$
//==============================================================================
//!
//! \file ArcLengthDriver.h
//!
//! \date Apr 12 2018
//!
//! \author Knut Morten Okstad / SINTEF
//!
//! \brief Arc-length solution driver for nonlinear isogeometric FEM simulators.
//!
//==============================================================================
#ifndef _ARC_LENGTH_DRIVER_H
#define _ARC_LENGTH_DRIVER_H
#include "NonlinearDriver.h"
/*!
\brief Arc-length solution driver for nonlinear isogeometric FEM simulators.
\details This class overrides the NonlinearDriver::solveStep() method,
which does nonlinear quasi-static simulations with prescribed increment size,
to implement a path-following solution procedure using the arc-length method.
This can be used to solve nonlinear problems with instabilities, such as
snap-through, snap-back, etc.
*/
class ArcLengthDriver : public NonlinearDriver
{
public:
//! \brief The constructor forwards to the parent class constructor.
//! \param sim Reference to the spline FE model
//! \param[in] adaptive If \e true, use adaptive mesh refinement
explicit ArcLengthDriver(SIMbase& sim, bool = false, bool adaptive = false);
//! \brief Empty destructor.
virtual ~ArcLengthDriver() {}
//! \brief Does nothing, overrides parent class method.
virtual void initPrm() {}
//! \brief Advances the load step one step forward.
virtual bool advanceStep(TimeStep& param, bool);
//! \brief Solves the nonlinear equations by Newton-Raphson iterations.
//! \param param Time stepping parameters
//! \param[in] zero_tol Truncate norm values smaller than this to zero
//! \param[in] outPrec Number of digits after the decimal point in norm print
virtual SIM::ConvStatus solveStep(TimeStep& param, SIM::SolutionMode,
double zero_tol, std::streamsize outPrec);
//! \brief Does nothing, overrides parent class method.
virtual SIM::ConvStatus solveIteration(TimeStep&) { return SIM::FAILURE; }
protected:
//! \brief Checks whether the nonlinear iterations have converged or diverged.
virtual SIM::ConvStatus checkConvergence(TimeStep& param);
//! \brief Does nothing, overrides parent class method.
virtual bool lineSearch(TimeStep&) { return false; }
using NonlinearDriver::parse;
//! \brief Parses a data section from an XML document.
virtual bool parse(const tinyxml2::XMLElement* elem);
//! \brief Solves the linearized system of current iteration.
//! \param[in] lambda Current load proportionality factor
//! \param[in] iter Newton iteration counter
//! \return Norm of the external load gradient, negative on failure
double solveLinearizedSystem(double lambda, int iter = 0);
private:
double arclen; //!< Arc-length parameter
double beta; //!< Arc-length parameter
Vector tansol; //!< Tangential displacement vector
Vector incsol; //!< Incremental solution of previous load step
};
#endif