/usr/include/trilinos/Intrepid_OrthogonalBases.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 | // @HEADER
// ************************************************************************
//
// Intrepid Package
// Copyright (2007) Sandia Corporation
//
// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
// license for use of this work by or on behalf of the U.S. Government.
//
// This library is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of the
// License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful, but
// WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
// USA
// Questions? Contact Pavel Bochev (pbboche@sandia.gov) or
// Denis Ridzal (dridzal@sandia.gov) or
// Robert C. Kirby (robert.c.kirby@ttu.edu)
//
// ************************************************************************
// @HEADER
/** \file Intrepid_OrthogonalBases.hpp
\brief Header file for orthogonal bases on various cell types
\author Created by R. Kirby
*/
#ifndef INTREPID_ORTHOGONALBASES_HPP
#define INTREPID_ORTHGONALBASES_HPP
#include "Intrepid_ConfigDefs.hpp"
#include "Intrepid_Types.hpp"
#include "Intrepid_Utils.hpp"
#include "Teuchos_Array.hpp"
#include "Teuchos_RCP.hpp"
#include "Teuchos_BLAS.hpp"
#include "Teuchos_oblackholestream.hpp"
#include "Teuchos_TestForException.hpp"
namespace Intrepid {
/** \class Intrepid::OrthgonalBases
\brief Basic implementation of general orthogonal polynomials on a
range of shapes, including the triangle, and tetrahedron.
Each basis is templated over Scalar type to allow multiple
precisions and automatic differentiation.
All methods of this class are static
The recurrence relations are formulated in such a way that automatic
differentiation on collapsed-coordinate bases works at all points in
the domain.
Also provided are routines for obtaining nodal and modal
derivative matrices for each basis.
*/
class OrthogonalBases {
public:
OrthogonalBases() {;}
~OrthogonalBases() {;}
/** \brief Calculates triangular orthogonal expansions
(e.g. Dubiner basis) at a range of input points
\param np [in] - number of input points
\param z [in] - 2d array of points z(pt,2)
\param n [in] - the maximum polynomial degree tabulated
\param poly_val [out] - 2d array poly_val((n+1)(n+2)/2,np)
\li The ScalarArray types must support (i,j) indexing
and a dimension(i) operation.
*/
template<class Scalar, class ScalarArray1, class ScalarArray2>
static void tabulateTriangle( const ScalarArray1& z ,
const int n ,
ScalarArray2 & poly_val );
/** \brief Calculates triangular orthogonal expansions
(e.g. Dubiner basis) at a range of input points
\param np [in] - number of input points
\param z [in] - 2d array of points z(pt,3)
\param n [in] - the maximum polynomial degree tabulated
\param poly_val [out] - 2d array poly_val((n+1)(n+2)(n+3)/6,np)
\li The ScalarArray types must support (i,j) indexing
and a dimension(i) operation.
*/
template<class Scalar, class ScalarArray1, class ScalarArray2>
static void tabulateTetrahedron( const ScalarArray1& z ,
const int n ,
ScalarArray2 & poly_val );
private:
/** \brief computes Jacobi recurrence coefficients of
order n with weights a,b so that
P^{alpha,beta}_{n+1}(x)
= (an x + bn) P^{alpha,beta}_n(x) - cn P^{alpha,beta}_{n-1}(x)
*/
template<class Scalar>
static void jrc( const Scalar &alpha , const Scalar &beta , const int &n ,
Scalar &an , Scalar &bn, Scalar &cn );
/** \brief Given indices p,q, computes the linear index of
the Dubiner polynomial D^{p,q} */
static inline int idxtri(int p, int q)
{
return (p+q)*(p+q+1)/2+q;
}
/** \brief Given indices p,q,r, computes the linear index of the
tetrahedral polynomial D^{p,q,r} */
static inline int idxtet(int p, int q, int r)
{
return (p+q+r)*(p+q+r+1)*(p+q+r+2)/6+(q+r)*(q+r+1)/2+r;
}
}; // class OrthogonalBases
} // namespace Intrepid
#include "Intrepid_OrthogonalBasesDef.hpp"
#endif
|