~meshing/meshing/urop

« back to all changes in this revision

Viewing changes to shape/produceGeo.c

  • Committer: Adam Candy
  • Date: 2013-07-23 18:17:18 UTC
  • Revision ID: adam.candy@imperial.ac.uk-20130723181718-vi35hxtsvopa74z4
Final fix (hopefully).
Licensing formally implemented.  Please update your branches and any derivative works.
Additional tidying and restructure.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
//  
22
22
//////////////////////////////////////////////////////////////////////////
23
23
 
24
 
//this file is for testing of the extraction of the points from
25
 
//GSSHS shape file
26
 
 
27
 
#include <stdlib.h>
28
 
#include <stdio.h>
29
 
 
30
 
int main(void) {
31
 
        /*
32
 
        assert(argc==4 && "Incorrect number of arguments passed" );
33
 
        char read[] = argv[1];
34
 
        char bound[] = argv[2];
35
 
        char write[] = argv[3];
36
 
 
37
 
        char *command1 = malloc(COMMAND_SIZE);
38
 
        if (command1==NULL) {
39
 
                printf("MALLOC FAILURE");
40
 
                exit(SYSTEM_FAILURE);
41
 
                return(EXIT_FAILURE);
42
 
        }
43
 
        */
44
 
        char command1[] = "python makeShapefile.py; rm test.* ; rm m.txt ; python extractPoints.py GSHHS_c_L1.shp polygon.shp test 5 > m.txt ; cat m.txt";
45
 
        char command2[] = "rm shpTest.geo; python makeGeoFile.py test.shp shpTest";
46
 
        char command3[] = "gmsh -2 shpTest.geo>t.txt ; rm t.txt";
47
 
        char command4[] = "gmsh shpTest.msh";
48
 
        system(command1);
49
 
        system(command2);
50
 
        printf("Meshing...\n");
51
 
        system(command3);
52
 
        printf("done...\n");
53
 
        system(command4);
54
 
        return 1;
55
 
}
 
24
//////////////////////////////////////////////////////////////////////////
 
25
//  
 
26
//  Generation of boundary representation from arbitrary geophysical
 
27
//  fields and initialisation for anisotropic, unstructured meshing.
 
28
//  
 
29
//  Copyright (C) 2011-2013 Dr Adam S. Candy, adam.candy@imperial.ac.uk
 
30
//  
 
31
//  This program is free software: you can redistribute it and/or modify
 
32
//  it under the terms of the GNU General Public License as published by
 
33
//  the Free Software Foundation, either version 3 of the License, or
 
34
//  (at your option) any later version.
 
35
//  
 
36
//  This program is distributed in the hope that it will be useful,
 
37
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
38
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
39
//  GNU General Public License for more details.
 
40
//  
 
41
//  You should have received a copy of the GNU General Public License
 
42
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
43
//  
 
44
//////////////////////////////////////////////////////////////////////////
 
45