> i want to use create_boundary_mass_matrix but i don't know how to use
> typename FunctionMap< dim >::type. In the documentation i found
> following statement:
>
> The create_boundary_mass_matrix() creates the matrix with entries
> $m_{ij} = \int_{\Gamma} \phi_i \phi_j dx$, where $\Gamma$ is the union
> of boundary parts with indicators contained in a FunctionMap passed to
> the function (i.e. if you want to set up the mass matrix for the parts
> of the boundary with indicators zero and 2, you pass the function a map
> of unsigned chars as parameter boundary_functions containing the keys
> zero and 2).
>
> I think i need same help with the FunctionMap couse i don't now how to
> use it here.

FunctionMap<dim>::type is really the same as
  std::map<unsigned char, Function<dim>*>
In your case, all the function wants to know is what keys are in the map, 
not the actual function it points to (we are just re-using this map since 
it is used in other places where we also care about what function is 
pointed to). So assume you wanted to create the boundary mass matrix for 
all parts of the boundary with boundary indicators zero and two, then what 
you would do is
  typename FunctionMap<dim>::type boundary_map;
  boundary_map[0] = 0;  // use zero pointer since it doesn't matter
  boundary_map[2] = 0;

  MatrixTools::create_boundary_mass_matrix (..., boundary_map, ...);

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to