Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ ed2117e6d6826a98b6988e2f18c0c34e408563b6
a71cad2dd6ace5741a754e2ca7daacd4bb094e0e
2c2402ed59c91164eaff46dee0f79386b7347e9e
05b7c571544c3bcb153fce67d12b9ac48947fc2d
c8f38049359170a34c915e209276238ea66b9a1e
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ set(BOUT_SOURCES
./src/field/where.cxx
./src/invert/fft_fftw.cxx
./src/invert/lapack_routines.cxx
./src/invert/laplace/common_transform.cxx
./src/invert/laplace/common_transform.hxx
./src/invert/laplace/impls/cyclic/cyclic_laplace.cxx
./src/invert/laplace/impls/cyclic/cyclic_laplace.hxx
./src/invert/laplace/impls/iterative_parallel_tri/iterative_parallel_tri.cxx
Expand Down
18 changes: 13 additions & 5 deletions include/bout/invert_laplace.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Laplacian;
#define PVEC_REAL_MPI_TYPE MPI_DOUBLE
#endif

#include "bout/bout_types.hxx"
#include "bout/field2d.hxx"
#include "bout/field3d.hxx"
#include "bout/fieldperp.hxx"
Expand All @@ -50,6 +51,8 @@ class Laplacian;

#include "bout/dcomplex.hxx"

class DSTTransform;
class FFTTransform;
class Solver;

constexpr auto LAPLACE_SPT = "spt";
Expand Down Expand Up @@ -258,7 +261,7 @@ public:
/// Coefficients in tridiagonal inversion
void tridagCoefs(int jx, int jy, int jz, dcomplex& a, dcomplex& b, dcomplex& c,
const Field2D* ccoef = nullptr, const Field2D* d = nullptr,
CELL_LOC loc = CELL_DEFAULT);
CELL_LOC loc = CELL_DEFAULT) const;

/*!
* Create a new Laplacian solver
Expand Down Expand Up @@ -301,6 +304,10 @@ public:
void savePerformance(Solver& solver, const std::string& name);

protected:
// Give access for tridagMatrix
friend class DSTTransform;
friend class FFTTransform;

bool async_send; ///< If true, use asyncronous send in parallel algorithms

int maxmode; ///< The maximum Z mode to solve for
Expand Down Expand Up @@ -332,23 +339,24 @@ protected:

void tridagCoefs(int jx, int jy, BoutReal kwave, dcomplex& a, dcomplex& b, dcomplex& c,
const Field2D* ccoef = nullptr, const Field2D* d = nullptr,
CELL_LOC loc = CELL_DEFAULT) {
CELL_LOC loc = CELL_DEFAULT) const {
tridagCoefs(jx, jy, kwave, a, b, c, ccoef, ccoef, d, loc);
}
void tridagCoefs(int jx, int jy, BoutReal kwave, dcomplex& a, dcomplex& b, dcomplex& c,
const Field2D* c1coef, const Field2D* c2coef, const Field2D* d,
CELL_LOC loc = CELL_DEFAULT);
CELL_LOC loc = CELL_DEFAULT) const;

void tridagMatrix(dcomplex* avec, dcomplex* bvec, dcomplex* cvec, dcomplex* bk, int jy,
int kz, BoutReal kwave, const Field2D* a, const Field2D* ccoef,
const Field2D* d, bool includeguards = true, bool zperiodic = true) {
const Field2D* d, bool includeguards = true,
bool zperiodic = true) const {
tridagMatrix(avec, bvec, cvec, bk, jy, kz, kwave, a, ccoef, ccoef, d, includeguards,
zperiodic);
}
void tridagMatrix(dcomplex* avec, dcomplex* bvec, dcomplex* cvec, dcomplex* bk, int jy,
int kz, BoutReal kwave, const Field2D* a, const Field2D* c1coef,
const Field2D* c2coef, const Field2D* d, bool includeguards = true,
bool zperiodic = true);
bool zperiodic = true) const;
CELL_LOC location; ///< staggered grid location of this solver
Mesh* localmesh; ///< Mesh object for this solver
Coordinates* coords; ///< Coordinates object, so we only have to call
Expand Down
Loading