Quaternionic functions and their applications in mechanics of continua