// ------------------------------------------------------------------------ // // SPDX-License-Identifier: LGPL-2.1-or-later // Copyright (C) 2023 by the deal.II authors // // This file is part of the deal.II library. // // Part of the source code is dual licensed under Apache-2.0 WITH // LLVM-exception OR LGPL-2.1-or-later. Detailed license information // governing the source code and code contributions can be found in // LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II. // // ------------------------------------------------------------------------ #ifndef dealii_fe_values_views_internal_h #define dealii_fe_values_views_internal_h #include #include #include #include #include #include #include DEAL_II_NAMESPACE_OPEN namespace FEValuesViews { /** * Internal namespace for the utility functions used to actually compute * values by FEValuesViews */ namespace internal { // Given values of degrees of freedom, evaluate the // values/gradients/... at quadrature points // ------------------------- scalar functions -------------------------- /** * Compute function values for Scalars. */ template void do_function_values( const ArrayView &dof_values, const Table<2, double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector::type> &values); /** * same code for gradient and Hessian, template argument 'order' to give * the order of the derivative (= rank of gradient/Hessian tensor) */ template void do_function_derivatives( const ArrayView &dof_values, const Table<2, dealii::Tensor> &shape_derivatives, const std::vector::ShapeFunctionData> &shape_function_data, std::vector< typename ProductType>::type> &derivatives); /** * Compute Laplacian values for Scalars. */ template void do_function_laplacians( const ArrayView &dof_values, const Table<2, dealii::Tensor<2, spacedim>> &shape_hessians, const std::vector::ShapeFunctionData> &shape_function_data, std::vector:: template solution_laplacian_type> &laplacians); // ----------------------------- vector part --------------------------- /** * Compute function values for Vectors. */ template void do_function_values( const ArrayView &dof_values, const Table<2, double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector< typename ProductType>::type> &values); /** * same code for gradient and Hessian, template argument 'order' to give * the order of the derivative (= rank of gradient/Hessian tensor) */ template void do_function_derivatives( const ArrayView &dof_values, const Table<2, dealii::Tensor> &shape_derivatives, const std::vector::ShapeFunctionData> &shape_function_data, std::vector< typename ProductType>::type> &derivatives); /** * Compute gradient values for Vectors. */ template void do_function_symmetric_gradients( const ArrayView &dof_values, const Table<2, dealii::Tensor<1, spacedim>> &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector< typename ProductType>::type> &symmetric_gradients); /** * Compute divergence values for Vectors. */ template void do_function_divergences( const ArrayView &dof_values, const Table<2, dealii::Tensor<1, spacedim>> &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector:: template solution_divergence_type> &divergences); /** * Compute curl values for Vectors. */ template void do_function_curls( const ArrayView &dof_values, const Table<2, dealii::Tensor<1, spacedim>> &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector::type>::type> &curls); /** * Compute Laplacian values for Vectors. */ template void do_function_laplacians( const ArrayView &dof_values, const Table<2, dealii::Tensor<2, spacedim>> &shape_hessians, const std::vector::ShapeFunctionData> &shape_function_data, std::vector:: template solution_laplacian_type> &laplacians); // ---------------------- symmetric tensor part ------------------------ /** * Compute values for symmetric tensors. */ template void do_function_values( const ArrayView &dof_values, const dealii::Table<2, double> &shape_values, const std::vector< typename SymmetricTensor<2, dim, spacedim>::ShapeFunctionData> &shape_function_data, std::vector< typename ProductType>::type> &values); /** * Compute divergence values for symmetric tensors. */ template void do_function_divergences( const ArrayView &dof_values, const Table<2, dealii::Tensor<1, spacedim>> &shape_gradients, const std::vector< typename SymmetricTensor<2, dim, spacedim>::ShapeFunctionData> &shape_function_data, std::vector:: template solution_divergence_type> &divergences); // ---------------------- non-symmetric tensor part ------------------------ /** * Compute values for nonsymmetric tensors. */ template void do_function_values( const ArrayView &dof_values, const dealii::Table<2, double> &shape_values, const std::vector::ShapeFunctionData> &shape_function_data, std::vector< typename ProductType>::type> &values); /** * Compute divergence values for nonsymmetric tensors. */ template void do_function_divergences( const ArrayView &dof_values, const Table<2, dealii::Tensor<1, spacedim>> &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector:: template solution_divergence_type> &divergences); /** * Compute gradient values for nonsymmetric tensors. */ template void do_function_gradients( const ArrayView &dof_values, const Table<2, dealii::Tensor<1, spacedim>> &shape_gradients, const std::vector::ShapeFunctionData> &shape_function_data, std::vector:: template solution_gradient_type> &gradients); } // end of namespace internal } // namespace FEValuesViews DEAL_II_NAMESPACE_CLOSE #endif