/[escript]/trunk/finley/src/Assemble_LumpedSystem.c
ViewVC logotype

Diff of /trunk/finley/src/Assemble_LumpedSystem.c

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

revision 2991 by gross, Mon Mar 22 05:42:48 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 39  void Finley_Assemble_LumpedSystem(Finley Line 39  void Finley_Assemble_LumpedSystem(Finley
39    
40    bool_t reducedIntegrationOrder=FALSE, expandedD;    bool_t reducedIntegrationOrder=FALSE, expandedD;
41    char error_msg[LenErrorMsg_MAX];    char error_msg[LenErrorMsg_MAX];
42    Assemble_Parameters p;    Finley_Assemble_Parameters p;
43    dim_t dimensions[ESCRIPT_MAX_DATA_RANK], k, e, len_EM_lumpedMat, q, s, isub;    dim_t dimensions[ESCRIPT_MAX_DATA_RANK], k, e, len_EM_lumpedMat, q, s, isub;
44    type_t funcspace;    type_t funcspace;
45    index_t color,*row_index=NULL;    index_t color,*row_index=NULL;
# Line 56  void Finley_Assemble_LumpedSystem(Finley Line 56  void Finley_Assemble_LumpedSystem(Finley
56    if (nodes==NULL || elements==NULL) return;    if (nodes==NULL || elements==NULL) return;
57    if (isEmpty(lumpedMat) || isEmpty(D)) return;    if (isEmpty(lumpedMat) || isEmpty(D)) return;
58    if (isEmpty(lumpedMat) && !isEmpty(D)) {    if (isEmpty(lumpedMat) && !isEmpty(D)) {
59          Finley_setError(TYPE_ERROR,"Assemble_LumpedSystem: coefficients are non-zero but no lumped matrix is given.");          Finley_setError(TYPE_ERROR,"Finley_Assemble_LumpedSystem: coefficients are non-zero but no lumped matrix is given.");
60          return;          return;
61    }    }
62    funcspace=getFunctionSpaceType(D);    funcspace=getFunctionSpaceType(D);
# Line 70  void Finley_Assemble_LumpedSystem(Finley Line 70  void Finley_Assemble_LumpedSystem(Finley
70    } else if (funcspace==FINLEY_REDUCED_FACE_ELEMENTS)  {    } else if (funcspace==FINLEY_REDUCED_FACE_ELEMENTS)  {
71         reducedIntegrationOrder=TRUE;         reducedIntegrationOrder=TRUE;
72    } else {    } else {
73         Finley_setError(TYPE_ERROR,"Assemble_LumpedSystem: assemblage failed because of illegal function space.");         Finley_setError(TYPE_ERROR,"Finley_Assemble_LumpedSystem: assemblage failed because of illegal function space.");
74    }    }
75    if (! Finley_noError()) return;    if (! Finley_noError()) return;
76    
77    /* set all parameters in p*/    /* set all parameters in p*/
78    Assemble_getAssembleParameters(nodes,elements,NULL,lumpedMat, reducedIntegrationOrder, &p);    Finley_Assemble_getAssembleParameters(nodes,elements,NULL,lumpedMat, reducedIntegrationOrder, &p);
79    if (! Finley_noError()) return;    if (! Finley_noError()) return;
80    
81    /* check if all function spaces are the same */    /* check if all function spaces are the same */
82    if (! numSamplesEqual(D,p.numQuadTotal,elements->numElements) ) {    if (! numSamplesEqual(D,p.numQuadTotal,elements->numElements) ) {
83          sprintf(error_msg,"Assemble_LumpedSystem: sample points of coefficient D don't match (%d,%d)",p.numQuadSub,elements->numElements);          sprintf(error_msg,"Finley_Assemble_LumpedSystem: sample points of coefficient D don't match (%d,%d)",p.numQuadSub,elements->numElements);
84          Finley_setError(TYPE_ERROR,error_msg);          Finley_setError(TYPE_ERROR,error_msg);
85    }    }
86    
# Line 88  void Finley_Assemble_LumpedSystem(Finley Line 88  void Finley_Assemble_LumpedSystem(Finley
88    if (p.numEqu==1) {    if (p.numEqu==1) {
89      if (!isEmpty(D)) {      if (!isEmpty(D)) {
90         if (!isDataPointShapeEqual(D,0,dimensions)) {         if (!isDataPointShapeEqual(D,0,dimensions)) {
91            Finley_setError(TYPE_ERROR,"Assemble_LumpedSystem: coefficient D, rank 0 expected.");            Finley_setError(TYPE_ERROR,"Finley_Assemble_LumpedSystem: coefficient D, rank 0 expected.");
92         }         }
93    
94      }      }
# Line 96  void Finley_Assemble_LumpedSystem(Finley Line 96  void Finley_Assemble_LumpedSystem(Finley
96      if (!isEmpty(D)) {      if (!isEmpty(D)) {
97        dimensions[0]=p.numEqu;        dimensions[0]=p.numEqu;
98        if (!isDataPointShapeEqual(D,1,dimensions)) {        if (!isDataPointShapeEqual(D,1,dimensions)) {
99            sprintf(error_msg,"Assemble_LumpedSystem: coefficient D, expected shape (%d,)",dimensions[0]);            sprintf(error_msg,"Finley_Assemble_LumpedSystem: coefficient D, expected shape (%d,)",dimensions[0]);
100            Finley_setError(TYPE_ERROR,error_msg);            Finley_setError(TYPE_ERROR,error_msg);
101        }        }
102      }      }

Legend:
Removed from v.2991  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26