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

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

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

revision 3489 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3490 by caltinay, Wed Mar 30 02:24:33 2011 UTC
# Line 38  void Finley_Assemble_interpolate(Finley_ Line 38  void Finley_Assemble_interpolate(Finley_
38    dim_t numComps=getDataPointSize(data);    dim_t numComps=getDataPointSize(data);
39    index_t *resort_nodes=NULL, *map=NULL;    index_t *resort_nodes=NULL, *map=NULL;
40    type_t data_type=getFunctionSpaceType(data);    type_t data_type=getFunctionSpaceType(data);
   type_t type;  
41    size_t numComps_size;    size_t numComps_size;
42    Finley_resetError();    Finley_resetError();
   #define NODES 0  
   #define REDUCED_NODES 3  
   #define DOF 1  
   #define REDUCED_DOF 2  
43    if (nodes==NULL || elements==NULL) return;    if (nodes==NULL || elements==NULL) return;
44    reduced_integration = Finley_Assemble_reducedIntegrationOrder(interpolated_data);    reduced_integration = Finley_Assemble_reducedIntegrationOrder(interpolated_data);
45    reference_element= Finley_ReferenceElementSet_borrowReferenceElement(elements->referenceElementSet, reduced_integration);    reference_element= Finley_ReferenceElementSet_borrowReferenceElement(elements->referenceElementSet, reduced_integration);
# Line 53  void Finley_Assemble_interpolate(Finley_ Line 48  void Finley_Assemble_interpolate(Finley_
48    /* set some parameter */    /* set some parameter */
49    
50    if (data_type==FINLEY_NODES) {    if (data_type==FINLEY_NODES) {
        type=NODES;  
51         resort_nodes=reference_element->Type->subElementNodes;         resort_nodes=reference_element->Type->subElementNodes;
52         numSub=reference_element->Type->numSubElements;         numSub=reference_element->Type->numSubElements;
53         basis=reference_element->BasisFunctions;         basis=reference_element->BasisFunctions;
# Line 65  void Finley_Assemble_interpolate(Finley_ Line 59  void Finley_Assemble_interpolate(Finley_
59                  dof_offset=reference_element->Type->offsets[0];                  dof_offset=reference_element->Type->offsets[0];
60             }             }
61    } else if (data_type==FINLEY_REDUCED_NODES) {    } else if (data_type==FINLEY_REDUCED_NODES) {
        type=REDUCED_NODES;  
62         numSub=1;         numSub=1;
63         resort_nodes=reference_element->Type->linearNodes;         resort_nodes=reference_element->Type->linearNodes;
64         basis=reference_element->LinearBasisFunctions;         basis=reference_element->LinearBasisFunctions;
# Line 81  void Finley_Assemble_interpolate(Finley_ Line 74  void Finley_Assemble_interpolate(Finley_
74            Finley_setError(TYPE_ERROR,"Finley_Assemble_interpolate: for more than one processor DEGREES_OF_FREEDOM data are not accepted as input.");            Finley_setError(TYPE_ERROR,"Finley_Assemble_interpolate: for more than one processor DEGREES_OF_FREEDOM data are not accepted as input.");
75            return;            return;
76         }         }
        type=DOF;  
77         numSub=reference_element->Type->numSubElements;         numSub=reference_element->Type->numSubElements;
78         resort_nodes=reference_element->Type->subElementNodes;         resort_nodes=reference_element->Type->subElementNodes;
79         basis=reference_element->BasisFunctions;         basis=reference_element->BasisFunctions;
# Line 97  void Finley_Assemble_interpolate(Finley_ Line 89  void Finley_Assemble_interpolate(Finley_
89            Finley_setError(TYPE_ERROR,"Finley_Assemble_interpolate: for more than one processor REDUCED_DEGREES_OF_FREEDOM data are not accepted as input.");            Finley_setError(TYPE_ERROR,"Finley_Assemble_interpolate: for more than one processor REDUCED_DEGREES_OF_FREEDOM data are not accepted as input.");
90            return;            return;
91         }         }
        type=REDUCED_DOF;  
92         numSub=1;         numSub=1;
93         resort_nodes=reference_element->Type->linearNodes;         resort_nodes=reference_element->Type->linearNodes;
94         basis=reference_element->LinearBasisFunctions;         basis=reference_element->LinearBasisFunctions;
# Line 157  void Finley_Assemble_interpolate(Finley_ Line 148  void Finley_Assemble_interpolate(Finley_
148             THREAD_MEMFREE(local_data);             THREAD_MEMFREE(local_data);
149          } /* end of parallel region */          } /* end of parallel region */
150    }    }
   #undef NODES  
   #undef REDUCED_NODES  
   #undef DOF  
   #undef REDUCED_DOF  
151  }  }

Legend:
Removed from v.3489  
changed lines
  Added in v.3490

  ViewVC Help
Powered by ViewVC 1.1.26