Skip to content
Snippets Groups Projects
Commit 4c2d637c authored by Hkorb's avatar Hkorb
Browse files

update python bindings and AL app

parent 17966f82
No related branches found
No related tags found
1 merge request!245Add new probe, Refactor File Writer
......@@ -212,21 +212,29 @@ void multipleLevel(const std::string& configPath)
para->addActuator( actuator_farm );
// SPtr<PointProbe> pointProbe = std::make_shared<PointProbe>("pointProbe", para->getOutputPath(), 100, 1, 500, 100);
// std::vector<real> probeCoordsX = {reference_diameter,2*reference_diameter,5*reference_diameter};
// std::vector<real> probeCoordsY = {3*reference_diameter,3*reference_diameter,3*reference_diameter};
// std::vector<real> probeCoordsZ = {3*reference_diameter,3*reference_diameter,3*reference_diameter};
// pointProbe->addProbePointsFromList(probeCoordsX, probeCoordsY, probeCoordsZ);
// // pointProbe->addProbePointsFromXNormalPlane(2*D, 0.0, 0.0, L_y, L_z, (uint)L_y/dx, (uint)L_z/dx);
// pointProbe->addStatistic(Statistic::Means);
// pointProbe->addStatistic(Statistic::Variances);
// para->addProbe( pointProbe );
// SPtr<PlaneProbe> planeProbe = std::make_shared<PlaneProbe>("planeProbe", para->getOutputPath(), 100, 500, 100, 100);
// planeProbe->setProbePlane(5*reference_diameter, 0, 0, dx, L_y, L_z);
// planeProbe->addStatistic(Statistic::Means);
// para->addProbe( planeProbe );
SPtr<PointProbe> pointProbe = std::make_shared<PointProbe>("pointProbe", para->getOutputPath(), 100, 1, 500, 100, false);
std::vector<real> probeCoordsX = {reference_diameter,2*reference_diameter,5*reference_diameter};
std::vector<real> probeCoordsY = {3*reference_diameter,3*reference_diameter,3*reference_diameter};
std::vector<real> probeCoordsZ = {3*reference_diameter,3*reference_diameter,3*reference_diameter};
pointProbe->addProbePointsFromList(probeCoordsX, probeCoordsY, probeCoordsZ);
// pointProbe->addProbePointsFromXNormalPlane(2*D, 0.0, 0.0, L_y, L_z, (uint)L_y/dx, (uint)L_z/dx);
pointProbe->addStatistic(Statistic::Means);
pointProbe->addStatistic(Statistic::Variances);
para->addProbe( pointProbe );
SPtr<PointProbe> timeseriesProbe = std::make_shared<PointProbe>("timeProbe", para->getOutputPath(), 100, 1, 500, 100, true);
timeseriesProbe->addProbePointsFromList(probeCoordsX, probeCoordsY, probeCoordsZ);
// pointProbe->addProbePointsFromXNormalPlane(2*D, 0.0, 0.0, L_y, L_z, (uint)L_y/dx, (uint)L_z/dx);
timeseriesProbe->addStatistic(Statistic::Instantaneous);
para->addProbe( timeseriesProbe );
SPtr<PlaneProbe> planeProbe = std::make_shared<PlaneProbe>("planeProbe", para->getOutputPath(), 100, 500, 100, 100);
planeProbe->setProbePlane(5*reference_diameter, 0, 0, dx, L_y, L_z);
planeProbe->addStatistic(Statistic::Means);
para->addProbe( planeProbe );
auto cudaMemoryManager = std::make_shared<CudaMemoryManager>(para);
......
......@@ -40,13 +40,15 @@ namespace probes
uint,
uint,
uint,
uint>(),
uint,
bool>(),
py::arg("probe_name"),
py::arg("output_path"),
py::arg("t_start_avg"),
py::arg("t_avg"),
py::arg("t_start_out"),
py::arg("t_out"))
py::arg("t_out"),
py::arg("output_timeseries"))
.def("add_probe_points_from_list", &PointProbe::addProbePointsFromList, py::arg("point_coords_x"), py::arg("point_coords_y"), py::arg("point_coords_z"))
.def("add_probe_points_from_x_normal_plane", &PointProbe::addProbePointsFromXNormalPlane, py::arg("pos_x"), py::arg("pos0_y"), py::arg("pos0_z"), py::arg("pos1_y"), py::arg("pos1_z"), py::arg("n_y"), py::arg("n_z"));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment