-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.cpp
More file actions
37 lines (32 loc) · 806 Bytes
/
main.cpp
File metadata and controls
37 lines (32 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright (c) 2015 Government of Canada */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>
#include "utility.h"
#include "phaseFieldAirBinaryModule.h"
#include <mpi.h>
#include "mesh.h"
int num_procs = 1;
int myid = 0;
int main(int argc, char **argv)
{
int err;
err = MPI_Init(&argc, &argv);
MPI_Comm_rank(MPI_COMM_WORLD, &myid);
MPI_Comm_size(MPI_COMM_WORLD, &num_procs);
phaseFieldAirBinaryModule *module;
module = new phaseFieldAirBinaryModule(myid, num_procs);
MESH_PARAMS.num_procs = num_procs;
module->Create_Initialization();
// module->Load_Restart(1000);
fflush(stdout);
module->Time_Loop(0);
MPI_Barrier(MPI_COMM_WORLD);
printf("Finished run\n");
fflush(stdout);
fflush(stdout);
err = MPI_Finalize();
return 0;
}