~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to finley/src/Assemble_LumpedSystem.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

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