|
IPPL API Reference
Independent Parallel Particle Layer C++ API
|
A solver for the electric diffusion equation given by \( \nabla \times \nabla \times E + E = f \text{ in } \Omega\) and \( n \times E = 0 \text{ on } \partial \Omega\) using the Nédélec basis functions. More...
#include <FEMMaxwellDiffusionSolver.h>
Inheritance diagram for ippl::FEMMaxwellDiffusionSolver< FieldType >:
Collaboration diagram for ippl::FEMMaxwellDiffusionSolver< FieldType >:Public Types | |
| using | Base = Maxwell< FieldType, FieldType > |
| using | MeshType = typename FieldType::Mesh_t |
| using | PCGSolverAlgorithm_t = CG< FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T >, FEMVector< T > > |
| using | ElementType = std::conditional_t< Dim==2, ippl::QuadrilateralElement< T >, ippl::HexahedralElement< T > > |
| using | QuadratureType = GaussJacobiQuadrature< T, 5, ElementType > |
| using | NedelecType = NedelecSpace< T, Dim, 1, ElementType, QuadratureType, FieldType > |
Public Member Functions | |
| FEMMaxwellDiffusionSolver (FieldType &lhs, FieldType &rhs, const FEMVector< point_t > &rhsVector) | |
| void | setRhs (FieldType &rhs, const FEMVector< point_t > &rhsVector) |
| void | solve () override |
| Solve the equation using finite element methods. | |
| int | getIterationCount () |
| T | getResidue () const |
| Kokkos::View< point_t * > | reconstructToPoints (const Kokkos::View< point_t * > &positions) |
| Reconstructs function values at arbitrary points in the mesh. | |
| template<typename F > | |
| T | getL2Error (const F &analytic) |
| Given an analytical solution computes the L2 norm error. | |
Public Member Functions inherited from ippl::Maxwell< FieldType, FieldType > | |
| Maxwell () | |
| Maxwell (FieldType &four_current, FieldType &E, FieldType &B) | |
| virtual void | setSources (FieldType &four_current) |
| void | setEMFields (FieldType &E, FieldType &B) |
| void | mergeParameters (const ParameterList ¶ms) |
Protected Member Functions | |
| virtual void | setDefaultParameters () |
| Sets the default values for the CG solver. Defaults are: max Iterations = 10, tolerance = 1e-13. | |
Protected Attributes | |
| PCGSolverAlgorithm_t | pcg_algo_m |
| The CG Solver we use. | |
| std::unique_ptr< FEMVector< T > > | rhsVector_m |
| FEM represenation of the rhs We use this to store the rhs b of the System Ax = b used in the Galerkin FEM scheme. | |
| std::unique_ptr< FEMVector< T > > | lhsVector_m |
| FEM represenation of the solution vector We use this to store the solution x of the System Ax = b used in the Galerkin FEM scheme. | |
| ElementType | refElement_m |
| the reference element we have. | |
| QuadratureType | quadrature_m |
| The quadrature rule we use. | |
| NedelecType | nedelecSpace_m |
| The Nedelec Space object. | |
Protected Attributes inherited from ippl::Maxwell< FieldType, FieldType > | |
| ParameterList | params_m |
| FieldType * | JN_mp |
| FieldType * | En_mp |
| FieldType * | Bn_mp |
Additional Inherited Members | |
Static Public Attributes inherited from ippl::Maxwell< FieldType, FieldType > | |
| static constexpr unsigned | Dim |
A solver for the electric diffusion equation given by \( \nabla \times \nabla \times E + E = f \text{ in } \Omega\) and \( n \times E = 0 \text{ on } \partial \Omega\) using the Nédélec basis functions.
| FieldType | The type used to represent a field on a mesh. |
|
inline |
Query how many iterations were required to obtain the solution the last time this solver was used
|
inline |
Given an analytical solution computes the L2 norm error.
| analytic | The analytical solution functor |
|
inline |
Query the residue
|
inline |
Reconstructs function values at arbitrary points in the mesh.
This function can be used to retrieve the values of a solution function at arbitrary points inside of the mesh.
positions only contains positions which are inside of local domain of this MPI rank (i.e. each rank gets its own unique position ) and where positions contains the positions of all ranks (i.e. positions is the same for all ranks). If in the future it can be guaranteed, that each rank will get its own positions then certain parts of the function implementation can be removed. Instructions for this are given in the implementation itself.| positions | The points at which the function should be evaluated. A Kokkos::View which stores in each element a 2D/3D point. |
Kokkos::View where each element corresponts to the function value at the point described by the same element inside of positions.
|
inlineoverridevirtual |
Solve the equation using finite element methods.
Implements ippl::Maxwell< FieldType, FieldType >.
|
protected |
The Nedelec Space object.
This is the representation of the Nedelec space that we have and which we use to interact with all the Nedelec stuff.