./install docin your TNL directory, it will create the documentation localy on your system. You may find it in Documentation/html folder then.
getRefinedMeshfunction and the
EntityRefinerclass: https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Meshes/Geometry/getRefinedMesh.h https://mmg-gitlab.fjfi.cvut.cz/gitlab/tnl/tnl-dev/-/blob/develop/src/TNL/Meshes/Geometry/EntityRefiner.h
Meshclass itself is static, so the modifications need to go through the mesh initialization process, which will be the bottleneck. It can be optimized by using a minimal mesh config to avoid unnecessary data and initialization steps, though.
MatrixViewa s a
Matrixto the linear solver? For example
using Solver = GMRES< SparseMatrixView< .. >>. The
std::shared_pointer< SparseMatrixView >.
setMatrixfunction manually whenever views to the matrix get invalidated. This happens upon reallocation, especially when matrix size or row capacities change. The approach suggested by Tomáš should work, but of course you need to ensure that the view wrapped by the shared pointer is always valid when the solver is used.
Hello! I've encountered weird behavior when moving TNL meshes. My code would crash if I attempted to move-construct a mesh from another non-empty mesh and then move data back into the original variable. So, something like this:
TNL::Meshes::Mesh<MeshConfig> m1; // ... // Initialize m1 // ... auto m2(std::move(m1)); m1 = std::move(m2); // This line will throw an "Attempted to move data to a nullptr" exception // if m1 was initialized with some data, and will not if m1 was originally empty
This will not happen if I pre-declared m2, like this:
TNL::Meshes::Mesh<MeshConfig> m1, m2; // Initialize m1 m2 = std::move(m1); m1 = std::move(m2); // It's ok now
Here's the gist with an example code for this issue: https://gist.github.com/GregTheMadMonk/7b14a538a3a0e147f9ba5510d4831be4.
Is it a bug, or am I doing something that I'm not supposed to do?