Rheolef  7.1
an efficient C++ finite element environment
p_laplacian1.icc
Go to the documentation of this file.
1 #include "eta.h"
26 #include "nu.h"
27 #include "dirichlet.icc"
28 p_laplacian::p_laplacian (Float p1, const geo& omega, string approx)
29  : p(p1), Xh(), lh(), m(), pm(), a1(), pa1() {
30  Xh = space (omega, approx);
31  Xh.block ("boundary");
32  trial u (Xh); test v (Xh);
33  lh = integrate (v);
34  m = integrate (u*v);
35  pm = problem (m);
36 }
38  field uh (Xh, 0);
39  dirichlet (lh, uh);
40  return uh;
41 }
42 field p_laplacian::residue (const field& uh) const {
43  trial u (Xh); test v (Xh);
44  form a = integrate (compose(eta(p), norm2(grad(uh)))*dot(grad(u),grad(v)));
45  field mrh = a*uh - lh;
46  mrh.set_b() = 0;
47  return mrh;
48 }
49 void p_laplacian::update_derivative (const field& uh) const {
50  size_t d = Xh.get_geo().dimension();
51  trial u (Xh); test v (Xh);
52  a1 = integrate (dot(compose(nu<eta>(eta(p),d), grad(uh))*grad(u),grad(v)));
53  pa1 = problem (a1);
54 }
56  field delta_uh (Xh,0);
57  pa1.solve (rh, delta_uh);
58  return delta_uh;
59 }
p_laplacian::update_derivative
void update_derivative(const field &uh) const
Definition: p_laplacian1.icc:49
form
see the form page for the full documentation
field
see the field page for the full documentation
p_laplacian::p_laplacian
p_laplacian(Float p, const geo &omega, string approx)
Definition: p_laplacian1.icc:28
nu
Definition: nu.h:26
rheolef::integrate
std::enable_if< details::is_field_expr_v2_nonlinear_arg< Expr >::value &&! is_undeterminated< Result >::value, Result >::type integrate(const geo_basic< T, M > &omega, const Expr &expr, const integrate_option &iopt, Result dummy=Result())
see the integrate page for the full documentation
Definition: integrate.h:202
p_laplacian::a1
form a1
Definition: p_laplacian.h:42
eta
Definition: eta.h:25
space
see the space page for the full documentation
p_laplacian::pa1
problem pa1
Definition: p_laplacian.h:43
rheolef::grad
std::enable_if< details::is_field_convertible< Expr >::value,details::field_expr_v2_nonlinear_terminal_field< typename Expr::scalar_type,typename Expr::memory_type,details::differentiate_option::gradient >>::type grad(const Expr &expr)
grad(uh): see the expression page for the full documentation
Definition: field_expr_terminal.h:911
rheolef::details::compose
class rheolef::details::field_expr_v2_nonlinear_node_unary compose
eta.h
The p-Laplacian problem – the eta function.
nu.h
The p-Laplacian problem – the nu function.
rheolef::norm2
T norm2(const vec< T, M > &x)
norm2(x): see the expression page for the full documentation
Definition: vec.h:379
p
Definition: sphere.icc:25
p_laplacian::pm
problem pm
Definition: p_laplacian.h:41
p_laplacian::derivative_solve
field derivative_solve(const field &mrh) const
Definition: p_laplacian1.icc:55
a
Definition: diffusion_isotropic.h:25
p_laplacian::m
form m
Definition: p_laplacian.h:40
lh
field lh(Float epsilon, Float t, const test &v)
Definition: burgers_diffusion_operators.icc:25
mkgeo_sector.m
m
Definition: mkgeo_sector.sh:118
test
see the test page for the full documentation
problem
see the problem page for the full documentation
u
Definition: leveque.h:25
Float
see the Float page for the full documentation
p_laplacian::Xh
space Xh
Definition: p_laplacian.h:38
mkgeo_ball.d
d
Definition: mkgeo_ball.sh:154
u
Float u(const point &x)
Definition: transmission_error.cc:26
p_laplacian::residue
field residue(const field &uh) const
Definition: p_laplacian1.icc:42
p_laplacian::initial
field initial() const
Definition: p_laplacian1.icc:37
p_laplacian::lh
field lh
Definition: p_laplacian.h:39
trial
see the test page for the full documentation
dirichlet
void dirichlet(const field &lh, field &uh)
Definition: dirichlet.icc:25
dirichlet.icc
The Poisson problem with homogeneous Dirichlet boundary condition – solver function.
geo
see the geo page for the full documentation
rheolef::details::dot
rheolef::details::is_vec dot