{"id":19863856,"url":"https://github.com/sandialabs/affect","last_synced_at":"2025-06-13T16:34:46.684Z","repository":{"id":15024456,"uuid":"17750203","full_name":"sandialabs/affect","owner":"sandialabs","description":"Read/write and post-process results of the finite element method in Python and C++.","archived":false,"fork":false,"pushed_at":"2018-12-18T16:13:30.000Z","size":8670,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-01T00:26:02.595Z","etag":null,"topics":["scr-2244","snl-data-analysis","snl-science-libs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sandialabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-14T15:11:51.000Z","updated_at":"2024-10-31T11:36:28.000Z","dependencies_parsed_at":"2022-09-17T06:03:17.878Z","dependency_job_id":null,"html_url":"https://github.com/sandialabs/affect","commit_stats":null,"previous_names":["sandialabs/affect"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sandialabs/affect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Faffect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Faffect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Faffect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Faffect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sandialabs","download_url":"https://codeload.github.com/sandialabs/affect/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sandialabs%2Faffect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259680485,"owners_count":22895199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scr-2244","snl-data-analysis","snl-science-libs"],"created_at":"2024-11-12T15:16:20.146Z","updated_at":"2025-06-13T16:34:46.617Z","avatar_url":"https://github.com/sandialabs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"affect\n======\n\nThe affect Python package provides a API/library for processing meshes and field results of a finite element \nanalysis.\n\nLicense\n-------\n\nBSD. Specifically the \"new/modified BSD\" license, also called the \"BSD three clause license\".\nSee [license file](https://github.com/kevincopps/affect/blob/master/LICENSE).\n\nDocumentation\n-------------\n\nSee the [affect documentation here](https://kevincopps.github.io/affect).\n\nBasic Goals and Capabilities\n----------------------------\n\n* Designed for use on many-core shared memory workstations or servers using \nthreaded parallelism.\n* Easy to use within a Python (_Jupyter_) Notebook and targets modern Python\n (\u003e3.5).\n* Support for faster operations on very large analysis results on \nunstructured grids (billions of elements/nodes) using a compact storage scheme and CPU threaded parallelism. \n* Fast skinning of mesh/block boundaries.\n* A clean Python Database class for reading mesh and fields from ExodusII files directly into Numpy arrays.\n* Some optimized built in postprocessors, like the FRF (frequency response function).\n\nUsing the Library\n----------------- \n\n### Dependencies\n\n`affect` requires Python 3.6+ with additional package dependencies. The easiest way to get going\n is by installing and using the [Anaconda](https://www.continuum.io/downloads) python environment.\n\n* [numpy](htttps://www.numpy.org)\n* [numexpr](https://github.com/pydata/numexpr)\n* [netcdf4](https://pypi.python.org/pypi/netCDF4)\n\nThe netcdf4 package has additional dependencies including the hdf4 and hdf5 libraries.\nFor a complete list of dependencies see the `requirements.txt` file.\n\n### OpenMP and thread affinity\n\nSetting OpenMP environment values for binding threads may improve performance. The matter of thread affinity becomes \nimportant on multi-socket nodes. Optimal settings of these environment variables will vary by platform.\n\nPutting threads far apart, i.e. on different sockets\n\n * May improve the aggregated memory bandwidth available to your application\n * May improve the combined cache size available to your application\n * May decrease performance of synchronization constructs\n \nPutting threads close together, i.e. on two adjacent cores which possibly shared some caches\n * May improve performance of synchronization constructs\n * May decrease the available memory bandwidth and cache size\n\nSee the OpenMP documentation for documentation on setting the two variables `OMP_PROC_BIND` and `OMP_PLACES`.\nThese can take on the following values:\n \nOne of `OMP_PROC_BIND={false|true|master|close|spread}` \n\nAnd one of `OMP_PLACES={sockets|cores|threads}` or an explicit list of places that are described by non-negative \nnumbers.\n\nFor example,\n```\nexport OMP_PLACES=threads\nexport OMP_PROC_BIND=close\n```\n\nDeveloping and Improving affect\n-------------------------------\n\n### Using the makefile\n \nFor building, testing, and documentation, the easiest way to work is using the `makefile` \nin the root directory of the project.\n\n```\nmake clean; make build\nmake test\nmake docs\n[...etc]\n```\n\n### Build warnings\n\nSome warnings are hidden during the `make build` process, notably the warning about the \ndeprecated numpy API that always occur with `cython` builds. These warnings are filtered using \nthe `remove_warning.py` script.\n\n\nThe following type of warning occurs when building on Linux with gcc: \n\n```\ncc1plus: warning: command line option \"-Wstrict-prototypes\" is valid for Ada/C/ObjC but not for C++\n```\n\nThis is normal, and a side effect of using setuptools and distutils with the \n`Extension(language='c++')` parameter. These warnings may also be hidden during `make build`. \n\n### Setting up your environment\n\nThere are a few other dependencies required only for development purposes for \nbuilding the code and documentation. `affect` is developed with Cython and the\ndocumentation is built using sphinx. For building a conda recipe using \n`conda build` you may also need jinja2. \n\n* cython \u003e= 0.24.1\n* jinja2\n* pytest \u003e= 3.0.5\n* pytest-cov \u003e= 2.3.1\n* pytest-runner \u003e= 2.11.1\n* sphinx \u003e= 1.5.1\n* sphinx_rtd_theme \u003e= 0.1.9\n\nOther command line tools required or that you may want to use on Mac or Linux \nare:\n\n* ccache\n* gcc6\n* make\n\nUsing the Conda distribution is the easiest way to develop and manage the \nPython package dependencies. Each of these may be installed similar to:\n\n```\nconda install pytest-cov\n```\n\nIf you find any of the dependencies are not in the default conda channel,\nfirst try adding the conda-forge channel (you may also wish to disable SSL\nverification behind firewalls or web proxies):  \n\n```\nconda config --set ssl_verify false\nconda config --add channels conda-forge\n```\n\nIf the package is still not found, fall back to using pip:\n\n```\npip install sphinx-autodoc-typehints\n```\n\n### Conda Recipe\n\nTo build the conda recipe, make sure you install the prerequisites:\n\n`conda install conda-build`\n\nThe file `meta.yaml` in the root directory controls the building of the conda package.\nBuild the recipe using\n\n`conda build \u003cproject-directory\u003e`\n\nImmediate Plans\n---------------\n\n* Write meshes in the _ExodusII_ format (unstructured meshes)\n* Read ExodusII meshes split across files, thus avoiding the need for \nexecuting the _Seacas_ `epu` tool. \n* Read and write _CGNS_ mesh format (structured meshes)\n* Provide a local least squares recovery for mesh fields. This is a smoothing\nalgorithm that can be used to, for example, either promote a element field \n(piecewise constant) to a piecewise linear field, or provide a local error\nindicator for spatial interpolation error on each element.\n\nFuture Plans\n------------\n\n* Fast visualization of mesh/block boundary.\n* Divide mesh boundary (block skin) into separate non-intersecting \nsurface regions at sharp edges. (This can be thought of as automatic \ncreation of sidesets ExodusII terms).\n* Fast search algorithm for nearest neighbor searches for element sides\nand nodes on the boundary surface. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Faffect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsandialabs%2Faffect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsandialabs%2Faffect/lists"}