/[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 97 by jgs, Tue Dec 14 05:39:33 2004 UTC revision 147 by jgs, Fri Aug 12 01:45:47 2005 UTC
# Line 52  void Finley_Assemble_PDE(Finley_NodeFile Line 52  void Finley_Assemble_PDE(Finley_NodeFile
52    
53    double *EM_S=NULL,*EM_F=NULL,*V=NULL,*dVdv=NULL,*dSdV=NULL,*Vol=NULL,*dvdV=NULL;    double *EM_S=NULL,*EM_F=NULL,*V=NULL,*dVdv=NULL,*dSdV=NULL,*Vol=NULL,*dvdV=NULL;
54    double time0;    double time0;
55    int dimensions[ESCRIPT_MAX_DATA_RANK],e,q,color;    dim_t dimensions[ESCRIPT_MAX_DATA_RANK],e,q;
56    Assemble_Parameters p;    Assemble_Parameters p;
57    maybelong *index_row=NULL,*index_col=NULL;    index_t *index_row=NULL,*index_col=NULL,color;
58    
59    if (nodes==NULL || elements==NULL) return;    if (nodes==NULL || elements==NULL) return;
60    if (S==NULL && isEmpty(F)) return;    if (S==NULL && isEmpty(F)) return;
# Line 75  void Finley_Assemble_PDE(Finley_NodeFile Line 75  void Finley_Assemble_PDE(Finley_NodeFile
75      return;      return;
76    }    }
77    /*  get a functionspace */    /*  get a functionspace */
78    int funcspace=UNKNOWN;    type_t funcspace=UNKNOWN;
79    updateFunctionSpaceType(funcspace,A);    updateFunctionSpaceType(funcspace,A);
80    updateFunctionSpaceType(funcspace,B);    updateFunctionSpaceType(funcspace,B);
81    updateFunctionSpaceType(funcspace,C);    updateFunctionSpaceType(funcspace,C);
# Line 88  void Finley_Assemble_PDE(Finley_NodeFile Line 88  void Finley_Assemble_PDE(Finley_NodeFile
88    
89    if (! functionSpaceTypeEqual(funcspace,A) ) {    if (! functionSpaceTypeEqual(funcspace,A) ) {
90          Finley_ErrorCode=TYPE_ERROR;          Finley_ErrorCode=TYPE_ERROR;
91          sprintf(Finley_ErrorMsg,"unexpected function space typ for coefficient A");          sprintf(Finley_ErrorMsg,"unexpected function space type for coefficient A");
92    }    }
93    if (! functionSpaceTypeEqual(funcspace,B) ) {    if (! functionSpaceTypeEqual(funcspace,B) ) {
94          Finley_ErrorCode=TYPE_ERROR;          Finley_ErrorCode=TYPE_ERROR;
95          sprintf(Finley_ErrorMsg,"unexpected function space typ for coefficient B");          sprintf(Finley_ErrorMsg,"unexpected function space type for coefficient B");
96    }    }
97    if (! functionSpaceTypeEqual(funcspace,C) ) {    if (! functionSpaceTypeEqual(funcspace,C) ) {
98          Finley_ErrorCode=TYPE_ERROR;          Finley_ErrorCode=TYPE_ERROR;
99          sprintf(Finley_ErrorMsg,"unexpected function space typ for coefficient C");          sprintf(Finley_ErrorMsg,"unexpected function space type for coefficient C");
100    }    }
101    if (! functionSpaceTypeEqual(funcspace,D) ) {    if (! functionSpaceTypeEqual(funcspace,D) ) {
102          Finley_ErrorCode=TYPE_ERROR;          Finley_ErrorCode=TYPE_ERROR;
103          sprintf(Finley_ErrorMsg,"unexpected function space typ for coefficient D");          sprintf(Finley_ErrorMsg,"unexpected function space type for coefficient D");
104    }    }
105    if (! functionSpaceTypeEqual(funcspace,X) ) {    if (! functionSpaceTypeEqual(funcspace,X) ) {
106          Finley_ErrorCode=TYPE_ERROR;          Finley_ErrorCode=TYPE_ERROR;
107          sprintf(Finley_ErrorMsg,"unexpected function space typ for coefficient X");          sprintf(Finley_ErrorMsg,"unexpected function space type for coefficient X");
108    }    }
109    if (! functionSpaceTypeEqual(funcspace,Y) ) {    if (! functionSpaceTypeEqual(funcspace,Y) ) {
110          Finley_ErrorCode=TYPE_ERROR;          Finley_ErrorCode=TYPE_ERROR;
111          sprintf(Finley_ErrorMsg,"unexpected function space typ for coefficient Y");          sprintf(Finley_ErrorMsg,"unexpected function space type for coefficient Y");
112    }    }
113    
114    /* check if all function spaces are the same */    /* check if all function spaces are the same */
# Line 258  void Finley_Assemble_PDE(Finley_NodeFile Line 258  void Finley_Assemble_PDE(Finley_NodeFile
258           dvdV=(double*) THREAD_MEMALLOC(p.numDim*p.numDim*p.numQuad,double);           dvdV=(double*) THREAD_MEMALLOC(p.numDim*p.numDim*p.numQuad,double);
259           dSdV=(double*) THREAD_MEMALLOC(p.NS_row*p.numQuad*p.numDim,double);           dSdV=(double*) THREAD_MEMALLOC(p.NS_row*p.numQuad*p.numDim,double);
260           Vol=(double*) THREAD_MEMALLOC(p.numQuad,double);           Vol=(double*) THREAD_MEMALLOC(p.numQuad,double);
261           index_col=(maybelong*) THREAD_MEMALLOC(p.NN_col,maybelong);           index_col=(index_t*) THREAD_MEMALLOC(p.NN_col,index_t);
262           index_row=(maybelong*) THREAD_MEMALLOC(p.NN_row,maybelong);           index_row=(index_t*) THREAD_MEMALLOC(p.NN_row,index_t);
263    
264           if (! (Finley_checkPtr(EM_S) || Finley_checkPtr(EM_F) || Finley_checkPtr(V) || Finley_checkPtr(index_col) ||           if (! (Finley_checkPtr(EM_S) || Finley_checkPtr(EM_F) || Finley_checkPtr(V) || Finley_checkPtr(index_col) ||
265                  Finley_checkPtr(index_row) || Finley_checkPtr(dVdv) || Finley_checkPtr(dSdV) || Finley_checkPtr(Vol) ))  {                  Finley_checkPtr(index_row) || Finley_checkPtr(dVdv) || Finley_checkPtr(dSdV) || Finley_checkPtr(Vol) ))  {
266    
267             /*  open loop over all colors: */             /*  open loop over all colors: */
268             for (color=0;color<elements->numColors;color++) {             for (color=elements->minColor;color<=elements->maxColor;color++) {
269                /*  open loop over all elements: */                /*  open loop over all elements: */
270                #pragma omp for private(e) schedule(static)                #pragma omp for private(e) schedule(static)
271                for(e=0;e<elements->numElements;e++){                for(e=0;e<elements->numElements;e++){
# Line 342  void Finley_Assemble_PDE(Finley_NodeFile Line 342  void Finley_Assemble_PDE(Finley_NodeFile
342  }  }
343  /*  /*
344   * $Log$   * $Log$
345   * Revision 1.2  2004/12/14 05:39:29  jgs   * Revision 1.6  2005/08/12 01:45:42  jgs
346   * *** empty log message ***   * erge of development branch dev-02 back to main trunk on 2005-08-12
347   *   *
348   * Revision 1.1.1.1.2.1  2004/11/24 01:37:12  gross   * Revision 1.5.2.1  2005/08/03 08:54:27  gross
349   * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now   * contact element assemblage was called with wrong element table pointer
350   *   *
351   * Revision 1.1.1.1  2004/10/26 06:53:57  jgs   * Revision 1.5  2005/07/08 04:07:46  jgs
352   * initial import of project esys2   * Merge of development branch back to main trunk on 2005-07-08
353   *   *
354   * Revision 1.3  2004/07/30 04:37:06  gross   * Revision 1.4  2004/12/15 07:08:32  jgs
355   * escript and finley are linking now and RecMeshTest.py has been passed   * *** empty log message ***
356     * Revision 1.1.1.1.2.2  2005/06/29 02:34:47  gross
357     * some changes towards 64 integers in finley
358   *   *
359   * Revision 1.2  2004/07/21 05:00:54  gross   * Revision 1.1.1.1.2.1  2004/11/24 01:37:12  gross
360   * name changes in DataC   * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now
361   *   *
  * Revision 1.1  2004/07/02 04:21:13  gross  
  * Finley C code has been included  
362   *   *
363   *   *
364   */   */

Legend:
Removed from v.97  
changed lines
  Added in v.147

  ViewVC Help
Powered by ViewVC 1.1.26