Trilinos based (stochastic) FEM solvers
main.cpp
Go to the documentation of this file.
1
#include "Epetra_ConfigDefs.h"
2
#ifdef HAVE_MPI
3
#include "mpi.h"
4
#include "Epetra_MpiComm.h"
5
#else
6
#include "Epetra_SerialComm.h"
7
#endif
8
9
#include "
meshpp.hpp
"
10
11
int
main
(
int
argc,
char
*argv[]){
12
13
#ifdef HAVE_MPI
14
MPI_Init(&argc, &argv);
15
Epetra_MpiComm Comm(MPI_COMM_WORLD);
16
#else
17
Epetra_SerialComm Comm;
18
#endif
19
20
//std::string mesh_file = "/Users/brian/Documents/GitHub/Trilinos/cee530/mesh/manufactured1.msh";
21
std::string mesh_file =
"/home/s/staber/Trilinos/arteries/mesh/media_flatboundaries.msh"
;
22
//std::string mesh_file = "/Users/brian/Documents/GitHub/Trilinos/nrl/mesh/composite_hexa_32.msh";
23
mesh
Mesh(Comm, mesh_file, 1.0);
24
25
Comm.Barrier();
26
if
(Comm.MyPID()==0){
27
std::cout <<
"EPART:\n"
;
28
for
(
unsigned
int
i
=0;
i
<Mesh.
n_cells
; ++
i
){
29
std::cout << Mesh.
epart
[
i
] <<
"\n"
;
30
}
31
std::cout <<
"FACES:\n"
;
32
for
(
unsigned
int
i
=0;
i
<Mesh.
n_local_faces
; ++
i
){
33
std::cout << Mesh.
local_faces
[
i
] <<
"\n"
;
34
}
35
}
36
37
/*std::vector<int> phase;
38
for (unsigned int e=0; e<Mesh.n_cells/32; ++e){
39
for (unsigned int j=0; j<32; ++j){
40
phase.push_back(j);
41
}
42
}
43
44
for (unsigned int e_gid=0; e_gid<32; ++e_gid){
45
if (phase[e_gid] % 2){
46
std::cout << e_gid << std::setw(15) << phase[e_gid] << std::setw(15) << "true\n";
47
}
48
else{
49
std::cout << e_gid << std::setw(15) << phase[e_gid] << std::setw(15) << "false\n";
50
}
51
}*/
52
53
#ifdef HAVE_MPI
54
MPI_Finalize();
55
#endif
56
return
0;
57
58
}
meshpp.hpp
mesh::epart
idx_t * epart
Definition:
meshpp.hpp:83
mesh::local_faces
std::vector< int > local_faces
Definition:
meshpp.hpp:81
mesh::n_local_faces
int n_local_faces
Definition:
meshpp.hpp:95
mesh
Definition:
meshpp.hpp:49
mesh::n_cells
int n_cells
Definition:
meshpp.hpp:88
main
int main(int argc, char *argv[])
Definition:
main.cpp:23
i
for i
Definition:
costFunction.m:38
examples
mesh
main.cpp
Generated by
1.8.13