a concise code provides building blocks for finite volume method