In order to close the question, I add this answer:
Finally I solved the problem by creating a self-made container based on arrays. Initially it was based on vectors, but I preferred to go to arrays by determining the number of dimensions and the maximum size. In this case, I think tis approach is better than using boost multi_array since my container is actually a flat array and the element indexing is generalized by mathematical operations.
Thank you for your replies.