OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
legacy_adapter.hpp File Reference

Adapter to wrap functional field ops into FieldModifier interface. More...

#include <memory>
#include <string>
#include <utility>
#include "openpfc/field/operations.hpp"
#include "openpfc/field_modifier.hpp"
Include dependency graph for legacy_adapter.hpp:

Go to the source code of this file.

Functions

template<typename Fn >
std::unique_ptr< FieldModifierpfc::field::make_legacy_modifier (std::string field_name, Fn fn)
 Create a FieldModifier from a coordinate-space lambda.
 

Detailed Description

Adapter to wrap functional field ops into FieldModifier interface.

Function Documentation

◆ make_legacy_modifier()

template<typename Fn >
std::unique_ptr< FieldModifier > pfc::field::make_legacy_modifier ( std::string  field_name,
Fn  fn 
)

Create a FieldModifier from a coordinate-space lambda.

Template Parameters
FnCallable signature: double(const Real3&) or double(const Real3&, double)
Parameters
field_nameName of the target real field in the model
fnFunction mapping coordinates (and optionally time) to values
Returns
std::unique_ptr<FieldModifier> usable with existing Simulator APIs
Here is the call graph for this function:
Here is the caller graph for this function: