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

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

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

revision 82 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC
# Line 1  Line 1 
1  /* $Id$ */  /*
2     ******************************************************************************
3     *                                                                            *
4     *       COPYRIGHT  ACcESS 2003,2004,2005 -  All Rights Reserved              *
5     *                                                                            *
6     * This software is the property of ACcESS. No part of this code              *
7     * may be copied in any form or by any means without the expressed written    *
8     * consent of ACcESS.  Copying, use or modification of this software          *
9     * by any unauthorised person is illegal unless that person has a software    *
10     * license agreement with ACcESS.                                             *
11     *                                                                            *
12     ******************************************************************************
13    */
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 6  Line 18 
18    
19  /**************************************************************/  /**************************************************************/
20    
 /*   Copyrights by ACcESS Australia 2003 */  
21  /*   Author: gross@access.edu.au */  /*   Author: gross@access.edu.au */
22  /*   Version: $Id$ */  /*   Version: $Id$ */
23    
24  /**************************************************************/  /**************************************************************/
25    
 #include "Finley.h"  
26  #include "ReferenceElements.h"  #include "ReferenceElements.h"
27    
28  /**************************************************************/  /**************************************************************/
# Line 375  Finley_RefElement* Finley_RefElement_all Line 385  Finley_RefElement* Finley_RefElement_all
385        
386    /*  allocate the Finley_RefElement to be returned: */    /*  allocate the Finley_RefElement to be returned: */
387        
388    out=(Finley_RefElement*)MEMALLOC(sizeof(Finley_RefElement));    out=MEMALLOC(1,Finley_RefElement);
389    if (Finley_checkPtr(out)) return NULL;    if (Finley_checkPtr(out)) return NULL;
390    out->Type=&(Finley_RefElement_InfoList[id]);    out->Type=&(Finley_RefElement_InfoList[id]);
391    out->numQuadNodes=numQuadNodes;    out->numQuadNodes=numQuadNodes;
# Line 388  Finley_RefElement* Finley_RefElement_all Line 398  Finley_RefElement* Finley_RefElement_all
398        
399    int Ndim=Finley_RefElement_InfoList[id].numDim;    int Ndim=Finley_RefElement_InfoList[id].numDim;
400    int NS=Finley_RefElement_InfoList[id].numShapes;    int NS=Finley_RefElement_InfoList[id].numShapes;
401    out->QuadNodes=(double *)MEMALLOC(numQuadNodes*Ndim*sizeof(double));    out->QuadNodes=MEMALLOC(numQuadNodes*Ndim,double);
402    out->QuadWeights=(double *)MEMALLOC(numQuadNodes*sizeof(double));    out->QuadWeights=MEMALLOC(numQuadNodes,double);
403    out->S=(double *)MEMALLOC(NS*numQuadNodes*sizeof(double));    out->S=MEMALLOC(NS*numQuadNodes,double);
404    out->dSdv=(double *)MEMALLOC(NS*Ndim*numQuadNodes*sizeof(double));    out->dSdv=MEMALLOC(NS*Ndim*numQuadNodes,double);
405    if ( Finley_checkPtr(out->QuadNodes) || Finley_checkPtr(out->QuadWeights) || Finley_checkPtr(out->S) || Finley_checkPtr(out->dSdv) ) {    if ( Finley_checkPtr(out->QuadNodes) || Finley_checkPtr(out->QuadWeights) || Finley_checkPtr(out->S) || Finley_checkPtr(out->dSdv) ) {
406           Finley_RefElement_dealloc(out);           Finley_RefElement_dealloc(out);
407           return NULL;           return NULL;
# Line 400  Finley_RefElement* Finley_RefElement_all Line 410  Finley_RefElement* Finley_RefElement_all
410    /*  set the quadrature nodes: */    /*  set the quadrature nodes: */
411        
412    Finley_RefElement_InfoList[id].getQuadNodes(numQuadNodes,out->QuadNodes,out->QuadWeights);    Finley_RefElement_InfoList[id].getQuadNodes(numQuadNodes,out->QuadNodes,out->QuadWeights);
413    if (Finley_ErrorCode!=NO_ERROR) {    if (! Finley_noError()) {
414           Finley_RefElement_dealloc(out);           Finley_RefElement_dealloc(out);
415           return NULL;           return NULL;
416    }    }
# Line 408  Finley_RefElement* Finley_RefElement_all Line 418  Finley_RefElement* Finley_RefElement_all
418    /*  eval shape functions on quadrature node: */    /*  eval shape functions on quadrature node: */
419        
420    Finley_RefElement_InfoList[id].getValues(numQuadNodes,out->QuadNodes,out->S,out->dSdv);    Finley_RefElement_InfoList[id].getValues(numQuadNodes,out->QuadNodes,out->S,out->dSdv);
421    if (Finley_ErrorCode!=NO_ERROR) {    if (! Finley_noError()) {
422           Finley_RefElement_dealloc(out);           Finley_RefElement_dealloc(out);
423           return NULL;           return NULL;
424    }    }
# Line 449  ElementTypeId Finley_RefElement_getTypeI Line 459  ElementTypeId Finley_RefElement_getTypeI
459  }  }
460  /*  /*
461  * $Log$  * $Log$
462  * Revision 1.1  2004/10/26 06:53:57  jgs  * Revision 1.5  2005/09/15 03:44:23  jgs
463  * Initial revision  * Merge of development branch dev-02 back to main trunk on 2005-09-15
464    *
465    * Revision 1.4.2.1  2005/09/07 06:26:21  gross
466    * the solver from finley are put into the standalone package paso now
467    *
468    * Revision 1.4  2004/12/15 07:08:33  jgs
469    * *** empty log message ***
470  *  *
 * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
 * Initial version of eys using boost-python.  
471  *  *
472  *  *
473  */  */

Legend:
Removed from v.82  
changed lines
  Added in v.150

  ViewVC Help
Powered by ViewVC 1.1.26