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

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

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

revision 1311 by elspeth, Wed Mar 22 02:46:56 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
 /*  
  ************************************************************  
  *          Copyright 2006 by ACcESS MNRF                   *  
  *                                                          *  
  *              http://www.access.edu.au                    *  
  *       Primary Business: Queensland, Australia            *  
  *  Licensed under the Open Software License version 3.0    *  
  *     http://www.opensource.org/licenses/osl-3.0.php       *  
  *                                                          *  
  ************************************************************  
 */  
1    
2  /**************************************************************/  /* $Id$ */
3    
4  /*   Finley: prints Mesh */  /*******************************************************
5     *
6     *           Copyright 2003-2007 by ACceSS MNRF
7     *       Copyright 2007 by University of Queensland
8     *
9     *                http://esscc.uq.edu.au
10     *        Primary Business: Queensland, Australia
11     *  Licensed under the Open Software License version 3.0
12     *     http://www.opensource.org/licenses/osl-3.0.php
13     *
14     *******************************************************/
15    
16  /**************************************************************/  /**************************************************************/
17    
18  /*   Author: gross@access.edu.au */  /*   Finley: prints Mesh */
 /*   Version: $Id$ */  
19    
20  /**************************************************************/  /**************************************************************/
21    
# Line 38  void Finley_Mesh_print(Finley_Mesh *in) Line 36  void Finley_Mesh_print(Finley_Mesh *in)
36        
37    if (in->Nodes!=NULL) {    if (in->Nodes!=NULL) {
38      numDim=in->Nodes->numDim;      numDim=in->Nodes->numDim;
39      printf("=== %1dD-Nodes:\nnumber of nodes=%d\ndegrees of freedom=%d\nreduced degrees of freedom=%d\nreduced number of nodes=%d\n",      printf("=== %1dD-Nodes:\nnumber of nodes=%d\n", numDim,in->Nodes->numNodes);
40          numDim,in->Nodes->numNodes,in->Nodes->numDegreesOfFreedom,in->Nodes->reducedNumDegreesOfFreedom,in->Nodes->reducedNumNodes);      printf("Id,Tag,globalDegreesOfFreedom,degreesOfFreedom,reducedDegreesOfFeedom,node,reducedNode,Coordinates\n");
     printf("Id,Tag,degreeOfFreedom,reducedDegreeOfFreedom,reducedNumNodes,Coordinates\n");  
41      for (i=0;i<in->Nodes->numNodes;i++) {      for (i=0;i<in->Nodes->numNodes;i++) {
42        printf("%d,%d,%d,%d,%d,",        printf("%d,%d,%d,%d,%d,%d,%d ",
43              in->Nodes->Id[i],in->Nodes->Tag[i],in->Nodes->degreeOfFreedom[i],in->Nodes->reducedDegreeOfFreedom[i],in->Nodes->toReduced[i]);              in->Nodes->Id[i],in->Nodes->Tag[i],in->Nodes->globalDegreesOfFreedom[i],
44                in->Nodes->degreesOfFreedomMapping->target[i],
45                in->Nodes->reducedDegreesOfFreedomMapping->target[i],
46                in->Nodes->nodesMapping->target[i],
47                in->Nodes->reducedNodesMapping->target[i]);
48        for (j=0;j<numDim;j++) printf(" %20.15e",in->Nodes->Coordinates[INDEX2(j,i,numDim)]);        for (j=0;j<numDim;j++) printf(" %20.15e",in->Nodes->Coordinates[INDEX2(j,i,numDim)]);
49        printf("\n");        printf("\n");
50      }      }
# Line 56  void Finley_Mesh_print(Finley_Mesh *in) Line 57  void Finley_Mesh_print(Finley_Mesh *in)
57                         in->Elements->ReferenceElement->Type->Name,in->Elements->numElements,in->Elements->minColor,in->Elements->maxColor);                         in->Elements->ReferenceElement->Type->Name,in->Elements->numElements,in->Elements->minColor,in->Elements->maxColor);
58      NN=in->Elements->ReferenceElement->Type->numNodes;      NN=in->Elements->ReferenceElement->Type->numNodes;
59      if (in->Elements->numElements>0) {      if (in->Elements->numElements>0) {
60         printf("Id,Tag,Color,Nodes\n");         printf("Id,Tag,Owner,Color,Nodes\n");
61         for (i=0;i<in->Elements->numElements;i++) {         for (i=0;i<in->Elements->numElements;i++) {
62           printf("%d,%d,%d,",in->Elements->Id[i],in->Elements->Tag[i],in->Elements->Color[i]);           printf("%d,%d,%d,%d,",in->Elements->Id[i],in->Elements->Tag[i],in->Elements->Owner[i], in->Elements->Color[i]);
63           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->Elements->Nodes[INDEX2(j,i,NN)]]);           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->Elements->Nodes[INDEX2(j,i,NN)]]);
64           printf("\n");           printf("\n");
65         }         }
# Line 73  void Finley_Mesh_print(Finley_Mesh *in) Line 74  void Finley_Mesh_print(Finley_Mesh *in)
74                 in->FaceElements->ReferenceElement->Type->Name,in->FaceElements->numElements,in->FaceElements->minColor,in->FaceElements->maxColor);                 in->FaceElements->ReferenceElement->Type->Name,in->FaceElements->numElements,in->FaceElements->minColor,in->FaceElements->maxColor);
75      NN=in->FaceElements->ReferenceElement->Type->numNodes;      NN=in->FaceElements->ReferenceElement->Type->numNodes;
76      if (in->FaceElements->numElements>0) {      if (in->FaceElements->numElements>0) {
77         printf("Id,Tag,Color,Nodes\n");         printf("Id,Tag,Owner,Color,Nodes\n");
78         for (i=0;i<in->FaceElements->numElements;i++) {         for (i=0;i<in->FaceElements->numElements;i++) {
79           printf("%d,%d,%d,",in->FaceElements->Id[i],in->FaceElements->Tag[i],in->FaceElements->Color[i]);           printf("%d,%d,%d,%d,",in->FaceElements->Id[i],in->FaceElements->Tag[i],in->Elements->Owner[i], in->FaceElements->Color[i]);
80           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->FaceElements->Nodes[INDEX2(j,i,NN)]]);           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->FaceElements->Nodes[INDEX2(j,i,NN)]]);
81           printf("\n");           printf("\n");
82         }         }
# Line 88  void Finley_Mesh_print(Finley_Mesh *in) Line 89  void Finley_Mesh_print(Finley_Mesh *in)
89                         in->ContactElements->ReferenceElement->Type->Name,in->ContactElements->numElements,in->ContactElements->minColor,in->ContactElements->maxColor);                         in->ContactElements->ReferenceElement->Type->Name,in->ContactElements->numElements,in->ContactElements->minColor,in->ContactElements->maxColor);
90      NN=in->ContactElements->ReferenceElement->Type->numNodes;      NN=in->ContactElements->ReferenceElement->Type->numNodes;
91      if (in->ContactElements->numElements>0) {      if (in->ContactElements->numElements>0) {
92         printf("Id,Tag,Color,Nodes\n");         printf("Id,Tag,Owner,Color,Nodes\n");
93         for (i=0;i<in->ContactElements->numElements;i++) {         for (i=0;i<in->ContactElements->numElements;i++) {
94           printf("%d,%d,%d,",in->ContactElements->Id[i],in->ContactElements->Tag[i],in->ContactElements->Color[i]);           printf("%d,%d,%d,%d,",in->ContactElements->Id[i],in->ContactElements->Tag[i],in->Elements->Owner[i], in->ContactElements->Color[i]);
95           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->ContactElements->Nodes[INDEX2(j,i,NN)]]);           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->ContactElements->Nodes[INDEX2(j,i,NN)]]);
96           printf("\n");           printf("\n");
97         }         }
# Line 103  void Finley_Mesh_print(Finley_Mesh *in) Line 104  void Finley_Mesh_print(Finley_Mesh *in)
104                         in->Points->ReferenceElement->Type->Name,in->Points->numElements,in->Points->minColor,in->Points->maxColor);                         in->Points->ReferenceElement->Type->Name,in->Points->numElements,in->Points->minColor,in->Points->maxColor);
105      NN=in->Points->ReferenceElement->Type->numNodes;      NN=in->Points->ReferenceElement->Type->numNodes;
106      if (in->Points->numElements>0) {      if (in->Points->numElements>0) {
107         printf("Id,Tag,Color,Nodes\n");         printf("Id,Tag,Owner,Color,Nodes\n");
108         for (i=0;i<in->Points->numElements;i++) {         for (i=0;i<in->Points->numElements;i++) {
109           printf("%d,%d,%d,",in->Points->Id[i],in->Points->Tag[i],in->Points->Color[i]);           printf("%d,%d,%d,%d,",in->Points->Id[i],in->Points->Tag[i],in->Elements->Owner[i], in->Points->Color[i]);
110           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->Points->Nodes[INDEX2(j,i,NN)]]);           for (j=0;j<NN;j++) printf(" %d",in->Nodes->Id[in->Points->Nodes[INDEX2(j,i,NN)]]);
111           printf("\n");           printf("\n");
112         }         }
113      }      }
114    }    }
115  }  }
   
 /*  
 * $Log$  
 * Revision 1.3  2005/09/15 03:44:22  jgs  
 * Merge of development branch dev-02 back to main trunk on 2005-09-15  
 *  
 * Revision 1.2.2.1  2005/09/07 06:26:19  gross  
 * the solver from finley are put into the standalone package paso now  
 *  
 * Revision 1.2  2005/07/08 04:07:54  jgs  
 * Merge of development branch back to main trunk on 2005-07-08  
 *  
 * Revision 1.1.1.1.2.1  2005/06/29 02:34:53  gross  
 * some changes towards 64 integers in finley  
 *  
 * Revision 1.1.1.1  2004/10/26 06:53:57  jgs  
 * initial import of project esys2  
 *  
 * Revision 1.1.1.1  2004/06/24 04:00:40  johng  
 * Initial version of eys using boost-python.  
 *  
 *  
 */  
   

Legend:
Removed from v.1311  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26