Logbook  (07-04-2025)
Static problems
StaticVectorSolver::TheCoefficient< dim, stage > Class Template Reference

Implements the permeability, \(\mu\), in the partial differential equation (i) of the vector boundary value problem. More...

#include <static_vector_input.hpp>

Inheritance diagram for StaticVectorSolver::TheCoefficient< dim, stage >:
Collaboration diagram for StaticVectorSolver::TheCoefficient< dim, stage >:

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 values of permeability, \(\mu\), at quadrature points. More...
 
void value_list (const std::vector< Point< 3 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
 
void value_list (const std::vector< Point< 3 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
 
void value_list (const std::vector< Point< 3 >> &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
 
void value_list (const std::vector< Point< 3 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
 
void value_list (const std::vector< Point< 3 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
 
void value_list (const std::vector< Point< 3 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
 
void value_list (const std::vector< Point< 3 >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
 

Detailed Description

template<int dim, int stage = 1>
class StaticVectorSolver::TheCoefficient< dim, stage >

Implements the permeability, \(\mu\), in the partial differential equation (i) of the vector boundary value problem.

If the magnetic vector potential \(\vec{A}\) is being computed, the coefficient must equal the permeability, \(\mu\). If the current vector potential \(\vec{T}\) is being computed, the coefficient must equal 1.

This class is declared in shared/include/static_vector_input.hpp but must be implemented in xyz/src/static_vector_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

void value_list(...)
void value_list(const std::vector< Point< dim >> &r, types::material_id mid, unsigned int cuid, std::vector< double > &values) const
Computes values of permeability, , at quadrature points.

member function of this class.

Definition at line 52 of file static_vector_input.hpp.

Member Function Documentation

◆ value_list()

template<int dim, int stage = 1>
void StaticVectorSolver::TheCoefficient< dim, stage >::value_list ( const std::vector< Point< dim >> &  r,
types::material_id  mid,
unsigned int  cuid,
std::vector< double > &  values 
) const

Computes values of permeability, \(\mu\), at quadrature points.

This function is called by the StaticVectorSolver::Solver1 and StaticVectorSolver::Solver2 classes during the assembly of the system matrix. It is called ones per each cell. This function must fill the vector values with the values of \(\mu\). The values[i] is interpreted as the value of \(\mu\) at the quadrature point r[i]. The code snippet below provides an example in which permeability equals

\(\mu = \mu_0 \big(x^2+y^2+1\big)\),

where \(\mu_0\) is the permeability of free space.

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
template<>
const std::vector<Point<3>> &r,
types::material_id mid,
unsigned int cuid,
std::vector<double> & values) const
{
Assert(r.size() == values.size(),
ExcDimensionMismatch(r.size(), values.size()));
auto v = values.begin();
for (auto p: r)
{
*v = MU0 * ( pow(p[0],2) + pow(p[1],2) + 1 );
v++;
}
}
#pragma GCC diagnostic pop
Parameters
[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.

The documentation for this class was generated from the following file: