// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- // vi: set et ts=4 sw=2 sts=2: // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception #ifndef DUNE_DUAL_Q1_LOCALBASIS_HH #define DUNE_DUAL_Q1_LOCALBASIS_HH #include #include #include #include #include namespace Dune { /** * \ingroup DualMortarImpl \brief Dual Lagrange shape functions of order 1 on the reference cube. \tparam D Type to represent the field in the domain. \tparam R Type to represent the field in the range. \tparam dim Dimension of the cube \nosubgrouping */ template class DualQ1LocalBasis { public: typedef LocalBasisTraits,R,1,Dune::FieldVector, Dune::FieldMatrix > Traits; void setCoefficients(const std::array ,(1<& coefficients) { coefficients_ = coefficients; } //! \brief number of shape functions unsigned int size () const { return 1<& out) const { // compute q1 values std::vector q1Values(size()); for (size_t i=0; i& out) const // return value { // compute q1 jacobians std::vector q1Jacs(size()); // Loop over all shape functions for (size_t i=0; i& order, const typename Traits::DomainType& in, // position std::vector& out) const // return value { auto totalOrder = std::accumulate(order.begin(), order.end(), 0); if (totalOrder == 0) { evaluateFunction(in, out); } else { DUNE_THROW(NotImplemented, "Desired derivative order is not implemented"); } } //! \brief Polynomial order of the shape functions unsigned int order () const { return 1; } private: std::array ,(1< coefficients_; }; } #endif