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

Diff of /branches/domexper/dudley/src/Assemble_gradient.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 38  void Dudley_Assemble_gradient(Dudley_Nod Line 38  void Dudley_Assemble_gradient(Dudley_Nod
38    register double *grad_data_e;    register double *grad_data_e;
39    dim_t numNodes=0, numShapesTotal=0, numComps, NN=0, numDim=0, numShapesTotal2=0, numQuad=0;    dim_t numNodes=0, numShapesTotal=0, numComps, NN=0, numDim=0, numShapesTotal2=0, numQuad=0;
40    type_t data_type=getFunctionSpaceType(data);    type_t data_type=getFunctionSpaceType(data);
41    bool_t reducedShapefunction=FALSE, reducedIntegrationOrder=FALSE;    bool_t reducedIntegrationOrder=FALSE;
42    Dudley_ElementFile_Jacobeans* jac=NULL;    Dudley_ElementFile_Jacobeans* jac=NULL;
43        
44    Dudley_resetError();    Dudley_resetError();
# Line 48  void Dudley_Assemble_gradient(Dudley_Nod Line 48  void Dudley_Assemble_gradient(Dudley_Nod
48    reducedIntegrationOrder=Dudley_Assemble_reducedIntegrationOrder(grad_data);    reducedIntegrationOrder=Dudley_Assemble_reducedIntegrationOrder(grad_data);
49    
50    if (data_type==DUDLEY_NODES) {    if (data_type==DUDLEY_NODES) {
        reducedShapefunction=FALSE;  
51         numNodes=nodes->nodesMapping->numTargets;         numNodes=nodes->nodesMapping->numTargets;
52    } else if (data_type==DUDLEY_REDUCED_NODES) {    } else if (data_type==DUDLEY_REDUCED_NODES) {
        reducedShapefunction=TRUE;  
53         numNodes=nodes->reducedNodesMapping->numTargets;         numNodes=nodes->reducedNodesMapping->numTargets;
54    } else if (data_type==DUDLEY_DEGREES_OF_FREEDOM) {    } else if (data_type==DUDLEY_DEGREES_OF_FREEDOM) {
55         if (elements->MPIInfo->size>1) {         if (elements->MPIInfo->size>1) {
56            Dudley_setError(TYPE_ERROR,"Dudley_Assemble_gradient: for more than one processor DEGREES_OF_FREEDOM data are not accepted as input.");            Dudley_setError(TYPE_ERROR,"Dudley_Assemble_gradient: for more than one processor DEGREES_OF_FREEDOM data are not accepted as input.");
57            return;            return;
58         }         }
        reducedShapefunction=FALSE;  
59         numNodes=nodes->degreesOfFreedomMapping->numTargets;         numNodes=nodes->degreesOfFreedomMapping->numTargets;
60    } else if (data_type==DUDLEY_REDUCED_DEGREES_OF_FREEDOM) {    } else if (data_type==DUDLEY_REDUCED_DEGREES_OF_FREEDOM) {
61         if (elements->MPIInfo->size>1) {         if (elements->MPIInfo->size>1) {
62            Dudley_setError(TYPE_ERROR,"Dudley_Assemble_gradient: for more than one processor REDUCED_DEGREES_OF_FREEDOM data are not accepted as input.");            Dudley_setError(TYPE_ERROR,"Dudley_Assemble_gradient: for more than one processor REDUCED_DEGREES_OF_FREEDOM data are not accepted as input.");
63            return;            return;
64         }         }
        reducedShapefunction=TRUE;  
65         numNodes=nodes->reducedDegreesOfFreedomMapping->numTargets;         numNodes=nodes->reducedDegreesOfFreedomMapping->numTargets;
66    } else {    } else {
67         Dudley_setError(TYPE_ERROR,"Dudley_Assemble_gradient: Cannot calculate gradient of data because of unsuitable input data representation.");         Dudley_setError(TYPE_ERROR,"Dudley_Assemble_gradient: Cannot calculate gradient of data because of unsuitable input data representation.");
68    }    }
69    
70    jac=Dudley_ElementFile_borrowJacobeans(elements,nodes,reducedShapefunction,reducedIntegrationOrder);    jac=Dudley_ElementFile_borrowJacobeans(elements,nodes,reducedIntegrationOrder);
71    refElement=Dudley_ReferenceElementSet_borrowReferenceElement(elements->referenceElementSet, reducedIntegrationOrder);    refElement=Dudley_ReferenceElementSet_borrowReferenceElement(elements->referenceElementSet, reducedIntegrationOrder);
72        
73    if (Dudley_noError())    if (Dudley_noError())

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

  ViewVC Help
Powered by ViewVC 1.1.26