Engineering material microstructure is the key to developing advanced materials with enhanced mechanical properties required for advanced applications. At the same time, conventional mechanics modeling finds it challenging in the context of high-throughput material design, wherein it needs to predict the microstructure effects on material response as efficiently as possible. In this talk, we present a machine-learning method of finite-element-based physics-informed neural networks suitable for surrogate modeling to solve boundary value problems. We design the architecture of convolution neural networks with a custom convolution operation called stencil convolution, which leverages the inverse isoperimetric map of the finite element method. Secondly, we develop a custom PyTorch class that uses finite element software ABAQUS to compute physics loss and gradients for backpropagation. The resulting framework has great potential to train neural networks with varying geometry, boundary conditions, and material properties. We will present the method’s performance in several training and testing scenarios with linear boundary value problems for varying boundary conditions and material properties. We will discuss its extension to the non-linear boundary value problems.