PRISMS-PF Manual
Loading...
Searching...
No Matches
initial_conditions.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: © 2025 PRISMS Center at the University of Michigan
2// SPDX-License-Identifier: GNU Lesser General Public Version 2.1
3
4#pragma once
5
6#include <deal.II/base/function.h>
7#include <deal.II/base/point.h>
8#include <deal.II/lac/vector.h>
9
11
12#include <prismspf/config.h>
13
15
16template <unsigned int dim>
18
20
21template <unsigned int dim>
23
24template <unsigned int dim, unsigned int degree, typename number>
25class PDEOperatorBase;
26
27template <unsigned int dim, typename number>
28class ReadFieldBase;
29
35template <unsigned int dim, unsigned int degree, typename number>
36class InitialCondition : public dealii::Function<dim, number>
37{
38public:
42 InitialCondition(const unsigned int &_index,
45
46 // NOLINTBEGIN(readability-identifier-length)
47
51 void
52 vector_value(const dealii::Point<dim> &p, dealii::Vector<number> &value) const override;
53
54 // NOLINTEND(readability-identifier-length)
55
56private:
57 unsigned int index;
58
60
62};
63
67template <unsigned int dim, typename number>
68class ReadInitialCondition : public dealii::Function<dim, number>
69{
70public:
76 const InitialConditionFile &ic_file,
77 const SpatialDiscretization<dim> &spatial_discretization);
78
79 // NOLINTBEGIN(readability-identifier-length)
80
84 void
85 vector_value(const dealii::Point<dim> &p, dealii::Vector<number> &value) const override;
86
87 // NOLINTEND(readability-identifier-length)
88
89private:
90 std::string field_name;
91
93
94 std::shared_ptr<ReadFieldBase<dim, number>> reader;
95};
96
Function for user-implemented initial conditions. These are only ever calculated for explicit time de...
Definition initial_conditions.h:37
unsigned int index
Definition initial_conditions.h:57
const PDEOperatorBase< dim, degree, number > * pde_operator
Definition initial_conditions.h:61
TensorRank field_type
Definition initial_conditions.h:59
void vector_value(const dealii::Point< dim > &p, dealii::Vector< number > &value) const override
Scalar/Vector value.
Definition initial_conditions.cc:37
This class contains the user implementation of each PDE operator.
Definition pde_operator_base.h:24
Definition read_field_base.h:23
Function for read-in of initial conditions.
Definition initial_conditions.h:69
std::shared_ptr< ReadFieldBase< dim, number > > reader
Definition initial_conditions.h:94
TensorRank field_type
Definition initial_conditions.h:92
void vector_value(const dealii::Point< dim > &p, dealii::Vector< number > &value) const override
Scalar/Vector value.
Definition initial_conditions.cc:84
std::string field_name
Definition initial_conditions.h:90
Definition user_input_parameters.h:32
@ Value
Use value of the variable as a criterion for refinement.
Definition grid_refiner_criterion.h:31
Definition conditional_ostreams.cc:20
Struct that store the read-in information for a single file.
Definition load_initial_condition_parameters.h:25
Struct that holds spatial discretization parameters.
Definition spatial_discretization.h:230
TensorRank
Tensor rank of the field.
Definition type_enums.h:30