/[escript]/branches/domexper/dudley/src/Assemble_interpolate.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/Assemble_interpolate.c

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

revision 3143 by jfenwick, Thu Sep 2 23:52:41 2010 UTC revision 3144 by jfenwick, Fri Sep 3 00:49:02 2010 UTC
# Line 36  void Dudley_Assemble_interpolate(Dudley_ Line 36  void Dudley_Assemble_interpolate(Dudley_
36    Dudley_ReferenceElement* reference_element=NULL;    Dudley_ReferenceElement* reference_element=NULL;
37    Dudley_ShapeFunction *basis=NULL;    Dudley_ShapeFunction *basis=NULL;
38    dim_t numComps=getDataPointSize(data);    dim_t numComps=getDataPointSize(data);
39    index_t *resort_nodes=NULL, *map=NULL;    index_t *map=NULL;
40    type_t data_type=getFunctionSpaceType(data);    type_t data_type=getFunctionSpaceType(data);
41    type_t type;    type_t type;
42    size_t numComps_size;    size_t numComps_size;
# Line 54  void Dudley_Assemble_interpolate(Dudley_ Line 54  void Dudley_Assemble_interpolate(Dudley_
54    
55    if (data_type==DUDLEY_NODES) {    if (data_type==DUDLEY_NODES) {
56         type=NODES;         type=NODES;
        resort_nodes=reference_element->Type->subElementNodes;  
57         basis=reference_element->BasisFunctions;         basis=reference_element->BasisFunctions;
58         numNodes=Dudley_NodeFile_getNumNodes(nodes);         numNodes=Dudley_NodeFile_getNumNodes(nodes);
59         map=Dudley_NodeFile_borrowTargetNodes(nodes);         map=Dudley_NodeFile_borrowTargetNodes(nodes);
60         dof_offset=reference_element->Type->offsets[0];         dof_offset=reference_element->Type->offsets[0];
61    } else if (data_type==DUDLEY_REDUCED_NODES) {    } else if (data_type==DUDLEY_REDUCED_NODES) {
62         type=REDUCED_NODES;         type=REDUCED_NODES;
        resort_nodes=reference_element->Type->linearNodes;  
63         basis=reference_element->LinearBasisFunctions;         basis=reference_element->LinearBasisFunctions;
64         numNodes=Dudley_NodeFile_getNumReducedNodes(nodes);         numNodes=Dudley_NodeFile_getNumReducedNodes(nodes);
65         map=Dudley_NodeFile_borrowTargetReducedNodes(nodes);         map=Dudley_NodeFile_borrowTargetReducedNodes(nodes);
# Line 72  void Dudley_Assemble_interpolate(Dudley_ Line 70  void Dudley_Assemble_interpolate(Dudley_
70            return;            return;
71         }         }
72         type=DOF;         type=DOF;
        resort_nodes=reference_element->Type->subElementNodes;  
73         basis=reference_element->BasisFunctions;         basis=reference_element->BasisFunctions;
74         numNodes=Dudley_NodeFile_getNumDegreesOfFreedom(nodes);         numNodes=Dudley_NodeFile_getNumDegreesOfFreedom(nodes);
75         map=Dudley_NodeFile_borrowTargetDegreesOfFreedom(nodes);         map=Dudley_NodeFile_borrowTargetDegreesOfFreedom(nodes);
# Line 83  void Dudley_Assemble_interpolate(Dudley_ Line 80  void Dudley_Assemble_interpolate(Dudley_
80            return;            return;
81         }         }
82         type=REDUCED_DOF;         type=REDUCED_DOF;
        resort_nodes=reference_element->Type->linearNodes;  
83         basis=reference_element->LinearBasisFunctions;         basis=reference_element->LinearBasisFunctions;
84         numNodes=Dudley_NodeFile_getNumReducedDegreesOfFreedom(nodes);         numNodes=Dudley_NodeFile_getNumReducedDegreesOfFreedom(nodes);
85         map=Dudley_NodeFile_borrowTargetReducedDegreesOfFreedom(nodes);         map=Dudley_NodeFile_borrowTargetReducedDegreesOfFreedom(nodes);
# Line 127  void Dudley_Assemble_interpolate(Dudley_ Line 123  void Dudley_Assemble_interpolate(Dudley_
123          for(e=0;e<elements->numElements;e++)          for(e=0;e<elements->numElements;e++)
124          {          {
125              for (q=0;q<NS_DOF;q++)              for (q=0;q<NS_DOF;q++)
126              {              {
127                      i=elements->Nodes[INDEX2(resort_nodes[INDEX2(dof_offset+q,0,numShapesTotal2)],e,NN)];                      i=elements->Nodes[INDEX2(q,e,NN)];
128                      data_array=getSampleDataRO(data,map[i]);                      data_array=getSampleDataRO(data,map[i]);
129                      memcpy(&(local_data[INDEX3(0,q,0, numComps,NS_DOF)]), data_array, numComps_size);                      memcpy(&(local_data[INDEX3(0,q,0, numComps,NS_DOF)]), data_array, numComps_size);
130              }              }

Legend:
Removed from v.3143  
changed lines
  Added in v.3144

  ViewVC Help
Powered by ViewVC 1.1.26