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

Implements the right-hand side ( \(\sigma\) or \(Q\)) of the Robin boundary condition (iii) in the static scalar boundary value problem. More...

#include <static_scalar_input.hpp>

Inheritance diagram for StaticScalarSolver::RobinRhs< dim, stage >:
Collaboration diagram for StaticScalarSolver::RobinRhs< dim, stage >:

Public Member Functions

void value_list (const std::vector< Point< dim >> &r, const std::vector< Tensor< 1, dim >> &n, types::boundary_id bid, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
 Computes the right-hand side of the Robin boundary condition ( \(\sigma\) or \(Q\)). More...
 
void value_list (const std::vector< Point< 2 >> &r, const std::vector< Tensor< 1, 2 >> &n, types::boundary_id bid, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
 
void value_list (const std::vector< Point< 2 >> &r, const std::vector< Tensor< 1, 2 >> &n, types::boundary_id bid, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
 

Detailed Description

template<int dim, int stage = 1>
class StaticScalarSolver::RobinRhs< dim, stage >

Implements the right-hand side ( \(\sigma\) or \(Q\)) of the Robin boundary condition (iii) in the static scalar boundary value problem.

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

void value_list(...)
void value_list(const std::vector< Point< dim >> &r, const std::vector< Tensor< 1, dim >> &n, types::boundary_id bid, types::material_id mid, unsigned int cuid, unsigned int fuid, std::vector< double > &values) const
Computes the right-hand side of the Robin boundary condition ( or ).

member function of this class template.

Definition at line 424 of file static_scalar_input.hpp.

Member Function Documentation

◆ value_list()

template<int dim, int stage = 1>
void StaticScalarSolver::RobinRhs< dim, stage >::value_list ( const std::vector< Point< dim >> &  r,
const std::vector< Tensor< 1, dim >> &  n,
types::boundary_id  bid,
types::material_id  mid,
unsigned int  cuid,
unsigned int  fuid,
std::vector< double > &  values 
) const

Computes the right-hand side of the Robin boundary condition ( \(\sigma\) or \(Q\)).

This function is called by objects derived from the StaticScalarSolver::Solver template during the assembly of the system right-hand side. It is called once for each face located on the boundary if the face ID is even and is greater than zero. This function must fill the vector values with the values of the right-hand side of the Robin boundary condition. The values[i] is interpreted as the right-hand side at quadrature point r[i]. The value of the right-hand side may vary from point-to-point, or may have the same value at all points. The following code snippet provides an example.

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
template<>
const std::vector<Point<2>> &r,
const std::vector<Tensor<1, 2>> & n,
types::boundary_id bid,
types::material_id mid,
unsigned int cuid,
unsigned int fuid,
std::vector<double> & values) const
{
Assert(r.size() == values.size(),
ExcDimensionMismatch(r.size(), values.size()));
if (bid == 2)
{
for (unsigned int i = 0; i < values.size(); i++)
values[i] = sigma;
}
else
{
for (unsigned int i = 0; i < values.size(); i++)
values[i] = 0.0;
}
}
#pragma GCC diagnostic pop
Parameters
[in]r- A vector that contains the quadrature points of the cell being processed.
[in]n- A vector that contains normal vectors at the quadrature points of the cell being processed.
[in]bid- The boundary ID.
[in]mid- The material ID.
[in]cuid- The cell user ID.
[in]fuid- The face user ID.
[out]values- The output data.

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