MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/CompactNSearch / enright_velocity_field

Function enright_velocity_field

demo/main.cpp:104–122  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104std::array<Real, 3>
105enright_velocity_field(std::array<Real, 3> const& x)
106{
107 Real sin_pi_x_2 = std::sin(M_PI * x[0]);
108 Real sin_pi_y_2 = std::sin(M_PI * x[1]);
109 Real sin_pi_z_2 = std::sin(M_PI * x[2]);
110 sin_pi_x_2 *= sin_pi_x_2;
111 sin_pi_y_2 *= sin_pi_y_2;
112 sin_pi_z_2 *= sin_pi_z_2;
113
114 Real sin_2_pi_x = std::sin(2.0 * M_PI * x[0]);
115 Real sin_2_pi_y = std::sin(2.0 * M_PI * x[1]);
116 Real sin_2_pi_z = std::sin(2.0 * M_PI * x[2]);
117 return {{
118 2.0 * sin_pi_x_2 * sin_2_pi_y * sin_2_pi_z,
119 -sin_2_pi_x * sin_pi_y_2 * sin_2_pi_z,
120 -sin_2_pi_x * sin_2_pi_y * sin_pi_z_2}};
121
122}
123
124void
125advect()

Callers 1

advectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected