Topology optimization implementation has had considerable bottlenecks, with became more critical with increasing problem size, particularly when moving to 3D shapes. This PR implements a number of optimizations in the code and example 8 (homogenized level set topology optimization). I am currently able to get 75% reduction of computational cost on this example with reference to the implementation from a couple of months ago.
modifications to homogenized level set, mesh field function and derived classes to allow for storing of sensitivity data for multiple variables at a time. This is to help with efficiency enhancements in large-scale topology optimization solves by minimizing interprocess communication.
added a method in assembly_base to compute a portion of adjoint sensitivity with significantly reduced communication cost and higher efficiency.
modifications in example 8 (homogenized level-set topology optimization) to take advantage of these enhancements .
Added new method in filter_base to use only nonzero values in the input vector and to provide output in a serialized vector. This helps in significantly reducing the bottleneck to compute the filtered values of level-set function.
Modified topology optimization examples 5, 6, 8 to use this modification.
Topology optimization implementation has had considerable bottlenecks, with became more critical with increasing problem size, particularly when moving to 3D shapes. This PR implements a number of optimizations in the code and example 8 (homogenized level set topology optimization). I am currently able to get 75% reduction of computational cost on this example with reference to the implementation from a couple of months ago.