/[escript]/branches/domexper/dudley/src/ElementFile_jacobeans.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/ElementFile_jacobeans.c

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

revision 3204 by jfenwick, Thu Sep 23 23:59:39 2010 UTC revision 3205 by jfenwick, Fri Sep 24 00:30:43 2010 UTC
# Line 31  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 31  Dudley_ElementFile_Jacobeans* Dudley_Ele
31       out->status=DUDLEY_INITIAL_STATUS-1;       out->status=DUDLEY_INITIAL_STATUS-1;
32       out->BasisFunctions=Dudley_ShapeFunction_reference(BasisFunctions);       out->BasisFunctions=Dudley_ShapeFunction_reference(BasisFunctions);
33       out->numDim=0;       out->numDim=0;
34       out->numQuadTotal=0;       out->numQuad=0;
35       out->numElements=0;       out->numElements=0;
36       out->absD=NULL;       out->absD=NULL;
37       out->quadweight=0;       out->quadweight=0;
# Line 75  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 75  Dudley_ElementFile_Jacobeans* Dudley_Ele
75    if (out->status < nodes->status)    if (out->status < nodes->status)
76    {    {
77       basis=out->BasisFunctions;       basis=out->BasisFunctions;
 //     shape=Dudley_ReferenceElementSet_borrowParametrization(self->referenceElementSet, reducedIntegrationOrder);  
78       refElement= Dudley_ReferenceElementSet_borrowReferenceElement(self->referenceElementSet, reducedIntegrationOrder);       refElement= Dudley_ReferenceElementSet_borrowReferenceElement(self->referenceElementSet, reducedIntegrationOrder);
79    
80       out->numDim=nodes->numDim;       out->numDim=nodes->numDim;
81  //     out->numQuadTotal=shape->numQuadNodes;       out->numQuad=QuadNums[self->numDim][!reducedIntegrationOrder];
      out->numQuadTotal=QuadNums[self->numDim][!reducedIntegrationOrder];  
82       out->numShapes=basis->Type->numShapes;       out->numShapes=basis->Type->numShapes;
83       out->numElements=self->numElements;       out->numElements=self->numElements;
84            
# Line 90  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 88  Dudley_ElementFile_Jacobeans* Dudley_Ele
88          dBdv=refElement->DBasisFunctionDv;          dBdv=refElement->DBasisFunctionDv;
89       }       }
90            
91       if (out->numQuadTotal != basis->numQuadNodes) {       if (out->numQuad != basis->numQuadNodes) {
92          Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: Incorrect total number of quadrature points.");          Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: Incorrect total number of quadrature points.");
93          return NULL;          return NULL;
94       }       }
# Line 102  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 100  Dudley_ElementFile_Jacobeans* Dudley_Ele
100       if (out->DSDX==NULL) out->DSDX=MEMALLOC((out->numElements)       if (out->DSDX==NULL) out->DSDX=MEMALLOC((out->numElements)
101                                              *(out->numShapes)                                              *(out->numShapes)
102                                              *(out->numDim)                                              *(out->numDim)
103                                              *(out->numQuadTotal),double);                                              *(out->numQuad),double);
104       if (out->absD==NULL) out->absD=MEMALLOC(out->numElements,double);       if (out->absD==NULL) out->absD=MEMALLOC(out->numElements,double);
105       if (! (Dudley_checkPtr(out->DSDX) || Dudley_checkPtr(out->absD)) ) {       if (! (Dudley_checkPtr(out->DSDX) || Dudley_checkPtr(out->absD)) ) {
106            /*========================== dim = 1 ============================================== */            /*========================== dim = 1 ============================================== */
# Line 114  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 112  Dudley_ElementFile_Jacobeans* Dudley_Ele
112                   Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: 2D does not support local dimension 0.");                   Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: 2D does not support local dimension 0.");
113               } else if (refElement->numLocalDim==1) {               } else if (refElement->numLocalDim==1) {
114            if (out->BasisFunctions->Type->numDim==1) {            if (out->BasisFunctions->Type->numDim==1) {
115                          Assemble_jacobeans_2D_M1D_E1D(nodes->Coordinates, out->numQuadTotal, self->numElements, numNodes,self->Nodes, out->DSDX,out->absD, &(out->quadweight), self->Id);                          Assemble_jacobeans_2D_M1D_E1D(nodes->Coordinates, out->numQuad, self->numElements, numNodes,self->Nodes, out->DSDX,out->absD, &(out->quadweight), self->Id);
116                    } else {                    } else {
117                      Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: element dimension for local dimenion 1 in a 2D domain has to be 1.");                      Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: element dimension for local dimenion 1 in a 2D domain has to be 1.");
118                    }                    }
119               } else if (refElement->numLocalDim==2) {               } else if (refElement->numLocalDim==2) {
120                       Assemble_jacobeans_2D(nodes->Coordinates,out->numQuadTotal, self->numElements,numNodes,self->Nodes,                       Assemble_jacobeans_2D(nodes->Coordinates,out->numQuad, self->numElements,numNodes,self->Nodes,
121                                             out->DSDX, out->absD, &(out->quadweight), self->Id);                                             out->DSDX, out->absD, &(out->quadweight), self->Id);
122               } else {               } else {
123                 Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: local dimenion in a 2D domain has to be  1 or 2.");                 Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: local dimenion in a 2D domain has to be  1 or 2.");
# Line 130  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 128  Dudley_ElementFile_Jacobeans* Dudley_Ele
128            Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: 3D does not support local dimension 0.");            Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: 3D does not support local dimension 0.");
129               } else if (refElement->numLocalDim==2) {               } else if (refElement->numLocalDim==2) {
130            if (out->BasisFunctions->Type->numDim==2) {            if (out->BasisFunctions->Type->numDim==2) {
131                          Assemble_jacobeans_3D_M2D_E2D(nodes->Coordinates,out->numQuadTotal,self->numElements,numNodes,self->Nodes,                          Assemble_jacobeans_3D_M2D_E2D(nodes->Coordinates,out->numQuad,self->numElements,numNodes,self->Nodes,
132                                                        out->DSDX,out->absD, &(out->quadweight), self->Id);                                                        out->DSDX,out->absD, &(out->quadweight), self->Id);
133                    } else {                    } else {
134                      Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: element dimension for local dimenion 2 in a 3D domain has to be 2.");                      Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: element dimension for local dimenion 2 in a 3D domain has to be 2.");
135                    }                    }
136               } else if (refElement->numLocalDim==3) {               } else if (refElement->numLocalDim==3) {
137                       Assemble_jacobeans_3D(nodes->Coordinates,out->numQuadTotal,self->numElements,numNodes,self->Nodes,                       Assemble_jacobeans_3D(nodes->Coordinates,out->numQuad,self->numElements,numNodes,self->Nodes,
138                                             out->DSDX,out->absD, &(out->quadweight), self->Id);                                             out->DSDX,out->absD, &(out->quadweight), self->Id);
139               } else {               } else {
140                 Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: local dimenion in a 3D domain has to be 2 or 3.");                 Dudley_setError(SYSTEM_ERROR,"Dudley_ElementFile_borrowJacobeans: local dimenion in a 3D domain has to be 2 or 3.");

Legend:
Removed from v.3204  
changed lines
  Added in v.3205

  ViewVC Help
Powered by ViewVC 1.1.26