Rheolef  7.2
an efficient C++ finite element environment
continuation_option.h
Go to the documentation of this file.
1 #ifndef _RHEOLEF_CONTINUATION_OPTION_H
2 #define _RHEOLEF_CONTINUATION_OPTION_H
3 //
4 // This file is part of Rheolef.
5 //
6 // Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
7 //
8 // Rheolef is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
12 //
13 // Rheolef is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with Rheolef; if not, write to the Free Software
20 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 //
22 // =========================================================================
23 
24 namespace rheolef {
69 } // namespace rheolef
70 
71 #include "rheolef/adapt.h"
72 
73 namespace rheolef {
74 
75 // [verbatim_continuation_option]
81  size_t max_iter;
93  size_t n_adapt;
95  void check() const;
96 };
97 // [verbatim_continuation_option]
98 
99 // backward compat:
101 
102 inline
104 : adapt_option(aopt),
105  ini_direction(1),
106  kappa (0.5),
107  tol (std::numeric_limits<Float>::epsilon()),
108  max_iter (10000),
109  newton_max_iter(100),
110  min_delta_parameter (0.001),
111  max_delta_parameter (0.025),
112  ini_delta_parameter (0.01),
113  theta_decr(0.75),
114  theta_incr(1.1),
115  theta_variation(0.25),
116  min_delta_parameter_successive_count_max(3),
117  tol_cos_angle(0.1),
118  do_prediction(true),
119  do_check_going_back(true),
120  n_adapt(0)
121 {}
122 inline
123 void
125  check_macro (ini_direction == 1 || ini_direction == -1, "ini_direction="<<tol<<" may be 1 or -1");
126  check_macro (tol > 0, "tol="<<tol<<" may be > 0");
127  check_macro (min_delta_parameter > 0, "min_delta_parameter="<<min_delta_parameter<<" may be > 0");
129  << " may be <= max_delta_parameter="<<max_delta_parameter);
131  "ini_delta_parameter="<<ini_delta_parameter<<" may be in range ["
132  << min_delta_parameter << ":" << max_delta_parameter << "]");
133  check_macro (0 < kappa && kappa < 1, "kappa="<<kappa<<" may be in range ]0:1[");
134  check_macro (0 < theta_variation && theta_variation < 1, "theta_variation="<<theta_variation<<" may be in range ]0:1[");
135  check_macro (1 < theta_incr, "theta_incr="<<theta_incr << " may be > 1");
136  check_macro (0 < theta_decr && theta_decr < 1, "theta_decr="<<theta_decr<<" may be in range ]0:1[");
137  check_macro (0 < tol_cos_angle && tol_cos_angle <= 1, "tol_cos_angle="<<tol_cos_angle<<" may be in range ]0:1]");
138 }
139 
140 } // namespace rheolef
141 #endif // _RHEOLEF_CONTINUATION_OPTION_H
see the Float page for the full documentation
check_macro(expr1.have_homogeneous_space(Xh1), "dual(expr1,expr2); expr1 should have homogeneous space. HINT: use dual(interpolate(Xh, expr1),expr2)")
This file is part of Rheolef.
adapt_option: see the adapt page for the full documentation
Definition: adapt.h:147
see the continuation_option page for the full documentation
continuation_option(const adapt_option &aopt=adapt_option())
Float epsilon