Date: 2021-03-03T22:27:37+00:00

Actual source code: MyTest.H
petsc-3.14.5 2021-03-03
Report Typos and Errors

      1: #ifndef MY_TEST_H_
      2: #define MY_TEST_H_

      4: #include <AMReX_EBFabFactory.H>
      5: #include <AMReX_MLMG.H>
      6: #include <AMReX_Array.H>

      8: class MyTest
      9: {
     10: public:

     12:     MyTest ();

     14:     void solve ();
     15:     void writePlotfile ();
     16:     void initData ();

     18: private:

     20:     void initializeEB ();
     21:     void readParameters ();
     22:     void initGrids ();

     24:     int max_level = 0;
     25:     int ref_ratio = 2;
     26:     int n_cell = 128;
     27:     int max_grid_size = 64;
     28:     int is_periodic = 0;
     29:     int eb_is_dirichlet = 0;
     30:
     31:     std::string plot_file_name{"plot"};

     33:     amrex::Vector<amrex::Real> scalars;

     35:     // For MLMG solver
     36:     int verbose = 2;
     37:     int bottom_verbose = 2;
     38:     int max_iter = 100;
     39:     int max_fmg_iter = 0;
     40:     int max_bottom_iter = 1000;
     41:     amrex::Real reltol        = 1.e-12;
     42:     amrex::Real bottom_reltol = 1.e-4;
     43:     int linop_maxorder = 3;
     44:     int max_coarsening_level = 30;
     45:     bool use_hypre = false;
     46:     bool use_petsc = false;
     47:     amrex::Vector<amrex::Geometry> geom;
     48:     amrex::Vector<amrex::BoxArray> grids;
     49:     amrex::Vector<amrex::DistributionMapping> dmap;
     50:     amrex::Vector<std::unique_ptr<amrex::EBFArrayBoxFactory> > factory;

     52:     amrex::Vector<amrex::MultiFab> phi;
     53:     amrex::Vector<amrex::MultiFab> rhs;
     54:     amrex::Vector<amrex::MultiFab> acoef;
     55:     amrex::Vector<amrex::Array<amrex::MultiFab,AMREX_SPACEDIM> > bcoef;
     56:     amrex::Vector<amrex::MultiFab> bcoef_eb;
     57: };

     59: #endif