/[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 3205 by jfenwick, Fri Sep 24 00:30:43 2010 UTC revision 3206 by jfenwick, Fri Sep 24 03:20:22 2010 UTC
# Line 56  void Dudley_ElementFile_Jacobeans_deallo Line 56  void Dudley_ElementFile_Jacobeans_deallo
56    
57    
58  Dudley_ElementFile_Jacobeans* Dudley_ElementFile_borrowJacobeans(Dudley_ElementFile* self, Dudley_NodeFile* nodes,  Dudley_ElementFile_Jacobeans* Dudley_ElementFile_borrowJacobeans(Dudley_ElementFile* self, Dudley_NodeFile* nodes,
59                                                                   bool_t reducedShapefunction, bool_t reducedIntegrationOrder) {                                                                   bool_t reducedIntegrationOrder) {
60    Dudley_ElementFile_Jacobeans *out = NULL;    Dudley_ElementFile_Jacobeans *out = NULL;
61    Dudley_ShapeFunction /* *shape=NULL, */ *basis;    Dudley_ShapeFunction /* *shape=NULL, */ *basis;
62    Dudley_ReferenceElement*  refElement=NULL;    Dudley_ReferenceElement*  refElement=NULL;
# Line 82  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 82  Dudley_ElementFile_Jacobeans* Dudley_Ele
82       out->numShapes=basis->Type->numShapes;       out->numShapes=basis->Type->numShapes;
83       out->numElements=self->numElements;       out->numElements=self->numElements;
84            
85       if (reducedShapefunction) {  //      if (reducedShapefunction) {
86          dBdv=basis->dSdv;  //         dBdv=basis->dSdv;
87       } else {  //      } else {
88          dBdv=refElement->DBasisFunctionDv;          dBdv=refElement->DBasisFunctionDv;
89       }  //      }
90            
91       if (out->numQuad != 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.");
# Line 111  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 111  Dudley_ElementFile_Jacobeans* Dudley_Ele
111               if (refElement->numLocalDim==0) {               if (refElement->numLocalDim==0) {
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->numQuad, 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->numQuad, 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);
# Line 127  Dudley_ElementFile_Jacobeans* Dudley_Ele Line 127  Dudley_ElementFile_Jacobeans* Dudley_Ele
127               if (refElement->numLocalDim==0) {               if (refElement->numLocalDim==0) {
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->numQuad,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->numQuad,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);

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

  ViewVC Help
Powered by ViewVC 1.1.26