libMesh
Loading...
Searching...
No Matches
continuation_system.h
Go to the documentation of this file.
1// The libMesh Finite Element Library.
2// Copyright (C) 2002-2026 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3
4// This library is free software; you can redistribute it and/or
5// modify it under the terms of the GNU Lesser General Public
6// License as published by the Free Software Foundation; either
7// version 2.1 of the License, or (at your option) any later version.
8
9// This library is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12// Lesser General Public License for more details.
13
14// You should have received a copy of the GNU Lesser General Public
15// License along with this library; if not, write to the Free Software
16// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18
19
20#ifndef LIBMESH_CONTINUATION_SYSTEM_H
21#define LIBMESH_CONTINUATION_SYSTEM_H
22
23// Local Includes
24#include "libmesh/fem_system.h"
25
26namespace libMesh
27{
28
29// Forward Declarations
30template <typename T> class LinearSolver;
31class NewtonSolver;
32
54{
55public:
61 const std::string & name,
62 const unsigned int number);
63
74
79
84
89 virtual void clear () override;
90
94 virtual void solve () override;
95
102 void continuation_solve();
103
108 void advance_arcstep();
109
120
125 bool quiet;
126
132 void set_max_arclength_stepsize(Real maxds) { ds=maxds; ds_current=maxds; }
133
139
145
152
161
166
172
179
186
193
199 //Real tau;
200
206 unsigned int n_backtrack_steps;
207
214
219
241
243
252
261
262protected:
267 virtual void init_data () override;
268
292
294
295
296
297private:
304 void initialize_tangent();
305
309 void solve_tangent();
310
316 void update_solution();
317
321 void set_Theta();
322
327 void set_Theta_LOCA();
328
333 void apply_predictor();
334
343
348
353
358
364
369
375
380
387
394
401
407
412
417
421 unsigned int newton_step;
422};
423
424} // namespace libMesh
425
426#endif // LIBMESH_CONTINUATION_SYSTEM_H
This class inherits from the FEMSystem.
Real previous_dlambda_ds
The old parameter tangent value.
Real ds
The initial arclength stepsize, selected by the user.
ContinuationSystem & operator=(const ContinuationSystem &)=delete
Real ds_current
Value of stepsize currently in use.
void save_current_solution()
Stores the current solution and continuation parameter (as "previous_u" and "old_continuation_paramet...
NumericVector< Number > * z
Temporary vector "z" ... the solution of .
ContinuationSystem sys_type
The type of system.
void set_Theta_LOCA()
A centralized function for setting the other normalization parameter, i.e.
bool quiet
If quiet==false, the System prints extra information about what it is doing.
NewtonSolver * newton_solver
A pointer to the underlying Newton solver used by the DiffSystem.
void set_max_arclength_stepsize(Real maxds)
Sets (initializes) the max-allowable ds value and the current ds value.
NumericVector< Number > * delta_u
Temporary vector "delta u" ... the Newton step update in our custom augmented PDE solve.
Real min_continuation_parameter
The minimum-allowable value of the continuation parameter.
unsigned int n_arclength_reductions
Number of arclength reductions to try when Newton fails to reduce the residual.
virtual void solve() override
Perform a standard "solve" of the system, without doing continuation.
NumericVector< Number > * du_ds
Extra work vectors used by the continuation algorithm.
virtual void clear() override
Clear all the data structures associated with the system.
Real Theta
Arclength normalization parameter.
void apply_predictor()
Applies the predictor to the current solution to get a guess for the next solution.
void advance_arcstep()
Call this function after a continuation solve to compute the tangent and get the next initial guess.
void solve_tangent()
Special solve algorithm for solving the tangent system.
void update_solution()
This function (which assumes the most recent tangent vector has been computed) updates the solution a...
Real max_continuation_parameter
The maximum-allowable value of the continuation parameter.
Real previous_ds
The previous arcstep length used.
RHS_Mode
There are (so far) two different vectors which may be assembled using the assembly routine: 1....
Real ds_min
The minimum-allowed steplength, defaults to 1.e-8.
void continuation_solve()
Perform a continuation solve of the system.
bool newton_progress_check
True by default, the Newton progress check allows the Newton loop to exit if half the allowed iterati...
ContinuationSystem(const ContinuationSystem &)=delete
Special functions.
bool tangent_initialized
False until initialize_tangent() is called.
double initial_newton_tolerance
How much to try to reduce the residual by at the first (inexact) Newton step.
ContinuationSystem(ContinuationSystem &&)=delete
Real dlambda_ds
The most recent value of the derivative of the continuation parameter with respect to s.
Real * continuation_parameter
The continuation parameter must be a member variable of the derived class, and the "continuation_para...
FEMSystem Parent
The type of the parent.
Real old_continuation_parameter
The system also keeps track of the old value of the continuation parameter.
unsigned int newton_step
Loop counter for nonlinear (Newton) iteration loop.
virtual void init_data() override
Initializes the member data fields associated with the system, so that, e.g., assemble() may be used.
double continuation_parameter_tolerance
How tightly should the Newton iterations attempt to converge delta_lambda.
void initialize_tangent()
Before starting arclength continuation, we need at least 2 prior solutions (both solution and u_previ...
Predictor
The code provides the ability to select from different predictor schemes for getting the initial gues...
@ Invalid_Predictor
Invalid predictor.
@ AB2
Second-order explicit Adams-Bashforth predictor.
@ Euler
First-order Euler predictor.
double solution_tolerance
How tightly should the Newton iterations attempt to converge ||delta_u|| Defaults to 1....
Real newton_stepgrowth_aggressiveness
A measure of how rapidly one should attempt to grow the arclength stepsize based on the number of New...
NumericVector< Number > * previous_u
The solution at the previous value of the continuation variable.
NumericVector< Number > * previous_du_ds
The value of du_ds from the previous solution.
void set_Theta()
A centralized function for setting the normalization parameter theta.
unsigned int n_backtrack_steps
Another scaling parameter suggested by the LOCA people.
Real Theta_LOCA
Another normalization parameter, which is described in the LOCA manual.
NumericVector< Number > * y
Temporary vector "y" ... stores -du/dlambda, the solution of .
NumericVector< Number > * y_old
Temporary vector "y_old" ... stores the previous value of -du/dlambda, which is the solution of .
This is the EquationSystems class.
This class provides a specific system class.
Definition fem_system.h:55
This class defines a solver which uses the default libMesh linear solver in a quasiNewton method to h...
Provides a uniform interface to vector storage schemes for different linear algebra libraries.
const std::string & name() const
Definition system.h:2385
unsigned int number() const
Definition system.h:2393
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real