There exist four (two) ways to define a variable coefficient in a differential operator.
Calculate a local stiffness matrix (or a stiffness matrix) by using a cell variable:
Local_stiffness_matrix<double> local_stiff_m(grid);
Local_stiffness_matrix<double> helm(grid);
Local_stiffness_matrix<double> poisson(grid);
... Cell_variable<double> a(grid); ... local_stiff_m = poisson * a + helm;
Instead of a cell variable, one can use an expression which can be evaluated at cell points.
Define a function and use this function in the definition of the bilinear form ( see Local stiffness matrices ).
Use a variable as a parameter in the operator (see Differential operators ). (not implemented up to now)
The third construction is (not implemented up to now)
Local_stiffness_matrix<double> local_stiff_m(grid); Cell_variable<double> a(grid), b(grid); Double_ c,d; ... local_stiff_m.Calculate(grad(v_())*c*grad(w_())+v_()*d*w_(),(c==a,d==b));Handbook
Last modified: Mon Feb 7 16:19:57 MET 2000