protobuf code for serializing phase field as matrix. Concept test