/[escript]/branches/doubleplusgood/finley/src/Quadrature.cpp
ViewVC logotype

Diff of /branches/doubleplusgood/finley/src/Quadrature.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4326 by jfenwick, Wed Feb 27 06:09:33 2013 UTC revision 4327 by jfenwick, Wed Mar 20 05:09:11 2013 UTC
# Line 1009  void Finley_Quad_getNodesRec(int numQuad Line 1009  void Finley_Quad_getNodesRec(int numQuad
1009    bool_t set=FALSE;    bool_t set=FALSE;
1010    #define DIM 2    #define DIM 2
1011        
1012    quadNodes1d=TMPMEMALLOC(numQuadNodes,double);    quadNodes1d=new double[numQuadNodes];
1013    quadWeights1d=TMPMEMALLOC(numQuadNodes,double);    quadWeights1d=new double[numQuadNodes];
1014    if (! ( Finley_checkPtr(quadNodes1d) || Finley_checkPtr(quadWeights1d) ) ) {    if (! ( Finley_checkPtr(quadNodes1d) || Finley_checkPtr(quadWeights1d) ) ) {
1015       /*  find numQuadNodes1d with numQuadNodes1d**2==numQuadNodes: */       /*  find numQuadNodes1d with numQuadNodes1d**2==numQuadNodes: */
1016            
# Line 1042  void Finley_Quad_getNodesRec(int numQuad Line 1042  void Finley_Quad_getNodesRec(int numQuad
1042           sprintf(error_msg,"Finley_Quad_getNodesRec: Illegal number of quadrature nodes %d on hexahedron.",numQuadNodes);           sprintf(error_msg,"Finley_Quad_getNodesRec: Illegal number of quadrature nodes %d on hexahedron.",numQuadNodes);
1043           Finley_setError(VALUE_ERROR,error_msg);           Finley_setError(VALUE_ERROR,error_msg);
1044       }       }
1045       TMPMEMFREE(quadNodes1d);       delete[] quadNodes1d;
1046       TMPMEMFREE(quadWeights1d);       delete[] quadWeights1d;
1047     }     }
1048     #undef DIM     #undef DIM
1049  }  }
# Line 1062  void Finley_Quad_getNodesHex(int numQuad Line 1062  void Finley_Quad_getNodesHex(int numQuad
1062        
1063    /*  find numQuadNodes1d with numQuadNodes1d**3==numQuadNodes: */    /*  find numQuadNodes1d with numQuadNodes1d**3==numQuadNodes: */
1064        
1065    quadNodes1d=TMPMEMALLOC(numQuadNodes,double);    quadNodes1d=new double[numQuadNodes];
1066    quadWeights1d=TMPMEMALLOC(numQuadNodes,double);    quadWeights1d=new double[numQuadNodes];
1067    if (! ( Finley_checkPtr(quadNodes1d) || Finley_checkPtr(quadWeights1d) ) ) {    if (! ( Finley_checkPtr(quadNodes1d) || Finley_checkPtr(quadWeights1d) ) ) {
1068       for (numQuadNodes1d=1;numQuadNodes1d<=MAX_numQuadNodesLine;numQuadNodes1d++) {       for (numQuadNodes1d=1;numQuadNodes1d<=MAX_numQuadNodesLine;numQuadNodes1d++) {
1069         if (numQuadNodes1d*numQuadNodes1d*numQuadNodes1d==numQuadNodes) {         if (numQuadNodes1d*numQuadNodes1d*numQuadNodes1d==numQuadNodes) {
# Line 1096  void Finley_Quad_getNodesHex(int numQuad Line 1096  void Finley_Quad_getNodesHex(int numQuad
1096            sprintf(error_msg,"Finley_Quad_getNodesHex: Illegal number of quadrature nodes %d on hexahedron.",numQuadNodes);            sprintf(error_msg,"Finley_Quad_getNodesHex: Illegal number of quadrature nodes %d on hexahedron.",numQuadNodes);
1097            Finley_setError(VALUE_ERROR,error_msg);            Finley_setError(VALUE_ERROR,error_msg);
1098       }       }
1099       TMPMEMFREE(quadNodes1d);       delete[] quadNodes1d;
1100       TMPMEMFREE(quadWeights1d);       delete[] quadWeights1d;
1101    }    }
1102    #undef DIM    #undef DIM
1103  }  }

Legend:
Removed from v.4326  
changed lines
  Added in v.4327

  ViewVC Help
Powered by ViewVC 1.1.26