Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Release 0.4.0
This release changes the input files so that the boundary indices start at 0 instead of 1
  • Loading branch information
mnucci32 committed Oct 15, 2016
2 parents 4dac0d8 + f3e5104 commit 64e515c
Show file tree
Hide file tree
Showing 15 changed files with 232 additions and 266 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ aither
*.res
*.out
*_center.xyz
*.resid

#Ignore blog files
_site
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ This code is for a 3D Navier-Stokes computational fluid dynamics solver. It is a
The code is 2nd order accurate in space and time. Available explicit time integration methods are forward euler (1st order) and a minimum storage four stage Runge-Kutta method (2nd order). The implicit solver (LU-SGS, BLU-SGS, DPLUR, BDPLUR) is implemented for implicit time integration. Dual time stepping is implemented for time accuracy in the implicit solver. Available implicit time integrations methods come from the Beam and Warming family of methods and are the implicit euler (1st order), Crank-Nicholson (2nd order), and BDF2 (2nd order) methods. The code has been thoroughly commented. It has been made parallel using MPI. Currently the Wilcox K-Omega 2006 and SST 2003 turbulence models are available.

### To Do List
* Add a library for matrix operations (Eigen and PETSc being considered)
* Implement higher order state reconstruction for DES / Hybrid RANS/LES
* Implement tubulence model for DES / Hybrid RANS/LES

Expand All @@ -25,7 +24,7 @@ make
make install
```

Cmake will automatically look for an MPI package. To specify a specific installation, set **-DMPI_DIR** to the MPI installation directory.
Cmake will automatically look for an MPI package. To specify a specific installation, set *-DMPI_DIR* to the MPI installation directory.

### How To Run
```bash
Expand Down
18 changes: 11 additions & 7 deletions include/boundaryConditions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,19 @@

/* This header contains the class boundaryConditions.
This class stores the information needed to specify the boundary_ conditions for one block_. */
This class stores the information needed to specify the boundary conditions for
one block. */

#include <vector> // vector
#include <array> // array
#include <string> // string
#include <iostream> // ostream
#include "mpi.h" // parallelism
#include "vector3d.hpp"

using std::ostream;
using std::vector;
using std::array;
using std::string;
using std::cout;
using std::endl;
Expand All @@ -45,8 +48,10 @@ class boundarySurface {

public:
// Constructor
boundarySurface(const string&, const int&, const int&, const int&,
const int&, const int&, const int&, const int&);
boundarySurface(const string &name, const int &imin, const int &imax,
const int &jmin, const int &jmax, const int &kmin,
const int &kmax, const int &tag) :
bcType_(name), data_{imin, imax, jmin, jmax, kmin, kmax, tag} {}
boundarySurface() : boundarySurface("undefined", 0, 0, 0, 0, 0, 0, 0) {}

// move constructor and assignment operator
Expand Down Expand Up @@ -120,9 +125,8 @@ class patch {
const bool(&)[4]);
patch(const boundarySurface &surf, const plot3dBlock &blk, const int &bNum,
const bool (&border)[4], int r = 0, int l = 0) :
patch(surf.SurfaceType(), bNum, surf.IMin() - 1, surf.IMax() - 1,
surf.JMin() -1, surf.JMax() - 1, surf.KMin() - 1,
surf.KMax() - 1, blk, r, l, border) {}
patch(surf.SurfaceType(), bNum, surf.IMin(), surf.IMax(), surf.JMin(),
surf.JMax(), surf.KMin(), surf.KMax(), blk, r, l, border) {}

// move constructor and assignment operator
patch(patch&&) noexcept = default;
Expand Down Expand Up @@ -393,7 +397,7 @@ ostream & operator<< (ostream &os, const decomposition&);
ostream & operator<< (ostream &os, const interblock&);


vector3d<int> GetSwapLoc(const int &, const int &, const int &,
array<int, 3> GetSwapLoc(const int &, const int &, const int &,
const interblock &, const bool &);

#endif
12 changes: 6 additions & 6 deletions include/multiArray3d.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ T multiArray3d<T>::GetElem(const int &ii, const int &jj, const int &kk) const {
cerr << "Tried to access " << ii << ", " << jj << ", " << kk << endl;
cerr << "Maximum locations are " << numI_ - 1 << ", " << numJ_ - 1 << ", "
<< numK_ - 1 << endl;
exit(1);
exit(EXIT_FAILURE);
}
}

Expand Down Expand Up @@ -403,7 +403,7 @@ multiArray3d<T> multiArray3d<T>::Slice(const int &is, const int &ie,
<< "boundaries " << is << ", " << ie << ", " << js << ", " << je
<< ", " << ks << ", " << ke << " from array with dimensions " <<
numI_ << ", " << numJ_ << ", " << numK_ << endl;
exit(1);
exit(EXIT_FAILURE);
}

multiArray3d<T> array(ie - is + 1, je - js + 1, ke - ks + 1);
Expand Down Expand Up @@ -442,7 +442,7 @@ void multiArray3d<T>::Insert(const int &is, const int &ie, const int &js,
", " << array.numK_ << endl;
cerr << "Size of location is " << ie - is + 1 << ", " << je - js + 1 <<
", " << ke - ks + 1 << endl;
exit(1);
exit(EXIT_FAILURE);
}

// s is for index of sliced array, p is for index of parent array
Expand Down Expand Up @@ -504,7 +504,7 @@ void multiArray3d<T>::SameSizeResize(const int &ii, const int&jj,
cerr << "ERROR: Error in multiArray3d<T>::SameSizeResize. Attempting to "
<< "resize array of " << this->Size() << " cells to " <<
ii * jj * kk << " cells." << endl;
exit(1);
exit(EXIT_FAILURE);
}
numI_ = ii;
numJ_ = jj;
Expand Down Expand Up @@ -565,7 +565,7 @@ void multiArray3d<T>::PutSlice(const multiArray3d<T> &array,
<< inter.Dir2EndFirst() - inter.Dir2StartFirst() << ", " << d3 << endl;
cerr << "Direction I, J, K of multiArray3d<T> to insert: " << array.NumI()
<< ", " << array.NumJ() << ", " << array.NumK() << endl;
exit(1);
exit(EXIT_FAILURE);
}

// adjust insertion indices if patch borders another interblock on the same
Expand Down Expand Up @@ -687,7 +687,7 @@ void multiArray3d<T>::SwapSliceMPI(const interblock &inter, const int &rank,
} else {
cerr << "ERROR: Error in procBlock::SwapSliceMPI(). Processor rank does "
"not match either of interblock ranks!" << endl;
exit(1);
exit(EXIT_FAILURE);
}

// get local state slice to swap
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ project (aither)

# set version number
set (aither_VERSION_MAJOR 0)
set (aither_VERSION_MINOR 3)
set (aither_VERSION_PATCH 1)
set (aither_VERSION_MINOR 4)
set (aither_VERSION_PATCH 0)

message (STATUS "Cmake version ${CMAKE_VERSION}")
message (STATUS "Configuring aither v${aither_VERSION_MAJOR}.${aither_VERSION_MINOR}.${aither_VERSION_PATCH}")
Expand Down
Loading

0 comments on commit 64e515c

Please sign in to comment.