80 closedBasis_( order , pointType==POINTTYPE_SPECTRAL?POINTTYPE_SPECTRAL:POINTTYPE_EQUISPACED ),
81 openBasis_( order-1 , pointType==POINTTYPE_SPECTRAL?POINTTYPE_SPECTRAL_OPEN:POINTTYPE_EQUISPACED ) ,
82 closedPts_( order+1 , 1 ),
86 this ->
basisCardinality_ = 2 * closedBasis_.getCardinality() * openBasis_.getCardinality();
87 this ->
basisCellTopology_ = shards::CellTopology(shards::getCellTopologyData<shards::Quadrilateral<4> >() );
92 PointTools::getLattice<Scalar,FieldContainer<Scalar> >( closedPts_ ,
93 shards::CellTopology(shards::getCellTopologyData<shards::Line<2> >()) ,
96 pointType==POINTTYPE_SPECTRAL?POINTTYPE_WARPBLEND:POINTTYPE_EQUISPACED );
98 if (pointType == POINTTYPE_SPECTRAL)
100 PointTools::getGaussPoints<Scalar,FieldContainer<Scalar> >( openPts_ ,
105 PointTools::getLattice<Scalar,FieldContainer<Scalar> >( openPts_ ,
106 shards::CellTopology(shards::getCellTopologyData<shards::Line<2> >()) ,
109 POINTTYPE_EQUISPACED );
112 Array<Array<RCP<Basis<Scalar,ArrayScalar > > > > bases(2);
113 bases[0].resize(2); bases[1].resize(2);
114 bases[0][0] = rcp( &openBasis_ ,
false );
115 bases[0][1] = rcp( &closedBasis_ ,
false );
116 bases[1][0] = rcp( &closedBasis_ ,
false );
117 bases[1][1] = rcp( &openBasis_ ,
false );
118 this->setBases( bases );
131 std::vector<int> tags( tagSize * this->getCardinality() );
133 const std::vector<std::vector<int> >& closedDofTags = closedBasis_.getAllDofTags();
134 const std::vector<std::vector<int> >& openDofTags = openBasis_.getAllDofTags();
136 std::map<int,std::map<int,int> > total_dof_per_entity;
137 std::map<int,std::map<int,int> > current_dof_per_entity;
139 for (
int i=0;i<4;i++) {
140 total_dof_per_entity[0][i] = 0;
141 current_dof_per_entity[0][i] = 0;
143 for (
int i=0;i<4;i++) {
144 total_dof_per_entity[1][i] = 0;
145 current_dof_per_entity[1][i] = 0;
147 total_dof_per_entity[2][0] = 0;
148 current_dof_per_entity[2][0] = 0;
151 for (
int i=0;i<4;i++) {
152 total_dof_per_entity[1][i] = openBasis_.getCardinality();
155 total_dof_per_entity[2][0] = this->getCardinality() - 4 * openBasis_.getCardinality();
160 for (
int j=0;j<closedBasis_.getCardinality();j++)
162 const int cdim = closedDofTags[j][0];
163 const int cent = closedDofTags[j][1];
164 for (
int i=0;i<openBasis_.getCardinality();i++)
166 const int odim = openDofTags[i][0];
167 const int oent = openDofTags[i][1];
171 tags[4*tagcur] = dofdim;
172 tags[4*tagcur+1] = dofent;
173 tags[4*tagcur+2] = current_dof_per_entity[dofdim][dofent];
174 current_dof_per_entity[dofdim][dofent]++;
175 tags[4*tagcur+3] = total_dof_per_entity[dofdim][dofent];
182 for (
int j=0;j<openBasis_.getCardinality();j++)
184 const int odim = openDofTags[j][0];
185 const int oent = openDofTags[j][1];
186 for (
int i=0;i<closedBasis_.getCardinality();i++)
188 const int cdim = closedDofTags[i][0];
189 const int cent = closedDofTags[i][1];
193 tags[4*tagcur] = dofdim;
194 tags[4*tagcur+1] = dofent;
195 tags[4*tagcur+2] = current_dof_per_entity[dofdim][dofent];
196 current_dof_per_entity[dofdim][dofent]++;
197 tags[4*tagcur+3] = total_dof_per_entity[dofdim][dofent];
204 this -> ordinalToTag_,
206 this -> basisCardinality_,
216 const ArrayScalar & inputPoints,
217 const EOperator operatorType)
const {
220#ifdef HAVE_INTREPID_DEBUG
221 Intrepid::getValues_HCURL_Args<Scalar, ArrayScalar>(outputValues,
224 this -> getBaseCellTopology(),
225 this -> getCardinality() );
229 int dim0 = inputPoints.dimension(0);
232 FieldContainer<Scalar> xPoints(dim0,1);
233 FieldContainer<Scalar> yPoints(dim0,1);
235 for (
int i=0;i<dim0;i++) {
236 xPoints(i,0) = inputPoints(i,0);
237 yPoints(i,0) = inputPoints(i,1);
240 switch (operatorType) {
243 FieldContainer<Scalar> closedBasisValsXPts( closedBasis_.getCardinality() , dim0 );
244 FieldContainer<Scalar> closedBasisValsYPts( closedBasis_.getCardinality() , dim0 );
245 FieldContainer<Scalar> openBasisValsXPts( openBasis_.getCardinality() , dim0 );
246 FieldContainer<Scalar> openBasisValsYPts( openBasis_.getCardinality() , dim0 );
248 closedBasis_.getValues( closedBasisValsXPts , xPoints , OPERATOR_VALUE );
249 closedBasis_.getValues( closedBasisValsYPts , yPoints , OPERATOR_VALUE );
250 openBasis_.getValues( openBasisValsXPts , xPoints , OPERATOR_VALUE );
251 openBasis_.getValues( openBasisValsYPts , yPoints , OPERATOR_VALUE );
255 for (
int j=0;j<closedBasis_.getCardinality();j++)
257 for (
int i=0;i<openBasis_.getCardinality();i++)
259 for (
int l=0;l<dim0;l++)
261 outputValues(bfcur,l,0) = closedBasisValsYPts(j,l) * openBasisValsXPts(i,l);
262 outputValues(bfcur,l,1) = 0.0;
269 for (
int j=0;j<openBasis_.getCardinality();j++)
271 for (
int i=0;i<closedBasis_.getCardinality();i++)
273 for (
int l=0;l<dim0;l++)
275 outputValues(bfcur,l,0) = 0.0;
276 outputValues(bfcur,l,1) = openBasisValsYPts(j,l) * closedBasisValsXPts(i,l);
285 FieldContainer<Scalar> closedBasisDerivsXPts( closedBasis_.getCardinality() , dim0 , 1 );
286 FieldContainer<Scalar> closedBasisDerivsYPts( closedBasis_.getCardinality() , dim0 , 1 );
287 FieldContainer<Scalar> openBasisValsXPts( openBasis_.getCardinality() , dim0 );
288 FieldContainer<Scalar> openBasisValsYPts( openBasis_.getCardinality() , dim0 );
290 closedBasis_.getValues( closedBasisDerivsXPts , xPoints , OPERATOR_D1 );
291 closedBasis_.getValues( closedBasisDerivsYPts , yPoints , OPERATOR_D1 );
292 openBasis_.getValues( openBasisValsXPts , xPoints , OPERATOR_VALUE );
293 openBasis_.getValues( openBasisValsYPts , yPoints , OPERATOR_VALUE );
298 for (
int j=0;j<closedBasis_.getCardinality();j++)
300 for (
int i=0;i<openBasis_.getCardinality();i++)
302 for (
int l=0;l<dim0;l++) {
303 outputValues(bfcur,l) = -closedBasisDerivsYPts(j,l,0) * openBasisValsXPts(i,l);
310 for (
int j=0;j<openBasis_.getCardinality();j++)
312 for (
int i=0;i<closedBasis_.getCardinality();i++)
314 for (
int l=0;l<dim0;l++)
316 outputValues(bfcur,l) = closedBasisDerivsXPts(i,l,0) * openBasisValsYPts(j,l);
324 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_DIV), std::invalid_argument,
325 ">>> ERROR (Basis_HCURL_QUAD_In_FEM): DIV is invalid operator for HCURL Basis Functions");
329 TEUCHOS_TEST_FOR_EXCEPTION( (operatorType == OPERATOR_GRAD), std::invalid_argument,
330 ">>> ERROR (Basis_HCURL_QUAD_In_FEM): GRAD is invalid operator for HCURL Basis Functions");
343 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType == OPERATOR_D1) ||
344 (operatorType == OPERATOR_D2) ||
345 (operatorType == OPERATOR_D3) ||
346 (operatorType == OPERATOR_D4) ||
347 (operatorType == OPERATOR_D5) ||
348 (operatorType == OPERATOR_D6) ||
349 (operatorType == OPERATOR_D7) ||
350 (operatorType == OPERATOR_D8) ||
351 (operatorType == OPERATOR_D9) ||
352 (operatorType == OPERATOR_D10) ),
353 std::invalid_argument,
354 ">>> ERROR (Basis_HCURL_QUAD_In_FEM): Invalid operator type");
358 TEUCHOS_TEST_FOR_EXCEPTION( ( (operatorType != OPERATOR_VALUE) &&
359 (operatorType != OPERATOR_GRAD) &&
360 (operatorType != OPERATOR_CURL) &&
361 (operatorType != OPERATOR_CURL) &&
362 (operatorType != OPERATOR_D1) &&
363 (operatorType != OPERATOR_D2) &&
364 (operatorType != OPERATOR_D3) &&
365 (operatorType != OPERATOR_D4) &&
366 (operatorType != OPERATOR_D5) &&
367 (operatorType != OPERATOR_D6) &&
368 (operatorType != OPERATOR_D7) &&
369 (operatorType != OPERATOR_D8) &&
370 (operatorType != OPERATOR_D9) &&
371 (operatorType != OPERATOR_D10) ),
372 std::invalid_argument,
373 ">>> ERROR (Basis_HCURL_QUAD_In_FEM): Invalid operator type");