Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating AbstractMesh_Class This work is related to reducing the code in Mesh_Class and putting it to AbstractMesh_Class. Also, we are making InitiateNodeElements routine faster. --- <details open="true"><summary>Generated summary (powered by <a href="https://app.graphite.dev">Graphite</a>)</summary> > ## TL;DR > This pull request introduces a change in the `AbstractMesh_Class@NodeDataMethods.F90` file. The change involves the addition of a new variable `nodewise_size` and a new parameter `chunk_size`. The `Append` method has been replaced with the `Expand` method to improve the efficiency of the code. > > ## What changed > The `obj_InitiateNodeToElements` method in the `AbstractMesh_Class@NodeDataMethods.F90` file has been modified. A new variable `nodewise_size` has been introduced to keep track of the size of each node. A new parameter `chunk_size` has been introduced to control the size of chunks when expanding the `nodeData%globalElements` vector. The `Append` method, which was previously used to add elements to the `nodeData%globalElements` vector, has been replaced with the `Expand` method. This change is expected to improve the efficiency of the code by reducing the number of memory reallocations. > > ## How to test > To test this change, you can run the existing unit tests in the `AbstractMesh` module. If the tests pass, it means that the change has not broken any existing functionality. To test the efficiency improvement, you can run a performance benchmark that measures the time taken to execute the `obj_InitiateNodeToElements` method. > > ## Why make this change > This change is made to improve the efficiency of the `obj_InitiateNodeToElements` method. The `Append` method, which was previously used to add elements to the `nodeData%globalElements` vector, can be inefficient because it may cause multiple memory reallocations. By replacing it with the `Expand` method and controlling the size of chunks with the `chunk_size` parameter, we can reduce the number of memory reallocations and thus improve the efficiency of the code. </details>
- Loading branch information