{ "info": { "author": "Qiao Chen", "author_email": "benechiao@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering", "Topic :: Software Development" ], "description": ".. _meshio: https://github.com/nschloe/meshio\n\nCreate & Convert *Cubed-sphere Grids* (CSGrid) to Unstructured Meshes\n=====================================================================\n\n.. image:: https://img.shields.io/pypi/v/csgrid2unstr.svg\n :target: https://pypi.org/project/csgrid2unstr/\n.. image:: https://img.shields.io/pypi/l/csgrid2unstr.svg\n :target: https://pypi.org/project/csgrid2unstr/\n\nIntroduction\n------------\n\nThe grid generator is from `here `_,\nand I/O is handled by `meshio`_.\n\nThis package was created for education/research purpose. Personally, I use this\nto study the grid convergence for data transferring between CSGrid and\n*spherical centroidal Voronoi tessellations* (SCVT).\n\n\n.. image:: demo.png\n :scale: 10 %\n :align: center\n\nInstallation\n------------\n\nYou can easily install this package through pip, i.e.\n\n.. code-block:: console\n\n $ pip install csgrid2unstr --user\n\nYou can, of course, install it directly from the repository:\n\n.. code-block:: console\n\n $ git clone https://github.com/chiao45/csgrid2unstr.git\n $ cd csgrid2unstr && python setup.py install --user\n\nNotice that this package depends on:\n\n1. `numpy `_\n2. `setuptools `_\n3. `meshio`_\n\nUsage\n-----\n\nAs Executable Binary\n++++++++++++++++++++\n\nOnce you have installed the package, open the terminal and type:\n\n.. code-block:: console\n\n $ csgrid2unstr -h\n usage: csgrid2unstr [-h] [-n SIZE] [-o OUTPUT] [-r REFINE]\n [-f {vtk,vtu,gmsh,off,exodus,xdmf,dolfin-xml,stl}] [-b]\n [-V] [-v]\n\n write CSGrid to unstr\n\n optional arguments:\n -h, --help show this help message and exit\n -n SIZE, --size SIZE Number of intervals of a square face\n -o OUTPUT, --output OUTPUT\n Output file name, w/o extension\n -r REFINE, --refine REFINE\n Level of refinements, default is 1\n -f {vtk,vtu,gmsh,off,exodus,xdmf,dolfin-xml,stl}, --format {vtk,vtu,gmsh,off,exodus,xdmf,dolfin-xml,stl}\n Output file format, default is VTK\n -b, --binary Use BINARY. Notice that this flag is ignored for\n some formats\n -V, --verbose Verbose output\n -v, --version Check version\n\nIf you got ``command not found: csgrid2unstr``, make sure ``csgrid2unstr`` is\nin your ``$PATH``.\n\nThere are two must-provided parameters, i.e. ``-n`` (``--size``) and ``-o``\n(``--output``). The former is to define the number of intervals of a square\nface, i.e. the number of quadrilaterals of a face is n*n, and the latter is\nto provide the output filename (**without extension**). For instance:\n\n.. code-block:: console\n\n $ csgrid2unstr -n 20 -o demo\n\nwill construct a CSGrid of 400 quadrilaterals per face, convert the grid into\nan unstructured mesh and store it in ``demo.vtk``.\n\nYou can create a serial of uniform refined grids by adding ``-r``\n(``--refine``) switch, e.g.:\n\n.. code-block:: console\n\n $ csgrid2unstr -n 10 -r 3 -o demo -f xdmf\n\nwill construct three CSGrids with 100, 400, and 1600 quadrilaterals per face,\nconvert them into three unstructured meshes and store them in ``demo0.xdmf``,\n``demo1.xdmf``, and ``demo2.xdfm``, resp.\n\nAs Module\n+++++++++\n\nUsing ``csgrid2unstr`` as a Python module is also simple.\n\n.. code-block:: python\n\n from __future__ import print_function\n from csgrid2unstr.cubed_sphere import CSGrid\n from csgrid2unstr.unstr import Unstr\n\n # create a CSGrid of 25 quads per face\n cs = CSGrid(5)\n\n # convert it into an unstructured mesh\n mesh = Unstr(cs)\n\n # two attributes, points and cells, of np.ndarray\n\n print('Nodes {}-by-3'.format(len(mesh.points)))\n print(mesh.points)\n\n print('Cells {}-by-4'.format(len(mesh.cells)))\n print(mesh.cells)\n\nLicense\n-------\n\nMIT License\n\nCopyright (c) 2018 Qiao Chen", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chiao45/csgrid2unstr", "keywords": "Math", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "csgrid2unstr", "package_url": "https://pypi.org/project/csgrid2unstr/", "platform": "", "project_url": "https://pypi.org/project/csgrid2unstr/", "project_urls": { "Homepage": "https://github.com/chiao45/csgrid2unstr" }, "release_url": "https://pypi.org/project/csgrid2unstr/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Creating and converting cubed-sphere grids to unstructured meshes", "version": "0.0.1" }, "last_serial": 4275770, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "89174c2fc5d9c0a03053143d94c90326", "sha256": "0a839d73c2c9b744edc4c5ebe3b155af5ab0e91881a52bb86d66195aa388ab02" }, "downloads": -1, "filename": "csgrid2unstr-0.0.1.tar.gz", "has_sig": false, "md5_digest": "89174c2fc5d9c0a03053143d94c90326", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9087, "upload_time": "2018-09-16T02:28:12", "url": "https://files.pythonhosted.org/packages/b2/85/0c0cc1df1d63f42723bff9e1b095721d54b1596f60a0a6e148d483d56998/csgrid2unstr-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "89174c2fc5d9c0a03053143d94c90326", "sha256": "0a839d73c2c9b744edc4c5ebe3b155af5ab0e91881a52bb86d66195aa388ab02" }, "downloads": -1, "filename": "csgrid2unstr-0.0.1.tar.gz", "has_sig": false, "md5_digest": "89174c2fc5d9c0a03053143d94c90326", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9087, "upload_time": "2018-09-16T02:28:12", "url": "https://files.pythonhosted.org/packages/b2/85/0c0cc1df1d63f42723bff9e1b095721d54b1596f60a0a6e148d483d56998/csgrid2unstr-0.0.1.tar.gz" } ] }