ryujin 2.5.0 revision c64172211cf21344cb9b9b0f3a1266aa6400d392
Loading...
Searching...
No Matches
electrostatic_configuration.h
Go to the documentation of this file.
1//
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
3// Copyright (C) 2026 by the ryujin authors
4//
5
6#pragma once
7
8#include <ryujin/base/compile_time_options.h>
11
12#include <deal.II/base/exceptions.h>
13#include <deal.II/base/parameter_acceptor.h>
14#include <deal.II/base/tensor.h>
15
16#include <string>
17
18namespace ryujin
19{
26 template <int dim, typename Number = double>
27 class ElectrostaticConfiguration : public dealii::ParameterAcceptor
28 {
29 public:
30 using curl_type = dealii::Tensor<1, dim == 2 ? 1 : dim, Number>;
31
32 ElectrostaticConfiguration(const std::string &name,
33 const std::string &subsection)
34 : ParameterAcceptor(subsection + "/" + name)
35 , name_(name)
36 {
37 dirichlet_boundaries_.insert({Boundary::do_nothing,
44 this->add_parameter(
45 "dirichlet boundaries",
46 dirichlet_boundaries_,
47 "A list of hyperbolic boundary types where homogeneous boundary "
48 "conditions will be enforced on the potential.");
49
50 is_time_dependent_ = false;
51 }
52
57 virtual double background_density(const dealii::Point<dim> &point,
58 Number t) const = 0;
59
63 virtual curl_type magnetic_field(const dealii::Point<dim> &point,
64 Number t) const = 0;
65
71
72
75 ACCESSOR_READ_ONLY(dirichlet_boundaries)
76
77
81 ACCESSOR_READ_ONLY(is_time_dependent)
82
83 protected:
85
86 private:
87 const std::string name_;
88 std::set<dealii::types::boundary_id> dirichlet_boundaries_;
89 };
90} // namespace ryujin
virtual curl_type magnetic_field(const dealii::Point< dim > &point, Number t) const =0
virtual double background_density(const dealii::Point< dim > &point, Number t) const =0
ElectrostaticConfiguration(const std::string &name, const std::string &subsection)
dealii::Tensor< 1, dim==2 ? 1 :dim, Number > curl_type
@ dirichlet_momentum
@ dirichlet_velocity
#define ACCESSOR_READ_ONLY(member)