![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
A class that represents a constant field modifier for use as an initial condition in a partial differential equation (PDE) model. More...
#include <constant.hpp>


Public Member Functions | |
| Constant ()=default | |
| Default constructor for the Constant class. | |
| Constant (double n0) | |
| Constructor for the Constant class that sets the initial density value. | |
| double | get_density () const |
| Get the current density value. | |
| void | set_density (double n0) |
| Set the density value. | |
| void | apply (Model &m, double t_unused) override |
| Apply the constant field modifier to the given model. | |
Public Member Functions inherited from pfc::FieldModifier | |
| void | set_field_name (const std::string &field_name) |
| const std::string & | get_field_name () const |
| virtual const std::string & | get_modifier_name () const |
| Get the name of the field modifier. | |
| virtual | ~FieldModifier ()=default |
| Destructor for the FieldModifier class. | |
A class that represents a constant field modifier for use as an initial condition in a partial differential equation (PDE) model.
The Constant class inherits from the FieldModifier abstract base class and overrides the apply method to set the field to a constant value.
|
inline |
Constructor for the Constant class that sets the initial density value.
| n0 | The constant value to set for the field. |
Apply the constant field modifier to the given model.
This method sets the field in the model to the constant density value.
| m | The model to apply the field modifier to. |
| t | The current time (unused in this implementation). |
Implements pfc::FieldModifier.
|
inline |
Get the current density value.
Set the density value.
| n0 | The new density value to set. |