Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit c78ffe16 authored by Sadr Mohsen's avatar Sadr Mohsen
Browse files

update bounds

parent 5d398cf2
No related branches found
No related tags found
1 merge request!17Flat top
...@@ -91,12 +91,24 @@ if(NOT IPPL_VERSION) ...@@ -91,12 +91,24 @@ if(NOT IPPL_VERSION)
set(IPPL_VERSION "3.2.0") set(IPPL_VERSION "3.2.0")
message(STATUS "Defaulting to IPPL-${IPPL_VERSION}") message(STATUS "Defaulting to IPPL-${IPPL_VERSION}")
endif() endif()
FetchContent_Declare(ippl
#URL https://github.com/IPPL-framework/ippl/archive/refs/tags/IPPL-${IPPL_VERSION}.tar.gz set(IPPL_GIT_TAG "" CACHE STRING "Optional branch or tag for IPPL")
GIT_REPOSITORY https://github.com/IPPL-framework/ippl.git #URL https://github.com/IPPL-framework/ippl/archive/refs/tags/IPPL-${IPPL_VERSION}.tar.gz
GIT_SHALLOW True if(IPPL_GIT_TAG)
DOWNLOAD_EXTRACT_TIMESTAMP True FetchContent_Declare(ippl
) GIT_REPOSITORY https://github.com/IPPL-framework/ippl.git
GIT_TAG ${IPPL_GIT_TAG}
GIT_SHALLOW True
DOWNLOAD_EXTRACT_TIMESTAMP True
)
else()
FetchContent_Declare(ippl
GIT_REPOSITORY https://github.com/IPPL-framework/ippl.git
GIT_SHALLOW True
DOWNLOAD_EXTRACT_TIMESTAMP True
)
endif()
FetchContent_MakeAvailable(ippl) FetchContent_MakeAvailable(ippl)
include_directories("${IPPL_SOURCE_DIR}/src") include_directories("${IPPL_SOURCE_DIR}/src")
......
...@@ -134,35 +134,18 @@ public: ...@@ -134,35 +134,18 @@ public:
auto& mesh = fc_m->getMesh(); auto& mesh = fc_m->getMesh();
auto& FL = fc_m->getFL(); auto& FL = fc_m->getFL();
hr = (rmax_m-rmin_m) / nr; hr = (rmax_m-rmin_m) / nr;
mesh.setMeshSpacing(hr); mesh.setMeshSpacing(hr);
mesh.setOrigin(rmin_m); mesh.setOrigin(rmin_m);
pc_m->getLayout().updateLayout(FL, mesh);
ippl::detail::RegionLayout<double, 3, Mesh_t<Dim>> rlayout; ippl::detail::RegionLayout<double, 3, Mesh_t<Dim>> rlayout;
rlayout = ippl::detail::RegionLayout<double, 3, Mesh_t<Dim>>(FL, mesh); rlayout = ippl::detail::RegionLayout<double, 3, Mesh_t<Dim>>(FL, mesh);
sampling_t samplingN(dist, normRmax_m, normRmin_m, rlayout, numberOfParticles);
sampling_t samplingR(dist, normRmax_m, normRmin_m, rlayout, numberOfParticles); size_type nlocal = samplingN.getLocalSamplesNum();
size_type nlocal = samplingR.getLocalSamplesNum();
pc_m->create(nlocal); pc_m->create(nlocal);
samplingR.generate(Rview, rand_pool64); samplingN.generate(Rview, rand_pool64);
auto meshP = fc_m->getMesh();
auto FLP = fc_m->getFL();
hp = (pmax_m-pmin_m) / nr;
meshP.setMeshSpacing(hp);
meshP.setOrigin(pmin_m);
ippl::detail::RegionLayout<double, 3, Mesh_t<Dim>> playout;
playout = ippl::detail::RegionLayout<double, 3, Mesh_t<Dim>>(FLP, meshP);
sampling_t samplingP(dist, normPmax_m, normPmin_m, playout, numberOfParticles); samplingN.updateBounds(normPmax_m, normPmin_m);
//samplingP.setLocalSamplesNum( nlocal ); samplingN.generate(Pview, rand_pool64);
samplingP.generate(Pview, rand_pool64);
Matrix_t L; Matrix_t L;
for (unsigned i = 0; i < 6; ++i){ for (unsigned i = 0; i < 6; ++i){
......
...@@ -299,14 +299,16 @@ void TrackRun::execute() { ...@@ -299,14 +299,16 @@ void TrackRun::execute() {
// deltaP = Util::convertMomentumEVoverCToBetaGamma(deltaP, beam->getM()); // deltaP = Util::convertMomentumEVoverCToBetaGamma(deltaP, beam->getM());
//} //}
long number_of_processors = sysconf(_SC_NPROCESSORS_ONLN); if (ippl::Comm->rank() == 0) {
std::cout << "number_of_processors " << number_of_processors << std::endl; long number_of_processors = sysconf(_SC_NPROCESSORS_ONLN);
*gmsg << "number_of_processors " << number_of_processors << endl;
std::cout << "omp_get_max_threads() " << omp_get_max_threads() << std::endl; // *gmsg << "omp_get_max_threads() " << omp_get_max_threads() << endl;
int world_size; int world_size;
MPI_Comm_size( MPI_COMM_WORLD, &world_size ); MPI_Comm_size( MPI_COMM_WORLD, &world_size );
std::cout<< "MPI_Comm_size " << world_size << std::endl; *gmsg << "MPI_Comm_size " << world_size << endl;
}
static IpplTimings::TimerRef samplingTime = IpplTimings::getTimer("samplingTime"); static IpplTimings::TimerRef samplingTime = IpplTimings::getTimer("samplingTime");
IpplTimings::startTimer(samplingTime); IpplTimings::startTimer(samplingTime);
......
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