WarpX
Loading...
Searching...
No Matches
FiniteDifference.H
Go to the documentation of this file.
1/* Copyright 2021-2025 Edoardo Zoni, Luca Fedeli
2 *
3 * This file is part of WarpX.
4 *
5 * License: BSD-3-Clause-LBNL
6 */
7#ifndef ABLASTR_MATH_FINITE_DIFFERENCE_H_
8#define ABLASTR_MATH_FINITE_DIFFERENCE_H_
9
10#include "ablastr/utils/Enums.H"
11
12#include <AMReX_Vector.H>
13#include <AMReX_REAL.H>
14
15namespace ablastr::math
16{
25 [[nodiscard]] amrex::Vector<amrex::Real>
27 int n_order, ablastr::utils::enums::GridType a_grid_type);
28
38 void
40 amrex::Vector<amrex::Real>& ordered_coeffs,
41 const amrex::Vector<amrex::Real>& unordered_coeffs, int order);
42}
43
44#endif //ABLASTR_MATH_FINITE_DIFFERENCE_H_
Definition AnyFFT.H:41
amrex::Vector< amrex::Real > getFornbergStencilCoefficients(const int n_order, GridType a_grid_type)
Returns an array of coefficients (Fornberg coefficients), corresponding to the weight of each point i...
Definition FiniteDifference.cpp:19
void ReorderFornbergCoefficients(amrex::Vector< amrex::Real > &ordered_coeffs, const amrex::Vector< amrex::Real > &unordered_coeffs, const int order)
Re-orders the Fornberg coefficients so that they can be used more conveniently for finite-order cente...
Definition FiniteDifference.cpp:63
GridType
Definition Enums.H:23