FCT_Solver.h
Go to the documentation of this file.
/*****************************************************************************
*
* Copyright (c) 2003-2017 by The University of Queensland
* http://www.uq.edu.au
*
* Primary Business: Queensland, Australia
* Licensed under the Apache License, version 2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Development until 2012 by Earth Systems Science Computational Center (ESSCC)
* Development 2012-2013 by School of Earth Sciences
* Development from 2014 by Centre for Geoscience Computing (GeoComp)
*
*****************************************************************************/
#ifndef __PASO_FCTSOLVER_H__
#define __PASO_FCTSOLVER_H__
#include "Transport.h"
#include "FluxLimiter.h"
#include "Solver.h"
namespace paso {
PASO_DLL_API
struct FCT_Solver
{
FCT_Solver(const_TransportProblem_ptr tp, Options* options);
~FCT_Solver();
SolverResult update(double* u, double* u_old, Options* options, Performance* pp);
SolverResult updateNL(double* u, double* u_old, Options* options, Performance* pp);
SolverResult updateLCN(double* u, double* u_old, Options* options, Performance* pp);
void initialize(double dt, Options* options, Performance* pp);
static double getSafeTimeStepSize(const_TransportProblem_ptr tp);
static void setLowOrderOperator(TransportProblem_ptr tp);
void setAntiDiffusionFlux_linearCN(SystemMatrix_ptr flux_matrix);
void setAntiDiffusionFlux_BE(SystemMatrix_ptr flux_matrix);
void setAntiDiffusionFlux_CN(SystemMatrix_ptr flux_matrix);
void setMuPaLu(double* out, const_Coupler_ptr<real_t> coupler, double a);
inline double getTheta()
{
return method == PASO_BACKWARD_EULER ? 1. : 0.5;
}
const_TransportProblem_ptr transportproblem;
escript::JMPI mpi_info;
FCT_FluxLimiter* flux_limiter;
index_t method;
double omega;
double dt;
double* b;
double* z;
double* du;
Coupler_ptr<real_t> u_coupler;
Coupler_ptr<real_t> u_old_coupler; /* last time step */
};
} // namespace paso
#endif // __PASO_FCTSOLVER_H__
paso::FCT_Solver::setMuPaLu
void setMuPaLu(double *out, const_Coupler_ptr< real_t > coupler, double a)
Definition: FCT_Solver.cpp:666
paso::TransportProblem_ptr
boost::shared_ptr< TransportProblem > TransportProblem_ptr
Definition: Transport.h:31
paso::FCT_Solver::update
SolverResult update(double *u, double *u_old, Options *options, Performance *pp)
Definition: FCT_Solver.cpp:125
FluxLimiter.h
PASO_DLL_API
#define PASO_DLL_API
Definition: Paso.h:59
paso::FCT_FluxLimiter
Definition: FluxLimiter.h:26
paso::Options
Definition: Options.h:89
paso::FCT_Solver::updateNL
SolverResult updateNL(double *u, double *u_old, Options *options, Performance *pp)
Definition: FCT_Solver.cpp:211
paso::FCT_Solver::setAntiDiffusionFlux_BE
void setAntiDiffusionFlux_BE(SystemMatrix_ptr flux_matrix)
Definition: FCT_Solver.cpp:436
paso::FCT_Solver::updateLCN
SolverResult updateLCN(double *u, double *u_old, Options *options, Performance *pp)
linear crank-nicolson update
Definition: FCT_Solver.cpp:143
escript::JMPI
boost::shared_ptr< JMPI_ > JMPI
Definition: EsysMPI.h:71
paso::FCT_Solver::~FCT_Solver
~FCT_Solver()
Definition: FCT_Solver.cpp:74
paso::FCT_Solver::du
double * du
Definition: FCT_Solver.h:66
paso::FCT_Solver::u_coupler
Coupler_ptr< real_t > u_coupler
Definition: FCT_Solver.h:67
paso::FCT_Solver::b
double * b
Definition: FCT_Solver.h:64
paso::FCT_Solver::flux_limiter
FCT_FluxLimiter * flux_limiter
Definition: FCT_Solver.h:60
paso::FCT_Solver::transportproblem
const_TransportProblem_ptr transportproblem
Definition: FCT_Solver.h:58
paso::FCT_Solver::setAntiDiffusionFlux_linearCN
void setAntiDiffusionFlux_linearCN(SystemMatrix_ptr flux_matrix)
Definition: FCT_Solver.cpp:492
Transport.h
paso::FCT_Solver::u_old_coupler
Coupler_ptr< real_t > u_old_coupler
Definition: FCT_Solver.h:68
paso::Performance
Definition: performance.h:54
paso::SystemMatrix_ptr
boost::shared_ptr< SystemMatrix > SystemMatrix_ptr
Definition: SystemMatrix.h:40
paso::FCT_Solver::z
double * z
Definition: FCT_Solver.h:65
paso
Definition: AMG.cpp:45
paso::FCT_Solver::setAntiDiffusionFlux_CN
void setAntiDiffusionFlux_CN(SystemMatrix_ptr flux_matrix)
Definition: FCT_Solver.cpp:385
paso::FCT_Solver::dt
double dt
Definition: FCT_Solver.h:63
escript::DataTypes::index_t
int index_t
type for array/matrix indices used both globally and on each rank
Definition: DataTypes.h:59
paso::FCT_Solver::setLowOrderOperator
static void setLowOrderOperator(TransportProblem_ptr tp)
Definition: FCT_Solver.cpp:597
paso::FCT_Solver::FCT_Solver
FCT_Solver(const_TransportProblem_ptr tp, Options *options)
Definition: FCT_Solver.cpp:45
paso::const_TransportProblem_ptr
boost::shared_ptr< const TransportProblem > const_TransportProblem_ptr
Definition: Transport.h:33
Solver.h
paso::const_Coupler_ptr
boost::shared_ptr< const Coupler< T > > const_Coupler_ptr
Definition: Coupler.h:43
paso::FCT_Solver::initialize
void initialize(double dt, Options *options, Performance *pp)
Definition: FCT_Solver.cpp:83
paso::FCT_Solver::mpi_info
escript::JMPI mpi_info
Definition: FCT_Solver.h:59
paso::FCT_Solver::getTheta
double getTheta()
Definition: FCT_Solver.h:53
paso::FCT_Solver::omega
double omega
Definition: FCT_Solver.h:62
paso::Coupler_ptr
boost::shared_ptr< Coupler< T > > Coupler_ptr
Definition: Coupler.h:42
paso::FCT_Solver::getSafeTimeStepSize
static double getSafeTimeStepSize(const_TransportProblem_ptr tp)
Definition: FCT_Solver.cpp:545
paso::SolverResult
SolverResult
Definition: Paso.h:42
paso::FCT_Solver::method
index_t method
Definition: FCT_Solver.h:61
PASO_BACKWARD_EULER
#define PASO_BACKWARD_EULER
Definition: Options.h:83
paso::FCT_Solver
Definition: FCT_Solver.h:27