32#ifndef PFC_INITIAL_CONDITIONS_SINGLE_SEED_HPP
33#define PFC_INITIAL_CONDITIONS_SINGLE_SEED_HPP
35#include "../field_modifier.hpp"
41 double amp_eq, rho_seed;
45 double get_amplitude()
const {
return amp_eq; }
48 double get_density()
const {
return rho_seed; }
52 const double s = 1.0 /
sqrt(2.0);
53 const std::array<double, 3>
q1 = {
s,
s, 0};
54 const std::array<double, 3>
q2 = {
s, 0,
s};
55 const std::array<double, 3>
q3 = {0,
s,
s};
56 const std::array<double, 3>
q4 = {
s, 0, -
s};
57 const std::array<double, 3>
q5 = {
s, -
s, 0};
58 const std::array<double, 3>
q6 = {0,
s, -
s};
59 const std::array<std::array<double, 3>, 6>
q = {
q1,
q2,
q3,
q4,
q5,
q6};
61 const double r2 =
pow(64.0, 2);
63 const double rho = rho_seed;
65 pfc::field::apply(
m, get_field_name(), [=](
const pfc::Real3 &
X) {
66 const double x =
X[0];
67 const double y =
X[1];
68 const double z =
X[2];
73 for (
int qi = 0;
qi < 6; ++
qi) {
Definition field_modifier.hpp:240
The Model class represents the physics model for simulations in OpenPFC.
Definition model.hpp:95
Definition single_seed.hpp:40
void apply(Model &m, double) override
Apply the field modification to the model (pure virtual)
Definition single_seed.hpp:50
Functional, coordinate-space field operations (header-only)
Represents the global simulation domain (the "world").
Definition world.hpp:91