Method for solving second order elliptic partial differential equation by combining neural network and finite element method
By employing a hybrid iterative method combining neural networks and the finite element method, and utilizing pre-trained neural operators to correct errors, the high cost and low accuracy issues caused by the need for manually constructing multiple meshes in existing technologies are resolved, achieving efficient and accurate solutions to second-order elliptic partial differential equations.
Patent Information
- Application Number
- CN202511086596.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-04
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2045-08-04
AI Technical Summary
Existing technologies require the artificial construction of multiple meshes to accelerate iterations when solving second-order elliptic partial differential equations, resulting in high computational costs and low solution accuracy.
A hybrid iterative method combining neural networks and the finite element method is adopted. By correcting errors through pre-trained neural operators, a hybrid iterative method is formed to accelerate convergence and reduce dependence on multigrids.
It significantly improves the efficiency of iterative solutions, reduces computation time and resource consumption, and improves solution accuracy, especially in large-scale problems.
Smart Images

Figure CN120578850B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of numerical analysis, in particular to a method for solving a second-order elliptic partial differential equation by combining a neural network and a finite element method. BACKGROUND
[0002] Many engineering calculation problems are modeled based on a second-order elliptic partial differential equation, and the finite element method is one of the most important numerical methods for solving the second-order elliptic partial differential equation and is widely used in research and development of various engineering technologies.
[0003] When the finite element method (direct method or iterative method) is used to process the second-order elliptic partial differential equation, a linear algebraic equation is usually obtained. When the size of the equation is large, the iterative method shows its advantages. However, due to the difficulty of the traditional iterative method in eliminating the error of the low frequency part, the convergence speed is extremely slow. Therefore, relevant personnel proposed a multi-grid algorithm to correct the low frequency error on a coarse grid and greatly improve the convergence speed. However, the cost is to manually construct a multi-grid, resulting in high user cost.
[0004] Therefore, there is an urgent need for a method for speeding up the iterative solution process of the second-order elliptic partial differential equation without constructing an additional grid. SUMMARY
[0005] The embodiments of the present application provide a method for solving a second-order elliptic partial differential equation by combining a neural network and a finite element method, to at least solve the technical problem that the related art requires manual construction of a multi-grid to accelerate iteration when solving a second-order elliptic partial differential equation, resulting in high calculation cost and low solution accuracy.
[0006] According to an aspect of the embodiments of the present application, a method for solving a second-order elliptic partial differential equation by combining a neural network and a finite element method is provided, including: step S1, obtaining first finite element unit information of a plurality of finite element units obtained by dividing a first object, first input parameter information of a second-order elliptic partial differential equation to be solved corresponding to the first object, and a first solution vector initialized as zero, and assembling a corresponding stiffness matrix and a load vector according to the first finite element unit information and the first input parameter information, wherein the first input parameter information at least includes equation parameters or coefficient functions, equation right end terms, and boundary conditions, and the first finite element unit information at least includes unit data of the plurality of finite element units and boundary conditions; step S2, inputting the first input parameter information obtained in step S1 into a pre-trained target neural operator to obtain a first solution network output by the target neural operator, wherein the first solution network is an approximation of a first solution corresponding to the first input parameter information expressed by a neural network, the target neural operator is used to reflect a mapping relationship between input parameter information of the second-order elliptic partial differential equation and a corresponding solution and is expressed by a neural network, the target neural operator is obtained by iteratively training an initial neural operator using a plurality of training samples, and the initial neural operator includes a plurality of neural networks; step S3, feeding forward and calculating an interpolation of the first solution network obtained in step S2 at discrete points on each finite element unit of the first object using the first finite element unit information obtained in step S1 to obtain a first modified solution vector; step S4, modifying the first solution vector of the second-order elliptic partial differential equation to be solved using the first modified solution vector obtained in step S3, including: when the current iteration round is a first iteration round, modifying the first solution vector initialized as zero using the first modified solution vector obtained in step S3; when the current iteration round is not the first iteration round, modifying the first solution vector obtained in a previous iteration round using the first modified solution vector obtained in step S3; step S5, iteratively processing the modified first solution vector obtained in step S4 using an iterative method; step S6, determining whether the iterated first solution vector obtained in step S5 satisfies a preset convergence condition, wherein if the preset convergence condition is satisfied, step S7 is performed, otherwise, step S8 is performed; step S7, outputting the iterated first solution vector; and step S8, determining a residual error vector according to the iterated first solution vector, the stiffness matrix, and the load vector obtained in step S1, mapping the residual error vector back to a residual error function, replacing the first input parameter information in step S2 with the obtained residual error function, and continuing to perform steps S2-S6.
[0007] Optionally, the training process of the target neural operator comprises: obtaining a plurality of sets of training samples, wherein each set of training samples comprises: second input parameter information of a second-order elliptic partial differential equation corresponding to a second object and a corresponding second solution, and the type of the second solution comprises one of: a second analytical solution, a second solution vector or a second solution network; constructing a neural operator, wherein the network types of a plurality of neural networks in the neural operator comprise at least one of: a convolutional neural network, a graph neural network, and a multi-layer perception; and iteratively training the neural operator using the plurality of sets of training samples to obtain the target neural operator.
[0008] Optionally, obtaining a plurality of sets of training samples comprises: obtaining state information of a plurality of second objects respectively; traversing each second object to perform the following steps: determining second finite element unit information and second input parameter information for dividing the second object based on the state information of the second object, wherein the second finite element unit information at least comprises: element data of a plurality of finite element units and boundary conditions, and the second input parameter information at least comprises: equation parameters or coefficient functions, equation right-hand terms, and boundary conditions, and the element data comprises at least one of: element shape, element node coordinates, element quantity, and element dimension, and the boundary conditions comprise at least one of: geometric information and numerical information of a homogeneous boundary condition or a non-homogeneous boundary condition; processing the boundary conditions of each finite element unit obtained by dividing the second object according to the type of the boundary conditions to obtain a second-order elliptic partial differential equation; constructing an element matrix and an element load vector according to the element data and material data of each finite element unit, and adjusting the element matrix and the element load vector according to the boundary conditions of each finite element unit; assembling the adjusted element matrix and the adjusted element load vector of each finite element unit to obtain a global matrix and a global load vector of the second object; constructing a second linear algebraic equation corresponding to the second-order elliptic partial differential equation of the second object based on the global matrix and the global load vector, and solving the second linear algebraic equation to obtain a corresponding second solution; and the plurality of sets of training samples are composed of the second input parameter information of the second-order elliptic partial differential equation corresponding to the plurality of second objects respectively and the corresponding second solutions.
[0009] Optionally, the plurality of neural networks comprise a plurality of branch networks and a trunk network, wherein iteratively training an initial neural operator using a plurality of sets of training samples to obtain a target neural operator comprises: in each round of iterative training, analyzing the second input parameter information in the training samples using each branch network in the neural operator to obtain feature vectors output by each branch network, and integrating each feature vector output by each branch network with the trunk network in the neural operator to calculate a predicted interpolation at each decoding discrete sampling point; and constructing a target loss function according to the following formula based on the decoding discrete sampling points and the second solution in the training samples:
[0010] ,
[0011] wherein denotes the total number of training samples, denotes the total number of decoded discrete sampling points in the solution domain of the second object, denotes the group of training samples, denotes the equation parameter or coefficient function in the second input parameter information in the group of training samples, denotes the input dimension of the group of branch networks, denotes the value of the group of encoded discrete sampling points, denotes the group of branch networks, denotes the network parameter of the group of branch networks, denotes the feature vector output by the denotes the backbone network, denotes the network parameter of the backbone network, denotes the value of the backbone network at each decoded discrete sampling point in the solution domain, denotes the operation of summing all components of the vector; denotes the component-wise multiplication, denotes the target loss function, and , denotes the value of the second solution at each decoded discrete sampling point in the solution domain in the group of training samples; the network parameters of each neural network in the neural operator are adjusted according to the target loss function to obtain a target neural operator.
[0012] Optionally, the second input parameter information in the training samples is analyzed by using each branch network in the neural operator to obtain a feature vector output by each branch network, including: determining the parameter type of the second input parameter information in the training samples, wherein the parameter type includes at least one of the following: an analytical expression, a discrete form corresponding to a finite element unit; in the case where the parameter type of the second input parameter information is an analytical expression, directly calculating the value of the analytical expression at the encoded discrete sampling points; in the case where the parameter type of the second input parameter information is a discrete form corresponding to a finite element unit, determining the element node coordinates of each finite element unit of the second object and the position information of each encoded discrete sampling point in the solution domain of the second object; determining the distance between each encoded discrete sampling point and the finite element unit node to obtain a corresponding distance matrix; determining the index of the finite element unit node corresponding to the minimum distance in each row of the distance matrix; determining the interpolation of the second input parameter at the encoded discrete sampling points as the basis function value corresponding to each index.
[0013] Optionally, the type of each discrete sampling point in the solving region of the second object comprises an encoded discrete sampling point or a decoded discrete sampling point, and the determining process of the discrete sampling points comprises: in the case that the solving region of the second object is a regular region, determining a plurality of discrete sampling points by using a preset probability distribution rule; in the case that the solving region of the second object is an irregular region, determining a regular region to which the solving region belongs, determining a plurality of discrete sampling points in the regular region by using a preset probability distribution rule, and eliminating discrete sampling points in other regions except the solving region of the second object in the plurality of discrete sampling points.
[0014] Optionally, the residual vector is mapped back to the residual function, and the first input parameter information in step S2 is replaced by the obtained residual function, and the subsequent steps S2-S6 are continued to be executed, including: in the case that the boundary condition does not include the non-homogeneous boundary condition, the residual vector is mapped back to the residual function according to the following formula: , and the right end item in the first input parameter information in step S2 is replaced by the residual function, and the above steps S2-S6 are continued to be executed; in the case that the boundary condition includes the non-homogeneous boundary condition, the residual vector is mapped back to the residual function according to the following formula: , while keeping the coefficients of the boundary finite element unit unchanged, to obtain a residual boundary condition, and the right end item and the boundary condition in the first input parameter information in step S2 are replaced by the residual function and the residual boundary condition, and the above steps S2-S6 are continued to be executed, and the right end item and the boundary condition are input into the same branch network in step S2; wherein, represents the residual vector, represents the basis function corresponding to each finite element unit, represents the product of the basis function corresponding to each finite element unit.
[0015] According to another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a stored computer program, wherein the computer program is executed by a processor to implement the above-mentioned method for solving a second-order elliptic partial differential equation by using a neural network and a finite element method.
[0016] According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, which comprises a stored computer program, wherein a device in which the non-volatile storage medium is located executes the above-mentioned method for solving a second-order elliptic partial differential equation by using a neural network and a finite element method by running the computer program.
[0017] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-mentioned method for solving a second-order elliptic partial differential equation by using a neural network and a finite element method through the computer program.
[0018] In the embodiments of the present application, in the process of solving a second-order elliptic partial differential equation by using a traditional finite element method and an iterative method, a neural operator is added to correct errors, forming a hybrid iterative method, so as to ensure the convergence of iteration and greatly improve the efficiency of overall iterative solution, which is particularly obvious in the solution of large-scale problems, can greatly reduce the calculation time and resource consumption, and further solves the technical problems of high calculation cost and low solution accuracy caused by manually constructing a multi-grid to accelerate iteration when solving a second-order elliptic partial differential equation in the related art. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are included to provide a further understanding of the present application, form a part of the present application and illustrate the illustrative embodiments of the present application and the explanation of the present application, and do not constitute improper limitations on the present application. In the drawings:
[0020] Figure 1 is a flowchart of an optional method for solving a second-order elliptic partial differential equation by using a neural network and a finite element method according to an embodiment of the present application;
[0021] Figure 2 is a schematic diagram of an optional neural operator according to an embodiment of the present application;
[0022] Figure 3 is a schematic diagram of an optional thermal conductivity distribution of a concrete material according to an embodiment of the present application;
[0023] Figure 4 is a schematic diagram of an optional temperature distribution of a heat source on a plate surface according to an embodiment of the present application;
[0024] Figure 5 is a schematic diagram of an optional boundary temperature distribution of a square concrete thin plate according to an embodiment of the present application;
[0025] Figure 6 is a schematic diagram of an optional grid model obtained by dividing a square concrete thin plate according to an embodiment of the present application;
[0026] Figure 7a is a temperature field cloud diagram obtained by using a finite element method (direct method) according to an embodiment of the present application;
[0027] Figure 7b is a temperature field cloud chart calculated by using a hybrid iterative method according to an embodiment of the present application;
[0028] Figure 7c is a temperature field cloud chart calculated by using a traditional iterative method according to an embodiment of the present application;
[0029] Figure 8 is an error convergence curve diagram of a hybrid iterative method and a traditional iterative method according to an embodiment of the present application;
[0030] Figure 9 is a structural schematic diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative labor should fall within the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or finite elements does not have to be limited to only those steps or finite elements clearly listed, but can include other steps or finite elements that are not clearly listed or inherent to the process, method, product, or device.
[0033] In addition, the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties. For example, an interface is provided between the system and the relevant user or institution. Before obtaining the relevant information, the interface needs to send a request for obtaining to the aforementioned user or institution, and after receiving the consent information fed back by the aforementioned user or institution, the relevant information is obtained.
[0034] In order to better understand the embodiments of the present application, the technical terms involved in the embodiments of the present application are explained as follows:
[0035] Cartesian Product: refers to the direct product of two sets X and Y in mathematics, that is, X*Y.
[0036] Iterative Method: Iteration is a mathematical process of solving problems by finding a series of approximate solutions from an initial estimate, and the algorithm used to achieve the mathematical process of solving problems by finding a series of approximate solutions from an initial estimate is collectively referred to as, such as Richardson, Jacobi, Gauss-Seidel, etc.
[0037] Embodiment 1
[0038] According to an embodiment of the present application, an embodiment of a method for solving a second-order elliptic partial differential equation by combining a neural network and a finite element method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0039] Figure 1 is a flowchart of an optional method for solving a second-order elliptic partial differential equation by combining a neural network and a finite element method according to an embodiment of the present application, as shown in Figure 1 The method is applied to a CPU (Central Processing Unit) and a GPU (Graphics Processing Unit), wherein neural network related calculations are completed in the GPU, and the rest are completed in the CPU. Specifically, the method includes at least steps S1-S8, wherein:
[0040] Step S1: obtaining first finite element unit information of a plurality of finite element units obtained by dividing a first object, first input parameter information of a second-order elliptic partial differential equation to be solved corresponding to the first object, and a first solution vector initialized to zero, and assembling a corresponding stiffness matrix and a load vector according to the first finite element unit information and the first input parameter information.
[0041] In the technical solution provided in step S1, the first object can be an object to be analyzed in the field of solid mechanics, fluid mechanics, thermodynamics, electric field analysis, etc., and the second-order elliptic partial differential equation to be solved corresponding to the first object can be a mathematical model established according to the physical properties (such as elasticity, thermal conductivity, electrical conductivity, etc.) and boundary conditions (such as temperature, pressure, electric potential, etc.) of the first object, so as to convert the physical phenomenon into mathematical language and facilitate solving by numerical methods (such as the finite element method). Therefore, the types of the second-order elliptic partial differential equation to be solved include but are not limited to Laplace's equation, Poisson's equation, heat conduction equation, fluid mechanics equation, electrodynamic equation, etc.
[0042] Therefore, the first input parameter information of the second-order elliptic partial differential equation to be solved at least includes equation parameters or coefficient functions (such as analytical expressions, grid-based functions, etc.), equation right-hand terms (i.e., source terms), boundary conditions, etc., which can be denoted as: It should be noted that if represents the equation right-hand term, when the boundary condition is not the second boundary condition, then can be the Cartesian product of the equation right-hand term and the boundary condition.
[0043] In addition, when the equation scale is large, the iterative method can gradually correct the deviation of the solution, and approximate the exact solution through multiple iterations, thereby effectively handling the sparsity and locality of the equation. However, the traditional iterative method is difficult to eliminate the error of the low-frequency part, resulting in extremely slow convergence speed. Therefore, in order to accelerate the convergence speed of the iterative method, the first object (i.e., the object to be analyzed) can be divided into multiple finite element units by using the multi-grid method, and the first finite element unit information of each finite element unit is determined, which at least includes the unit data of the multiple finite element units and the boundary conditions. Through grid division, the low-frequency error can be corrected on the coarse grid, thereby greatly improving the convergence speed. Further, the second-order elliptic partial differential equation to be solved can be converted into a linear equation group by using the first finite element unit information and the first input parameter information, where A represents a d*d stiffness matrix, b represents a load vector, and x represents the first solution vector to be solved. Therefore, the first solution vector to be solved of the above-mentioned second-order elliptic partial differential equation and the number of iterations s can be initialized, and are denoted as , .
[0044] Step S2, input the first input parameter information obtained in step S1 into the pre-trained target neural operator to obtain a first solution network output by the target neural operator.
[0045] In the technical solution provided in step S2, the pre-trained target neural operator is called to analyze the first input parameter information to obtain a corresponding first solution network, and the first solution network is an approximation of the first (equation) solution of the to-be-solved second-order elliptic partial differential equation expressed by a neural network. Therefore, the target neural operator (NeuralOperator) is obtained by iteratively training an initial neural operator (containing multiple neural networks) using multiple training samples to learn a mapping relationship between input parameter information of the second-order elliptic partial differential equation and the corresponding (equation) solution expressed by a neural network.
[0046] Step S3, using the first finite element unit information obtained in step S1, feedforward calculation of the first solution network obtained in step S2 at the discrete point interpolation of each finite element unit of the first object to obtain a first modified solution vector.
[0047] In the technical solution provided in step S3, since the finite element method is used to solve the equation at a specific node, the output of the first solution network is given at a specific set of sampling points. Therefore, based on the first finite element unit information of each finite element unit obtained by dividing the first object, the interpolation of the first solution network at the (residual) solution vector corresponding node, i.e., the discrete point interpolation , can be calculated. Therefore, the expression of the discrete point interpolation can be written as:
[0048]
[0049] In the formula, u represents the first solution network output by the target neural operator.
[0050] Step S4, using the first modified solution vector obtained in step S3 to modify the first solution vector of the to-be-solved second-order elliptic partial differential equation.
[0051] In the technical solution provided in step S4, the obtained first modified solution vector is converted back to the CPU, and the first modified solution vector is used to modify the first solution vector of the to-be-solved second-order elliptic partial differential equation. Therefore, the modification process can include: when the current iteration round is the first iteration round (i.e., t is equal to 1), using the first modified solution vector obtained in step S3 to modify the first solution vector initialized to zero is modified, i.e. ; and when the current iteration round is not the first iteration round (i.e. t is greater than 1), the first modified solution vector obtained in step S3 is modified, i.e. . .
[0052] Step S5, the modified first solution vector obtained in step S4 is iteratively processed by using an iteration method.
[0053] Specifically, the modified first solution vector is iteratively processed by using a conventional iteration method, thus, the expression of the first solution vector obtained in each iteration round can be written as:
[0054] ,
[0055] wherein M represents a modification period, and s represents an iteration number.
[0056] Step S6, it is judged whether the iterated first solution vector obtained in step S5 satisfies a preset convergence condition.
[0057] That is, for the first solution vector obtained in each iteration round , it can also be judged whether the iterated first solution vector satisfies a preset convergence condition (such as the iteration number reaches a maximum iteration number, or the first solution vector tends to be stable). Wherein: if yes, step S7 is executed, otherwise, step S8 is executed.
[0058] Step S7, the iterated first solution vector is directly taken as the first solution vector of the second-order elliptic partial differential equation to be solved, and the first solution vector is outputted.
[0059] Step S8, a residual vector is determined according to the iterated first solution vector, the stiffness matrix and the load vector obtained in step S1, and the residual vector is mapped back to a residual function, the first input parameter information in step S2 is replaced by the obtained residual function, and the above steps S2-S5 are continuously executed.
[0060] In the technical scheme provided in step S8, the residual vector is determined according to the iterated first solution vector , the stiffness matrix A and the load vector b, i.e. ; and then the residual vector is transferred to the GPU, so as to map the residual vector back to the residual function, replace the first input parameter information in step S2 by the obtained residual function , and continuously execute the above steps S2-S6.
[0061] Based on the scheme defined in steps S1 to S8, it can be known that, in the embodiment, in the process of solving the second-order elliptic partial differential equation using the traditional finite element method and iterative method, the neural operator is added to correct the error, forming a hybrid iterative method, thereby ensuring the convergence of iteration and greatly improving the efficiency of the overall iterative solution, which is particularly obvious in the solution of large-scale problems, and can greatly reduce the calculation time and resource consumption. Thus, the technical problem of high calculation cost and low solution accuracy caused by manually constructing a multi-grid to accelerate iteration when solving a second-order elliptic partial differential equation in the related art is solved.
[0062] The above method of the embodiment will be further introduced below.
[0063] As an optional implementation, the training process of the target neural operator can be completed in advance on a GPU, and the GPU can train the target neural operator through the following steps, including:
[0064] Step S21, obtaining a plurality of sets of training samples.
[0065] Each set of training samples includes second input parameter information of a second-order elliptic partial differential equation corresponding to a second object and a corresponding second solution, and the type of the second solution includes one of the following: a second analytical solution, a second solution vector, or a second solution network.
[0066] Optionally, in the technical scheme provided in the above step S21, the method can include:
[0067] Step S211, obtaining state information of each of a plurality of second objects.
[0068] Step S212, traversing each of the second objects and performing the following steps:
[0069] First step: determining the second finite element unit information and the second input parameter information for dividing the second object based on the state information of the second object. The second finite element unit information at least includes: cell data of a plurality of finite element units, boundary conditions, and the second input parameter information at least includes: equation parameters or coefficient functions, equation right-hand terms, and boundary conditions. The cell data includes at least one of the following: cell shape, cell node coordinates, cell number, and cell dimension. The boundary conditions include at least one of the following: geometric information and numerical information of homogeneous boundary conditions or inhomogeneous boundary conditions.
[0070] Second step: processing the boundary conditions of each finite element unit obtained by dividing the second object according to the type of the boundary conditions to obtain a second-order elliptic partial differential equation.
[0071] Step 3: constructing element matrix and element load vector according to element data and material data of each finite element unit, and adjusting element matrix and element load vector according to boundary conditions of each finite element unit.
[0072] Step 4: assembling the adjusted element matrix and the adjusted element load vector of each finite element unit to obtain the global matrix and the global load vector of the second object.
[0073] Step 5: constructing the second linear algebraic equation corresponding to the second-order elliptic partial differential equation of the second object based on the global matrix and the global load vector, and solving the second linear algebraic equation to obtain the corresponding second (equation) solution.
[0074] Step S213, the second input parameter information of the second-order elliptic partial differential equation corresponding to each of the plurality of second objects and the corresponding second solution are used to form a plurality of training samples.
[0075] Step S22, constructing a neural operator.
[0076] Specifically, the plurality of neural networks in the neural operator include a plurality of branch networks and a trunk network, and specifically, Figure 2 is an optional neural operator according to an embodiment of the present application The schematic diagram of Figure 2 The network types of the neural networks contained in the neural operator include but are not limited to convolutional neural network (CNN), graph neural network (GNN), multilayer perceptron (MLP), etc.
[0077] Step S23, iteratively training the neural operator using the plurality of training samples to obtain a target neural operator.
[0078] Optionally, in the technical solution provided in the above step S23, the method can include:
[0079] Step S231, in each round of iterative training process, the second input parameter information in the training sample is analyzed by using each branch network in the neural operator to obtain the feature vector output by each branch network, and each feature vector output by each branch network is integrated with the trunk network in the neural operator to calculate the predicted interpolation at each decoding discrete sampling point.
[0080] The decoding discrete sampling points refer to converting the feature vectors (i.e., the feature representation in a high-dimensional space) output by each branch network back to the nodal solution on the finite element unit after the neural operator gives a predicted solution, wherein the decoding is used to map the solution predicted by the neural operator back to the finite element space, so as to be combined or corrected with the solution vector in the iterative solution process of the finite element method.
[0081] Therefore, a series of points can be randomly selected on the calculation domain (also referred to as the solution domain) of the finite element analysis as a plurality of discrete sampling points on the solution region of each second object (including the decoding discrete sampling points and the encoding discrete sampling points), wherein represents the solution region, and It should be noted that the discrete sampling points can be flexibly selected according to specific conditions, and it is not required to select the same position or number of points for each row of data.
[0082] Optionally, the embodiments of the present application preferably determine the discrete sampling points in the solution region of each second object in the following manner:
[0083] In the case where the solution region of the second object is divided by a grid, the cell coordinates of a plurality of finite element units obtained by dividing the solution region are directly selected as a plurality of discrete sampling points;
[0084] In the case where the solution region of the second object is a regular region (such as a rectangle, a cuboid, a disc, a sphere, etc.), a plurality of discrete sampling points are determined by using a preset probability distribution rule.
[0085] In the case where the solution region of the second object is an irregular region, a regular region to which the solution region belongs is determined, a plurality of discrete sampling points in the regular region are determined by using a preset probability distribution rule, and the discrete sampling points in other regions except the solution region of the second object in the plurality of discrete sampling points are removed.
[0086] Further, the plurality of groups of training samples obtained in step S21 are denoted as , represents the total number of training samples, represents the training sample, represents the second input parameter information in the training sample. Therefore, the input function at the discrete sampling points can be calculated to obtain the corresponding discrete coordinate values .
[0087] Regarding the calculation of the input function at the The value at a discrete sampling point, since the parameter type of each second input parameter information includes multiple types, such as an analytical expression, a discrete form corresponding to a finite element unit, etc., therefore, for each parameter type, the corresponding calculation method is different. Specifically, it is divided into the following cases:
[0088] Case one: the parameter type of the second input parameter information is an analytical expression.
[0089] In this case, the value of the analytical expression at the encoding discrete sampling point can be directly calculated. Among them, the encoding discrete sampling point refers to the original discrete sampling point information being converted or encoded into a higher level representation form in the training process of the neural operator, so that the neural network can learn and process more effectively. Among them, this encoding can be a step of data preprocessing, such as converting spatial coordinates into normalized form or combining multiple related discrete sampling point information into a more complex input vector through feature engineering.
[0090] Case two: the parameter type of the second input parameter information is a discrete form corresponding to a finite element unit.
[0091] In this case, the interpolation can be calculated by different interpolation methods, such as linear interpolation method, nearest neighbor interpolation method or higher order interpolation method, etc. For example, if the sampling nearest neighbor interpolation method is used to determine the feature vector output by each branch network, the specific steps can include the following steps:
[0092] First step: determine the element node coordinates of each finite element unit of the second object , the function value corresponding to each finite element unit , and the position information of each encoding discrete sampling point in the solution region of the second object .
[0093] Second step: determine the distance between each encoding discrete sampling point and the finite element unit node, and obtain the corresponding distance matrix D, wherein the dimension of the distance matrix D is q*d.
[0094] Third step: determine the index of the finite element unit node corresponding to the minimum distance in each row in the distance matrix , wherein .
[0095] Fourth step: determine the interpolation of the second input parameter at the function value corresponding to each index as the encoding discrete sampling point .
[0096] It should be noted that if the GPU memory is insufficient, the interpolation at the discrete sampling point can be calculated in batches. In addition, if the interpolation accuracy is high, linear (or higher order accuracy) interpolation can be performed based on the grid to improve the accuracy of the determined interpolation point.
[0097] Step S232: Based on the decoded discrete sampling points and the second solution within the training samples, construct the target loss function according to the following formula:
[0098]
[0099] In the formula This represents the total number of training samples. This represents the total number of decoded discrete sampling points within the solution region of the second object. Indicates the first The second input parameter information in the group training samples Equation parameters or coefficient functions Indicates the first The input dimension of each branch network, express exist The value of each encoded discrete sampling point Indicates the first A branch network, Indicates the first Network parameters of each branch network Indicates the first The feature vectors output by each branch network Indicates the backbone network. This represents the network parameters of the backbone network. This represents the value of the backbone network at each discrete decoding sampling point within the solution region. This represents the operation of summing all the components of a vector; This indicates that the components are multiplied positionally. Denotes the target loss function, and , Indicates the first The value of the second (equation) solution at each discrete sampling point in the solution region within the training samples. It is important to note the differences between each branch network. The input dimensions are respectively backbone network The input dimension is the physical space dimension (such as 1, 2 or 3), while the output dimension of the branch network and the backbone network are both the same size p.
[0100] Step S233: Optimize the target loss function by adjusting the network parameters of each neural network within the neural operator to obtain the target neural operator.
[0101] Specifically, the target loss function can be optimized by an optimization algorithm (such as gradient descent, stochastic gradient descent, Adam, RMSProp, etc.) to adjust the network parameters (such as learning rate, training step number, network size) of each neural network in the neural operator until the network parameters converge, and the trained target neural operator is obtained.
[0102] Further, in the actual inference process, the completed target neural operator can be directly called, and the input parameter information of the to-be-solved second-order elliptic partial differential equation is analyzed by using the target neural operator to obtain an approximate solution network for quickly predicting the solution of the equation, and the predicted solution can be expressed as:
[0103]
[0104] As an optional implementation, in the technical solution provided in the above step S7, the method can include:
[0105] In the case where the non-homogeneous boundary condition is not included in the boundary condition, the residual vector is mapped back to the residual function according to the following formula: ; then, the residual function is used to replace the right end term of the equation in the first input parameter information in step S2, and the above steps S2-S5 are continued to be executed.
[0106] In the case where the non-homogeneous boundary condition is included in the boundary condition, the residual vector of the internal node is mapped back to the residual function according to the following formula: , and at the same time, the coefficient of the boundary finite element unit is kept unchanged to obtain the residual boundary condition ; then, the residual function and the residual boundary condition are used to replace the right end term of the equation and the boundary condition in the first input parameter information in step S2, the above steps S2-S5 are continued to be executed, and the right end term of the equation and the boundary condition are input into the same branch network in step S2.
[0107] In the above two expressions of the residual function, represents the residual vector, represents the basis function corresponding to each finite element unit, represents the integral of the basis function corresponding to each finite element unit, represents the multiplication of the components.
[0108] In the following, a two-dimensional steady-state heat conduction problem corresponding to a non-homogeneous material is solved and analyzed, and the results of a commercial software are compared to prove that the method provided by the embodiment of the present application for solving a second-order elliptic partial differential equation by combining a neural network and a finite element method can effectively improve the solving speed.
[0109] For a square concrete thin plate with a cross section of 1x1, since the thickness of the square concrete thin plate is much smaller than its length and width, the thickness of the square concrete thin plate can be ignored, and heat transfer is only carried out in the plane of the square concrete thin plate, so the heat conduction problem of the square concrete thin plate can be simplified as a two-dimensional heat conduction problem for analysis. In addition, due to the unevenness of the density, pores and bubbles, and water content distribution of the concrete material, the thermal conductivity of the concrete material is not uniform In space, the distribution is uneven, as shown in Figure 3
[0110] It is assumed that there is a heat source in the interior of the thin plate , and the distribution of the heat source on the plate surface is as shown in Figure 4 It can be seen that the heat source is unevenly distributed on the plate surface. At the same time, the temperature distribution on the boundary of the square concrete thin plate is given as shown in Figure 5
[0111] Specifically, the verification idea is as follows:
[0112] I. Grid division is performed on the thin plate to obtain the grid model shown in Figure 6 , wherein the number of elements obtained by division is 498002, the number of nodes is 250000, and the finite element method (direct method) is used to solve the heat conduction problem on the grid model shown in Figure 6 , and the obtained result is regarded as the true solution;
[0113] II. According to the equation parameters or coefficient functions, thermal conductivity, heat source, boundary conditions and other training target neural operators of the corresponding steady-state heat conduction equation of the square concrete thin plate, the approximate temperature field distribution of the grid model is predicted, which is used as the initial value of the subsequent iterative method; on the grid model shown in Figure 6 , the mixed iterative method (i.e. the combination of neural network and finite element method) provided by the embodiment of the present application and the traditional iterative method are used for solving respectively, and the superiority of the mixed iterative method provided by the embodiment of the present application is illustrated by comparing the iteration times and calculation time of the two methods.
[0114] Among them, Figure 7a , 7b , 7c are respectively the temperature field cloud diagram (also called reference cloud diagram) calculated by using the finite element method (direct method), the temperature field cloud diagram calculated by using the mixed iterative method, and the temperature field cloud diagram calculated by using the traditional iterative method.
[0115] In addition, Figure 8 is a comparison diagram of the iteration times and convergence speed of the mixed iterative method and the traditional iterative method. At the same time, the iteration times and calculation time of the above mixed iterative method and traditional iterative method are summarized in the table to obtain Table 1 as follows.
[0116] Table 1
[0117]
[0118] By Figure 8 As can be seen from the above table 1, the hybrid iteration method provided by the embodiments of the present application is significantly superior to the traditional iteration method in terms of iteration times and calculation time. Therefore, when the hybrid iteration method provided by the embodiments of the present application is used to calculate the two-dimensional steady-state heat conduction problem of the square concrete slab, accurate problem solution can be obtained through fewer iteration times and shorter calculation time, so that the calculation efficiency is significantly superior to the traditional iteration method.
[0119] Embodiment 2
[0120] According to the embodiments of the present application, a non-volatile storage medium is also provided, which stores a program, wherein the program controls the device in which the non-volatile storage medium is located to execute the method for solving the second-order elliptic partial differential equation by the neural network and the finite element method in embodiment 1 when the program is running.
[0121] According to the embodiments of the present application, a computer program product is also provided, which includes a stored computer program, wherein the computer program implements the method for solving the second-order elliptic partial differential equation by the neural network and the finite element method in embodiment 1 when the computer program is executed by a processor.
[0122] According to the embodiments of the present application, a processor is also provided, which is used to run a program, wherein the program executes the method for solving the second-order elliptic partial differential equation by the neural network and the finite element method in embodiment 1 when the program is running.
[0123] Optionally, the program implements the following steps when the program is running:
[0124] In step S1, first finite element unit information of a plurality of finite element units obtained by dividing a first object, first input parameter information of a second-order elliptic partial differential equation to be solved corresponding to the first object, and a first solution vector initialized to zero are obtained, and a corresponding stiffness matrix and a load vector are assembled according to the first finite element unit information and the first input parameter information, wherein the first input parameter information at least includes equation parameters or coefficient functions, equation right end terms, and boundary conditions, and the first finite element unit information at least includes unit data and boundary conditions of the plurality of finite element units;
[0125] Step S2, input the first input parameter information obtained in step S1 into the pre-trained target neural operator to obtain a first solution network output by the target neural operator, wherein the first solution network is an approximation of the first solution corresponding to the first input parameter information expressed by the neural network, the target neural operator is expressed by the neural network and is used to reflect the mapping relationship between the input parameter information of the second-order elliptic partial differential equation and the corresponding solution, the target neural operator is obtained by iteratively training an initial neural operator using a plurality of training samples, and the initial neural operator includes a plurality of neural networks;
[0126] Step S3, using the first finite element unit information obtained in step S1, the first solution network obtained in step S2 is interpolated at the discrete points on each finite element unit of the first object to obtain a first modified solution vector;
[0127] Step S4, using the first modified solution vector obtained in step S3 to modify the first solution vector of the second-order elliptic partial differential equation to be solved, including: when the current iteration round is the first iteration round, using the first modified solution vector obtained in step S3 to modify the first solution vector initialized to zero; when the current iteration round is not the first iteration round, using the first modified solution vector obtained in step S3 to modify the first solution vector obtained in the last iteration round;
[0128] Step S5, using an iterative method to iteratively process the modified first solution vector obtained in step S4;
[0129] Step S6, determining whether the iterated first solution vector obtained in step S5 satisfies a preset convergence condition, wherein if the preset convergence condition is satisfied, step S7 is executed, otherwise step S8 is executed;
[0130] Step S7, outputting the iterated first solution vector;
[0131] Step S8, determining a residual vector according to the iterated first solution vector, the stiffness matrix and the load vector obtained in step S1, mapping the residual vector back to a residual function, replacing the first input parameter information in step S2 with the obtained residual function, and continuing to execute steps S2-S6.
[0132] As an optional implementation, the above electronic device can exist in the form of a mobile terminal, a computer terminal or a similar computing device. Figure 9 A hardware structure block diagram of an electronic device for implementing a method of solving a second-order elliptic partial differential equation by combining a neural network and a finite element method is shown. As shown in Figure 9As shown, the electronic device 90 can include one or more processors 902 (the processor 902 can include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 904 for storing data, and a transmission device 906 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 9 The structure shown is only schematic, which does not limit the structure of the above-mentioned electronic device. For example, the electronic device 90 can also include more or fewer components than those shown in Figure 9 or have a different configuration than that shown in Figure 9 .
[0133] It should be noted that the one or more processors 902 and / or other data processing circuits described above can be referred to herein as "data processing circuits" in general. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any other combination. In addition, the data processing circuit can be a single independent processing module, or all or part of any one of the other elements combined into the electronic device 90. As referred to in the embodiments of the present application, the data processing circuit serves as a processor control (for example, selection of a variable resistance terminal path connected to an interface).
[0134] The memory 904 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the neural network and finite element method mixed solution method of second order elliptic partial differential equation method in the embodiments of the present application. The processor 902 executes the software programs and modules stored in the memory 904 to perform various functional applications and data processing, i.e. to implement the vulnerability detection method of the application program described above. The memory 904 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 904 can further include a memory remotely arranged with respect to the processor 902, which can be connected to the electronic device 90 through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network and a combination thereof.
[0135] The transmission device 906 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the electronic device 90. In an example, the transmission device 906 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In an example, the transmission device 906 can be a radio frequency (RF) module that is configured to communicate with the Internet wirelessly.
[0136] The display can be a liquid crystal display (LCD) that is touch screen type, for example, which can enable a user to interact with a user interface of the electronic device 90.
[0137] The above-mentioned sequence numbers of the embodiments of the present application are only for description, and do not represent advantages or disadvantages of the embodiments.
[0138] In the above-mentioned embodiments of the present application, the description of each embodiment has its own focus, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0139] In the several embodiments provided by the present application, it should be understood that the disclosed technology can be implemented in other ways. Of course, the device embodiment described above is only illustrative, and for example, the division of units can be a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interface, unit or module, and can be electrical or other forms.
[0140] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed on multiple units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0141] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0142] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or the part that essentially contributes to the related art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present application. The aforementioned storage medium includes a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0143] The above only describes the preferred embodiments of the present application. It should be noted that, for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should also be considered as the protection scope of the present application.
Claims
1. A method for solving second-order elliptic partial differential equations using a hybrid neural network and finite element method, characterized in that, include: Step S1: Obtain the first finite element information of the multiple finite element elements obtained by dividing the first object, the first input parameter information of the second-order elliptic partial differential equation to be solved corresponding to the first object, and the first solution vector initialized to zero. Then, assemble the corresponding stiffness matrix and load vector according to the first finite element information and the first input parameter information. The first input parameter information includes at least: equation parameters or coefficient functions, right-hand side terms of the equation, and boundary conditions. The first finite element information includes at least: element data of multiple finite element elements and boundary conditions. Step S2: Input the first input parameter information obtained in step S1 into the pre-trained target neural operator to obtain the first solution network output by the target neural operator. The first solution network is an approximation of the first solution corresponding to the first input parameter information expressed by the neural network. The target neural operator is expressed by the neural network and is used to reflect the mapping relationship between the input parameter information and the corresponding solution of the second-order elliptic partial differential equation. The target neural operator is obtained by iteratively training the initial neural operator using multiple sets of training samples. The initial neural operator includes multiple neural networks. Step S3: Using the first finite element information obtained in step S1, the first solution network obtained in step S2 is used to interpolate the discrete points on each finite element of the first object to obtain the first corrected solution vector. Step S4 involves using the first corrected solution vector obtained in step S3 to correct the first solution vector of the second-order elliptic partial differential equation to be solved, including: when the current iteration round is the first iteration round, using the first corrected solution vector obtained in step S3 to correct the first solution vector initialized to zero; when the current iteration round is not the first iteration round, using the first corrected solution vector obtained in step S3 to correct the first solution vector obtained in the previous iteration. Step S5: Iterate the modified first solution vector obtained in step S4 using the iterative method. Step S6: Determine whether the first solution vector obtained after iteration in step S5 satisfies the preset convergence condition. If it does, proceed to step S7; otherwise, proceed to step S8. Step S7: Output the first solution vector after iteration; Step S8: Determine the residual vector based on the first solution vector after iteration, the stiffness matrix obtained in step S1, and the load vector, and map the residual vector back to the residual function. Use the obtained residual function to replace the first input parameter information in step S2, and continue to execute the above steps S2-S6.
2. The method according to claim 1, characterized in that, The training process of the target neural operator includes: Multiple sets of training samples are obtained, wherein each set of training samples includes: the second input parameter information of the second-order elliptic partial differential equation corresponding to the second object and the corresponding second solution, and the type of the second solution includes one of the following: second analytical solution, second solution vector or second solution network; Construct a neural operator, wherein the network types of multiple neural networks within the neural operator include at least one of the following: convolutional neural network, graph neural network, and multilayer perceptron; The neural operator is iteratively trained using multiple sets of training samples to obtain the target neural operator.
3. The method according to claim 2, characterized in that, Obtain multiple sets of training samples, including: Obtain the state information of multiple second objects; Iterate through each second object, performing the following steps: Based on the state information of the second object, the second finite element information and the second input parameter information for dividing the second object are determined. The second finite element information includes at least: element data and boundary conditions of multiple finite element elements. The second input parameter information includes at least: equation parameters or coefficient functions, right-hand side terms of equations, and boundary conditions. The element data includes at least one of the following: element shape, cell point coordinates, number of elements, and element dimension. The boundary conditions include at least one of the following: geometric information and numerical information of homogeneous or non-homogeneous boundary conditions. The boundary conditions of each finite element obtained by dividing the second object are processed according to the type of boundary conditions to obtain the second-order elliptic partial differential equation. Element matrices and element load vectors are constructed based on the element data and material data of each finite element element, and the element matrices and element load vectors are adjusted according to the boundary conditions of each finite element element. The adjusted element matrices and adjusted element load vectors of each finite element element are assembled to obtain the global matrix and global load vector of the second object. Based on the global matrix and global load vector, construct the second linear algebraic equation corresponding to the second-order elliptic partial differential equation of the second object, and solve the second linear algebraic equation to obtain the corresponding second solution; Multiple training samples are formed by the second input parameter information and the corresponding second solution of the second-order elliptic partial differential equations corresponding to multiple second objects.
4. The method according to claim 2, characterized in that, Multiple neural networks comprise multiple branch networks and a backbone network. The initial neural operator is iteratively trained using multiple sets of training samples to obtain the target neural operator, which includes: In each round of iterative training, the second input parameter information in the training samples is analyzed by the various branch networks in the neural operator to obtain the feature vectors output by each branch network. The feature vectors output by each branch network are then integrated with the backbone network in the neural operator to calculate the prediction interpolation at each decoding discrete sampling point. Based on the decoded discrete sampling points and the second solution within the training samples, the target loss function is constructed according to the following formula: , In the formula This represents the total number of training samples. This represents the total number of decoded discrete sampling points within the solution region of the second object. Indicates the first The second input parameter information in the group training samples Equation parameters or coefficient functions And n represents the total number of parameters or coefficient functions in the equation. Indicates the first The input dimension of each branch network, express exist The value of each encoded discrete sampling point Indicates the first A branch network, Indicates the first Network parameters of each branch network Indicates the first The feature vectors output by each branch network Indicates the backbone network. This represents the network parameters of the backbone network. This represents the value of the backbone network at each discrete decoding sampling point within the solution region. This represents the operation of summing all the components of a vector. This indicates that the components are multiplied positionally. Denotes the target loss function, and , Indicates the first The value of the second solution at each decoded discrete sampling point in the solution region within the training samples; The target neural operator is obtained by adjusting the network parameters of each neural network within the neural operator based on the target loss function.
5. The method according to claim 4, characterized in that, By analyzing the second input parameter information within the training samples using the various branch networks within the neural operator, the feature vectors output by each branch network are obtained, including: Determine the parameter type of the second input parameter information within the training samples, wherein the parameter type includes at least one of the following: analytical expression, discrete form corresponding to finite element element; If the parameter type of the second input parameter information is an analytical expression, the value of the analytical expression at the encoded discrete sampling point is directly calculated. When the parameter type of the second input parameter information is the discrete form corresponding to the finite element element, determine the coordinates of the cell points of each finite element element of the second object and the position information of each coded discrete sampling point in the solution area of the second object; determine the distance between each coded discrete sampling point and the finite element cell point to obtain the corresponding distance matrix; determine the index of the finite element cell point corresponding to the minimum distance in each row of the distance matrix; determine the basis function value of the second input parameter at each index as the interpolation at the coded discrete sampling point.
6. The method according to claim 4, characterized in that, The types of discrete sampling points within the solution region of the second object include: encoded discrete sampling points or decoded discrete sampling points, and the process of determining the discrete sampling points includes: When the solution region of the second object is a regular region, multiple discrete sampling points are determined using a preset probability distribution rule; When the solution region of the second object is an irregular region, the regular region to which the solution region belongs is determined, and multiple discrete sampling points in the regular region are determined using a preset probability distribution rule. Discrete sampling points in other regions besides the solution region of the second object are then removed from the multiple discrete sampling points.
7. The method according to claim 1, characterized in that, Map the residual vector back to the residual function, and use the obtained residual function to replace the first input parameter information in step S2, then continue with subsequent steps S2-S6, including: When non-homogeneous boundary conditions are not included in the boundary conditions, the residual vector is mapped back to the residual function according to the following formula: Then, the right-hand side of the equation in the first input parameter information in step S2 is replaced with the residual function, and the above steps S2-S6 are continued. When the boundary conditions include non-homogeneous boundary conditions, the residual vector is mapped back to the residual function according to the following formula: Meanwhile, the coefficients of the boundary finite element elements remain unchanged to obtain the residual boundary conditions. The right-hand side of the equation and the boundary conditions in the first input parameter information in step S2 are replaced by the residual function and the residual boundary conditions. Steps S2-S6 are then executed. In step S2, the right-hand side of the equation and the boundary conditions are input into the same branch network as a whole. in, Represents the residual vector. This represents the basis functions corresponding to each finite element. This represents the integral of the basis functions corresponding to each finite element.
8. A computer program product, characterized in that, include: A computer program, wherein when executed by a processor, the computer program implements a method for solving second-order elliptic partial differential equations using a hybrid neural network and finite element method as described in any one of claims 1 to 7.
9. A non-volatile storage medium, characterized in that, The non-volatile storage medium stores a computer program, wherein the device containing the non-volatile storage medium executes the method of solving second-order elliptic partial differential equations by running the computer program, which combines neural networks and finite element methods according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute, via the computer program, a method for solving second-order elliptic partial differential equations using a hybrid neural network and finite element method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Unsupervised method for solving parameterized partial differential equation based on graph neural network
CN117474073A
Method and apparatus for bilayer physical information neural network for PDE constraint optimization
CN119790399A
