/[escript]/trunk/finley/src/Mesh_prepare.cpp
ViewVC logotype

Contents of /trunk/finley/src/Mesh_prepare.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 782 - (show annotations)
Tue Jul 18 00:47:47 2006 UTC (12 years, 11 months ago) by bcumming
Original Path: trunk/finley/src/Mesh_prepare.c
File MIME type: text/plain
File size: 2891 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: prepares the mesh for further calculations */
16
17 /**************************************************************/
18
19 /* Author: gross@access.edu.au */
20 /* Version: $Id$ */
21
22 /**************************************************************/
23
24 #include "Mesh.h"
25
26 /**************************************************************/
27
28 void Finley_Mesh_prepare(Finley_Mesh* in) {
29
30 /* set the labeling vectors in node files: */
31 Finley_Mesh_prepareNodes(in);
32
33 #ifndef PASO_MPI
34 /* rearrange elements: */
35 Finley_Mesh_optimizeElementDistribution(in);
36
37 /* improve coloring */
38 Finley_Mesh_improveColoring(in);
39 #endif
40 }
41 /* */
42 /* tries to reduce the coloring for all element files: */
43 /* */
44 void Finley_Mesh_improveColoring(Finley_Mesh* in) {
45 Finley_ElementFile_improveColoring(in->Elements,in->Nodes->numNodes,in->Nodes->degreeOfFreedom);
46 Finley_ElementFile_improveColoring(in->FaceElements,in->Nodes->numNodes,in->Nodes->degreeOfFreedom);
47 Finley_ElementFile_improveColoring(in->Points,in->Nodes->numNodes,in->Nodes->degreeOfFreedom);
48 Finley_ElementFile_improveColoring(in->ContactElements,in->Nodes->numNodes,in->Nodes->degreeOfFreedom);
49 }
50 /* */
51 /* redistribute elements to minimize communication during assemblage */
52 /* */
53 void Finley_Mesh_optimizeElementDistribution(Finley_Mesh* in) {
54 Finley_ElementFile_optimizeDistribution(&(in->Elements));
55 Finley_ElementFile_optimizeDistribution(&(in->FaceElements));
56 Finley_ElementFile_optimizeDistribution(&(in->Points));
57 Finley_ElementFile_optimizeDistribution(&(in->ContactElements));
58 }
59
60 /*
61 * $Log$
62 * Revision 1.2 2005/09/15 03:44:22 jgs
63 * Merge of development branch dev-02 back to main trunk on 2005-09-15
64 *
65 * Revision 1.1.1.1.6.1 2005/09/07 06:26:19 gross
66 * the solver from finley are put into the standalone package paso now
67 *
68 * Revision 1.1.1.1 2004/10/26 06:53:57 jgs
69 * initial import of project esys2
70 *
71 * Revision 1.1.1.1 2004/06/24 04:00:40 johng
72 * Initial version of eys using boost-python.
73 *
74 *
75 */
76

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26