Commit 603daf9d authored by Dominic Kempf's avatar Dominic Kempf

Remove more references to SGrid from the grid Howto

parent ffd5c2ed
......@@ -338,12 +338,11 @@ functions which print useful information about a grid.
Since the dimension will be used as a template parameter in many
places below we define it as a constant in line number \ref{gs:dim}.
The \lstinline!YaspGrid! class template takes two template parameters
which are the dimension of the grid and the
dimension of the space where the grid is embedded in (its world
dimension). If the world dimension is strictly greater than the
grid dimension the surplus coordinates of each grid vertex
are set to zero. For ease of writing we
The \lstinline!YaspGrid! class template takes its dimension as a
template parameter. Technically, \lstinline!YaspGrid! has a second template
parameter, that defines how it stores coordinates. In this example, we
use an equidistant grid, which allows us to stay with the default value
\lstinline!EquidistantCoordinates!. For ease of writing we
define in line \ref{gs:gridtype} the type \lstinline!GridType! using
the selected value for the dimension. All identifiers of the \Dune{}
framework are within the \lstinline!Dune! namespace.
......@@ -7,7 +7,7 @@
// Dune includes
#include "config.h" // file constructed by ./configure script
#include <dune/grid/sgrid.hh> // load sgrid definition
#include <dune/grid/yaspgrid.hh> // load yaspgrid definition
#include <dune/common/parallel/mpihelper.hh> // include mpi helper class
......@@ -119,11 +119,11 @@ int main(int argc, char **argv)
try {
// make a grid
const int dim=2;
typedef Dune::SGrid<dim,dim> GridType;
Dune::FieldVector<int,dim> N(1);
Dune::FieldVector<GridType::ctype,dim> L(-1.0);
typedef Dune::YaspGrid<dim> GridType;
Dune::array<int,dim> N;
std::fill(N.begin(), N.end(), 1);
Dune::FieldVector<GridType::ctype,dim> H(1.0);
GridType grid(N,L,H);
GridType grid(H,N);
// refine all elements once using the standard refinement rule
grid.globalRefine(1); /*@\label{tc:refine}@*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment