diff --git a/current/annotated.html b/current/annotated.html new file mode 100644 index 000000000..6d1643fd8 --- /dev/null +++ b/current/annotated.html @@ -0,0 +1,134 @@ + + + +
+ + + + +
+
+
+
+
+ |
+
▼Nasgard | |
Cdiscretization_manager | Wrapper around several aspects of the pde discretization |
Cprog_opts | Reads options from the command line and input files |
Creconstruct_solution | Reconstruct the solution at arbitrary points in the domain from hierarchical data |
+
+
+
+
+ |
+
Main include file for all ASGarD methods and classes. +More...
+#include "asgard_time_advance.hpp"
Go to the source code of this file.
++Functions | |
template<typename precision > | |
void | asgard::simulate_builtin (prog_opts const &options) |
Simulates one of the builtin PDEs. | |
template<typename pde_class > | |
auto | asgard::discretize (prog_opts const &options, verbosity_level verbosity=verbosity_level::quiet) |
Creates a discretization for the given pde and options. | |
template<typename pde_class > | |
void | asgard::simulate (prog_opts const &options, verbosity_level verbosity=verbosity_level::quiet) |
One shot method, simulate the pde with the given options. | |
+void | asgard::print_info (std::ostream &os=std::cout) |
Print core library information, e.g., build options and such. | |
Main include file for all ASGarD methods and classes.
+ +
+
+
+
+
+ |
+
+
+
+
+
+ |
+
Defines the container class discretization_manager. +More...
+#include "asgard_reconstruct.hpp"
#include "asgard_boundary_conditions.hpp"
#include "asgard_coefficients.hpp"
#include "asgard_moment.hpp"
#include "asgard_solver.hpp"
Go to the source code of this file.
++Classes | |
class | asgard::discretization_manager< precision > |
Wrapper around several aspects of the pde discretization. More... | |
+Functions | |
template<typename P > | |
void | asgard::advance_time (discretization_manager< P > &manager, int64_t num_steps=-1) |
Integrates in time until the final time or number of steps. | |
Defines the container class discretization_manager.
+ +
+
+
+
+
+ |
+
+
+
+
+
+ |
+
Defines common enums and the options manager class prog_opts. +More...
+#include "asgard_tools.hpp"
Go to the source code of this file.
++Classes | |
struct | asgard::prog_opts |
Reads options from the command line and input files. More... | |
+Enumerations | |
enum class | asgard::verbosity_level { verbosity_level::quiet +, verbosity_level::high + } |
Allows reducing the amount of cout-noise. More... | |
enum class | asgard::solve_opts { solve_opts::direct +, solve_opts::gmres +, solve_opts::bicgstab +, solve_opts::scalapack + } |
the available solvers for implicit time stepping More... | |
enum class | asgard::PDE_opts { + custom = 0 +, advection_1 +, continuity_1 +, continuity_2 +, + continuity_3 +, continuity_6 +, fokkerplanck_1d_pitch_E_case1 +, fokkerplanck_1d_pitch_E_case2 +, + fokkerplanck_1d_pitch_C +, fokkerplanck_1d_4p3 +, fokkerplanck_1d_4p4 +, fokkerplanck_1d_4p5 +, + fokkerplanck_2d_complete_case1 +, fokkerplanck_2d_complete_case2 +, fokkerplanck_2d_complete_case3 +, fokkerplanck_2d_complete_case4 +, + diffusion_1 +, diffusion_2 +, vlasov_lb_full_f +, vlasov_two_stream +, + relaxation_1x1v +, relaxation_1x2v +, relaxation_1x3v +, riemann_1x2v +, + riemann_1x3v +, collisional_landau +, collisional_landau_1x2v +, collisional_landau_1x3v + + } |
list of builtin PDE specifications, refer to the specs in the src/pde folder | |
enum class | PDE_case_opts { + case0 +, case1 +, case2 +, case3 +, + case4 +, case_count + + } |
enum class | asgard::kronmult_mode { kronmult_mode::dense +, kronmult_mode::sparse + } |
Indicates whether we should be using sparse or dense kronmult. More... | |
enum class | asgard::grid_type { grid_type::sparse +, grid_type::dense +, grid_type::mixed + } |
Type of discretization grid. More... | |
enum class | asgard::time_advance::method { method::imp +, method::exp +, method::imex + } |
enum | asgard::adapt_norm { asgard::l2 +, asgard::linf + } |
+Functions | |
+split_views | asgard::split_argv (std::string_view const &opts) |
+prog_opts | asgard::make_opts (std::string const &cli) |
+std::ostream & | asgard::operator<< (std::ostream &os, prog_opts const &options) |
overload for writing options to a stream | |
+Variables | |
+int constexpr | asgard::solver::novalue = -1 |
+double constexpr | asgard::solver::notolerance = -1.0 |
Defines common enums and the options manager class prog_opts.
+ +
+
+
+
+
+ |
+
+
+
+
+
+ |
+
Provides the class for reconstructing solution at arbitrary points in the domain. +More...
+#include "asgard_interpolation.hpp"
Go to the source code of this file.
++Classes | |
class | asgard::reconstruct_solution |
Reconstruct the solution at arbitrary points in the domain from hierarchical data. More... | |
Provides the class for reconstructing solution at arbitrary points in the domain.
+ +
+
+
+
+
+ |
+
+
+
+
+
+ |
+
This is the complete list of members for asgard::discretization_manager< precision >, including all inherited members.
+
+
+
+
+
+ |
+
Wrapper around several aspects of the pde discretization. + More...
+ +#include <asgard_discretization.hpp>
+Public Member Functions | |
+ | discretization_manager (std::unique_ptr< PDE< precision > > &&pde_in, verbosity_level vebosity=verbosity_level::quiet) |
take ownership of the pde object and discretize the pde | |
+int64_t | degrees_of_freedom () const |
total degrees of freedom for the problem | |
+int | degree () const |
returns the degree of the discretization | |
+int64_t | time_step () const |
get the current time-step number | |
+precision | dt () const |
get the current time-step size | |
+precision | time () const |
get the current integration time | |
+int64_t | final_time_step () const |
get the currently set final time step | |
+void | set_final_time_step (int64_t new_final_time_step) |
set new final time step, must be no less than the current time_step() | |
void | add_time_steps (int64_t additional_time_steps) |
add new time steps for simulation | |
+std::vector< precision > const & | current_state () const |
return the current state, in wavelet format, local to this mpi rank | |
+void | set_next_step (fk::vector< precision > const &next, std::optional< precision > new_dt={}) |
register the next time step and checkpoint | |
+void | checkpoint () const |
write out checkpoint/restart data and data for plotting | |
+void | save_snapshot (std::filesystem::path const &filename) const |
write out snapshot data, same as checkpoint but can be invoked manually | |
+void | save_final_snapshot () const |
calls save-snapshot for the final step, if requested with -outfile | |
std::optional< std::array< std::vector< precision >, 2 > > | rmse_exact_sol () const |
if analytic solution exists, return the rmse error | |
+fk::vector< precision > | current_mpistate () const |
collect the current state from across all mpi ranks | |
+PDE< precision > const & | get_pde () const |
returns a ref to the original pde | |
+adapt::distributed_grid< precision > const & | get_grid () const |
returns a ref to the sparse grid | |
Wrapper around several aspects of the pde discretization.
+Assumes ownership of the loaded PDE and builds the sparse grid and operators. The current state is set to the initial conditions and time is set to 0 (if a restart file is provided the state and time are loaded form the file).
+Time integration can be performed with the advance_time() function.
+
+
|
+ +inline | +
add new time steps for simulation
+could add negative number (i.e., subtract time steps) but cannot move the time before the current time_step()
+ +std::optional< std::array< std::vector< precision >, 2 > > asgard::discretization_manager< precision >::rmse_exact_sol | +( | +) | +const | +
if analytic solution exists, return the rmse error
+If no analytic solution has been specified, the optional will be empty. If an analytic solution exists, this will return both the absolute and relative rmse (normalized by the max entry of the exact solution). The vector contains an entry for each mpi rank.
+(note: we are working on computing the rmse for all mpi ranks instead of per rank)
+ +
+
+
+
+
+ |
+
This is the complete list of members for asgard::reconstruct_solution, including all inherited members.
+cell_centers(double x[]) const | asgard::reconstruct_solution | |
num_cells() const | asgard::reconstruct_solution | inline |
num_dimensions() const | asgard::reconstruct_solution | inline |
reconstruct(double const x[], int num_x, double y[]) const | asgard::reconstruct_solution | |
reconstruct_solution(int dims, int64_t num_cells, int const asg_cells[], int degree, precision const solution[]) | asgard::reconstruct_solution | |
set_domain_bounds(double const amin[], double const amax[]) | asgard::reconstruct_solution |
+
+
+
+
+ |
+
Reconstruct the solution at arbitrary points in the domain from hierarchical data. + More...
+ +#include <asgard_reconstruct.hpp>
+Public Member Functions | |
template<typename precision > | |
reconstruct_solution (int dims, int64_t num_cells, int const asg_cells[], int degree, precision const solution[]) | |
Constructor, prepares the data-structures for reconstruction. | |
void | set_domain_bounds (double const amin[], double const amax[]) |
Sets the min/max bound of the domain. | |
void | reconstruct (double const x[], int num_x, double y[]) const |
Reconstruct the values of the solution at the given points. | |
+int | num_dimensions () const |
Returns the number of dimensions. | |
+int64_t | num_cells () const |
Returns the number of SG cells. | |
+void | cell_centers (double x[]) const |
Returns the centers of the sparse grid cells. | |
Reconstruct the solution at arbitrary points in the domain from hierarchical data.
+The class is intended to be used from within Python for plotting and post-processing of the data. The API uses raw-arrays to facilitate interfacing with the Python ctypes module.
+The reconstruction algorithms are taken from Tasmanian.
+asgard::reconstruct_solution::reconstruct_solution | +( | +int | +dims, | +
+ | + | int64_t | +num_cells, | +
+ | + | int const | +asg_cells[], | +
+ | + | int | +degree, | +
+ | + | precision const | +solution[] | +
+ | ) | ++ |
Constructor, prepares the data-structures for reconstruction.
+precision | is auto-directed as float or double, reconstruction uses double precision but the coefficients can be provided in single precision |
dims | is the problem number of dimenisons |
num_cells | is the number of sparse grid cells (multi-indexes) |
asg_cells | is an array of size 2 * dims * num_cells containing the multi-indexes in ASGarD format (level, index) |
degree | is the polynomial order |
solution | is the current set of coefficients representing the PDE solution, size is (degree + 1)^dims * num_cells |
void asgard::reconstruct_solution::set_domain_bounds | +( | +double const | +amin[], | +
+ | + | double const | +amax[] | +
+ | ) | ++ |
Sets the min/max bound of the domain.
+Both arrays should have size equal to the number of dimensions, without this call the domain is set to the canonical (0, 1)
+ +void asgard::reconstruct_solution::reconstruct | +( | +double const | +x[], | +
+ | + | int | +num_x, | +
+ | + | double | +y[] | +
+ | ) | +const | +
Reconstruct the values of the solution at the given points.
+x | has size num_x * number-of-dimensions and each strip of dims entries holds one point in the domain |
num_x | is the number of points for the reconstruction |
y | has size num_x and will hold the values of the solution at the given set of points |
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+Files | |
asgard.hpp | |
Main include file for all ASGarD methods and classes. | |
asgard_discretization.hpp | |
Defines the container class discretization_manager. | |
asgard_program_options.hpp | |
Defines common enums and the options manager class prog_opts. | |
asgard_reconstruct.hpp | |
Provides the class for reconstructing solution at arbitrary points in the domain. | |
+
+
+
+
+ |
+
▼ src | |
asgard.hpp | Main include file for all ASGarD methods and classes |
asgard_discretization.hpp | Defines the container class discretization_manager |
asgard_program_options.hpp | Defines common enums and the options manager class prog_opts |
asgard_reconstruct.hpp | Provides the class for reconstructing solution at arbitrary points in the domain |
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
This page explains how to interpret the graphs that are generated by doxygen.
+Consider the following example:
This will result in the following graph:
+The boxes in the above graph have the following meaning:
+The arrows have the following meaning:
+
+
+
+
+
+ |
+
+Files | |
file | asgard_program_options.hpp |
Defines common enums and the options manager class prog_opts. | |
+Classes | |
struct | asgard::prog_opts |
Reads options from the command line and input files. More... | |
+Enumerations | |
enum class | asgard::verbosity_level { verbosity_level::quiet +, verbosity_level::high + } |
Allows reducing the amount of cout-noise. More... | |
enum class | asgard::solve_opts { solve_opts::direct +, solve_opts::gmres +, solve_opts::bicgstab +, solve_opts::scalapack + } |
the available solvers for implicit time stepping More... | |
enum class | asgard::PDE_opts { + custom = 0 +, advection_1 +, continuity_1 +, continuity_2 +, + continuity_3 +, continuity_6 +, fokkerplanck_1d_pitch_E_case1 +, fokkerplanck_1d_pitch_E_case2 +, + fokkerplanck_1d_pitch_C +, fokkerplanck_1d_4p3 +, fokkerplanck_1d_4p4 +, fokkerplanck_1d_4p5 +, + fokkerplanck_2d_complete_case1 +, fokkerplanck_2d_complete_case2 +, fokkerplanck_2d_complete_case3 +, fokkerplanck_2d_complete_case4 +, + diffusion_1 +, diffusion_2 +, vlasov_lb_full_f +, vlasov_two_stream +, + relaxation_1x1v +, relaxation_1x2v +, relaxation_1x3v +, riemann_1x2v +, + riemann_1x3v +, collisional_landau +, collisional_landau_1x2v +, collisional_landau_1x3v + + } |
list of builtin PDE specifications, refer to the specs in the src/pde folder | |
enum class | asgard::kronmult_mode { kronmult_mode::dense +, kronmult_mode::sparse + } |
Indicates whether we should be using sparse or dense kronmult. More... | |
enum class | asgard::grid_type { grid_type::sparse +, grid_type::dense +, grid_type::mixed + } |
Type of discretization grid. More... | |
enum class | asgard::time_advance::method { method::imp +, method::exp +, method::imex + } |
enum | asgard::adapt_norm { asgard::l2 +, asgard::linf + } |
Common options shared by most or even all PDEs and discretization methods. The tools provided here allow for reading the options from either the command line or an input file and also specify PDE specific options.
+
+
|
+ +strong | +
Allows reducing the amount of cout-noise.
+The high noise is usually desired for large simulations as the cout stream will become a log for the various aspects of the problem. This is very useful for debugging, catching early problems and keeping an eye on a long simulation.
+However, high noise is bad for testing and potentially some large applications, e.g., high verbosity may drown important messages from other sub-systems.
+Enumerator | |
---|---|
quiet | do not generate cout output, except on errors and important warnings + |
high | provide a detailed log of the various aspects of the simulation + |
+
|
+ +strong | +
the available solvers for implicit time stepping
+
+
|
+ +strong | +
Indicates whether we should be using sparse or dense kronmult.
+Used by the local kronmult, global kronmult (block or non-block case) will ignore these options.
+Enumerator | |
---|---|
dense | Using a dense matrix (assumes everything is connected). + |
sparse | Using a sparse matrix (checks for connectivity). + |
+
|
+ +strong | +
+
|
+ +strong | +
enum asgard::adapt_norm | +
+
+
+
+
+ |
+
+Files | |
file | asgard.hpp |
Main include file for all ASGarD methods and classes. | |
file | asgard_discretization.hpp |
Defines the container class discretization_manager. | |
+Classes | |
class | asgard::discretization_manager< precision > |
Wrapper around several aspects of the pde discretization. More... | |
+Functions | |
template<typename precision > | |
void | asgard::simulate_builtin (prog_opts const &options) |
Simulates one of the builtin PDEs. | |
template<typename pde_class > | |
auto | asgard::discretize (prog_opts const &options, verbosity_level verbosity=verbosity_level::quiet) |
Creates a discretization for the given pde and options. | |
template<typename pde_class > | |
void | asgard::simulate (prog_opts const &options, verbosity_level verbosity=verbosity_level::quiet) |
One shot method, simulate the pde with the given options. | |
template<typename P > | |
void | asgard::advance_time (discretization_manager< P > &manager, int64_t num_steps=-1) |
Integrates in time until the final time or number of steps. | |
Given a PDE specification, these tools create a sparse grid discretization of the state, source and operator terms, and performs time-stepping integration in time.
+Simulates one of the builtin PDEs.
+The options.pde_choice must contain a valid PDE_opts that is not PDE_opts::custom. This method is equivalent to calling the asgard executable.
+ +auto asgard::discretize | +( | +prog_opts const & | +options, | +
+ | + | verbosity_level | +verbosity = verbosity_level::quiet |
+
+ | ) | ++ |
Creates a discretization for the given pde and options.
+Creates a new asgard::discretization_manager, unlike the one-shot method asgard::simulate(), the discretization allows for finer control of the time steeping and output frequency.
+pde_class | is a user provided PDE specification that is derived from the base asgard::PDE class |
options | is a set of options, either provided from the command line, a file or manually set by the user |
verbosity | indicates how much output ASGarD should provide, verbosity_level::high is useful for development and debugging while quiet is suitable for long simulations |
Note: options.pde_choice must be either empty (does not contain a value) or set to PDE_opts::custom
+ +void asgard::simulate | +( | +prog_opts const & | +options, | +
+ | + | verbosity_level | +verbosity = verbosity_level::quiet |
+
+ | ) | ++ |
One shot method, simulate the pde with the given options.
+Creates a new PDE, discretizes it and advances in time according to the options specified by the prog_opts instance and the PDE specification.
+pde_class | is a user provided PDE specification that is derived from the base asgard::PDE class |
options | is a set of options, either provided from the command line, a file or manually set by the user |
verbosity | indicates how much output ASGarD should provide, verbosity_level::high is useful for development and debugging while quiet is suitable for long simulations |
Note: options.pde_choice must be either empty (does not contain a value) or set to PDE_opts::custom
+ +void asgard::advance_time | +( | +discretization_manager< P > & | +manager, | +
+ | + | int64_t | +num_steps = -1 |
+
+ | ) | ++ |
Integrates in time until the final time or number of steps.
+This method manipulates the problems internal state, applying adaptivity, checkpointing and other related operations. The method is decalred as a friend to simplify the implementation is external to simplify the discretization_manager class, which will primarily focus on data storage.
+The optional variable num_steps indicates the number of time steps to take:
+
+
+
+
+ |
+
+Files | |
file | asgard_reconstruct.hpp |
Provides the class for reconstructing solution at arbitrary points in the domain. | |
+Classes | |
class | asgard::reconstruct_solution |
Reconstruct the solution at arbitrary points in the domain from hierarchical data. More... | |
The internal data-structures of ASGarD store the solution state in hierarchical format, i.e., vector of coefficients associated with sparse grid points. Interpretation of the data in raw format is challenging at best but converting the data into a more standard dense-grid format is also not feasible in high dimensions.
+The asgard::reconstruct_solution can find the value of the solution at arbitrary points of the domain but computing the sum of coefficients times the values of the basis functions. The class also comes with bindings for Python and MATLAB. See the included examples.
+
+
+
+
+
+ |
+
To cite the ASGarD code in your work, please use: doi:10.11578/dc.20201125.5
+Papers using ASGarD:
+The ASGarD project has the goal of building a solver specifically targeting high-dimensional PDEs where the "curse-of-dimensionality" has previously precluded useful continuum / Eularian (grid or mesh based as opposed to Monte-Carlo sampling) simulation. Our approach is based on a Discontinuous-Galerkin finite-element solver build atop an adaptive hierarchical sparse-grid (note this is different from the "combination technique" when applied to sparse-grids).
+Documentation of usage: https://ornl.github.io/project-asgard/asgard
+The developer documentation contains information about how to contribute to the ASGarD project.
+Issues are a great way to discuss all aspects of the ASGarD project, whether it is to ask a general question, request a new feature, or propose a contribution to the code base.
+The ASGarD project was initiated by David Green at Oak Ridge National Laboratory.
+For technical questions, contact Miroslav Stoyanov (stoya.nosp@m.novm.nosp@m.k@orn.nosp@m.l.go.nosp@m.v) at Oak Ridge National Laboratory.
+Test | Status (Develop) |
---|---|
format/clang | |
warnings/clang | |
unit/g++ | |
unit/clang++ | |
unit/g++/mpi | |
unit/g++/cuda | |
unit/g++/io |
See the detailed Installation instructions.
+