Advection-Diffusion example. More...
Modules | |
Files | |
Classes | |
class | pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time > |
advection-diffusion sweeper with semi-implicit time-integration. More... | |
struct | pfasst::examples::advection_diffusion::FFT::workspace |
class | pfasst::examples::advection_diffusion::FFT |
FFT helper class. More... | |
class | pfasst::examples::advection_diffusion::SpectralTransfer1D< time > |
Spectral (FFT) transfer routines. More... | |
Functions | |
error_map | pfasst::examples::advection_diffusion::run_mpi_pfasst (const double abs_res_tol, const double rel_res_tol, const size_t niters, const size_t nsteps, const double dt, const size_t ndofs_f, const size_t ndofs_c, const size_t nnodes_f, const size_t nnodes_c) |
Advection/diffusion example using an encapsulated IMEX sweeper. More... | |
tuple< error_map, residual_map > | pfasst::examples::advection_diffusion::run_serial_mlsdc (size_t nlevs, size_t nsteps_in=4, double step_size_in=0.01, size_t num_iter_in=8, size_t nnodes_in=5, size_t ndofs_in=128) |
Advection/diffusion example using an encapsulated IMEX sweeper. More... | |
error_map | pfasst::examples::advection_diffusion::run_vanilla_sdc (double abs_residual_tol, double rel_residual_tol=0.0) |
Advection/diffusion example using an encapsulated IMEX sweeper. More... | |
Advection-Diffusion example.
This directory contains several implementations of an advection/diffusion solver using the PFASST framework.
All of the solvers use the SDC sweeper defined in advection_diffusion_sweeper.hpp
, and the FFT routines in fft.hpp
.
The implementations are, in order of complexity:
vanilla_sdc.cpp
- basic example that uses an encapsulated IMEX sweeper.serial_mlsdc.cpp
- basic multi-level version that uses polynomial interpolation in time and spectral interpolation in space, as defined in specrtal_transfer_1d.hpp
.serial_mlsdc_autobuild.cpp
- same as above, but uses the "auto build" feature to shorten main
. error_map pfasst::examples::advection_diffusion::run_mpi_pfasst | ( | const double | abs_res_tol, |
const double | rel_res_tol, | ||
const size_t | niters, | ||
const size_t | nsteps, | ||
const double | dt, | ||
const size_t | ndofs_f, | ||
const size_t | ndofs_c, | ||
const size_t | nnodes_f, | ||
const size_t | nnodes_c | ||
) |
Advection/diffusion example using an encapsulated IMEX sweeper.
This example uses MPI PFASST.
Definition at line 43 of file mpi_pfasst.cpp.
References pfasst::Controller< time >::add_level(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::get_errors(), pfasst::Controller< time >::get_finest(), ML_CLOG, ML_LOG, pfasst::quadrature::quadrature_factory(), pfasst::PFASST< time >::run(), pfasst::PFASST< time >::set_comm(), pfasst::Controller< time >::set_duration(), pfasst::MLSDC< time >::set_nsweeps(), pfasst::Controller< time >::set_options(), and pfasst::MLSDC< time >::setup().
Referenced by main(), ConvergenceTest::SetUp(), and TEST().
tuple<error_map, residual_map> pfasst::examples::advection_diffusion::run_serial_mlsdc | ( | size_t | nlevs, |
size_t | nsteps_in = 4 , |
||
double | step_size_in = 0.01 , |
||
size_t | num_iter_in = 8 , |
||
size_t | nnodes_in = 5 , |
||
size_t | ndofs_in = 128 |
||
) |
Advection/diffusion example using an encapsulated IMEX sweeper.
This example uses a (serial) multi-level SDC sweeper.
Definition at line 37 of file serial_mlsdc.cpp.
References pfasst::Controller< time >::add_level(), pfasst::Controller< time >::coarsest(), plot::dt, pfasst::Controller< time >::finest(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::get_errors(), pfasst::Controller< time >::get_finest(), pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper< time >::get_residuals(), pfasst::encap::EncapSweeper< time >::get_start_state(), ML_LOG, pfasst::quadrature::quadrature_factory(), pfasst::MLSDC< time >::run(), pfasst::Controller< time >::set_duration(), pfasst::Controller< time >::set_options(), and pfasst::MLSDC< time >::setup().
Referenced by main(), ConvergenceTest::SetUp(), and TEST().
error_map pfasst::examples::advection_diffusion::run_vanilla_sdc | ( | double | abs_residual_tol, |
double | rel_residual_tol = 0.0 |
||
) |
Advection/diffusion example using an encapsulated IMEX sweeper.
This example uses a vanilla SDC sweeper.
Definition at line 34 of file vanilla_sdc.cpp.
References pfasst::Controller< time >::add_level(), pfasst::quadrature::GaussLegendre, pfasst::quadrature::quadrature_factory(), pfasst::SDC< time >::run(), pfasst::Controller< time >::set_duration(), pfasst::Controller< time >::set_options(), and pfasst::Controller< time >::setup().
Referenced by main(), and TEST().