CN113515903B - Partition-packaged rapid point searching method, storage medium and terminal - Google Patents

Partition-packaged rapid point searching method, storage medium and terminal Download PDF

Info

Publication number
CN113515903B
CN113515903B CN202111049359.4A CN202111049359A CN113515903B CN 113515903 B CN113515903 B CN 113515903B CN 202111049359 A CN202111049359 A CN 202111049359A CN 113515903 B CN113515903 B CN 113515903B
Authority
CN
China
Prior art keywords
grid
point
dimension
bounding box
representing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111049359.4A
Other languages
Chinese (zh)
Other versions
CN113515903A (en
Inventor
陈琦
陈坚强
华如豪
毛枚良
王新光
万钊
孙伟
张爱婧
郭勇颜
白进维
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Original Assignee
Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Computational Aerodynamics Institute of China Aerodynamics Research and Development Center filed Critical Computational Aerodynamics Institute of China Aerodynamics Research and Development Center
Priority to CN202111049359.4A priority Critical patent/CN113515903B/en
Publication of CN113515903A publication Critical patent/CN113515903A/en
Application granted granted Critical
Publication of CN113515903B publication Critical patent/CN113515903B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Evolutionary Computation (AREA)
  • Fluid Mechanics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Analysis (AREA)
  • Computing Systems (AREA)
  • Algebra (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a partition-packaged rapid point searching method, a storage medium and a terminal, belonging to the technical field of computational fluid mechanics and grids, wherein the method comprises the following steps: establishing a bounding box of each grid block in a structural grid system, and dividing the bounding box into a plurality of subspaces; acquiring the attribute information of the grid points in each subspace of each bounding box, and packaging and storing the attribute information; determining a subspace of a bounding box corresponding to a given grid point; and calculating the distances between the given grid point and all the grid points in the subspace where the given grid point belongs, and comparing the distances to determine the nearest grid point of the given grid point. After acquiring, packaging and storing the grid point attribute information in each subspace of each bounding box, the method only needs to calculate the distance between a given grid point and all grid points in the subspace to which the given grid point belongs, and determines the nearest grid point of the given grid point by comparing the distances, so that the calculation time overhead can be greatly saved and the calculation efficiency is improved.

Description

Partition-packaged rapid point searching method, storage medium and terminal
Technical Field
The invention relates to the technical field of computational fluid mechanics and grids, in particular to a method for quickly searching a grid point closest to a given grid point in other grid systems aiming at the given grid point in a plurality of sets of structural grid systems, and particularly relates to a quick point searching method for partition encapsulation, a storage medium and a terminal.
Background
Point finding technologies are widely available in grid technology and computer graphics, and have wide application requirements in computational fluid dynamics and computer science. For example, in computational fluid dynamics, when relative motion between a plurality of objects is involved, a dynamic grid technology needs to be applied, and the process needs to continuously perform a point finding operation to determine the relative position relationship between the objects. The calculation amount of the point searching is extremely large, and in the computational fluid mechanics, the calculation amount can be equivalent to the calculation amount of the flow field solving. Therefore, how to improve the point-searching calculation efficiency is an urgent technical problem to be solved in the field.
Disclosure of Invention
The invention aims to solve the problem of low point searching calculation efficiency in the field of the existing fluid mechanics calculation, and provides a partition-packaged rapid point searching method, a storage medium and a terminal.
The purpose of the invention is realized by the following technical scheme: a method for fast point finding for partition encapsulation, the method comprising:
establishing a bounding box of each grid block in a structural grid system, and dividing the bounding box into a plurality of subspaces;
acquiring the attribute information of the grid points in each subspace of each bounding box, and packaging and storing the attribute information;
determining a subspace of a bounding box corresponding to a given grid point;
and calculating the distances between the given grid point and all the grid points in the subspace where the given grid point belongs, and comparing the distances to determine the nearest grid point of the given grid point.
In one example, the method further comprises a global closest point determining step of:
and calculating the distances between the given grid point and all grid points in the adjacent subspaces of the subspaces to which the given grid point belongs, and comparing the distances to determine the global nearest grid point of the given grid point.
In one example, the creating a bounding box of grid blocks in the structural grid system specifically comprises:
calculating the length scale and the minimum scale of each grid block in different directions;
calculating the minimum dimension of each grid block;
and calculating the dimension of the bounding box based on the length dimension and the minimum dimension of each grid block in different directions and the minimum dimension, thereby realizing the establishment of the bounding box.
In an example, the calculation formula for calculating the length scale and the minimum scale of each grid block in different directions is as follows:
Figure 880018DEST_PATH_IMAGE001
wherein ABS represents an absolute value; MIN represents taking the minimum value;
Figure 327809DEST_PATH_IMAGE002
represents a grid block inxThe smallest dimension of the direction;
Figure 345443DEST_PATH_IMAGE003
represents a grid block inyThe smallest dimension of the direction;
Figure 105589DEST_PATH_IMAGE004
represents a grid block inzThe smallest dimension of the direction;
Figure 90731DEST_PATH_IMAGE005
representing the minimum of a grid blockDimension;
Figure 492894DEST_PATH_IMAGE006
respectively represent grid blocks inxA maximum coordinate and a minimum coordinate of the direction;
Figure 630614DEST_PATH_IMAGE007
respectively represent grid blocks inyA maximum coordinate and a minimum coordinate of the direction;
Figure 155136DEST_PATH_IMAGE008
respectively represent grid blocks inzMaximum and minimum coordinates of direction.
In an example, the calculating the minimum dimension of each grid block specifically includes:
calculating the minimum dimension based on the grid points of each grid block in different directions:
Figure 112728DEST_PATH_IMAGE009
wherein the content of the first and second substances,
Figure 69314DEST_PATH_IMAGE010
representing a minimum dimension of the lattice block;
Figure 61541DEST_PATH_IMAGE011
representing taking the minimum value;
Figure 694647DEST_PATH_IMAGE012
is shown inxThe number of grid points in the direction;
Figure 201852DEST_PATH_IMAGE013
is shown inyThe number of grid points in the direction;
Figure 211396DEST_PATH_IMAGE014
is shown inzThe number of grid points of the direction.
In one example, the formula for calculating the bounding box dimension is:
Figure 307397DEST_PATH_IMAGE015
wherein the content of the first and second substances,
Figure 111405DEST_PATH_IMAGE016
represents a bounding boxxA dimension of direction;
Figure 43589DEST_PATH_IMAGE017
represents a bounding boxyA dimension of direction;
Figure 653562DEST_PATH_IMAGE018
represents a bounding boxzA dimension of direction;Intrepresenting rounding;
Figure 620381DEST_PATH_IMAGE002
represents a grid block inxThe smallest dimension of the direction;
Figure 343093DEST_PATH_IMAGE003
represents a grid block inyThe smallest dimension of the direction;
Figure 496994DEST_PATH_IMAGE004
represents a grid block inzThe smallest dimension of the direction;
Figure 848341DEST_PATH_IMAGE005
representing a minimum dimension of the grid block;
Figure 918934DEST_PATH_IMAGE010
representing the smallest dimension of the grid block.
In one example, the calculation formula for determining the subspace of the bounding box corresponding to a given grid point is:
Figure 799165DEST_PATH_IMAGE019
wherein the content of the first and second substances,
Figure 705941DEST_PATH_IMAGE020
represents a subspace ofxA dimension of direction;
Figure 860979DEST_PATH_IMAGE021
represents a subspace ofyA dimension of direction;
Figure 287543DEST_PATH_IMAGE022
represents a subspace ofzA dimension of direction;Intrepresenting rounding;
Figure 666572DEST_PATH_IMAGE023
indicating that given grid points are respectively atxDirection (b),yDirection (b),zCoordinates of the direction;
Figure 60644DEST_PATH_IMAGE016
represents a bounding boxxA dimension of direction;
Figure 753794DEST_PATH_IMAGE017
represents a bounding boxyA dimension of direction;
Figure 549711DEST_PATH_IMAGE018
represents a bounding boxzA dimension of direction;
Figure 286592DEST_PATH_IMAGE006
respectively represent grid blocks inxA maximum coordinate and a minimum coordinate of the direction;
Figure 902381DEST_PATH_IMAGE007
respectively represent grid blocks inyA maximum coordinate and a minimum coordinate of the direction;
Figure 399222DEST_PATH_IMAGE008
respectively represent grid blocks inzMaximum and minimum coordinates of direction.
In one example, the distance between a given grid point and all grid points is calculated as:
Figure 846384DEST_PATH_IMAGE024
wherein the content of the first and second substances,
Figure 770477DEST_PATH_IMAGE025
representing the distance between a given grid point and any one of all grid points;
Figure 886944DEST_PATH_IMAGE023
indicating that given grid points are respectively atxDirection (b),yDirection (b),zCoordinates of the direction;
Figure 656317DEST_PATH_IMAGE026
initial grid points involved in distance calculation in all grid points are respectively shown inxDirection (b),yDirection (b),zCoordinates of the direction.
It should be further noted that the technical features corresponding to the above examples can be combined with each other or replaced to form a new technical solution.
The present invention also includes a storage medium having stored thereon computer instructions which, when executed, perform the steps of the method for fast point finding of a partitioned package formed by any one or more of the above examples.
The invention also includes a terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, the processor executing the computer instructions to perform the steps of the method for fast point finding of a partitioned package formed by any one or more of the examples.
Compared with the prior art, the invention has the beneficial effects that:
(1) in one example, after acquiring, packaging and storing the grid point attribute information in each subspace of each bounding box, the method only needs to calculate the distances between a given grid point and all grid points in the subspace to which the given grid point belongs, and determines the nearest grid point of the given grid point by comparing the distances, so that the calculation time overhead can be greatly saved and the calculation efficiency is improved; meanwhile, the point searching method does not cause the phenomenon of distortion of the closest point due to improper selection of the initial point, and ensures the reliability of point searching; furthermore, the whole point searching process is simple, operation is facilitated, the programming requirement is low, the point searching method can be realized only by slightly changing a program, and popularization and use are facilitated.
(2) In one example, the present invention can determine the global closest point by calculating the distances between the given grid point and all grid points in the subspaces adjacent to the given grid point, and compared with the prior art in which all grid points need to be compared one by one, the present invention greatly improves the calculation efficiency, and has high accuracy and reliability of point finding.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention.
FIG. 1 is a flow chart of a point finding method in an example of the present invention;
FIG. 2 is a flow chart of a global seek method in an example of the present invention;
FIG. 3 is a schematic diagram of a cube bounding box in accordance with an example of the present invention;
fig. 4 is a schematic diagram of partition encapsulation in an example of the present invention.
In the figure: 1-bounding box, 11-subspace, 2-main grid, 3-background grid.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that directions or positional relationships indicated by "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", and the like are directions or positional relationships based on the drawings, and are only for convenience of description and simplification of description, and do not indicate or imply that the device or element referred to must have a specific orientation, be configured and operated in a specific orientation, and thus, should not be construed as limiting the present invention. Furthermore, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
In the description of the present invention, it should be noted that, unless otherwise explicitly stated or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
The invention relates to a quick point searching method for partitioned encapsulation, which aims at any given space point (grid point), quickly searches the closest grid point in a mass of grid points and reduces the calculation amount of inquiry. As shown in fig. 1, a method for fast point finding of partition encapsulation specifically includes the following steps:
s1: establishing a bounding box of each grid block in a structural grid system, and dividing the bounding box into a plurality of subspaces; the bounding box is a geometric body which is slightly larger than the volume of the grid block, and is specifically a cubic bounding box in the example; a set of structural grid systems generally consists of a number of grid BLOCKs (BLOCKs) which can be regarded as basic units constituting the structural grid system, and therefore the present application first constructs auxiliary cubic bounding boxes for the grid BLOCKs.
S2: acquiring the attribute information of the grid points in each subspace of each bounding box, and packaging and storing the attribute information; the attribute information of the grid points is specifically coordinate information of the grid points, and in this step, the total number of grid points falling into each subspace is stored in a corresponding package.
S3: determining a subspace of a bounding box corresponding to a given grid point;
s4: and calculating distances between the given grid point and all grid points in the subspace where the given grid point belongs to, and comparing the distances to determine the nearest grid point of the given grid point, namely, the grid point corresponding to the shortest distance is the nearest grid point of the given grid point.
In this example, the main time calculation cost is the step of obtaining the grid point attribute information in each subspace of each bounding box and the step of determining the subspace of the bounding box corresponding to a given grid point, i.e. the partition encapsulation process, however, the process is mainly a comparison operation and only needs to be executed once, which can save a large amount of calculation time; after acquiring, packaging and storing the attribute information of the grid points in each subspace of each bounding box, only calculating the distance between a given grid point and all the grid points in the subspace to which the given grid point belongs, and determining the nearest grid point of the given grid point by comparing the distance, wherein the number of all the grid points in the subspace is greatly reduced compared with the number of the grid points in the whole structural grid system, so that the calculation amount is greatly reduced, the calculation time overhead is saved, and the calculation efficiency is improved; meanwhile, the phenomenon of distortion of the closest point is easily caused by improper selection of the initial point in the conventional point searching method, for example, a two-dimensional wing grid is taken as an example, if a point P is arranged above a wing, a grid point closest to the point P is searched from any initial point D, if the initial point D is arranged below the wing, the searching point is searched from the point D by using the conventional point searching method, and in the process of gradually approaching the point P, the searching point cannot penetrate through the wing and winds to the upper surface of the wing (grids are arranged around the wing, but no grids are arranged inside the wing), the finally searched grid point is probably arranged on the lower surface of the wing, however, the point closest to the point P is usually arranged on the upper surface of the wing under the condition, namely, the distortion occurs due to improper selection of the initial point. In order to avoid the distortion phenomenon, the bounding boxes of all grid blocks in the structural grid system are divided into a plurality of subspaces, and points are searched in the space where the given grid point belongs, so that the phenomenon that the closest point is distorted due to improper selection of the initial point is avoided, and the point searching reliability is high; furthermore, the whole point searching process is simple, operation is facilitated, the programming requirement is low, the point searching method can be realized only by slightly changing a program, and popularization and use are facilitated.
In one example, as shown in fig. 2, the method of the present invention further includes a global nearest grid point determining step:
s5: the distances between the given grid point and all grid points in the subspaces adjacent to the given grid point are calculated, the current nearest grid point is updated, and the global nearest grid point of the given grid point is determined by comparing the distances.
In one example, the creating a bounding box of grid blocks in the structural grid system specifically comprises:
s11: calculating the length scale and the minimum scale of each grid block in different directions;
s12: calculating the minimum dimension of each grid block;
s13: and calculating the dimension of the bounding box based on the length dimension and the minimum dimension of each grid block in different directions and the minimum dimension, thereby realizing the establishment of the bounding box.
In one example, the grid blocks are obtained by traversing the grid blocks one by one through a comparison algorithmxThe minimum and maximum coordinates in the direction are recorded as
Figure 161248DEST_PATH_IMAGE027
In ayThe minimum and maximum coordinates in the direction are recorded as
Figure 256243DEST_PATH_IMAGE028
In azThe minimum and maximum coordinates in the direction are recorded as
Figure 643362DEST_PATH_IMAGE029
And determining the size of the auxiliary cube bounding box through the six extreme value coordinate parameters.
Specifically, the specific calculation formula for calculating the length scale and the minimum scale of each grid block in different directions in step S11 is as follows:
Figure 731272DEST_PATH_IMAGE001
wherein ABS represents an absolute value; MIN represents taking the minimum value;
Figure 90710DEST_PATH_IMAGE002
represents a grid block inxThe smallest dimension of the direction;
Figure 356606DEST_PATH_IMAGE003
represents a grid block inyThe smallest dimension of the direction;
Figure 434283DEST_PATH_IMAGE004
represents a grid block inzThe smallest dimension of the direction;
Figure 561770DEST_PATH_IMAGE005
representing a minimum dimension of the grid block;
Figure 838031DEST_PATH_IMAGE006
respectively represent grid blocks inxA maximum coordinate and a minimum coordinate of the direction;
Figure 274829DEST_PATH_IMAGE007
respectively represent grid blocks inyA maximum coordinate and a minimum coordinate of the direction;
Figure 574223DEST_PATH_IMAGE008
respectively represent grid blocks inzMaximum and minimum coordinates of direction.
Further, the step S12 of calculating the minimum dimension of each grid block specifically includes:
calculating the minimum dimension based on the grid points of each grid block in different directions:
Figure 754668DEST_PATH_IMAGE030
wherein the content of the first and second substances,
Figure 151015DEST_PATH_IMAGE010
representing a minimum dimension of the lattice block;
Figure 7981DEST_PATH_IMAGE011
representing taking the minimum value;
Figure 529092DEST_PATH_IMAGE012
is shown inxThe number of grid points in the direction;
Figure 513229DEST_PATH_IMAGE013
is shown inyThe number of grid points in the direction;
Figure 764082DEST_PATH_IMAGE014
is shown inzThe number of grid points of the direction.
Further, the calculation formula of the bounding box dimension in step S13 is:
Figure 542682DEST_PATH_IMAGE031
wherein the content of the first and second substances,
Figure 298892DEST_PATH_IMAGE016
represents a bounding boxxA dimension of direction;
Figure 821140DEST_PATH_IMAGE017
represents a bounding boxyA dimension of direction;
Figure 926499DEST_PATH_IMAGE018
represents a bounding boxzIn a direction ofDimension;Intindicating rounding. In particular, the bounding box sizes are according to which respectivelyxDirection (b),yDirection (b),zThe length scale of the direction is determined, after the size and the dimensionality of the bounding box are obtained, the establishment of an auxiliary cube bounding box can be realized, and the interior of the bounding box comprises
Figure 610422DEST_PATH_IMAGE032
And the subspaces realize the division of the space surrounding the box. It should be noted that, since the grid points of the sub-space inside the bounding box are not actually required to be saved in the bounding box, a large amount of storage space can be saved.
In one example, the grid point coordinates are compared with the dimensions and sizes of the subspaces to determine the grid points corresponding to the subspaces, and on the basis, the grid point attribute information in each subspace is packaged and stored.
In an example, in step S3, the subspace of the bounding box corresponding to the given grid point is determined, that is, the subspace of the given grid point is calculated according to the coordinate information of the given grid point in combination with the dimensions of the bounding box and the extreme coordinate information of each direction, where the specific calculation formula is:
Figure 637283DEST_PATH_IMAGE033
wherein the content of the first and second substances,
Figure 494381DEST_PATH_IMAGE020
represents a subspace ofxA dimension of direction;
Figure 172356DEST_PATH_IMAGE021
represents a subspace ofyA dimension of direction;
Figure 27179DEST_PATH_IMAGE022
represents a subspace ofzA dimension of direction;Intrepresenting rounding;
Figure 275758DEST_PATH_IMAGE023
representing a given grid pointAre respectively atxDirection (b),yDirection (b),zCoordinates of the direction. Specifically, in the above formula
Figure 139809DEST_PATH_IMAGE034
Represents the bounding box size;
Figure 219760DEST_PATH_IMAGE035
the dimensions of the bounding box are represented,
Figure 261797DEST_PATH_IMAGE036
representing a subspace inside the bounding box. And when the number of the grid points falling into the subspace is increased by one, recording the attribute information of the grid point. After step S3 is completed, the packaging of the grid points is completed, and the total number of grid points and the corresponding attribute information of the grid points that fall into each auxiliary cube bounding box are stored in the subspace of each auxiliary cube bounding box.
In one example, in step S4, grid points are given
Figure 732092DEST_PATH_IMAGE037
The distance calculation formula to all grid points is:
Figure 399834DEST_PATH_IMAGE024
wherein the content of the first and second substances,
Figure 334292DEST_PATH_IMAGE025
representing the distance between a given grid point and any one of all grid points;
Figure 796497DEST_PATH_IMAGE038
indicating that given grid points are respectively atxDirection (b),yDirection (b),zCoordinates of the direction;
Figure 3357DEST_PATH_IMAGE026
initial grid points involved in distance calculation in all grid points are respectively shown inxDirection (b),yDirection (b),zCoordinates of the direction.
The present invention step S4 determines the nearest grid point of the given grid point by comparing the distance magnitudes, i.e. it is equivalent to performing a query operation in the packaging bounding box. For a given grid point or points of the grid,
Figure 474789DEST_PATH_IMAGE039
it is necessary to find the nearest grid point, and the calculation is first performed by the formula in step S3P n Subspace in which a point falls
Figure 467016DEST_PATH_IMAGE040
. Memory space
Figure 896860DEST_PATH_IMAGE040
Sharing inmPoints, marksD 1 、D 2 、D 3 …D m To arbitrarily take a point
Figure 607328DEST_PATH_IMAGE041
As an initial point, calculateP n Point and pointD i Distance between pointsl ni . ComputingD i Points around the pointD j AndP n distance between pointsl nj If, ifl ni <=l nj Then, thenD i Points being distancesP n And (5) searching the point of the grid point with the nearest point. Otherwise, it willD j Marking the point as the current closest point, jumping to any grid point and given grid pointP n Until the distance is foundP n Point nearest grid pointD i
Typically, the nearest grid point mentioned aboveD i I.e. distanceP n The nearest grid point, but in a special case, the nearest grid pointD i Not the global closest point, to ensure reliable establishment of the closest grid pointAlternatively, a global nearest grid point confirmation step may be further performed. In particular, the global nearest grid point confirmation step is associated with the given grid pointP n The same searching step is carried out, and the searching range is only expanded to the given grid pointP n Computing given grid points from the adjacent subspaces of the subspacesP n And comparing the distances between the grid points and all grid points in the adjacent subspaces of the subspaces to determine the global nearest grid point of the given grid point.
To further illustrate the inventive concept of the present application, a specific embodiment is provided to further illustrate the point searching process of the technical solution of the present application:
as shown in FIG. 3, a structural grid system consisting of two grids is shownxRepresenting a coordinate systemxThe shaft is provided with a plurality of axial holes,yrepresenting a coordinate systemyThe axis, the grid point of the background grid (given grid point) needs to find the grid point in the main grid that is closest to it. For convenience of description, a two-dimensional case is exemplified here.
a) The method comprises the following steps Traverse the grid points of the main grid 2, calculatexMinimum coordinates of direction
Figure 364675DEST_PATH_IMAGE042
And maximum value coordinates
Figure 945829DEST_PATH_IMAGE043
yMinimum coordinates of direction
Figure 15416DEST_PATH_IMAGE044
And maximum value coordinates
Figure 947600DEST_PATH_IMAGE045
b) The method comprises the following steps Compute a master grid 2 atxDirection (b),yLength scale of directiondxAnddyand the minimum length scale of the main grid 2ds
c) The method comprises the following steps Computing the minimum dimension of the primary grid 2dim
d) The method comprises the following steps Computing enclosure 1 (surround)Boxes) respectively atxDirection (b),yDimension of direction
Figure 557573DEST_PATH_IMAGE046
And
Figure 508080DEST_PATH_IMAGE017
e) the method comprises the following steps According to the length scale of the main grid 2dxAnddy,minimum length scaleds,And minimum dimension
Figure 748568DEST_PATH_IMAGE046
And
Figure 902469DEST_PATH_IMAGE017
building the enclosure 1 and preserving the smallest dimensions of the enclosure 1
Figure 253816DEST_PATH_IMAGE046
Figure 871879DEST_PATH_IMAGE017
And dimensional information, as shown in FIG. 3, contained in the package 1
Figure 34001DEST_PATH_IMAGE047
A subspace 11 numbered from (1, 1), (1, 2) … up to
Figure 940778DEST_PATH_IMAGE048
f) The method comprises the following steps Traversing the background grid 3, computing the subspace 11 in which the grid points lie, as shown in fig. 4PPoint;
g) the method comprises the following steps Traversing the main grid 2, computing the subspace 11 in which the grid points lie, as shown in fig. 4D1-D6Point;
h) the method comprises the following steps Finishing the packaging process of all the grid points, and recording the attribute information of the grid points and the total grid points in each subspace 11 of the packaging box 1;
i) the method comprises the following steps After the packaging box 1 is finished, the point searching operation can be really started, and any point is selected from the background grid 3PCalculate the child in which it is locatedA space 11;
j) the method comprises the following steps Extracting main grid 2 point information from the subspace 11;
k) the method comprises the following steps Get an initial pointD1CalculatingD1AndPdistance of pointsS1Minimum distance ofS0=S1
l): computingD1Dot peripheral dots (neighboring dots)D2D6AndPdistance of pointsS2S6
m): computingS0S2AndS6the smallest of the number of the first to the second,S2at a minimum, thereforeS0=S2D2As a new closest point;
n): computingD2Points around the pointD3D4D5AndPdistance of pointsS3S4S5
o): computingS0S3S4S5The smallest of the number of the first to the second,S0at a minimum, the distance in the subspace 11 is obtainedPLocal closest point of pointD2Point;
p): to be provided withD2As an initial point, its surrounding points are calculatedD1D3D4D5AndPthe distance between the points is such that,D2distance of pointsPThe point distance is shortest, the confirmation work is completed,D2the point being the distancePThe nearest grid point;
q): traverse the and in the other subspaces 11 in the main grid 2PAnd (4) repeating the processes from the step i) to the step p) for the adjacent points of the points to finish the point searching process of all the points, saving the related information and finishing the calculation.
The present embodiment provides a storage medium, which has the same inventive concept as the fast point searching method of a partition package formed by any one or a combination of the above examples, and has stored thereon computer instructions, which when executed, perform the steps of the fast point searching method of the partition package formed by any one or a combination of the above examples.
Based on such understanding, the technical solution of the present embodiment or parts of the technical solution may be essentially implemented in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The present embodiment also provides a terminal, which has the same inventive concept as the fast point finding method of a partition package formed by any one or a combination of the above examples, and includes a memory and a processor, where the memory stores computer instructions executable on the processor, and the processor executes the computer instructions to perform the steps of the fast point finding method of the partition package formed by any one or a combination of the above examples. The processor may be a single or multi-core central processing unit or a specific integrated circuit, or one or more integrated circuits configured to implement the present invention.
Each functional unit in the embodiments provided by the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above detailed description is for the purpose of describing the invention in detail, and it should not be construed that the detailed description is limited to the description, and it will be apparent to those skilled in the art that various modifications and substitutions can be made without departing from the spirit of the invention.

Claims (10)

1. A quick point searching method for partition encapsulation is characterized in that: the method is applied to the field of computational fluid mechanics and used for judging the phase position relation between objects, and comprises the following steps:
establishing a bounding box of each grid block in a structural grid system of the two-dimensional wing, and dividing the bounding box into a plurality of subspaces;
acquiring the attribute information of the grid points in each subspace of each bounding box, and packaging and storing the attribute information;
determining a subspace of a bounding box corresponding to a given grid point;
and calculating the distances between the given grid point and all the grid points in the subspace where the given grid point belongs, and comparing the distances to determine the nearest grid point of the given grid point.
2. The method for fast searching for a point in a partition package according to claim 1, wherein: the method further comprises a global closest point determining step of:
and calculating the distances between the given grid point and all grid points in the adjacent subspaces of the subspaces to which the given grid point belongs, and comparing the distances to determine the global nearest grid point of the given grid point.
3. The method for fast searching for a point in a partition package according to claim 1, wherein: the bounding box for establishing each grid block in the structural grid system specifically comprises:
calculating the length scale and the minimum scale of each grid block in different directions;
calculating the minimum dimension of each grid block;
and calculating the dimension of the bounding box based on the length dimension and the minimum dimension of each grid block in different directions and the minimum dimension, thereby realizing the establishment of the bounding box.
4. The method for fast searching for a point in a partition package according to claim 3, wherein: the calculation formula for calculating the length scale and the minimum scale of each grid block in different directions is as follows:
dx=ABS(xmax-xmin)
dy=ABS(ymax-ymin)
dz=ABS(zmax-zmin)
ds=MIN(dx,dy,dz)
wherein ABS represents an absolute value; MIN represents taking the minimum value; dxRepresents the minimum dimension of the grid block in the x direction; dyRepresents the minimum dimension of the grid block in the y direction; dzRepresents the minimum dimension of the grid block in the z direction; dsRepresenting a minimum dimension of the grid block; x is the number ofmax、xminRespectively representing a maximum value coordinate and a minimum value coordinate of the grid block in the x direction; y ismax、yminRespectively representing a maximum value coordinate and a minimum value coordinate of the grid block in the y direction; z is a radical ofmax、zminRespectively representing the maximum and minimum coordinates of the grid block in the z-direction.
5. The method for fast searching for a point in a partition package according to claim 3, wherein: the calculation of the minimum dimension of each grid block specifically includes:
calculating the minimum dimension based on the grid points of each grid block in different directions:
dim=MIN(im,jm,km)
where dim represents the smallest dimension of the lattice block; MIN represents taking the minimum value; i.e. imRepresenting the number of grid points in the x-direction; j is a function ofmRepresents the number of grid points in the y-direction; k is a radical ofmRepresenting the number of grid points in the z-direction.
6. The method for fast searching for a point in a partition package according to claim 3, wherein: the calculation formula of the bounding box dimension is as follows:
idim=Int(dx/ds)×dim
jdim=Int(dy/ds)×dim
kdim=Int(dz/ds)×dim
wherein idimRepresenting the dimensions of the bounding box in the x-direction; j is a function ofdimRepresents the dimension of the bounding box in the y-direction; k is a radical ofdimRepresents the dimension of the bounding box in the z-direction; int denotes rounding; dxRepresents the minimum dimension of the grid block in the x direction; dyRepresenting the minimum dimension of a grid block in the y-direction;dzRepresents the minimum dimension of the grid block in the z direction; dsRepresenting a minimum dimension of the grid block; dim represents the smallest dimension of the lattice block.
7. The method for fast searching for a point in a partition package according to claim 1, wherein: the calculation formula for determining the subspace of the bounding box corresponding to the given grid point is as follows:
Figure FDA0003486216940000031
Figure FDA0003486216940000032
Figure FDA0003486216940000033
wherein inRepresenting the dimension of the subspace in the x direction; j is a function ofnRepresenting the dimension of the subspace in the y direction; k is a radical ofnRepresenting the dimension of the subspace in the z direction; int denotes rounding; x is the number ofn,yn,znRepresenting the coordinates of a given grid point in the x-direction, y-direction, z-direction, respectively; i.e. idimRepresenting the dimensions of the bounding box in the x-direction; j is a function ofdimRepresents the dimension of the bounding box in the y-direction; k is a radical ofdimRepresents the dimension of the bounding box in the z-direction; x is the number ofmax、xminRespectively representing a maximum value coordinate and a minimum value coordinate of the grid block in the x direction; y ismax、yminRespectively representing a maximum value coordinate and a minimum value coordinate of the grid block in the y direction; z is a radical ofmax、zminRespectively representing the maximum and minimum coordinates of the grid block in the z-direction.
8. The method for fast searching for a point in a partition package according to claim 1, wherein: the distance between a given grid point and all grid points is calculated as:
Figure FDA0003486216940000034
wherein lniRepresenting the distance between a given grid point and any one of all grid points; x is the number ofn,yn,znRepresenting the coordinates of a given grid point in the x-direction, y-direction, z-direction, respectively; x is the number ofi,yi,ziAnd the coordinates of the initial grid points participating in distance calculation in all the grid points in the x direction, the y direction and the z direction respectively are shown.
9. A storage medium having stored thereon computer instructions, characterized in that: the computer instructions when executed perform the steps of the method for fast point finding of partition encapsulation according to any one of claims 1 to 8.
10. A terminal comprising a memory and a processor, the memory having stored thereon computer instructions executable on the processor, the terminal comprising: the processor, when executing the computer instructions, performs the steps of the method for fast point finding of the partition encapsulation according to any one of claims 1 to 8.
CN202111049359.4A 2021-09-08 2021-09-08 Partition-packaged rapid point searching method, storage medium and terminal Active CN113515903B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111049359.4A CN113515903B (en) 2021-09-08 2021-09-08 Partition-packaged rapid point searching method, storage medium and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111049359.4A CN113515903B (en) 2021-09-08 2021-09-08 Partition-packaged rapid point searching method, storage medium and terminal

Publications (2)

Publication Number Publication Date
CN113515903A CN113515903A (en) 2021-10-19
CN113515903B true CN113515903B (en) 2022-03-08

Family

ID=78063045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111049359.4A Active CN113515903B (en) 2021-09-08 2021-09-08 Partition-packaged rapid point searching method, storage medium and terminal

Country Status (1)

Country Link
CN (1) CN113515903B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114756974B (en) * 2022-06-13 2022-09-02 中国空气动力研究与发展中心计算空气动力研究所 Wall surface distance calculation method considering object surface normal information

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6456376B1 (en) * 1995-09-20 2002-09-24 J.A. Woollam Co., Inc. Rotating compensator ellipsometer system with spatial filter
CN101825440A (en) * 2009-03-03 2010-09-08 鸿富锦精密工业(深圳)有限公司 Clearance detecting system and method for product parts
CN102819039A (en) * 2012-08-22 2012-12-12 电子科技大学 Interval velocity model building method under complicated geological conditions
CN103377303A (en) * 2012-04-28 2013-10-30 鸿富锦精密工业(深圳)有限公司 Curve surface measurement system and method
CN104637084A (en) * 2015-01-29 2015-05-20 吴宇晖 Method for building garment virtual three-dimensional model and virtual garment trying-on system
CN105069245A (en) * 2015-08-19 2015-11-18 中国航天空气动力技术研究院 Multiple-searching technology based three-dimensional wave-rider rapid design method
CN108459909A (en) * 2018-02-27 2018-08-28 北京临近空间飞行器系统工程研究所 A kind of Multi-bodies Separation mesh overlay method and system suitable for parallel processing
CN112581621A (en) * 2020-12-01 2021-03-30 中国船舶重工集团公司第七一六研究所 Three-dimensional point cloud steel plate space size online extraction method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6585128B2 (en) * 2001-04-30 2003-07-01 Deere & Company Oil breather splash guard structure

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6456376B1 (en) * 1995-09-20 2002-09-24 J.A. Woollam Co., Inc. Rotating compensator ellipsometer system with spatial filter
CN101825440A (en) * 2009-03-03 2010-09-08 鸿富锦精密工业(深圳)有限公司 Clearance detecting system and method for product parts
CN103377303A (en) * 2012-04-28 2013-10-30 鸿富锦精密工业(深圳)有限公司 Curve surface measurement system and method
CN102819039A (en) * 2012-08-22 2012-12-12 电子科技大学 Interval velocity model building method under complicated geological conditions
CN104637084A (en) * 2015-01-29 2015-05-20 吴宇晖 Method for building garment virtual three-dimensional model and virtual garment trying-on system
CN105069245A (en) * 2015-08-19 2015-11-18 中国航天空气动力技术研究院 Multiple-searching technology based three-dimensional wave-rider rapid design method
CN108459909A (en) * 2018-02-27 2018-08-28 北京临近空间飞行器系统工程研究所 A kind of Multi-bodies Separation mesh overlay method and system suitable for parallel processing
CN112581621A (en) * 2020-12-01 2021-03-30 中国船舶重工集团公司第七一六研究所 Three-dimensional point cloud steel plate space size online extraction method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
并行多块结构重叠网格装配算法及应用;马文鹏 等;《计算机应用研究》;20160331;第33卷(第3期);788-793,809 *
道岔上方接触网平面布置研究;韩军杰;《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》;20170331(第03期);C033-51 *

Also Published As

Publication number Publication date
CN113515903A (en) 2021-10-19

Similar Documents

Publication Publication Date Title
JP4398455B2 (en) Route search method, program and system
US7940263B2 (en) Curved-surface generating method and program, and three-dimensional shape processing apparatus
KR102005343B1 (en) Partitioned space based spatial data object query processing apparatus and method, storage media storing the same
CN112000115B (en) Path planning method of autonomous underwater robot and related equipment
US10157219B2 (en) Geographical map-based visualization of big data
CN113515903B (en) Partition-packaged rapid point searching method, storage medium and terminal
CN108303098A (en) Robot path planning method and equipment
CN105469445B (en) A kind of step-length changeably drawing generating method
CN105051725A (en) Graph data query method and device
CN113147739B (en) Heuristic automatic parking method and device for unmanned vehicle
CN114756974B (en) Wall surface distance calculation method considering object surface normal information
CN104809760A (en) Depth-first strategy based method for automatically constructing geo-spatial three-dimensional outline
WO2022242259A1 (en) Data processing method and apparatus, device, and medium
CN107506572B (en) Method and device for acquiring height of target point
CN114707463A (en) Parasitic capacitance extraction method and device based on random walking and electronic device
CN114338506A (en) Neural task on-chip routing method and device of brain-like computer operating system
CN105760442A (en) Image feature enhancing method based on database neighborhood relation
CN113849498B (en) Index construction and query method
CN116244865A (en) Method and device for finite element modeling of axial flow impeller and computer storage medium
KR101642598B1 (en) Space division method, space division device, and storage medium
CN108052778B (en) Efficient double search method for adjacent particles for non-grid particle simulation technology
CN115730438A (en) Parallel processing method for inverse solution of GPU (graphics processing Unit) of NURBS (non-Uniform rational B-spline) surface mapping of product
CN114119882B (en) Efficient nested grid host unit searching method in aircraft dynamic flow field analysis
CN113204607B (en) Vector polygon rasterization method for balancing area, topology and shape characteristics
CN113552881A (en) Multi-path planning data set generation method for neural network training

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant