/[escript]/trunk-mpi-branch/finley/src/Assemble_getAssembleParameters.c
ViewVC logotype

Diff of /trunk-mpi-branch/finley/src/Assemble_getAssembleParameters.c

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

revision 1222 by ksteube, Tue May 15 03:23:17 2007 UTC revision 1223 by gross, Fri Aug 3 02:40:39 2007 UTC
# Line 39  void Assemble_getAssembleParameters(Finl Line 39  void Assemble_getAssembleParameters(Finl
39    }    }
40    /*  check the dimensions of S and F */    /*  check the dimensions of S and F */
41    if (S!=NULL && !isEmpty(F)) {    if (S!=NULL && !isEmpty(F)) {
42      if (! numSamplesEqual(F,1,(S->myNumRows*S->row_block_size)/S->logical_row_block_size)) {      if (! numSamplesEqual(F,1,(Paso_Distribution_getMyNumComponents(S->row_distribution)*S->row_block_size)/S->logical_row_block_size)) {
43        Finley_setError(TYPE_ERROR,"Assemble_getAssembleParameters: number of rows of matrix and length of right hand side don't match.");        Finley_setError(TYPE_ERROR,"Assemble_getAssembleParameters: number of rows of matrix and length of right hand side don't match.");
44        return;        return;
45      }      }
# Line 67  void Assemble_getAssembleParameters(Finl Line 67  void Assemble_getAssembleParameters(Finl
67       }       }
68    }    }
69    
70    parm->col_DOF=nodes->degreeOfFreedom;    parm->col_DOF=nodes->degreesOfFreedomMapping->target;
71    parm->row_DOF=nodes->degreeOfFreedom;    parm->row_DOF=nodes->degreesOfFreedomMapping->target;
72    /* get the information for the labeling of the degrees of freedom from matrix */    /* get the information for the labeling of the degrees of freedom from matrix */
73    if (S!=NULL) {    if (S!=NULL) {
74        /* Make sure # rows in matrix == num DOF for one of: full or reduced (use numLocalDOF for MPI) */        /* Make sure # rows in matrix == num DOF for one of: full or reduced (use numLocalDOF for MPI) */
75  #ifndef PASO_MPI        if ( Paso_Distribution_getMyNumComponents(S->row_distribution)*S->row_block_size==parm->numEqu* Paso_Distribution_getMyNumComponents(nodes->degreesOfFreedomDistribution)) {
76        if (S->myNumRows*S->row_block_size==parm->numEqu*nodes->numDegreesOfFreedom) {             parm->row_DOF_UpperBound =  Paso_Distribution_getMyNumComponents(nodes->degreesOfFreedomDistribution);
77             parm->row_DOF_UpperBound = nodes->numDegreesOfFreedom;             parm->row_DOF=nodes->degreesOfFreedomMapping->target;
78  #else  
       if (S->myNumRows*S->row_block_size==parm->numEqu*nodes->degreeOfFreedomDistribution->numLocal) {  
            parm->row_DOF_UpperBound = nodes->degreeOfFreedomDistribution->numLocal;  
 #endif  
            parm->row_DOF=nodes->degreeOfFreedom;  
79             parm->row_node=&(parm->id[0]);             parm->row_node=&(parm->id[0]);
80             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,FALSE,reducedIntegrationOrder);             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,FALSE,reducedIntegrationOrder);
81        }        }
82  #ifndef PASO_MPI        else if ( Paso_Distribution_getMyNumComponents(S->row_distribution)*S->row_block_size==parm->numEqu* Paso_Distribution_getMyNumComponents(nodes->reducedDegreesOfFreedomDistribution)) {
83        else if (S->myNumRows*S->row_block_size==parm->numEqu*nodes->reducedNumDegreesOfFreedom) {             parm->row_DOF_UpperBound =  Paso_Distribution_getMyNumComponents(nodes->reducedDegreesOfFreedomDistribution);
84             parm->row_DOF_UpperBound = nodes->reducedNumDegreesOfFreedom;             parm->row_DOF=nodes->reducedDegreesOfFreedomMapping->target;
 #else  
       else if (S->myNumRows*S->row_block_size==parm->numEqu*nodes->reducedDegreeOfFreedomDistribution->numLocal) {  
            parm->row_DOF_UpperBound = nodes->reducedDegreeOfFreedomDistribution->numLocal;  
 #endif  
            parm->row_DOF=nodes->reducedDegreeOfFreedom;  
85             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,TRUE,reducedIntegrationOrder);             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,TRUE,reducedIntegrationOrder);
86             parm->row_node=parm->row_jac->ReferenceElement->Type->linearNodes;             parm->row_node=parm->row_jac->ReferenceElement->Type->linearNodes;
87        } else {        } else {
88             Finley_setError(TYPE_ERROR,"Assemble_getAssembleParameters: number of rows in matrix does not match the number of degrees of freedom in mesh");             Finley_setError(TYPE_ERROR,"Assemble_getAssembleParameters: number of rows in matrix does not match the number of degrees of freedom in mesh");
89        }        }
90        /* Make sure # cols in matrix == num DOF for one of: full or reduced (use numLocalDOF for MPI) */        /* Make sure # cols in matrix == num DOF for one of: full or reduced (use numLocalDOF for MPI) */
91  #ifndef PASO_MPI              if ( Paso_Distribution_getMyNumComponents(S->col_distribution)*S->col_block_size==parm->numComp* Paso_Distribution_getMyNumComponents(nodes->degreesOfFreedomDistribution)) {
92        if (S->myNumCols*S->col_block_size==parm->numComp*nodes->numDegreesOfFreedom) {             parm->col_DOF_UpperBound =  Paso_Distribution_getMyNumComponents(nodes->degreesOfFreedomDistribution);
            parm->col_DOF_UpperBound = nodes->numDegreesOfFreedom;  
 #else  
       if (S->myNumCols*S->col_block_size==parm->numComp*nodes->degreeOfFreedomDistribution->numLocal) {  
            parm->col_DOF_UpperBound = nodes->degreeOfFreedomDistribution->numLocal;  
 #endif  
93             parm->col_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,FALSE,reducedIntegrationOrder);             parm->col_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,FALSE,reducedIntegrationOrder);
94             parm->col_DOF=nodes->degreeOfFreedom;             parm->col_DOF=nodes->degreesOfFreedomMapping->target;
95             parm->col_node=&(parm->id[0]);             parm->col_node=&(parm->id[0]);
96        }        }
97  #ifndef PASO_MPI        else if ( Paso_Distribution_getMyNumComponents(S->col_distribution)*S->col_block_size==parm->numComp* Paso_Distribution_getMyNumComponents(nodes->reducedDegreesOfFreedomDistribution)) {
98        else if (S->myNumCols*S->col_block_size==parm->numComp*nodes->reducedNumDegreesOfFreedom) {             parm->col_DOF_UpperBound =  Paso_Distribution_getMyNumComponents(nodes->reducedDegreesOfFreedomDistribution);
99             parm->col_DOF_UpperBound = nodes->reducedNumDegreesOfFreedom;             parm->col_DOF=nodes->reducedDegreesOfFreedomMapping->target;
 #else  
       else if (S->myNumCols*S->col_block_size==parm->numComp*nodes->reducedDegreeOfFreedomDistribution->numLocal) {  
            parm->col_DOF_UpperBound = nodes->reducedDegreeOfFreedomDistribution->numLocal;  
 #endif  
            parm->col_DOF=nodes->reducedDegreeOfFreedom;  
100             parm->col_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,TRUE,reducedIntegrationOrder);             parm->col_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,TRUE,reducedIntegrationOrder);
101             parm->col_node=parm->row_jac->ReferenceElement->Type->linearNodes;             parm->col_node=parm->row_jac->ReferenceElement->Type->linearNodes;
102        } else {        } else {
# Line 125  void Assemble_getAssembleParameters(Finl Line 106  void Assemble_getAssembleParameters(Finl
106    if (! Finley_noError()) return;    if (! Finley_noError()) return;
107    /* get the information from right hand side */    /* get the information from right hand side */
108    if (!isEmpty(F)) {    if (!isEmpty(F)) {
109  #ifndef PASO_MPI        if (numSamplesEqual(F,1, Paso_Distribution_getMyNumComponents(nodes->degreesOfFreedomDistribution))) {
110        if (numSamplesEqual(F,1,nodes->numDegreesOfFreedom)) {             parm->row_DOF_UpperBound =  Paso_Distribution_getMyNumComponents(nodes->degreesOfFreedomDistribution);
111             parm->row_DOF_UpperBound=nodes->numDegreesOfFreedom;             parm->row_DOF=nodes->degreesOfFreedomMapping->target;
 #else  
       if (numSamplesEqual(F,1,nodes->degreeOfFreedomDistribution->numLocal)) {  
            parm->row_DOF_UpperBound = nodes->degreeOfFreedomDistribution->numLocal;  
 #endif  
            parm->row_DOF=nodes->degreeOfFreedom;  
112             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,FALSE,reducedIntegrationOrder);             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,FALSE,reducedIntegrationOrder);
113             parm->row_node=&(parm->id[0]);             parm->row_node=&(parm->id[0]);
114        }        }
115  #ifndef PASO_MPI        else if (numSamplesEqual(F,1, Paso_Distribution_getMyNumComponents(nodes->reducedDegreesOfFreedomDistribution))) {
116        else if (numSamplesEqual(F,1,nodes->reducedNumDegreesOfFreedom)) {             parm->row_DOF_UpperBound =  Paso_Distribution_getMyNumComponents(nodes->reducedDegreesOfFreedomDistribution);
117             parm->row_DOF_UpperBound=nodes->reducedNumDegreesOfFreedom;             parm->row_DOF=nodes->reducedDegreesOfFreedomMapping->target;
 #else  
       else if (numSamplesEqual(F,1,nodes->reducedDegreeOfFreedomDistribution->numLocal)) {  
            parm->row_DOF_UpperBound = nodes->reducedDegreeOfFreedomDistribution->numLocal;  
 #endif  
            parm->row_DOF=nodes->reducedDegreeOfFreedom;  
118             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,TRUE,reducedIntegrationOrder);             parm->row_jac=Finley_ElementFile_borrowJacobeans(elements,nodes,TRUE,reducedIntegrationOrder);
119             parm->row_node=parm->row_jac->ReferenceElement->Type->linearNodes;             parm->row_node=parm->row_jac->ReferenceElement->Type->linearNodes;
120        } else {        } else {
# Line 169  void Assemble_getAssembleParameters(Finl Line 140  void Assemble_getAssembleParameters(Finl
140    parm->col_NN=parm->col_jac->ReferenceElement->Type->numNodes;    parm->col_NN=parm->col_jac->ReferenceElement->Type->numNodes;
141    parm->col_NS=parm->col_jac->ReferenceElement->Type->numShapes;    parm->col_NS=parm->col_jac->ReferenceElement->Type->numShapes;
142  }  }
   
 /*  
  * $Log$  
  * Revision 1.6  2005/09/15 03:44:21  jgs  
  * Merge of development branch dev-02 back to main trunk on 2005-09-15  
  *  
  * Revision 1.5.2.1  2005/09/07 06:26:17  gross  
  * the solver from finley are put into the standalone package paso now  
  *  
  * Revision 1.5  2005/07/08 04:07:47  jgs  
  * Merge of development branch back to main trunk on 2005-07-08  
  *  
  * Revision 1.4  2004/12/15 07:08:32  jgs  
  * *** empty log message ***  
  * Revision 1.1.1.1.2.4  2005/07/01 07:02:13  gross  
  * some bug with OPENMP fixed  
  *  
  * Revision 1.1.1.1.2.3  2005/06/29 02:34:48  gross  
  * some changes towards 64 integers in finley  
  *  
  * Revision 1.1.1.1.2.2  2004/11/12 06:58:18  gross  
  * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry  
  *  
  * Revision 1.1.1.1.2.1  2004/10/28 22:59:24  gross  
  * finley's RecTest.py is running now: problem in SystemMatrixAdapater fixed  
  *  
  * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
  * initial import of project esys2  
  *  
  * Revision 1.2  2004/07/21 05:00:54  gross  
  * name changes in DataC  
  *  
  * Revision 1.1  2004/07/02 04:21:13  gross  
  * Finley C code has been included  
  *  
  *  
  */  
   

Legend:
Removed from v.1222  
changed lines
  Added in v.1223

  ViewVC Help
Powered by ViewVC 1.1.26