Chi-Tech
constrdestr.cc
Go to the documentation of this file.
1#include "diffusion_solver.h"
2
3#include "chi_log.h"
4
5/**\defgroup LuaDiffusionBasicOptions Basic Options
6 * \ingroup LuaDiffusion
7 *
8Option name | Type | Default Value | Description
9----------------------|------- |---------------|------------
10"discretization_method" | string | "None" | Spatial discretization method. "PWLC", "PWLD_MIP".
11"max_iters" | int | 500 | Maximum iterations for solver convergence.
12"residual_tolerance" | float | 1.0e-8 | Residual convergence tolerance.
13"property_map_D" | int | 0 | Material property index to use for diffusion coefficient
14"property_map_q" | int | 1 | Material property index to use for source.
15"property_map_sigma" | int | 2 | Material property index to use for interaction coefficient.
16 *
17 * To set these options use the command chiSolverSetBasicOption() with
18 * an option-name and value in the table above.
19 *
20 * ## Example
21 * Example usage
22 * \code
23 * chiSolverSetBasicOption(phys1, "discretization_method", "PWLC")
24 * \endcode*/
25
26chi_diffusion::Solver::Solver(const std::string& in_solver_name):
27 chi_physics::Solver(in_solver_name, {{"discretization_method", std::string("None")},
28 {"max_iters", int64_t(500)},
29 {"residual_tolerance", 1.0e-8},
30 {"property_map_D",int64_t(0)},
31 {"property_map_q",int64_t(1)},
32 {"property_map_sigma",int64_t(2)}})
33{}
34
36{
37 VecDestroy(&x_);
38 VecDestroy(&b_);
39 MatDestroy(&A_);
40 KSPDestroy(&ksp_);
41}
Solver(const Solver &)=delete