Implements the right-hand side ( \(\rho_f\), \(\rho_t\), \(\rho_r\), or \(J_f\)) in the div-grad partial differential equation (i) of the scalar boundary value problem. More...
#include <static_scalar_input.hpp>


Public Member Functions | |
| void | value_list (const std::vector< Point< dim >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const |
| Computes the right-hand side of the div-grad partial differential equation at quadrature points. More... | |
| void | value_list (const std::vector< Point< 2 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const |
| void | value_list (const std::vector< Point< 2 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const |
Implements the right-hand side ( \(\rho_f\), \(\rho_t\), \(\rho_r\), or \(J_f\)) in the div-grad partial differential equation (i) of the scalar boundary value problem.
In the case of a problem formulated in terms of the electrostatic scalar potential, \(\Phi\), the right-hand side is the volume free-charge density, \(\rho_f\). In the case of a problem formulated in terms of the total magnetic scalar potential, \(\Psi\), the right-hand side is the volume magnetic-charge density, \(\rho_t\). (Note, that normally in the literature \(\rho_t / \mu_0\) is designated as volume magnetic-charge density.) In the case of a problem formulated in terms of the reduced magnetic scalar potential, \(\Theta\), the right-hand side is the reduced volume magnetic- charge density, \(\rho_r\). In the cases of a planar two-dimensional problem formulated in terms of the magnitude of the vector potential, \(A\), and an axisymmetric two-dimensional problem formulated in terms of the scaled magnitude of the vector potential, \(A'\), the right-hand side is the magnitude of the free-current density, \(J_f\). In the case of the planar two-dimensional problem formulated in terms of the magnitude of the current vector potential, \(T\), the StaticScalarSolver::PdeRhsCvp is used instead of this class template.
This class template is declared in shared/include/static_scalar_input.hpp but must be implemented in xyz/src/static_scalar_input.cpp, where xyz is the directory of the current numerical experiment. That is, the declaration is shared between all numerical experiments while implementation is specific for each individual numerical experiment. See the structure of the code for more details.
The dim template parameter is, as per usual, the amount of spatial dimensions. The purpose of the stage template parameter is discussed in here.
The user is supposed to implement
member function of this class template.
Definition at line 152 of file static_scalar_input.hpp.
| void StaticScalarSolver::PdeRhs< dim, stage >::value_list | ( | const std::vector< Point< dim >> & | r, |
| types::material_id | mid, | ||
| unsigned int | cuid, | ||
| std::vector< double > & | values | ||
| ) | const |
Computes the right-hand side of the div-grad partial differential equation at quadrature points.
This function is called by objects derived from the StaticScalarSolver::Solver template during the assembly of the system right-hand side. It is called ones per each cell. This function must fill the vector values with the values of the right-hand side of the partial differential equation. The values[i] is interpreted as the right-hand side of the partial differential equation at quadrature point r[i]. The right- hand side of the partial differential equation may vary from point-to-point, or may have the same value at all points. The following code snippet provides an example.
| [in] | r | - A vector that contains the quadrature points of the cell being processed. |
| [in] | mid | - The material ID. |
| [in] | cuid | - The cell user ID. |
| [out] | values | - The output data. |