@@ -175,6 +175,7 @@ void InitializeVariables(const amrex::Geometry & geom,
175
175
176
176
// coefficient for initialization psi
177
177
const amrex::Real a = 1000000 ;
178
+ const double pi = 4 . * std::atan (1 .);
178
179
179
180
for (amrex::MFIter mfi (psi); mfi.isValid (); ++mfi)
180
181
{
@@ -187,8 +188,8 @@ void InitializeVariables(const amrex::Geometry & geom,
187
188
const amrex::Real x_cell_center = (i+0.5 ) * dx;
188
189
const amrex::Real y_cell_center = (j+0.5 ) * dy;
189
190
190
- const amrex::Real x_transformed = LinearMapCoordinates (x_cell_center, x_min, x_max, 0.0 , 2 *std::numbers:: pi );
191
- const amrex::Real y_transformed = LinearMapCoordinates (y_cell_center, y_min, y_max, 0.0 , 2 *std::numbers:: pi );
191
+ const amrex::Real x_transformed = LinearMapCoordinates (x_cell_center, x_min, x_max, 0.0 , 2 *pi );
192
+ const amrex::Real y_transformed = LinearMapCoordinates (y_cell_center, y_min, y_max, 0.0 , 2 *pi );
192
193
193
194
phi_array (i,j,k) = a*std::sin (x_transformed)*std::sin (y_transformed);
194
195
});
@@ -202,7 +203,7 @@ void InitializeVariables(const amrex::Geometry & geom,
202
203
203
204
// coefficient for pressure
204
205
double el = geom.ProbLength (0 );
205
- amrex::Real pcf = (std::numbers:: pi * std::numbers:: pi * a * a)/(el * el);
206
+ amrex::Real pcf = (pi * pi * a * a)/(el * el);
206
207
207
208
for (amrex::MFIter mfi (p); mfi.isValid (); ++mfi)
208
209
{
@@ -215,8 +216,8 @@ void InitializeVariables(const amrex::Geometry & geom,
215
216
amrex::Real x_node = i * dx;
216
217
amrex::Real y_node = j * dy;
217
218
218
- const amrex::Real x_transformed = LinearMapCoordinates (x_node, x_min, x_max, 0.0 , 2 *std::numbers:: pi );
219
- const amrex::Real y_transformed = LinearMapCoordinates (y_node, y_min, y_max, 0.0 , 2 *std::numbers:: pi );
219
+ const amrex::Real x_transformed = LinearMapCoordinates (x_node, x_min, x_max, 0.0 , 2 *pi );
220
+ const amrex::Real y_transformed = LinearMapCoordinates (y_node, y_min, y_max, 0.0 , 2 *pi );
220
221
221
222
p_array (i,j,k) = pcf * (std::cos (2 *x_transformed) + std::cos (2 *y_transformed)) + 5000 ;
222
223
});
0 commit comments