## 4 Conclusions  
This study explored the problem of constructing one-dimensional computational grids using two approaches: the traditional numerical method and PINNs. The primary goal was to compare the accuracy, adaptability, and efficiency of these methods in solving the diffusion equation, which is used for adaptive grid generation. Testing was conducted with various control function parameters, allowing for a detailed analysis of the influence of \(\alpha\) and \(\epsilon\) on the node distribution and the quality of the resulting computational grids. The results of the numerical method demonstrated high accuracy in defining the grid structure, especially for small values of the parameter \(\epsilon\), which promoted more pronounced node clustering in regions requiring a detailed analysis. However, this method necessitated an explicit discrete solution of the equation, leading to increased computational costs, particularly as problem complexity grew. Additionally, the grid generated by the numerical method exhibited significant variations in the step size between nodes, which may require additional smoothing. Conversely, the PINN method demonstrated a smoother node distribution, minimizing abrupt changes in the step size between neighboring points. The use of automatic differentiation in PyTorch enabled the seamless integration of the diffusion equation into the loss function, allowing the neural network model to learn while respecting physical constraints. Testing revealed that the PINN model was capable of adapting to different control function parameters; however, in some cases, deviations from the numerical solution were observed, particularly in regions with sharp gradients. The convergence speed of the PINN model depends on optimization parameters and problem complexity. In some tests, a significantly higher number of iterations was required to achieve the desired accuracy, highlighting the need for the careful selection of optimal network hyperparameters. Additionally, an analysis of loss function graphs indicated that, as the number of control points increased, the training process became more complex, and the improvement in approximation accuracy was not uniform. Additionally, this work investigated the implementation of hard boundary condition enforcement within the PINN framework using an embedded smooth mask function \(\phi(x)\). Unlike traditional penalty-based approaches, this method ensures exact boundary values through architectural constraints, eliminating the need for loss weight tuning. Numerical tests confirmed that the use of this masking technique resulted in machine-precision boundary satisfaction, while the conventional loss-based approach led to notable deviations at the interval ends. This architectural enhancement improves physical consistency and can be especially beneficial for problems requiring strict boundary alignment. Thus, the results of this study demonstrate that the PINN method can be used for adaptive computational grid generation, providing a smooth node distribution and flexible grid density adjustment. However, achieving high accuracy requires the careful selection of model parameters and the loss function. The numerical method remains a reliable tool for precise adaptive grid construction, especially in problems with sharp density variations. In the future, a hybrid approach combining the accuracy of the numerical method with the adaptability and generalization capabilities of neural network models could be developed. Conceptualization, O.T. and M.M. ; methodology, M.M. and O.T. ; software, M.M. and O.T. ; validation, O.T., M.M. and D.A.-Z. ; formal analysis, O.T. ; investigation, M.M. and O.T. ; resources, O.T. ; data curation, M.M. ; writing--original draft preparation, M.M. ; writing--review and editing, O.T. and D.A.-Z. ; visualization, M.M. ; supervision, O.T. and D.A.-Z. ; project administration, O.T. ; funding acquisition, D.A.-Z. All authors have read and agreed to the published version of the manuscript.