From 6c732e71b0a01adb4c8d9e3e939aabfe40d81061 Mon Sep 17 00:00:00 2001 From: guido Date: Tue, 21 Jun 2005 08:07:26 +0000 Subject: [PATCH] functions resorted git-svn-id: https://svn.dealii.org/trunk@10903 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/fe/fe_tools.h | 254 +++++++++++++------------- 1 file changed, 129 insertions(+), 125 deletions(-) diff --git a/deal.II/deal.II/include/fe/fe_tools.h b/deal.II/deal.II/include/fe/fe_tools.h index 4a80f72c0c..d96c1d21f9 100644 --- a/deal.II/deal.II/include/fe/fe_tools.h +++ b/deal.II/deal.II/include/fe/fe_tools.h @@ -216,6 +216,135 @@ class FETools template static void compute_projection_matrices(const FiniteElement &fe, FullMatrix* matrices); + +//TODO:[WB] Replace this documentation by something comprehensible + + /** + * Projects scalar data defined in + * quadrature points to a finite element + * space on a single cell. + * + * What this function does is the + * following: assume that there is scalar + * data uq, 0 <= q < + * Q:=quadrature.n_quadrature_points + * defined at the quadrature points of a + * cell, with the points defined by the + * given rhs_quadrature + * object. We may then want to ask for + * that finite element function (on a + * single cell) vh in + * the finite-dimensional space defined + * by the given FE object that is the + * projection of u in the + * following sense: + * + * Usually, the projection + * vh is that + * function that satisfies + * (vh,w)=(u,w) for + * all discrete test functions + * w. In the present case, we + * can't evaluate the right hand side, + * since u is only defined in + * the quadrature points given by + * rhs_quadrature, so we replace + * it by a quadrature + * approximation. Likewise, the left hand + * side is approximated using the + * lhs_quadrature object; if + * this quadrature object is chosen + * appropriately, then the integration of + * the left hand side can be done + * exactly, without any + * approximation. The use of different + * quadrature objects is necessary if the + * quadrature object for the right hand + * side has too few quadrature points -- + * for example, if data q is + * only defined at the cell center, then + * the corresponding one-point quadrature + * formula is obviously insufficient to + * approximate the scalar product on the + * left hand side by a definite form. + * + * After these quadrature approximations, + * we end up with a nodal representation + * Vh of + * vh that satisfies + * the following system of linear + * equations: M Vh = Q + * U, where + * Mij=(phi_i,phi_j) + * is the mass matrix approximated by + * lhs_quadrature, and + * Q is the matrix + * Qiq=phii(xq) + * wq where + * wq are quadrature + * weights; U is the vector of + * quadrature point data + * uq. + * + * In order to then get the nodal + * representation Vh + * of the projection of U, one + * computes Vh = X U, + * X=M-1 Q. The purpose + * of this function is to compute the + * matrix X and return it + * through the last argument of this + * function. + * + * Note that this function presently only + * supports scalar data. An extension of + * the mass matrix is of course trivial, + * but one has to define the order of + * data in the vector U if it + * contains vector valued data in all + * quadrature points. + * + * A use for this function is described + * in the introduction to the step-18 + * example program. + * + * The opposite of this function, + * interpolation of a finite element + * function onto quadrature points is + * essentially what the + * FEValues::get_function_values + * functions do; to make things a little + * simpler, the + * FETools::compute_interpolation_to_quadrature_points_matrix + * provides the matrix form of this. + */ + template + static + void + compute_projection_from_quadrature_points_matrix (const FiniteElement &fe, + const Quadrature &lhs_quadrature, + const Quadrature &rhs_quadrature, + FullMatrix &X); + + /** + * Given a (scalar) local finite element + * function, compute the matrix that maps + * the vector of nodal values onto the + * vector of values of this function at + * quadrature points as given by the + * second argument. In a sense, this + * function does the opposite of the @p + * compute_projection_from_quadrature_points_matrix + * function. + */ + template + static + void + compute_interpolation_to_quadrature_points_matrix (const FiniteElement &fe, + const Quadrature &quadrature, + FullMatrix &I_q); + + //@} /** * @name DoF: Functions which should be in DoFTools @@ -668,131 +797,6 @@ class FETools get_fe_from_name (const std::string &name); - /** - * Projects scalar data defined in - * quadrature points to a finite element - * space on a single cell. - * - * What this function does is the - * following: assume that there is scalar - * data uq, 0 <= q < - * Q:=quadrature.n_quadrature_points - * defined at the quadrature points of a - * cell, with the points defined by the - * given rhs_quadrature - * object. We may then want to ask for - * that finite element function (on a - * single cell) vh in - * the finite-dimensional space defined - * by the given FE object that is the - * projection of u in the - * following sense: - * - * Usually, the projection - * vh is that - * function that satisfies - * (vh,w)=(u,w) for - * all discrete test functions - * w. In the present case, we - * can't evaluate the right hand side, - * since u is only defined in - * the quadrature points given by - * rhs_quadrature, so we replace - * it by a quadrature - * approximation. Likewise, the left hand - * side is approximated using the - * lhs_quadrature object; if - * this quadrature object is chosen - * appropriately, then the integration of - * the left hand side can be done - * exactly, without any - * approximation. The use of different - * quadrature objects is necessary if the - * quadrature object for the right hand - * side has too few quadrature points -- - * for example, if data q is - * only defined at the cell center, then - * the corresponding one-point quadrature - * formula is obviously insufficient to - * approximate the scalar product on the - * left hand side by a definite form. - * - * After these quadrature approximations, - * we end up with a nodal representation - * Vh of - * vh that satisfies - * the following system of linear - * equations: M Vh = Q - * U, where - * Mij=(phi_i,phi_j) - * is the mass matrix approximated by - * lhs_quadrature, and - * Q is the matrix - * Qiq=phii(xq) - * wq where - * wq are quadrature - * weights; U is the vector of - * quadrature point data - * uq. - * - * In order to then get the nodal - * representation Vh - * of the projection of U, one - * computes Vh = X U, - * X=M-1 Q. The purpose - * of this function is to compute the - * matrix X and return it - * through the last argument of this - * function. - * - * Note that this function presently only - * supports scalar data. An extension of - * the mass matrix is of course trivial, - * but one has to define the order of - * data in the vector U if it - * contains vector valued data in all - * quadrature points. - * - * A use for this function is described - * in the introduction to the step-18 - * example program. - * - * The opposite of this function, - * interpolation of a finite element - * function onto quadrature points is - * essentially what the - * FEValues::get_function_values - * functions do; to make things a little - * simpler, the - * FETools::compute_interpolation_to_quadrature_points_matrix - * provides the matrix form of this. - */ - template - static - void - compute_projection_from_quadrature_points_matrix (const FiniteElement &fe, - const Quadrature &lhs_quadrature, - const Quadrature &rhs_quadrature, - FullMatrix &X); - - /** - * Given a (scalar) local finite element - * function, compute the matrix that maps - * the vector of nodal values onto the - * vector of values of this function at - * quadrature points as given by the - * second argument. In a sense, this - * function does the opposite of the @p - * compute_projection_from_quadrature_points_matrix - * function. - */ - template - static - void - compute_interpolation_to_quadrature_points_matrix (const FiniteElement &fe, - const Quadrature &quadrature, - FullMatrix &I_q); - /** * Exception */ -- 2.39.5