lanl / dfnWorks

dfnWorks is a parallelized computational suite to generate three-dimensional discrete fracture networks (DFN) and simulate flow and transport. If you download the software please fill out our interest form to stay up to date on releases https://goo.gl/forms/VE39oKsyp4LVC6Gj2 and join our google group https://groups.google.com/d/forum/dfnworks-users . Precompiled Docker Container https://hub.docker.com/r/ees16/dfnworks
https://dfnworks.lanl.gov/
Other
75 stars 45 forks source link

Fix a couple of build/install issues #17

Closed cgcgcg closed 2 years ago

cgcgcg commented 2 years ago
cgcgcg commented 2 years ago

@hymanjd Can you point me to where it is used?

hymanjd commented 2 years ago

It's used in every function in TrackingParticle.c. void SearchNeighborCells, int InsideCell (unsigned int numc), void PredictorStep(), void NeighborCells (int k), int CheckDistance(), double InOutFlowCell(int indcell, int int1, double nposx, double nposy), etc. In principle, you should be able to add np as an argument to all of these functions.

We had a postdoc fix this for an openMP version of the code, which is still in testing, and it took him a while to get it working as a local variable, which was necessary for openMP to work.

However, a better approach is to make the particle an object with np (particle number) as an attribute and many of these functions being attached to the class, which is the direction we're heading with the C++ version.

cgcgcg commented 2 years ago

Ok, so it really should be a global variable then if I want to avoid a major refactor. I updated the PR accordingly, this compiles and should be equivalent.

hymanjd commented 2 years ago

Thanks. I'll run this through some tests to confirm and then merge.