The heat equation.
The heat equation
int main (
int argc,
char **argv) {
size_t n_max = (argc > 2) ? atoi(argv[2]) : 100;
Float delta_t = 0.5/n_max;
Xh.block ("boundary");
form a = integrate (
u*v + delta_t*dot(grad(
u),grad(v)));
dout << event (0, uh);
for (size_t n = 1; n <= n_max; n++) {
field rhs = uh + delta_t;
dout << event (n*delta_t, uh);
}
}
field lh(Float epsilon, Float t, const test &v)
see the Float page for the full documentation
see the branch page for the full documentation
see the field page for the full documentation
see the geo page for the full documentation
see the problem page for the full documentation
see the environment page for the full documentation
see the space page for the full documentation
see the test page for the full documentation
see the test page for the full documentation
This file is part of Rheolef.
rheolef - reference manual