Added Doxygen comments in tutorials.

This commit is contained in:
Xavier Raynaud 2012-04-16 17:54:42 +02:00
parent d2fcdeec2f
commit c43954548b
2 changed files with 40 additions and 38 deletions

View File

@ -26,17 +26,13 @@
#include "config.h"
#endif // HAVE_CONFIG_H
/// \page tutorial1 A simple carthesian grid
/// This tutorial explains how to construct a simple carthesian grid.\n\n
/// We construct a 2x2 two dimensional carthesian grid with 4 blocks of equal size.
/// \page tutorial1 A simple cartesian grid
/// This tutorial explains how to construct a simple cartesian grid.
#include <opm/core/grid.h>
#include <opm/core/GridManager.hpp>
#include <opm/core/utility/writeVtkData.hpp>
#include <cassert>
#include <cstddef>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
@ -48,13 +44,14 @@ int main()
{
/// \endcode
/// \page tutorial1
/// By setting <code>nz = 1</code>, we make the grid two dimensional
/// We set the number of blocks in each direction.
/// \code
int nx = 3;
int ny = 3;
int nz = 1;
int nz = 2;
/// \endcode
/// The size of each block is 1x1x1. We use standard units (SI)
/// The size of each block is 1x1x1. The default units are allways the
/// standard units (SI). But other units can easily be dealt with, see Opm::unit.
/// \code
double dx = 1.0;
double dy = 1.0;
@ -62,7 +59,7 @@ int main()
/// \endcode
/// \page tutorial1
/// One of the constructors of the class Opm::GridManager takes <code>nx,ny,nz,dx,dy,dz</code>
/// and construct the corresponding carthesian grid.
/// and construct the corresponding cartesian grid.
/// \code
Opm::GridManager grid(nx, ny, nz, dx, dy, dz);
/// \endcode

View File

@ -24,7 +24,7 @@
/// \f$u\f$ denotes the velocity and \f$p\f$ the pressure. The permeability tensor is
/// given by \f$K\f$ and \f$\mu\f$ denotes the viscosity.
///
/// We solve the flow equations for a carthesian grid and we set the source term
/// We solve the flow equations for a cartesian grid and we set the source term
/// \f$q\f$ be zero except at the left-lower and right-upper corner, where it is equal
/// with opposite sign (inflow equal to outflow).
@ -36,16 +36,14 @@
#include <opm/core/grid.h>
#include <opm/core/GridManager.hpp>
#include <opm/core/utility/writeVtkData.hpp>
#include <cassert>
#include <cstddef>
#include <iostream>
#include <iomanip>
#include <fstream>
#include <vector>
#include <opm/core/linalg/LinearSolverUmfpack.hpp>
#include <opm/core/pressure/IncompTpfa.hpp>
#include <opm/core/pressure/FlowBCManager.hpp>
#include <opm/core/utility/miscUtilities.hpp>
#include <opm/core/utility/Units.hpp>
/// \page tutorial2
/// \section commentedcode Commented code:
@ -54,7 +52,7 @@ int main()
{
/// \endcode
/// \page tutorial2
/// We construct a carthesian grid
/// We construct a cartesian grid
/// \code
int dim = 3;
int nx = 40;
@ -71,19 +69,25 @@ int main()
int num_faces = grid.c_grid()->number_of_faces;
/// \endcode
/// \page tutorial2
/// We define the viscosity (unit: cP).
/// \details
/// We define a fluid viscosity equal to \f$1\,cP\f$. We use
/// the namespaces Opm::unit
/// and Opm::prefix to deal with the units.
/// \code
double mu = 1.0;
using namespace Opm::unit;
using namespace Opm::prefix;
double mu = 1.0*centi*Poise;
/// \endcode
/// \page tutorial2
/// We define the permeability (unit: mD).
/// \details
/// We define a permeability equal to \f$100\,mD\f$.
/// \code
double k = 100.0;
double k = 100.0*milli*darcy;
/// \endcode
/// \page tutorial2
/// \details
/// We set up the permeability tensor and compute the mobility for each cell.
/// The permeability tensor is flattened in a vector.
/// The resulting permeability matrix is flattened in a vector.
/// \code
std::vector<double> permeability(num_cells*dim*dim, 0.);
std::vector<double> mob(num_cells);
@ -96,7 +100,8 @@ int main()
/// \endcode
/// \page tutorial2
/// We choose the UMFPACK linear solver for the pressure solver.
/// \details
/// We take UMFPACK as the linear solver for the pressure solver (This library has therefore to be installed.)
/// \code
Opm::LinearSolverUmfpack linsolver;
/// \endcode
@ -170,7 +175,7 @@ int main()
}
/// \endcode
/// \page tutorial2
/// We read the the vtu output file in \a Paraview and obtain the following pressure
/// We read the vtu output file in \a Paraview and obtain the following pressure
/// distribution. \image html tutorial2.png