Rheolef
7.2
an efficient C++ finite element environment
lambda_c.h
Go to the documentation of this file.
1
25
struct
alpha_c_fun
{
26
typedef
Float
value_type
;
27
typedef
Float
float_type
;
28
alpha_c_fun
() :
_f1
(0) {}
29
Float
residue
(
const
Float
&
a
)
const
{
return
tanh(
a
) - 1/
a
; }
30
void
update_derivative
(
const
Float
&
a
)
const
{
31
_f1
= 1/sqr(cosh(
a
)) + 1/sqr(
a
); }
32
Float
derivative_solve
(
const
Float
& r)
const
{
return
r/
_f1
; }
33
Float
dual_space_norm
(
const
Float
& r)
const
{
return
abs(r); }
34
mutable
Float
_f1
;
35
};
36
Float
alpha_c
() {
37
Float
tol =
numeric_limits<Float>::epsilon
();
38
size_t
max_iter = 100;
39
alpha_c_fun
f
;
40
Float
ac = 1;
41
newton
(
alpha_c_fun
(), ac, tol, max_iter);
42
return
ac;
43
}
44
Float
lambda_c
() {
45
Float
ac =
alpha_c
();
46
return
8*sqr(ac/cosh(ac));
47
}
Float
see the Float page for the full documentation
alpha_c
Float alpha_c()
Definition:
lambda_c.h:36
lambda_c
Float lambda_c()
Definition:
lambda_c.h:44
mkgeo_ball.f
int f
Definition:
mkgeo_ball.sh:221
mkgeo_ball.a
int a
Definition:
mkgeo_ball.sh:151
rheolef::newton
int newton(const Problem &P, Field &uh, Float &tol, size_t &max_iter, odiststream *p_derr=0)
see the newton page for the full documentation
Definition:
newton.h:98
alpha_c_fun
Definition:
lambda_c.h:25
alpha_c_fun::float_type
Float float_type
Definition:
lambda_c.h:27
alpha_c_fun::_f1
Float _f1
Definition:
lambda_c.h:34
alpha_c_fun::alpha_c_fun
alpha_c_fun()
Definition:
lambda_c.h:28
alpha_c_fun::derivative_solve
Float derivative_solve(const Float &r) const
Definition:
lambda_c.h:32
alpha_c_fun::value_type
Float value_type
Definition:
lambda_c.h:26
alpha_c_fun::residue
Float residue(const Float &a) const
Definition:
lambda_c.h:29
alpha_c_fun::dual_space_norm
Float dual_space_norm(const Float &r) const
Definition:
lambda_c.h:33
alpha_c_fun::update_derivative
void update_derivative(const Float &a) const
Definition:
lambda_c.h:30
epsilon
Float epsilon
Definition:
transmission_error.cc:25