55 const EPointType pointType ):
57 V((n+1)*(n+2)/2,(n+1)*(n+2)/2),
58 Vinv((n+1)*(n+2)/2,(n+1)*(n+2)/2),
59 latticePts( (n+1)*(n+2)/2 , 2 )
61 TEUCHOS_TEST_FOR_EXCEPTION( n <= 0, std::invalid_argument, "polynomial order must be >= 1
");
63 const int N = (n+1)*(n+2)/2;
64 this -> basisCardinality_ = N;
65 this -> basisDegree_ = n;
66 this -> basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Triangle<3> >() );
67 this -> basisType_ = BASIS_FEM_FIAT;
68 this -> basisCoordinates_ = COORDINATES_CARTESIAN;
69 this -> basisTagsAreSet_ = false;
73 shards::CellTopology myTri_3( shards::getCellTopologyData< shards::Triangle<3> >() );
75 PointTools::getLattice<Scalar,FieldContainer<Scalar> >( latticePts ,
82 // form Vandermonde matrix. Actually, this is the transpose of the VDM,
83 // so we transpose on copy below.
85 Phis.getValues( V , latticePts , OPERATOR_VALUE );
87 // now I need to copy V into a Teuchos array to do the inversion
88 Teuchos::SerialDenseMatrix<int,Scalar> Vsdm(N,N);
89 for (int i=0;i<N;i++) {
90 for (int j=0;j<N;j++) {
96 Teuchos::SerialDenseSolver<int,Scalar> solver;
97 solver.setMatrix( rcp( &Vsdm , false ) );
100 // now I need to copy the inverse into Vinv
101 for (int i=0;i<N;i++) {
102 for (int j=0;j<N;j++) {
103 Vinv(i,j) = Vsdm(j,i);