chaos-polymtl / lethe

Repository for the open-source lethe CFD/DEM/CFD-DEM project
https://chaos-polymtl.github.io/lethe/index.html
Apache License 2.0
271 stars 60 forks source link

Refactor entry string to tensor functions #1186

Closed AmishgaAlphonius closed 3 months ago

AmishgaAlphonius commented 3 months ago

Description

The entry_string_to_tensor functions were duplicated; they were in utilities.h and parameters.h. In one case it was templated with spacedim and the other not. This PR merges both uses of the same function in utilities.h. Since these are small functions, they were inlined. Hence, they don't have any explicit instantiation.

While doing this, redundant if conditions were noticed in the manifolds.cc, these were replaced by for loops.

Checklist (will be removed when merged)

See this page for more information about the pull request process.

Code related list:

Pull request related list: