escript  Revision_
FCT_Solver.h
Go to the documentation of this file.
1 
2 /*****************************************************************************
3 *
4 * Copyright (c) 2003-2020 by The University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Apache License, version 2.0
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014-2017 by Centre for Geoscience Computing (GeoComp)
14 * Development from 2019 by School of Earth and Environmental Sciences
15 **
16 *****************************************************************************/
17 
18 #ifndef __PASO_FCTSOLVER_H__
19 #define __PASO_FCTSOLVER_H__
20 
21 #include "Transport.h"
22 #include "FluxLimiter.h"
23 #include "Solver.h"
24 
25 namespace paso {
26 
28 {
30 
31  ~FCT_Solver();
32 
33  SolverResult update(double* u, double* u_old, Options* options, Performance* pp);
34 
35  SolverResult updateNL(double* u, double* u_old, Options* options, Performance* pp);
36 
37  SolverResult updateLCN(double* u, double* u_old, Options* options, Performance* pp);
38 
39  void initialize(double dt, Options* options, Performance* pp);
40 
41  static double getSafeTimeStepSize(const_TransportProblem_ptr tp);
42 
43  static void setLowOrderOperator(TransportProblem_ptr tp);
44 
45  void setAntiDiffusionFlux_linearCN(SystemMatrix_ptr<double> flux_matrix);
46 
47  void setAntiDiffusionFlux_BE(SystemMatrix_ptr<double> flux_matrix);
48 
49  void setAntiDiffusionFlux_CN(SystemMatrix_ptr<double> flux_matrix);
50 
51  void setMuPaLu(double* out, const_Coupler_ptr<real_t> coupler, double a);
52 
53  inline double getTheta()
54  {
55  return method == PASO_BACKWARD_EULER ? 1. : 0.5;
56  }
57 
62  double omega;
63  double dt;
64  double* b;
65  double* z;
66  double* du;
68  Coupler_ptr<real_t> u_old_coupler; /* last time step */
69 };
70 
71 
72 } // namespace paso
73 
74 #endif // __PASO_FCTSOLVER_H__
75 
#define PASO_BACKWARD_EULER
Definition: Options.h:73
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:61
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:74
void update(dim_t n, double a, double *x, double b, const double *y)
Definition: PasoUtil.cpp:339
Definition: BiCGStab.cpp:25
boost::shared_ptr< TransportProblem > TransportProblem_ptr
Definition: Transport.h:32
boost::shared_ptr< const Coupler< T > > const_Coupler_ptr
Definition: Coupler.h:44
boost::shared_ptr< SystemMatrix< T > > SystemMatrix_ptr
Definition: SystemMatrix.h:42
boost::shared_ptr< const TransportProblem > const_TransportProblem_ptr
Definition: Transport.h:34
SolverResult
Definition: Paso.h:44
boost::shared_ptr< Coupler< T > > Coupler_ptr
Definition: Coupler.h:43
bool initialize(const std::string &simFile, const std::string &comment)
Definition: VisItControl.cpp:178
#define PASO_DLL_API
Definition: paso/src/system_dep.h:29
Definition: FluxLimiter.h:27
Definition: FCT_Solver.h:28
double omega
Definition: FCT_Solver.h:62
FCT_FluxLimiter * flux_limiter
Definition: FCT_Solver.h:60
double * b
Definition: FCT_Solver.h:64
escript::JMPI mpi_info
Definition: FCT_Solver.h:59
double dt
Definition: FCT_Solver.h:63
const_TransportProblem_ptr transportproblem
Definition: FCT_Solver.h:58
double * z
Definition: FCT_Solver.h:65
Coupler_ptr< real_t > u_coupler
Definition: FCT_Solver.h:67
Coupler_ptr< real_t > u_old_coupler
Definition: FCT_Solver.h:68
double * du
Definition: FCT_Solver.h:66
index_t method
Definition: FCT_Solver.h:61
double getTheta()
Definition: FCT_Solver.h:53
Definition: Options.h:80
Definition: performance.h:56