encapsulate it to C++ class
heat and head_2d