22
22
//////////////////////////////////////////////////////////////////////////
30
#define MATH_EVAL_LINE 38
31
#define BUFFER_SIZE 300
34
int i = system("gmsh -2 box.geo");
37
system("gmsh box.msh");
41
void changeMathEval(int new) {
43
read = fopen("box.geo","r");
45
write = fopen("temp.geo","w");
47
perror("ERROR in opening file to write\n");
50
char *buffer = (char *) malloc(BUFFER_SIZE * sizeof(char));
52
perror("ERROR in opening file\n");
57
memset(buffer, 0, ((sizeof(char))*BUFFER_SIZE));
58
fgets (buffer, BUFFER_SIZE, read);
59
if (i==MATH_EVAL_LINE) {
60
char *temp = calloc(BUFFER_SIZE);
61
temp = strncpy(temp,buffer,strlen(buffer)-5);
62
char *num = calloc((new/10) + 2);
63
temp = strcpy(temp,itoa(new,num,10));
80
for ( int i = 0; i< ; i+=15) {
24
//////////////////////////////////////////////////////////////////////////
26
// Generation of boundary representation from arbitrary geophysical
27
// fields and initialisation for anisotropic, unstructured meshing.
29
// Copyright (C) 2011-2013 Dr Adam S. Candy, adam.candy@imperial.ac.uk
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.
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.
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/>.
44
//////////////////////////////////////////////////////////////////////////