3 #include <deal.II/lac/precondition.h>
4 #include <deal.II/lac/solver_gmres.h>
7 : m_grid(nrows, ncols, nhalo),
9 m_eddy(m_grid,
"eddy"),
11 m_advection(m_grid, m_psi),
12 m_diffusion(m_grid, m_eddy),
13 m_pattern(m_grid.rank(), m_grid.rank(), 9),
17 m_buffer(m_grid.pattern()) {
36 for (
int i = 0; i <
m_grid.rows(); i++)
40 if (i >
m_grid.rows() / 4. && i < 3. *
m_grid.rows() / 4. &&
45 for (
int i = 0; i <
m_grid.rank(); i++)
67 std::cout <<
"== begin ==" << std::endl;
68 std::cout <<
m_psi << std::endl;
69 std::cout <<
m_eddy << std::endl;
70 std::cout <<
m_q << std::endl;
71 std::cout <<
"== source ==" << std::endl;
72 std::cout <<
m_src << std::endl;
83 std::cout <<
"== end ==" << std::endl;
87 dealii::SolverControl control(1000, 1
e-12);
88 dealii::SolverGMRES<> solver(control);
90 for (
int t = 0; t < nt; t++) {
96 std::cout <<
m_src << std::endl;
dealii::SparsityPattern m_pattern
dealii::Vector< Scalar > m_src
dealii::SparseMatrix< Scalar > m_force
Variable< Scalar, 2 > m_eddy
Diffusion< Scalar, 2, 4 > m_diffusion
void assemble(double, double)
dealii::Vector< Scalar > m_rhs
dealii::SparseMatrix< Scalar > m_mass
dealii::Vector< Scalar > m_bnd
Variable< Scalar, 2 > m_psi
Kinetics(int, int, int=1)
Variable< Scalar, 2 > m_q
dealii::SparseMatrix< Scalar > m_buffer
Advection< Scalar, 2, 4 > m_advection
RectGrid< Scalar, Dimension > m_grid
dealii::SparseMatrix< Scalar > m_adj