Dear Kyusik, So my new question is , in deal.II, could I get local divergence of certain > function to get surface integral? > >> Yes it is. You can extract the divergence of a function using, for example, the FEValuesView function get_function_divergences <https://www.dealii.org/8.5.0/doxygen/deal.II/classFEValuesViews_1_1Vector.html#aa20eae586e7a296f95770cb02c5ad773> .
However, you'll note that this function only makes sense (and its therefore only defined) for a vector field. Your solution field is scalar though, which presents a bit of an issue. On the face of it you'd have to first project the gradient of the solution (scaled by the function "f") onto an axillary vector-valued FE space and then compute the divergence of that projected field. I think that what you could alternatively do is to expand your integrand into a gradient term and a Laplacian term. You can quite easily point-wise compute these individual quantities using the scalar FEValueViews functions get_function_gradients <https://www.dealii.org/8.5.0/doxygen/deal.II/classFEValuesViews_1_1Scalar.html#aac98b8207ba9c750a30165fd24fe1e6e> and get_function_laplacians <https://www.dealii.org/8.5.0/doxygen/deal.II/classFEValuesViews_1_1Scalar.html#afbeaeda586d94edf549ad2d714be6510>, or those equivalently <https://www.dealii.org/8.5.0/doxygen/deal.II/classFEValuesBase.html#a69c63f8be0311c8970253276ac7df138> defined <https://www.dealii.org/8.5.0/doxygen/deal.II/classFEValuesBase.html#ae0f6e77a23934574b9f7bee161b73928> for FEValuesBase. Does this help? Regards, Jean-Paul -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.