55 const ArrayScalar &pts ):
56 latticePts_( n+1 , 1 ),
64 this ->
basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Line<2> >() );
71 for (
int i=0;i<n;i++) {
72 TEUCHOS_TEST_FOR_EXCEPTION( pts(i,0) >= pts(i+1,0) ,
74 "Intrepid::Basis_HGRAD_LINE_Cn_FEM Illegal points given to constructor" );
78 if (std::abs(pts(0,0)+1.0) < INTREPID_TOL) {
84 for (
int i=1;i<n;i++) {
87 if (std::abs(pts(n,0)-1.0) < INTREPID_TOL) {
100 Teuchos::SerialDenseMatrix<int,Scalar> Vsdm(N,N);
101 for (
int i=0;i<N;i++) {
102 for (
int j=0;j<N;j++) {
108 Teuchos::SerialDenseSolver<int,Scalar> solver;
109 solver.setMatrix( rcp( &Vsdm ,
false ) );
113 for (
int i=0;i<N;i++) {
114 for (
int j=0;j<N;j++) {
115 Vinv_(i,j) = Vsdm(j,i);
123 const EPointType &pointType ):
124 latticePts_( n+1 , 1 ),
132 this ->
basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Line<2> >() );
138 case POINTTYPE_EQUISPACED:
141 case POINTTYPE_SPECTRAL:
144 case POINTTYPE_SPECTRAL_OPEN:
145 PointTools::getGaussPoints<Scalar,FieldContainer<Scalar> >(
latticePts_ , n );
148 TEUCHOS_TEST_FOR_EXCEPTION(
true , std::invalid_argument ,
"Basis_HGRAD_LINE_Cn_FEM:: invalid point type" );
158 Teuchos::SerialDenseMatrix<int,Scalar> Vsdm(N,N);
159 for (
int i=0;i<N;i++) {
160 for (
int j=0;j<N;j++) {
166 Teuchos::SerialDenseSolver<int,Scalar> solver;
167 solver.setMatrix( rcp( &Vsdm ,
false ) );
171 for (
int i=0;i<N;i++) {
172 for (
int j=0;j<N;j++) {
173 Vinv_(i,j) = Vsdm(j,i);
190 int *tags =
new int[ tagSize * this->getCardinality() ];
195 const int n = this->getDegree();
198 if (latticePts_(0,0) == -1.0) {
214 for (
int i=1;i<n;i++) {
217 tags[4*i+2] = -edge_dof + i;
218 tags[4*i+3] = internal_dof;
220 if (latticePts_(n,0) == 1.0) {
234 this -> ordinalToTag_,
236 this -> basisCardinality_,
250 const ArrayScalar & inputPoints,
251 const EOperator operatorType)
const {
254#ifdef HAVE_INTREPID_DEBUG
255 Intrepid::getValues_HGRAD_Args<Scalar, ArrayScalar>(outputValues,
258 this -> getBaseCellTopology(),
259 this -> getCardinality() );
261 const int numPts = inputPoints.dimension(0);
262 const int numBf = this->getCardinality();
265 switch (operatorType) {
268 FieldContainer<Scalar> phisCur( numBf , numPts );
269 Phis_.getValues( phisCur , inputPoints , operatorType );
270 for (
int i=0;i<outputValues.dimension(0);i++) {
271 for (
int j=0;j<outputValues.dimension(1);j++) {
272 outputValues(i,j) = 0.0;
273 for (
int k=0;k<this->getCardinality();k++) {
274 outputValues(i,j) += this->Vinv_(k,i) * phisCur(k,j);
295 FieldContainer<Scalar> phisCur( numBf , numPts , dkcard );
296 Phis_.getValues( phisCur , inputPoints , operatorType );
298 for (
int i=0;i<outputValues.dimension(0);i++) {
299 for (
int j=0;j<outputValues.dimension(1);j++) {
300 for (
int k=0;k<outputValues.dimension(2);k++) {
301 outputValues(i,j,k) = 0.0;
302 for (
int l=0;l<this->getCardinality();l++) {
303 outputValues(i,j,k) += this->Vinv_(l,i) * phisCur(l,j,k);
311 TEUCHOS_TEST_FOR_EXCEPTION(
true , std::invalid_argument,
312 ">>> ERROR (Basis_HGRAD_LINE_Cn_FEM): Operator type not implemented" );
316 catch (std::invalid_argument &exception){
317 TEUCHOS_TEST_FOR_EXCEPTION(
true , std::invalid_argument,
318 ">>> ERROR (Basis_HGRAD_LINE_Cn_FEM): Operator failed");
void setOrdinalTagData(std::vector< std::vector< std::vector< int > > > &tagToOrdinal, std::vector< std::vector< int > > &ordinalToTag, const int *tags, const int basisCard, const int tagSize, const int posScDim, const int posScOrd, const int posDfOrd)
Fills ordinalToTag_ and tagToOrdinal_ by basis-specific tag data.
int getDkCardinality(const EOperator operatorType, const int spaceDim)
Returns cardinality of Dk, i.e., the number of all derivatives of order k.