Hipace
Classes | Functions
Fields.cpp File Reference
#include "Fields.H"
#include "fft_poisson_solver/FFTPoissonSolverPeriodic.H"
#include "fft_poisson_solver/FFTPoissonSolverDirichlet.H"
#include "Hipace.H"
#include "OpenBoundary.H"
#include "utils/HipaceProfilerWrapper.H"
#include "utils/Constants.H"
#include "utils/GPUUtil.H"
#include "utils/InsituUtil.H"
#include "particles/particles_utils/ShapeFactors.H"

Classes

struct  derivative_inner< dir >
 inner version of derivative More...
 
struct  derivative_inner< Direction::z >
 inner version of derivative More...
 
struct  derivative< dir >
 derivative in x or y direction More...
 
struct  derivative< Direction::z >
 derivative in z direction. Use fields from previous and next slice More...
 
struct  interpolated_field_xy_inner< interp_order_xy, ArrayType >
 inner version of interpolated_field_xy More...
 
struct  interpolated_field_xy< interp_order_xy, MfabType >
 interpolate field in x, y with interp_order_xy order transversely, x and y must be inside field box More...
 
struct  guarded_field_xy_inner
 inner version of guarded_field_xy More...
 
struct  guarded_field_xy
 if indices are outside of the fields box zero is returned More...
 

Functions

template<class FVA , class FVB >
void LinCombination (const amrex::IntVect box_grow, amrex::MultiFab dst, const amrex::Real factor_a, const FVA &src_a, const amrex::Real factor_b, const FVB &src_b)
 Calculates dst = factor_a*src_a + factor_b*src_b. src_a and src_b can be derivatives. More...
 
template<class FV >
void Multiply (const amrex::IntVect box_grow, amrex::MultiFab dst, const amrex::Real factor, const FV &src)
 Calculates dst = factor*src. src can be a derivative. More...
 
template<class Functional >
void SetDirichletBoundaries (Array2< amrex::Real > RHS, const amrex::Box &solver_size, const amrex::Geometry &geom, const amrex::Real offset, const amrex::Real factor, const Functional &boundary_value)
 Sets non zero Dirichlet Boundary conditions in RHS which is the source of the Poisson equation: laplace LHS = RHS. More...
 

Function Documentation

◆ LinCombination()

template<class FVA , class FVB >
void LinCombination ( const amrex::IntVect  box_grow,
amrex::MultiFab  dst,
const amrex::Real  factor_a,
const FVA &  src_a,
const amrex::Real  factor_b,
const FVB &  src_b 
)

Calculates dst = factor_a*src_a + factor_b*src_b. src_a and src_b can be derivatives.

Parameters
[in]box_growhow much the domain of dst should be grown
[in]dstdestination
[in]factor_afactor before src_a
[in]src_afirst source
[in]factor_bfactor before src_b
[in]src_bsecond source

◆ Multiply()

template<class FV >
void Multiply ( const amrex::IntVect  box_grow,
amrex::MultiFab  dst,
const amrex::Real  factor,
const FV &  src 
)

Calculates dst = factor*src. src can be a derivative.

Parameters
[in]box_growhow much the domain of dst should be grown
[in]dstdestination
[in]factorfactor before src_a
[in]srcfirst source

◆ SetDirichletBoundaries()

template<class Functional >
void SetDirichletBoundaries ( Array2< amrex::Real >  RHS,
const amrex::Box solver_size,
const amrex::Geometry geom,
const amrex::Real  offset,
const amrex::Real  factor,
const Functional &  boundary_value 
)

Sets non zero Dirichlet Boundary conditions in RHS which is the source of the Poisson equation: laplace LHS = RHS.

Parameters
[in]RHSsource of the Poisson equation: laplace LHS = RHS
[in]solver_sizesize of RHS/poisson solver (no tiling)
[in]geomgeometry of of RHS/poisson solver
[in]offsetshift boundary value by offset number of cells
[in]factormultiply the boundary_value by this factor
[in]boundary_valuefunctional object (Real x, Real y) -> Real value_of_potential