Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swapnil/eos table #99

Merged
merged 104 commits into from
Sep 27, 2024
Merged

Swapnil/eos table #99

merged 104 commits into from
Sep 27, 2024

Conversation

shankar-1729
Copy link
Collaborator

Merge the EOS table branch with the development branch.

Sherwood Richers and others added 30 commits January 17, 2024 20:40
…ipt in anticipation of changing them based on opacities. Set Vphase to not evolve in time.
…ro meaning its time derivative its zero after it is used in collision term
…even if max_adaptive_speedup>1 is not satisfy
shankar-1729 and others added 22 commits June 17, 2024 13:39
…wapnil/eos_table

Jenkins changes by Sherwood
…/eos_table

Fix initial huge memory allocation issue
…U-arrays and sets them to corresponding MultiFabs
The function does either outer_boundary or inner_boundary depending on which template parameter is true and which is false
We set (x,y,z) coordinates face-centered based on direction, and also set Vphase based on direction.
…conflicts resolution

The merge conflict for Source/Evolve.cpp needs to be fixed. WARNING: code won't compile in the current state.
The conflict occurred in the assignment of opacities into the opacity matrices.
…on with the electron neutrino and antineutrino values interpolated from the equation of state table.
…5_CUDA

Use of NUM_FLAVORS = 3 currently fails
…stability and Collisions to equilibrium test

Resolve merge conflict in sample_inputs/inputs_coll_equi_test
@erickurquilla1999 erickurquilla1999 merged commit cdab6c5 into development Sep 27, 2024
2 checks passed
@erickurquilla1999 erickurquilla1999 deleted the swapnil/eos_table branch September 27, 2024 18:50
//printf("(Evolve.cpp) number of particles: np = %d \n", np);
FlavoredNeutrinoContainer::ParticleType* pstruct = &(pti.GetArrayOfStructs()[0]);

amrex::ParallelFor (np, [=] AMREX_GPU_DEVICE (int i) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loop looks like it does nothing. Should we remove it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have cleaned this loop and commented it out. But I would like to keep the commented code since it can be used for printing values for each particle in case particle debug is needed in the future.

EOS_tabulated_obj.get_mue_muhat(rho, temperature, Ye, mue_out, muhat_out, keyerr, anyerr);
if (anyerr) assert(0); //If there is an error in interpolation call, stop execution.

//#define DEBUG_INTERPOLATION_TABLES
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we certain the tables interpolate correctly now? Should we remove this debug output?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would keep it. It is not being compiled, so it won't affect the performance in any way. The debug output can be enabled by uncommenting //#define DEBUG_INTERPOLATION_TABLES, which can be very useful when debugging later on. But let me know if you would like this to be removed.

@@ -290,6 +290,7 @@ InitParticles(const TestParams* parms)

if(parms->IMFP_method == 1){
p.rdata(PIdx::Vphase) = dx[0]*dx[1]*dx[2]*4*MathConst::pi*(pow(p.rdata(PIdx::pupt)+parms->delta_E/2,3)-pow(p.rdata(PIdx::pupt)-parms->delta_E/2,3))/(3*ndirs_per_loc*parms->nppc[0]*parms->nppc[1]*parms->nppc[2]);
//printf("(Inside FlavoredNeutrinoContainerInit.cpp) Vphase = %g \n", p.rdata(PIdx::Vphase));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be removed

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

const auto lo = amrex::lbound(tile_box);
const auto hi = amrex::ubound(tile_box);

//printf("tile_box = [%d, %d, %d] x [%d, %d, %d] \n", lo.x, lo.y, lo.z, hi.x, hi.y, hi.z);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging lines

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

}

if (!create_particle_this_cell) continue;
//printf("CREATE PARTRICLE AT: i = %d, j = %d, k = %d \n", i, j, k);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!


//TODO:
int my_reader_process = 0; //reader_process;
/*if (my_reader_process < 0 || my_reader_process >= CCTK_nProcs(cctkGH))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

for(int k = 0; k<nye_;k++)
for(int j = 0; j<ntemp_; j++)
for(int i = 0; i<nrho_; i++) {
//int indold = i + nrho_*(j + ntemp_*(k + nye_*iv));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

myManagedArena.deallocate(energy_top, ngroup_);
//----------------------------------------------------------------------------------------------

// convert any other quantities to log.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@@ -72,24 +107,48 @@ void evolve_flavor(const TestParams* parms)
const IntVect ngrow(1 + (1+shape_factor_order_vec)/2);
for(int i=0; i<AMREX_SPACEDIM; i++) AMREX_ASSERT(parms->ncell[i] >= ngrow[i]);

//printf("ngrow = [%d, %d, %d] \n", ngrow[0], ngrow[1], ngrow[2]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Vector<int> domain_lo_bc_types(AMREX_SPACEDIM, BCType::int_dir);
Vector<int> domain_hi_bc_types(AMREX_SPACEDIM, BCType::int_dir);
//Vector<int> domain_lo_bc_types(AMREX_SPACEDIM, BCType::foextrap);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove debugging comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants