-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnpsat.cc
103 lines (95 loc) · 4.13 KB
/
npsat.cc
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//#include <deal.II/base/logstream.h>
//#include <deal.II/base/mpi.h>
#include <deal.II/base/conditional_ostream.h>
#include <iostream>
#include <list>
#include "myheaders/my_macros.h"
#include "myheaders/dsimstructs.h"
#include "myheaders/user_input.h"
//#include "myheaders/cgal_functions.h"
//#include "myheaders/interpinterface.h"
//#include "myheaders/MultiPolyInterp.h"
#include "myheaders/npsat.h"
#include "myheaders/gather_data.h"
using namespace dealii;
/////////////*! \mainpage Home
//////////// *
//////////// * \section intro_sec Introduction
//////////// *
//////////// * The Non Point Source Assessment Toolbox (NPSAT) is a modelling framework
//////////// * that can be used to assess and evaluate the dynamic, spatio‐temporally
//////////// * distributed linkages between nonpoint sources above a groundwater basin
//////////// * and groundwater discharges to wells, streams, or other compliance discharge
//////////// * surfaces (CDSs) within a groundwater basin.
//////////// *
//////////// * The NPSAT framework consist of two phases:
//////////// * - Construction Phase:
//////////// * The construction phase of the NPSAT involves several steps, which are time
//////////// * consuming but need to executed only once
//////////// * -# Simulation of a fully three-dimensional groundwater flow field at a spatial
//////////// * resolution that can properly capture individual sources (e.g., crop fields,
//////////// * lagoons, septic leach fields) and the impact to individual CDSs (wells, streams).
//////////// * -# Streamline-based transport simulation at high-spatial resolution.
//////////// * -# Computation of Unit Response Functions which essentially link a fraction of the
//////////// * source area with a fraction of the CDS
//////////// *
//////////// *
//////////// * \section install_sec Installation
//////////// *
//////////// * \subsection step1 Step 1: Opening the box
//////////// *
//////////// * etc...
//////////// */
////////////
////////////
/////////////*! \page page1 A Tule River example
//////////// \tableofcontents
//////////// Leading text.
//////////// \section sec An example section
//////////// This page contains the subsections \ref subsection1 and \ref subsection2.
//////////// For more info see page \ref page2.
//////////// \subsection subsection1 The first subsection
//////////// Text.
//////////// \subsection subsection2 The second subsection
//////////// More text.
////////////*/
/////////////*! \page page2 Modesto example
//////////// Even more info.
////////////*/
int main (int argc, char **argv){
deallog.depth_console (1);
Utilities::MPI::MPI_InitFinalize mpi_initialization(argc, argv, 1);
CL_arguments<_DIM> CLI;
AquiferProperties<_DIM> AQprop;
//std::cout << "Is here?" << std::endl;
//return 0;
if (CLI.parse_command_line(argc,argv)){
bool read_param = CLI.read_param_file(AQprop);
if (read_param){
if (CLI.do_gather){
if (AQprop.part_param.particle_prefix.empty()){
std::cerr << "You havent specify a particle prefix name to gather data from" << std::endl;
return 0;
}
Gather_Data::gather_particles<_DIM> G;
G.gather_streamlines(AQprop.part_param.particle_prefix, CLI.get_np(), CLI.get_nSc(), CLI.EntityIDs);
G.print_streamlines4URF(AQprop.part_param.particle_prefix, AQprop.part_param);
G.calculate_age(true, 365);
G.simplify_XYZ_streamlines(AQprop.part_param.simplify_thres);
G.print_vtk(AQprop.part_param.particle_prefix, AQprop.part_param);
}
else{
//CLI.Debug_Prop();
NPSAT<_DIM> npsat(AQprop);
if (AQprop.solver_param.load_solution <=0)
npsat.solve_refine();
if (AQprop.part_param.bDoParticleTracking > 0)
npsat.particle_tracking();
}
}
else
std::cerr << "Error while reading the parameter file" << std::endl;
}
//std::cout << "Just a dummy change" << std::endl;
return 0;
}