Git Product home page Git Product logo

gmsh_scripts's People

Contributors

romanzes637 avatar somesortofme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gmsh_scripts's Issues

Выборочное применение некоторых параметров раздела methadata

Параметры MeshSizeExtendFromBoundary, Mesh.MeshSizeFromCurvature, Mesh.MinimumLineNodes сейчас применяются сразу ко всем целевым сущностям (граничным поверхностям, кривым или прямым линиям сетки), и это неудобно на практике:
рис. 1 Mesh.MeshSizeFromCurvature
рис. 2 Mesh.MinimumLineNodes

Предлагаю добавить возможность применять эти параметры к определенным сущностям:

  1. MeshSizeExtendFromBoundary: отдельно к поверхностям каждого из горизонтальный слоев, заданных в разделе layer.
    То есть, если, например, задано "layer": [[0.05, "0.6:2"],["0.3:2"]], то MeshSizeExtendFromBoundary[1] применяется к границе слоя радиусом 0.05, а MeshSizeExtendFromBoundary[2] - к границе слоя 0.6.
  2. Mesh.MeshSizeFromCurvature - аналогично MeshSizeExtendFromBoundary.
  3. Mesh.MinimumLineNodes - отдельно к вертикальным и горизонтальным линиям заданного layer.

Error: `np.float` was a deprecated alias for the builtin `float`

I got this error when running python -m gmsh_scripts matrix.json. The python version is 3.11.5

  File "C:\Users\*\anaconda3\envs\*\Lib\site-packages\gmsh_scripts\entity\point.py", line 58, in parse_coordinates
    coordinates = np.array(coordinates, dtype=np.float)
                                              ^^^^^^^^
  File "C:\Users\*\anaconda3\envs\*\Lib\site-packages\numpy\__init__.py", line 338, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

Found two nearly self-intersecting facets

2022-06-01T19:17:03.596+0300|VISION|192.168.0.14|Роман|3392|DEBUG|support.py|534|Info: Found two nearly self-intersecting facets (dihedral angle  1.06416E-07).
2022-06-01T19:17:03.597+0300|VISION|192.168.0.14|Роман|3392|DEBUG|support.py|534|Info:   1st: [130, 3541, 37417] #286
2022-06-01T19:17:03.597+0300|VISION|192.168.0.14|Роман|3392|DEBUG|support.py|534|Info:   2nd: [130, 3541, 131] #293
2022-06-01T19:17:03.597+0300|VISION|192.168.0.14|Роман|3392|DEBUG|support.py|534|Info: The dihedral angle between them is 6.09716e-06 degree.
2022-06-01T19:17:03.597+0300|VISION|192.168.0.14|Роман|3392|DEBUG|support.py|534|Info: Hint: You may use Mesh.AngleToleranceFacetOverlap to decrease the dihedral angle tolerance 0.1 (degree)

If change in lateral_well.json from "layer": [[40, 120], ["1:5"]] to "layer": [[40, 120], ["1:4"]] bug disappears.

wells_parent.json

{
  "metadata": {
    "issues": ["Issue: PCL Error: A segment and a facet intersect at point. Solution: Set appropriate mesh size or set MeshSizeFromCurvature = 12 See: https://gitlab.onelab.info/gmsh/gmsh/-/issues/766"],
    "run": {
      "factory": "occ",
      "log_level": "DEBUG",
	  "log_path": null,
      "options": {
        "Mesh.Algorithm": 6,
        "Mesh.Algorithm3D": 1,
        "Mesh.MeshSizeFactor": 1,
        "Mesh.MeshSizeMin": 0.01,
        "Mesh.MeshSizeMax": 1e22,
        "Mesh.MeshSizeFromPoints": 1,
        "Mesh.MeshSizeExtendFromBoundary": 1,
        "Mesh.MeshSizeFromCurvature": 40,
		"Mesh.MinimumLineNodes": 9
      }
    }
  },
  "data": {
    "class": "block.Matrix",
    "matrix": [
      ["2700;1;1", "3400:2;1;1"],
      ["100;1;1", "1200:2;1;1"],
      ["-1800;1;1", "100:2;1;1"]],
    "items_do_register_map": 0,
	"items_do_unregister_map": 0,
    "items_do_unregister_boolean_map": 0,
    "items_boolean_level_map": 0,
    "items_do_quadrate_map": 0,
	"children": ["/main_well.json", "/lateral_well.json"],
	"items_zone": ["M"]
  }
}

main_well.json

{
  "data": {
	"class": "block.Layer",
    "layer": [[50, 150], ["1:5"],
      {"class": "coordinate_system.Path",
        "curves": [
          ["line", [[3300.000,   200.000,     0.000], [3300.000,   344.870,   -781.780]]],
          ["line", [[3300.000,   344.870,   -781.780], [3300.000,   713.210,  -1364.860]]],
		  ["line", [[3300.000,   713.210,  -1364.860], [3300.000,  1120.020,  -1795.460]]]
        ],
        "orientations": [
          [[1, -90.000, 0], "coordinate_system.Spherical"],
          [[1, -90.000,     20.000], "coordinate_system.Spherical"],
          [[1, -90.000,     46.700], "coordinate_system.Spherical"],
		  [[1, -90.000,     60.840], "coordinate_system.Spherical"]
        ]
      }],
    "layer_curves": [["circle_arc", "circle_arc"], ["line"]],
	"items_zone": ["W1"],
	"items_boolean_level_map": [1, 0],
    "items_do_register_map": [1, 1],
    "items_do_unregister_map": [1, 0],
    "items_do_unregister_boolean_map": [1, 0]
  }
}

lateral_well.json

{
  "data": {
	"class": "block.Layer",
    "layer": [[40, 120], ["1:5"],
      {"class": "coordinate_system.Path",
        "curves": [
          ["line", [[3300,	394.87,	-781.78], [3295.55,	347.072,	-1066.87]]],
          ["line", [[3295.55,	347.072,	-1066.87], [3256.95,	363.035,	-1228.71]]],
		  ["line", [[3256.95,	363.035,	-1228.71], [3170.06,	401.045,	-1368.71]]],
          ["line", [[3170.06,	401.045,	-1368.71], [3046.58,	455.797,	-1466.93]]],
		  ["line", [[3046.58,	455.797,	-1466.93], [2931.31,	512.14,	-1573.47]]],
          ["line", [[2931.31,	512.14,	-1573.47], [2841.23,	551.925,	-1710.39]]]
        ],
        "orientations": [
          [[1, 0, 0], "coordinate_system.Spherical"],
          [[1, 0,     6.44], "coordinate_system.Spherical"],
          [[1, 0,     26.22], "coordinate_system.Spherical"],
		  [[1, 0,     42.69], "coordinate_system.Spherical"],
          [[1, 0,     61.18], "coordinate_system.Spherical"],
          [[1, 0,     41.95], "coordinate_system.Spherical"],
          [[1, 0,     28.29], "coordinate_system.Spherical"]
        ]
      }],
    "layer_curves": [["circle_arc", "circle_arc"], ["line"]],
	"items_zone": ["W2"],
	"items_boolean_level_map": [1, 0],
    "items_do_register_map": [1, 1],
    "items_do_unregister_map": [1, 0],
    "items_do_unregister_boolean_map": [1, 0]
  }
}

wells_parent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.