lambda_c.h
Go to the documentation of this file.
struct alpha_c_fun {
typedef Float value_type;
typedef Float float_type;
alpha_c_fun() : _f1(0) {}
Float residue (const Float& a) const { return tanh(a) - 1/a; }
void update_derivative (const Float& a) const {
_f1 = 1/sqr(cosh(a)) + 1/sqr(a); }
Float derivative_solve (const Float& r) const { return r/_f1; }
Float dual_space_norm (const Float& r) const { return abs(r); }
mutable Float _f1;
};
Float alpha_c() {
Float tol = numeric_limits<Float>::epsilon();
size_t max_iter = 100;
alpha_c_fun f;
Float ac = 1;
newton (alpha_c_fun(), ac, tol, max_iter);
return ac;
}
Float lambda_c() {
Float ac = alpha_c();
return 8*sqr(ac/cosh(ac));
}
alpha_c_fun::_f1
Float _f1
Definition: lambda_c.h:34
alpha_c_fun::derivative_solve
Float derivative_solve(const Float &r) const
Definition: lambda_c.h:32
lambda_c
Float lambda_c()
Definition: lambda_c.h:44
mkgeo_ball.f
f
Definition: mkgeo_ball.sh:221
alpha_c_fun::dual_space_norm
Float dual_space_norm(const Float &r) const
Definition: lambda_c.h:33
alpha_c_fun::float_type
Float float_type
Definition: lambda_c.h:27
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::update_derivative
void update_derivative(const Float &a) const
Definition: lambda_c.h:30
alpha_c
Float alpha_c()
Definition: lambda_c.h:36
a
Definition: diffusion_isotropic.h:25
Float
see the Float page for the full documentation
alpha_c_fun::alpha_c_fun
alpha_c_fun()
Definition: lambda_c.h:28
mkgeo_ball.a
a
Definition: mkgeo_ball.sh:151
alpha_c_fun::residue
Float residue(const Float &a) const
Definition: lambda_c.h:29
alpha_c_fun::value_type
Float value_type
Definition: lambda_c.h:26
epsilon
Float epsilon
Definition: transmission_error.cc:25
alpha_c_fun
Definition: lambda_c.h:25