![]() |
OpenPFC
0.1.4
Phase Field Crystal simulation framework
|
Custom field modifier: Gaussian initial condition. More...


Public Member Functions | |
| void | apply (Model &m, double t) override |
| Apply the field modification to the model (pure virtual) | |
| GaussianIC (const std::string &field_name, const types::Real3 ¢er, double amplitude=1.0, double sigma=1.0) | |
| std::string | get_field_name () const override |
| void | apply (Model &model, double t) override |
| Apply the field modification to the model (pure virtual) | |
| GaussianIC (Real3 center, double amplitude, double width, double background=0.0) | |
| void | apply (Model &model, double time) override |
| Apply the field modification to the model (pure virtual) | |
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. | |
Custom field modifier: Gaussian initial condition.
Custom initial condition: Gaussian bump in 3D space.
This demonstrates:
Apply the field modification to the model (pure virtual)
This is the main interface method that derived classes must implement to define their modification logic. The method receives full mutable access to the Model and current simulation time, allowing arbitrary modifications.
Implementation Responsibilities:
model.get_real_field() or model.get_complex_field()model.get_world() and model.get_fft()Typical Implementation Pattern:
| model | Mutable reference to the Model containing fields to modify |
| time | Current simulation time (useful for time-dependent BCs) |
time is typically 0.0 time reflects current simulation time Implements pfc::FieldModifier.
Apply the field modification to the model (pure virtual)
This is the main interface method that derived classes must implement to define their modification logic. The method receives full mutable access to the Model and current simulation time, allowing arbitrary modifications.
Implementation Responsibilities:
model.get_real_field() or model.get_complex_field()model.get_world() and model.get_fft()Typical Implementation Pattern:
| model | Mutable reference to the Model containing fields to modify |
| time | Current simulation time (useful for time-dependent BCs) |
time is typically 0.0 time reflects current simulation time Implements pfc::FieldModifier.
Apply the field modification to the model (pure virtual)
This is the main interface method that derived classes must implement to define their modification logic. The method receives full mutable access to the Model and current simulation time, allowing arbitrary modifications.
Implementation Responsibilities:
model.get_real_field() or model.get_complex_field()model.get_world() and model.get_fft()Typical Implementation Pattern:
| model | Mutable reference to the Model containing fields to modify |
| time | Current simulation time (useful for time-dependent BCs) |
time is typically 0.0 time reflects current simulation time Implements pfc::FieldModifier.