Commit 2c19ec9a authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Jakub Klinkovský
Browse files

Added constructors with dimensions to grids.

parent 524483f7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ class Grid< 1, Real, Device, Index > : public Object
    */
   Grid();
   
   Grid( const Index xSize );

   /**
    * \brief Returns type of grid Real (value), Device type and the type of Index.
    */
+11 −0
Original line number Diff line number Diff line
@@ -33,6 +33,17 @@ Grid< 1, Real, Device, Index >::Grid()
{
}

template< typename Real,
          typename Device,
          typename Index >
Grid< 1, Real, Device, Index >::Grid( const Index xSize )
: numberOfCells( 0 ),
  numberOfVertices( 0 ),
        distGrid(nullptr)
{
   this->setDimensions( xSize );
}

template< typename Real,
          typename Device,
          typename Index  >
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ class Grid< 2, Real, Device, Index > : public Object
   /**
    * \brief See Grid1D::getType().
    */
   Grid( const Index xSize, const Index ySize );

   static String getType();

   /**
+14 −0
Original line number Diff line number Diff line
@@ -36,6 +36,20 @@ Grid< 2, Real, Device, Index > :: Grid()
{
}

template< typename Real,
          typename Device,
          typename Index >
Grid< 2, Real, Device, Index >::Grid( const Index xSize, const Index ySize )
: numberOfCells( 0 ),
  numberOfNxFaces( 0 ),
  numberOfNyFaces( 0 ),
  numberOfFaces( 0 ),   
  numberOfVertices( 0 ),
  distGrid(nullptr)
{
   this->setDimensions( xSize, ySize );
}

template< typename Real,
          typename Device,
          typename Index >
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,8 @@ class Grid< 3, Real, Device, Index > : public Object
    */
   Grid();
   
   Grid( const Index xSize, const Index ySize, const Index zSize );   

   /**
    * \brief See Grid1D::getType().
    */
Loading