added block definition and block sum methods in linalg

@karlnapf Please have a look! This follows from the proposal in #2225.