Generic Strategies To Implement Material Grading In Finite Element Methods For Isotropic And Anisotropic Materials