29#ifndef PFC_INITIAL_CONDITIONS_CONSTANT_HPP
30#define PFC_INITIAL_CONDITIONS_CONSTANT_HPP
32#include "../field_modifier.hpp"
85 pfc::field::apply(
m, get_field_name(),
86 [
n0 = m_n0](
const pfc::Real3 &) {
return n0; });
A class that represents a constant field modifier for use as an initial condition in a partial differ...
Definition constant.hpp:44
double get_density() const
Get the current density value.
Definition constant.hpp:65
void apply(Model &m, double t_unused) override
Apply the constant field modifier to the given model.
Definition constant.hpp:81
Constant()=default
Default constructor for the Constant class.
void set_density(double n0)
Set the density value.
Definition constant.hpp:71
Constant(double n0)
Constructor for the Constant class that sets the initial density value.
Definition constant.hpp:59
Definition field_modifier.hpp:240
The Model class represents the physics model for simulations in OpenPFC.
Definition model.hpp:95
Functional, coordinate-space field operations (header-only)
Represents the global simulation domain (the "world").
Definition world.hpp:91