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

Contents of /branches/domexper/dudley/src/NodeFile_copyTable.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 782 - (show annotations)
Tue Jul 18 00:47:47 2006 UTC (13 years, 4 months ago) by bcumming
Original Path: trunk/finley/src/NodeFile_copyTable.c
File MIME type: text/plain
File size: 2589 byte(s)
Large number of changes to Finley for meshing in MPI.

- optimisation and neatening up of rectcanglular mesh generation code
- first and second order 1D, 2D and 3D rectangular meshes are now
  available in finley and escript using MPI.
- reduced meshes now generated in MPI, and interpolation to and from 
  reduced data types now supported.  

1 /*
2 ************************************************************
3 * Copyright 2006 by ACcESS MNRF *
4 * *
5 * http://www.access.edu.au *
6 * Primary Business: Queensland, Australia *
7 * Licensed under the Open Software License version 3.0 *
8 * http://www.opensource.org/licenses/osl-3.0.php *
9 * *
10 ************************************************************
11 */
12
13 /**************************************************************/
14
15 /* Finley: Mesh: NodeFile */
16
17 /* copies node file in into node file out starting from offset */
18 /* the nodes offset to in->numNodes+offset-1 in out will be overwritten */
19
20
21 /**************************************************************/
22
23 /* Author: gross@access.edu.au */
24 /* Version: $Id$ */
25
26 /**************************************************************/
27
28 #include "NodeFile.h"
29
30 /**************************************************************/
31
32 void Finley_NodeFile_copyTable(int offset,Finley_NodeFile* out,int idOffset,int dofOffset,Finley_NodeFile* in) {
33 int i,n;
34 /* check dimension and file size */
35 if (out->numDim!=in->numDim) {
36 Finley_setError(TYPE_ERROR,"__FILE__: dimensions of node files don't match");
37 }
38 if (out->numNodes<in->numNodes+offset) {
39 Finley_setError(MEMORY_ERROR,"__FILE__: node table is too small.");
40 }
41 if (Finley_noError()) {
42 #pragma omp parallel for private(i,n) schedule(static)
43 for(n=0;n<in->numNodes;n++) {
44 out->Id[offset+n]=in->Id[n]+idOffset;
45 out->Tag[offset+n]=in->Tag[n];
46 out->degreeOfFreedom[offset+n]=in->degreeOfFreedom[n]+dofOffset;
47 out->reducedDegreeOfFreedom[offset+n]=in->reducedDegreeOfFreedom[n]+dofOffset;
48 out->toReduced[offset+n]=in->toReduced[n]+dofOffset;
49 #ifdef PASO_MPI
50 out->Dom[offset+n]=in->Dom[n];
51 #endif
52 for(i=0;i<out->numDim;i++) out->Coordinates[INDEX2(i,offset+n,out->numDim)]=in->Coordinates[INDEX2(i,n,in->numDim)];
53 }
54 }
55 }
56 /*
57 * $Log$
58 * Revision 1.2 2005/09/15 03:44:23 jgs
59 * Merge of development branch dev-02 back to main trunk on 2005-09-15
60 *
61 * Revision 1.1.1.1.6.1 2005/09/07 06:26:20 gross
62 * the solver from finley are put into the standalone package paso now
63 *
64 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
65 * initial import of project esys2
66 *
67 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
68 * Initial version of eys using boost-python.
69 *
70 *
71 */

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26