aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/FiniteDifferenceSolver/FiniteDifferenceSolver.cpp
blob: a146b66b1e1b90def69878eebc67f5d3b30693cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


void FiniteDifferenceSolver::FiniteDifferenceSolver ( std::array<Real,3> cell_size ) {
    // Select algorithm (The choice of algorithm is a runtime option,
    // but we compile code for each algorithm, using templates)
    if (fdtd_algo == MaxwellSolverAlgo::Yee){
        YeeAlgorithm::InitializeStencilCoefficients( cell_size,
            stencil_coefs_x, stencil_coefs_y, stencil_coefs_z );
    } else if (fdtd_algo == MaxwellSolverAlgo::CKC) {
        CKCAlgorithm::InitializeStencilCoefficients( cell_size,
            stencil_coefs_x, stencil_coefs_y, stencil_coefs_z );
    } else {
        amrex::Abort("Unknown algorithm");
    }
};