ryujin 2.1.1 revision ee5cbcbf2346c1299c942d0e1f13b46449973c18
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 <compile_time_options.h>
9#include <discretization.h>
10
11#include "convenience_macros.h"
12
13#include <deal.II/base/exceptions.h>
14#include <deal.II/base/parameter_acceptor.h>
15#include <deal.II/base/tensor.h>
16
17#include <string>
18
19namespace ryujin
20{
21 namespace ElectrostaticConfigurationLibrary
22 {
29 template <int dim, typename Number = double>
30 class ElectrostaticConfiguration : public dealii::ParameterAcceptor
31 {
32 public:
33 using curl_type = dealii::Tensor<1, dim == 2 ? 1 : dim, Number>;
34
35 ElectrostaticConfiguration(const std::string &name,
36 const std::string &subsection)
37 : ParameterAcceptor(subsection + "/" + name)
38 , name_(name)
39 {
40 dirichlet_boundaries_.insert({Boundary::do_nothing,
47 this->add_parameter(
48 "dirichlet boundaries",
49 dirichlet_boundaries_,
50 "A list of hyperbolic boundary types where homogeneous boundary "
51 "conditions will be enforced on the potential.");
52
53 is_time_dependent_ = false;
54 }
55
60 virtual double background_density(const dealii::Point<dim> &point,
61 Number t) const = 0;
62
66 virtual curl_type magnetic_field(const dealii::Point<dim> &point,
67 Number t) const = 0;
68
74
75
78 ACCESSOR_READ_ONLY(dirichlet_boundaries)
79
80
84 ACCESSOR_READ_ONLY(is_time_dependent)
85
86 protected:
88
89 private:
90 const std::string name_;
91 std::set<dealii::types::boundary_id> dirichlet_boundaries_;
92 };
93 } // namespace ElectrostaticConfigurationLibrary
94} /* namespace ryujin */
ElectrostaticConfiguration(const std::string &name, const std::string &subsection)
virtual double background_density(const dealii::Point< dim > &point, Number t) const =0
virtual curl_type magnetic_field(const dealii::Point< dim > &point, Number t) const =0
@ dirichlet_momentum
@ dirichlet_velocity
#define ACCESSOR_READ_ONLY(member)