Showing preview only (4,631K chars total). Download the full file or copy to clipboard to get everything.
Repository: PyFR/PyFR
Branch: develop
Commit: 3cf0cc000c3c
Files: 598
Total size: 4.3 MB
Directory structure:
gitextract__nojc1no/
├── AUTHORS
├── LICENSE
├── README.md
├── doc/
│ ├── Makefile
│ ├── requirements.txt
│ └── src/
│ ├── _static/
│ │ └── css/
│ │ └── custom.css
│ ├── backends/
│ │ ├── backend-cuda.rst
│ │ ├── backend-hip.rst
│ │ ├── backend-metal.rst
│ │ ├── backend-opencl.rst
│ │ ├── backend-openmp.rst
│ │ └── backend.rst
│ ├── boundary-initial-conditions/
│ │ ├── soln-bcs.rst
│ │ └── soln-ics.rst
│ ├── conf.py
│ ├── developer_guide.rst
│ ├── examples.rst
│ ├── file_format.rst
│ ├── index.rst
│ ├── installation.rst
│ ├── io.rst
│ ├── meshing.rst
│ ├── nodal-point-sets/
│ │ ├── solver-elements-hex.rst
│ │ ├── solver-elements-pri.rst
│ │ ├── solver-elements-pyr.rst
│ │ ├── solver-elements-quad.rst
│ │ ├── solver-elements-tet.rst
│ │ ├── solver-elements-tri.rst
│ │ ├── solver-interfaces-line.rst
│ │ ├── solver-interfaces-quad.rst
│ │ └── solver-interfaces-tri.rst
│ ├── performance_tuning.rst
│ ├── plugins/
│ │ ├── soln-plugin-ascent.rst
│ │ ├── soln-plugin-dtstats.rst
│ │ ├── soln-plugin-fluid-force.rst
│ │ ├── soln-plugin-fwh.rst
│ │ ├── soln-plugin-integrate.rst
│ │ ├── soln-plugin-nancheck.rst
│ │ ├── soln-plugin-pseudostats.rst
│ │ ├── soln-plugin-residual.rst
│ │ ├── soln-plugin-sampler.rst
│ │ ├── soln-plugin-tavg.rst
│ │ ├── soln-plugin-writer.rst
│ │ ├── solver-plugin-source.rst
│ │ ├── solver-plugin-turbulence.rst
│ │ └── triggers.rst
│ ├── post_processing.rst
│ ├── systems/
│ │ ├── constants.rst
│ │ ├── solver-artificial-viscosity.rst
│ │ ├── solver-entropy-filter.rst
│ │ ├── solver-interfaces.rst
│ │ ├── solver-time-integrator.rst
│ │ └── solver.rst
│ └── user_guide.rst
├── pyfr/
│ ├── __init__.py
│ ├── __main__.py
│ ├── _version.py
│ ├── backends/
│ │ ├── __init__.py
│ │ ├── base/
│ │ │ ├── __init__.py
│ │ │ ├── backend.py
│ │ │ ├── blasext.py
│ │ │ ├── generator.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ └── packing.mako
│ │ │ ├── makoutil.py
│ │ │ ├── provider.py
│ │ │ └── types.py
│ │ ├── cuda/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── blasext.py
│ │ │ ├── compiler.py
│ │ │ ├── cublaslt.py
│ │ │ ├── driver.py
│ │ │ ├── generator.py
│ │ │ ├── gimmik.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── axnpby.mako
│ │ │ │ ├── base.mako
│ │ │ │ ├── packing.mako
│ │ │ │ └── reduction.mako
│ │ │ ├── nvtools.py
│ │ │ ├── packing.py
│ │ │ ├── provider.py
│ │ │ └── types.py
│ │ ├── hip/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── blasext.py
│ │ │ ├── compiler.py
│ │ │ ├── driver.py
│ │ │ ├── generator.py
│ │ │ ├── gimmik.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── axnpby.mako
│ │ │ │ ├── base.mako
│ │ │ │ ├── packing.mako
│ │ │ │ └── reduction.mako
│ │ │ ├── packing.py
│ │ │ ├── provider.py
│ │ │ ├── rocblas.py
│ │ │ ├── roctx.py
│ │ │ └── types.py
│ │ ├── metal/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── blasext.py
│ │ │ ├── compiler.py
│ │ │ ├── generator.py
│ │ │ ├── gimmik.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── axnpby.mako
│ │ │ │ ├── base.mako
│ │ │ │ ├── packing.mako
│ │ │ │ └── reduction.mako
│ │ │ ├── mps.py
│ │ │ ├── packing.py
│ │ │ ├── provider.py
│ │ │ ├── types.py
│ │ │ └── util.py
│ │ ├── opencl/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── blasext.py
│ │ │ ├── clblast.py
│ │ │ ├── compiler.py
│ │ │ ├── driver.py
│ │ │ ├── generator.py
│ │ │ ├── gimmik.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── axnpby.mako
│ │ │ │ ├── base.mako
│ │ │ │ ├── packing.mako
│ │ │ │ └── reduction.mako
│ │ │ ├── packing.py
│ │ │ ├── provider.py
│ │ │ ├── tinytc.py
│ │ │ └── types.py
│ │ └── openmp/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── blasext.py
│ │ ├── compiler.py
│ │ ├── generator.py
│ │ ├── kernels/
│ │ │ ├── __init__.py
│ │ │ ├── axnpby.mako
│ │ │ ├── base.mako
│ │ │ ├── batch-gemm.mako
│ │ │ ├── packing.mako
│ │ │ ├── par-memcpy.mako
│ │ │ ├── par-memop.mako
│ │ │ ├── reduction.mako
│ │ │ └── run-kernels.mako
│ │ ├── packing.py
│ │ ├── provider.py
│ │ ├── types.py
│ │ └── xsmm.py
│ ├── cache.py
│ ├── ctypesutil.py
│ ├── inifile.py
│ ├── integrators/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── controllers.py
│ │ ├── explicit/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── controllers.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ └── rkvdh2.mako
│ │ │ └── steppers.py
│ │ ├── implicit/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── controllers.py
│ │ │ ├── gmres.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── applyprecond.mako
│ │ │ │ ├── precondextract.mako
│ │ │ │ ├── precondperturb.mako
│ │ │ │ └── precondscale.mako
│ │ │ ├── krylov.py
│ │ │ ├── newton.py
│ │ │ ├── steppers.py
│ │ │ └── tolerance.py
│ │ └── registers.py
│ ├── mpiutil.py
│ ├── nputil.py
│ ├── partitioners/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── baseline.py
│ │ ├── kahip.py
│ │ ├── metis.py
│ │ ├── reconstruct.py
│ │ └── scotch.py
│ ├── plugins/
│ │ ├── __init__.py
│ │ ├── ascent.py
│ │ ├── base.py
│ │ ├── dtstats.py
│ │ ├── fieldeval.py
│ │ ├── fluidforce.py
│ │ ├── fwh.py
│ │ ├── integrate.py
│ │ ├── kernels/
│ │ │ ├── __init__.py
│ │ │ ├── fieldeval.mako
│ │ │ ├── fluidforce.mako
│ │ │ ├── sample.mako
│ │ │ ├── source.mako
│ │ │ ├── tavg.mako
│ │ │ └── turbulence.mako
│ │ ├── mesh.py
│ │ ├── nancheck.py
│ │ ├── residual.py
│ │ ├── sampler.py
│ │ ├── source.py
│ │ ├── tavg.py
│ │ ├── triggers/
│ │ │ ├── __init__.py
│ │ │ ├── base.py
│ │ │ ├── field.py
│ │ │ ├── point.py
│ │ │ ├── sources.py
│ │ │ └── steady.py
│ │ ├── turbulence.py
│ │ └── writer.py
│ ├── points.py
│ ├── polys.py
│ ├── progress.py
│ ├── quadrules/
│ │ ├── __init__.py
│ │ ├── hex/
│ │ │ ├── gauss-legendre-lobatto-n125-d7-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n216-d9-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n27-d3-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n343-d11-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n512-d13-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n64-d5-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n729-d15-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n8-d1-pstu.txt
│ │ │ ├── gauss-legendre-n1-d1-pstu.txt
│ │ │ ├── gauss-legendre-n125-d9-pstu.txt
│ │ │ ├── gauss-legendre-n216-d11-pstu.txt
│ │ │ ├── gauss-legendre-n27-d5-pstu.txt
│ │ │ ├── gauss-legendre-n343-d13-pstu.txt
│ │ │ ├── gauss-legendre-n512-d15-pstu.txt
│ │ │ ├── gauss-legendre-n64-d7-pstu.txt
│ │ │ ├── gauss-legendre-n729-d17-pstu.txt
│ │ │ ├── gauss-legendre-n8-d3-pstu.txt
│ │ │ ├── witherden-n148-d13-sp.txt
│ │ │ ├── witherden-n199-d15-sp.txt
│ │ │ ├── witherden-n282-d17-sp.txt
│ │ │ ├── witherden-n369-d19-sp.txt
│ │ │ ├── witherden-n505-d21-sp.txt
│ │ │ ├── witherden-vincent-n1-d1-sp.txt
│ │ │ ├── witherden-vincent-n14-d5-sp.txt
│ │ │ ├── witherden-vincent-n34-d7-sp.txt
│ │ │ ├── witherden-vincent-n58-d9-sp.txt
│ │ │ ├── witherden-vincent-n6-d3-sp.txt
│ │ │ └── witherden-vincent-n90-d11-sp.txt
│ │ ├── line/
│ │ │ ├── gauss-legendre-lobatto-n10-d17-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n11-d19-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n12-d21-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n13-d23-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n14-d25-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n15-d27-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n16-d29-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n17-d31-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n18-d33-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n19-d35-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n2-d1-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n20-d37-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n3-d3-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n4-d5-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n5-d7-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n6-d9-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n7-d11-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n8-d13-spu.txt
│ │ │ ├── gauss-legendre-lobatto-n9-d15-spu.txt
│ │ │ ├── gauss-legendre-n1-d1-spu.txt
│ │ │ ├── gauss-legendre-n10-d19-spu.txt
│ │ │ ├── gauss-legendre-n11-d21-spu.txt
│ │ │ ├── gauss-legendre-n12-d23-spu.txt
│ │ │ ├── gauss-legendre-n13-d25-spu.txt
│ │ │ ├── gauss-legendre-n14-d27-spu.txt
│ │ │ ├── gauss-legendre-n15-d29-spu.txt
│ │ │ ├── gauss-legendre-n16-d31-spu.txt
│ │ │ ├── gauss-legendre-n17-d33-spu.txt
│ │ │ ├── gauss-legendre-n18-d35-spu.txt
│ │ │ ├── gauss-legendre-n19-d37-spu.txt
│ │ │ ├── gauss-legendre-n2-d3-spu.txt
│ │ │ ├── gauss-legendre-n20-d39-spu.txt
│ │ │ ├── gauss-legendre-n3-d5-spu.txt
│ │ │ ├── gauss-legendre-n4-d7-spu.txt
│ │ │ ├── gauss-legendre-n5-d9-spu.txt
│ │ │ ├── gauss-legendre-n6-d11-spu.txt
│ │ │ ├── gauss-legendre-n7-d13-spu.txt
│ │ │ ├── gauss-legendre-n8-d15-spu.txt
│ │ │ └── gauss-legendre-n9-d17-spu.txt
│ │ ├── pri/
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n126-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n18-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n196-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n288-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n40-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n405-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n6-stu.txt
│ │ │ ├── alpha-opt~gauss-legendre-lobatto-n75-stu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n126-d8-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n18-d3-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n196-d10-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n288-d12-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n40-d5-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n405-d14-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n6-d1-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-lobatto-n75-d7-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n1-d1-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n126-d8-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n18-d4-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n196-d10-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n288-d12-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n40-d5-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n405-d14-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n6-d2-pstu.txt
│ │ │ ├── williams-shunn~gauss-legendre-n75-d7-pstu.txt
│ │ │ ├── witherden-n128-d12-sp.txt
│ │ │ ├── witherden-n145-d13-sp.txt
│ │ │ ├── witherden-n182-d14-sp.txt
│ │ │ ├── witherden-n217-d15-sp.txt
│ │ │ ├── witherden-n263-d16-sp.txt
│ │ │ ├── witherden-n292-d17-sp.txt
│ │ │ ├── witherden-n362-d18-sp.txt
│ │ │ ├── witherden-n421-d19-sp.txt
│ │ │ ├── witherden-n46-d8-sp.txt
│ │ │ ├── witherden-n483-d20-sp.txt
│ │ │ ├── witherden-n59-d9-sp.txt
│ │ │ ├── witherden-n82-d10-sp.txt
│ │ │ ├── witherden-n97-d11-sp.txt
│ │ │ ├── witherden-vincent-n1-d1-sp.txt
│ │ │ ├── witherden-vincent-n11-d4-sp.txt
│ │ │ ├── witherden-vincent-n16-d5-sp.txt
│ │ │ ├── witherden-vincent-n28-d6-sp.txt
│ │ │ ├── witherden-vincent-n35-d7-sp.txt
│ │ │ ├── witherden-vincent-n46-d8-sp.txt
│ │ │ ├── witherden-vincent-n5-d2-sp.txt
│ │ │ ├── witherden-vincent-n60-d9-sp.txt
│ │ │ ├── witherden-vincent-n8-d3-sp.txt
│ │ │ └── witherden-vincent-n85-d10-sp.txt
│ │ ├── pyr/
│ │ │ ├── gauss-legendre-lobatto-n14-su.txt
│ │ │ ├── gauss-legendre-lobatto-n140-su.txt
│ │ │ ├── gauss-legendre-lobatto-n30-su.txt
│ │ │ ├── gauss-legendre-lobatto-n5-su.txt
│ │ │ ├── gauss-legendre-lobatto-n55-su.txt
│ │ │ ├── gauss-legendre-lobatto-n91-su.txt
│ │ │ ├── gauss-legendre-n1-su.txt
│ │ │ ├── gauss-legendre-n14-su.txt
│ │ │ ├── gauss-legendre-n140-su.txt
│ │ │ ├── gauss-legendre-n30-su.txt
│ │ │ ├── gauss-legendre-n5-su.txt
│ │ │ ├── gauss-legendre-n55-su.txt
│ │ │ ├── gauss-legendre-n91-su.txt
│ │ │ ├── witherden-n120-d12-sp.txt
│ │ │ ├── witherden-n142-d13-sp.txt
│ │ │ ├── witherden-n174-d14-sp.txt
│ │ │ ├── witherden-n206-d15-sp.txt
│ │ │ ├── witherden-n258-d16-sp.txt
│ │ │ ├── witherden-n291-d17-sp.txt
│ │ │ ├── witherden-n357-d18-sp.txt
│ │ │ ├── witherden-n415-d19-sp.txt
│ │ │ ├── witherden-n44-d8-sp.txt
│ │ │ ├── witherden-n482-d20-sp.txt
│ │ │ ├── witherden-n56-d9-sp.txt
│ │ │ ├── witherden-n76-d10-sp.txt
│ │ │ ├── witherden-n92-d11-sp.txt
│ │ │ ├── witherden-vincent-n1-d1-sp.txt
│ │ │ ├── witherden-vincent-n10-d4-sp.txt
│ │ │ ├── witherden-vincent-n15-d5-sp.txt
│ │ │ ├── witherden-vincent-n24-d6-sp.txt
│ │ │ ├── witherden-vincent-n31-d7-sp.txt
│ │ │ ├── witherden-vincent-n47-d8-sp.txt
│ │ │ ├── witherden-vincent-n5-d2-sp.txt
│ │ │ ├── witherden-vincent-n6-d3-sp.txt
│ │ │ ├── witherden-vincent-n62-d9-sp.txt
│ │ │ └── witherden-vincent-n83-d10-sp.txt
│ │ ├── quad/
│ │ │ ├── gauss-legendre-lobatto-n100-d17-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n121-d19-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n144-d21-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n16-d5-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n169-d23-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n196-d25-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n25-d7-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n36-d9-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n4-d1-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n49-d11-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n64-d13-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n81-d15-pstu.txt
│ │ │ ├── gauss-legendre-lobatto-n9-d3-pstu.txt
│ │ │ ├── gauss-legendre-n1-d1-pstu.txt
│ │ │ ├── gauss-legendre-n100-d19-pstu.txt
│ │ │ ├── gauss-legendre-n121-d21-pstu.txt
│ │ │ ├── gauss-legendre-n144-d23-pstu.txt
│ │ │ ├── gauss-legendre-n16-d7-pstu.txt
│ │ │ ├── gauss-legendre-n169-d25-pstu.txt
│ │ │ ├── gauss-legendre-n196-d27-pstu.txt
│ │ │ ├── gauss-legendre-n25-d9-pstu.txt
│ │ │ ├── gauss-legendre-n36-d11-pstu.txt
│ │ │ ├── gauss-legendre-n4-d3-pstu.txt
│ │ │ ├── gauss-legendre-n49-d13-pstu.txt
│ │ │ ├── gauss-legendre-n64-d15-pstu.txt
│ │ │ ├── gauss-legendre-n81-d17-pstu.txt
│ │ │ ├── gauss-legendre-n9-d5-pstu.txt
│ │ │ ├── witherden-vincent-n1-d1-sp.txt
│ │ │ ├── witherden-vincent-n12-d7-sp.txt
│ │ │ ├── witherden-vincent-n20-d9-sp.txt
│ │ │ ├── witherden-vincent-n28-d11-sp.txt
│ │ │ ├── witherden-vincent-n37-d13-sp.txt
│ │ │ ├── witherden-vincent-n4-d3-sp.txt
│ │ │ ├── witherden-vincent-n48-d15-sp.txt
│ │ │ ├── witherden-vincent-n60-d17-sp.txt
│ │ │ ├── witherden-vincent-n72-d19-sp.txt
│ │ │ ├── witherden-vincent-n8-d5-sp.txt
│ │ │ └── witherden-vincent-n85-d21-sp.txt
│ │ ├── surface.py
│ │ ├── tet/
│ │ │ ├── alpha-opt-n10-su.txt
│ │ │ ├── alpha-opt-n120-su.txt
│ │ │ ├── alpha-opt-n165-su.txt
│ │ │ ├── alpha-opt-n20-su.txt
│ │ │ ├── alpha-opt-n220-su.txt
│ │ │ ├── alpha-opt-n35-su.txt
│ │ │ ├── alpha-opt-n4-su.txt
│ │ │ ├── alpha-opt-n56-su.txt
│ │ │ ├── alpha-opt-n84-su.txt
│ │ │ ├── shunn-ham-n1-d1-spu.txt
│ │ │ ├── shunn-ham-n10-d3-spu.txt
│ │ │ ├── shunn-ham-n20-d5-spu.txt
│ │ │ ├── shunn-ham-n35-d6-spu.txt
│ │ │ ├── shunn-ham-n4-d2-spu.txt
│ │ │ ├── shunn-ham-n56-d8-spu.txt
│ │ │ ├── shunn-ham-n84-d9-spu.txt
│ │ │ ├── witherden-n123-d12-sp.txt
│ │ │ ├── witherden-n145-d13-sp.txt
│ │ │ ├── witherden-n172-d14-sp.txt
│ │ │ ├── witherden-n213-d15-sp.txt
│ │ │ ├── witherden-n251-d16-sp.txt
│ │ │ ├── witherden-n290-d17-sp.txt
│ │ │ ├── witherden-n352-d18-sp.txt
│ │ │ ├── witherden-n411-d19-sp.txt
│ │ │ ├── witherden-n474-d20-sp.txt
│ │ │ ├── witherden-n79-d10-sp.txt
│ │ │ ├── witherden-n96-d11-sp.txt
│ │ │ ├── witherden-vincent-n1-d1-sp.txt
│ │ │ ├── witherden-vincent-n14-d5-sp.txt
│ │ │ ├── witherden-vincent-n24-d6-sp.txt
│ │ │ ├── witherden-vincent-n35-d7-sp.txt
│ │ │ ├── witherden-vincent-n4-d2-sp.txt
│ │ │ ├── witherden-vincent-n46-d8-sp.txt
│ │ │ ├── witherden-vincent-n59-d9-sp.txt
│ │ │ ├── witherden-vincent-n8-d3-sp.txt
│ │ │ └── witherden-vincent-n81-d10-sp.txt
│ │ └── tri/
│ │ ├── alpha-opt-n10-su.txt
│ │ ├── alpha-opt-n15-su.txt
│ │ ├── alpha-opt-n21-su.txt
│ │ ├── alpha-opt-n28-su.txt
│ │ ├── alpha-opt-n3-su.txt
│ │ ├── alpha-opt-n36-su.txt
│ │ ├── alpha-opt-n45-su.txt
│ │ ├── alpha-opt-n6-su.txt
│ │ ├── williams-shunn-n1-d1-spu.txt
│ │ ├── williams-shunn-n10-d5-spu.txt
│ │ ├── williams-shunn-n15-d7-spu.txt
│ │ ├── williams-shunn-n21-d8-spu.txt
│ │ ├── williams-shunn-n28-d10-spu.txt
│ │ ├── williams-shunn-n3-d2-spu.txt
│ │ ├── williams-shunn-n36-d12-spu.txt
│ │ ├── williams-shunn-n45-d14-spu.txt
│ │ ├── williams-shunn-n6-d4-spu.txt
│ │ ├── witherden-vincent-n1-d1-sp.txt
│ │ ├── witherden-vincent-n12-d6-sp.txt
│ │ ├── witherden-vincent-n15-d7-sp.txt
│ │ ├── witherden-vincent-n16-d8-sp.txt
│ │ ├── witherden-vincent-n19-d9-sp.txt
│ │ ├── witherden-vincent-n25-d10-sp.txt
│ │ ├── witherden-vincent-n28-d11-sp.txt
│ │ ├── witherden-vincent-n3-d2-sp.txt
│ │ ├── witherden-vincent-n33-d12-sp.txt
│ │ ├── witherden-vincent-n37-d13-sp.txt
│ │ ├── witherden-vincent-n42-d14-sp.txt
│ │ ├── witherden-vincent-n49-d15-sp.txt
│ │ ├── witherden-vincent-n55-d16-sp.txt
│ │ ├── witherden-vincent-n6-d4-sp.txt
│ │ ├── witherden-vincent-n60-d17-sp.txt
│ │ ├── witherden-vincent-n67-d18-sp.txt
│ │ ├── witherden-vincent-n7-d5-sp.txt
│ │ ├── witherden-vincent-n73-d19-sp.txt
│ │ └── witherden-vincent-n79-d20-sp.txt
│ ├── readers/
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── gmsh.py
│ │ ├── native.py
│ │ ├── shared_nodes.py
│ │ └── stl.py
│ ├── regions.py
│ ├── resamplers.py
│ ├── shapes.py
│ ├── solvers/
│ │ ├── __init__.py
│ │ ├── base/
│ │ │ ├── __init__.py
│ │ │ ├── elements.py
│ │ │ ├── inters.py
│ │ │ └── system.py
│ │ ├── baseadvec/
│ │ │ ├── __init__.py
│ │ │ ├── elements.py
│ │ │ ├── entfilter.py
│ │ │ ├── inters.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── evalsrcmacros.mako
│ │ │ │ ├── intcent.mako
│ │ │ │ ├── mpicent.mako
│ │ │ │ ├── negdivconf.mako
│ │ │ │ ├── smats.mako
│ │ │ │ └── transform.mako
│ │ │ └── system.py
│ │ ├── baseadvecdiff/
│ │ │ ├── __init__.py
│ │ │ ├── artvisc.py
│ │ │ ├── elements.py
│ │ │ ├── inters.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── artvisc.mako
│ │ │ │ ├── avfill.mako
│ │ │ │ ├── gradcoru.mako
│ │ │ │ ├── shocksensor.mako
│ │ │ │ ├── transform_grad.mako
│ │ │ │ └── vtxreduce.mako
│ │ │ └── system.py
│ │ ├── euler/
│ │ │ ├── __init__.py
│ │ │ ├── elements.py
│ │ │ ├── inters.py
│ │ │ ├── kernels/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── bccent.mako
│ │ │ │ ├── bccflux.mako
│ │ │ │ ├── bcs/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── char-riem-inv-controlled.mako
│ │ │ │ │ ├── char-riem-inv-mass-flow.mako
│ │ │ │ │ ├── char-riem-inv-pressure.mako
│ │ │ │ │ ├── char-riem-inv.mako
│ │ │ │ │ ├── slp-adia-wall.mako
│ │ │ │ │ ├── sup-in-fa.mako
│ │ │ │ │ └── sup-out-fn.mako
│ │ │ │ ├── entropy.mako
│ │ │ │ ├── entropyfilter.mako
│ │ │ │ ├── entropylocal.mako
│ │ │ │ ├── eos.mako
│ │ │ │ ├── flux.mako
│ │ │ │ ├── intcflux.mako
│ │ │ │ ├── mpicflux.mako
│ │ │ │ ├── rsolvers/
│ │ │ │ │ ├── __init__.py
│ │ │ │ │ ├── exact.mako
│ │ │ │ │ ├── hll.mako
│ │ │ │ │ ├── hllc.mako
│ │ │ │ │ ├── roe.mako
│ │ │ │ │ ├── roem.mako
│ │ │ │ │ ├── rsolve1d.mako
│ │ │ │ │ └── rusanov.mako
│ │ │ │ ├── tflux.mako
│ │ │ │ └── wavespeed.mako
│ │ │ └── system.py
│ │ └── navstokes/
│ │ ├── __init__.py
│ │ ├── elements.py
│ │ ├── inters.py
│ │ ├── kernels/
│ │ │ ├── __init__.py
│ │ │ ├── bccent.mako
│ │ │ ├── bccflux.mako
│ │ │ ├── bcconu.mako
│ │ │ ├── bcs/
│ │ │ │ ├── __init__.py
│ │ │ │ ├── char-riem-inv-mass-flow.mako
│ │ │ │ ├── char-riem-inv-pressure.mako
│ │ │ │ ├── char-riem-inv.mako
│ │ │ │ ├── common.mako
│ │ │ │ ├── ghost-imperm.mako
│ │ │ │ ├── ghost.mako
│ │ │ │ ├── no-slp-adia-wall.mako
│ │ │ │ ├── no-slp-isot-wall.mako
│ │ │ │ ├── slp-adia-wall.mako
│ │ │ │ ├── sub-in-frv.mako
│ │ │ │ ├── sub-in-ftpttang.mako
│ │ │ │ ├── sub-out-fp.mako
│ │ │ │ ├── sup-in-fa.mako
│ │ │ │ └── sup-out-fn.mako
│ │ │ ├── flux.mako
│ │ │ ├── intcflux.mako
│ │ │ ├── intconu.mako
│ │ │ ├── mpicflux.mako
│ │ │ ├── mpiconu.mako
│ │ │ └── tflux.mako
│ │ └── system.py
│ ├── template.py
│ ├── tests/
│ │ ├── __init__.py
│ │ ├── hex-gleg-ord3.npz
│ │ └── test_ele_mats.py
│ ├── util.py
│ └── writers/
│ ├── __init__.py
│ ├── base.py
│ ├── csv.py
│ ├── native.py
│ ├── serialise.py
│ ├── upgrade.py
│ └── vtk/
│ ├── __init__.py
│ ├── base.py
│ ├── boundary.py
│ ├── stl.py
│ └── volume.py
└── pyproject.toml
================================================
FILE CONTENTS
================================================
================================================
FILE: AUTHORS
================================================
Semih Akkurt <s.akkurt18@imperial.ac.uk>
Harry Davis <h.davis13@imperial.ac.uk>
Tarik Dzanic <tdzanic@tamu.edu>
Antony Farrington <antony.farrington07@imperial.ac.uk>
Giorgio Giangaspero <g.giangaspero@imperial.ac.uk>
Arvind Iyer <a.iyer@imperial.ac.uk>
Niki Loppi <n.loppi15@imperial.ac.uk>
George Ntemos <george.ntemos11@imperial.ac.uk>
Jin Seok Park <jin-seok.park@imperial.ac.uk>
Will Trojak <w.trojak@ibm.com>
Brian Vermeire <b.vermeire@imperial.ac.uk>
Peter Vincent <p.vincent@imperial.ac.uk>
Freddie Witherden <freddie@witherden.org>
================================================
FILE: LICENSE
================================================
Copyright (c) 2012–2026 Imperial College London
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
a. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
b. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
c. Neither the name of PyFR nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
================================================
FILE: README.md
================================================
# PyFR
## Overview
PyFR is an open-source Python based framework for solving advection-diffusion
type problems on streaming architectures using the Flux Reconstruction
approach of Huynh. The framework is designed to solve a range of governing
systems on mixed unstructured grids containing various element types. It is
also designed to target a range of hardware platforms via use of an in-built
domain specific language derived from the Mako templating engine.
## Examples
Test cases are available in the
[PyFR-Test-Cases](https://github.com/PyFR/PyFR-Test-Cases) repository.
## Contributing
To contribute to PyFR please follow the steps listed below:
1. Fork this repository to your GitHub account
2. Create a new branch in your forked repository
3. Make changes in your new branch
4. Submit your changes by creating a Pull Request to the `develop` branch of the original PyFR repository
Modifications to the `develop` branch are eventually merged into the master
branch for a new release.
## Help and Community
Information on the usage and structure of PyFR can be found in the
[documentation](http://pyfr.readthedocs.io/en/latest/).
For further help in developing and using PyFR, or to connect with the wider
community of users, please go to the [PyFR Discourse](https://pyfr.discourse.group).
## Authors
See the AUTHORS file.
## License
PyFR is released under the New BSD License (see the LICENSE file for details).
Documentation is made available under a Creative Commons Attribution 4.0
license (see <http://creativecommons.org/licenses/by/4.0/>).
================================================
FILE: doc/Makefile
================================================
SPHINXOPTS =
SPHINXBUILD = sphinx-build
BUILDDIR = build
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) src
.PHONY: help clean html linkcheck
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " linkcheck to check all external links for integrity"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
================================================
FILE: doc/requirements.txt
================================================
sphinx >= 5.0
sphinx-rtd-theme
sphinxcontrib-contentui
================================================
FILE: doc/src/_static/css/custom.css
================================================
section {
text-align: justify;
}
.wy-side-nav-search, .wy-nav-top {
background: #94b24d;
}
.rst-content section ol li > *, .rst-content .section ul li > * {
margin-bottom: 0px;
margin-top: 0px;
}
.rst-content section ol li > ol, .rst-content .section ol li > ul, .rst-content .section ul li > ol, .rst-content .section ul li > ul {
margin-bottom: 0px;
margin-top: 0px;
}
.rst-content section ol li > p, .rst-content .section ol li > p:last-child, .rst-content .section ul li > p, .rst-content .section ul li > p:last-child, .rst-content section ul li > ul {
margin-bottom: 6px !important;
margin-top: 6px !important;
}
.rst-content h2, .rst-content h3, .rst-content h4 {
margin-bottom: 8px;
}
p {
margin-top: 0px;
margin-right: 0px;
margin-bottom: 12px;
margin-left: 0px;
}
================================================
FILE: doc/src/backends/backend-cuda.rst
================================================
**************
[backend-cuda]
**************
Parameterises the CUDA backend with
#. ``device-id`` --- method for selecting which device(s) to run on:
*int* | ``round-robin`` | ``local-rank`` | ``uuid``
#. ``mpi-type`` --- type of MPI library that is being used:
``standard`` | ``cuda-aware``
#. ``cflags`` --- additional NVIDIA realtime compiler (``nvrtc``) flags:
*string*
#. ``cublas-nkerns`` --- number of kernel algorithms to try when
benchmarking, defaults to 512:
*int*
#. ``gimmik-nkerns`` --- number of kernel algorithms to try when
benchmarking, defaults to 8:
*int*
#. ``gimmik-nbench`` --- number of benchmarking runs for each
kernel, defaults to 5:
*int*
Example:
.. code-block:: ini
[backend-cuda]
device-id = round-robin
mpi-type = standard
================================================
FILE: doc/src/backends/backend-hip.rst
================================================
*************
[backend-hip]
*************
Parameterises the HIP backend with
#. ``device-id`` --- method for selecting which device(s) to run on:
*int* | ``local-rank`` | ``uuid``
#. ``mpi-type`` --- type of MPI library that is being used:
``standard`` | ``hip-aware``
#. ``rocblas-nkerns`` --- number of kernel algorithms to try when
benchmarking, defaults to 2048:
*int*
#. ``gimmik-nkerns`` --- number of kernel algorithms to try when
benchmarking, defaults to 8:
*int*
#. ``gimmik-nbench`` --- number of benchmarking runs for each
kernel, defaults to 5:
*int*
Example:
.. code-block:: ini
[backend-hip]
device-id = local-rank
mpi-type = standard
================================================
FILE: doc/src/backends/backend-metal.rst
================================================
****************
[backend-metal]
****************
Parameterises the Metal backend with
#. ``gimmik-max-nnz`` --- cutoff for GiMMiK in terms of the number of
non-zero entires in a constant matrix, defaults to 2048:
*int*
#. ``gimmik-nkerns`` --- number of kernel algorithms to try when
benchmarking, defaults to 18:
*int*
#. ``gimmik-nbench`` --- number of benchmarking runs for each
kernel, defaults to 40:
*int*
Example:
.. code-block:: ini
[backend-metal]
gimmik-max-nnz = 512
================================================
FILE: doc/src/backends/backend-opencl.rst
================================================
****************
[backend-opencl]
****************
Parameterises the OpenCL backend with
#. ``platform-id`` --- for selecting platform id:
*int* | *string*
#. ``device-type`` --- for selecting what type of device(s) to run on:
``all`` | ``cpu`` | ``gpu`` | ``accelerator``
#. ``device-id`` --- for selecting which device(s) to run on:
*int* | *string* | ``local-rank`` | ``uuid``
#. ``gimmik-max-nnz`` --- cutoff for GiMMiK in terms of the number of
non-zero entires in a constant matrix, defaults to 2048:
*int*
#. ``gimmik-nkerns`` --- number of kernel algorithms to try when
benchmarking, defaults to 8:
*int*
#. ``gimmik-nbench`` --- number of benchmarking runs for each
kernel, defaults to 5:
*int*
Example:
.. code-block:: ini
[backend-opencl]
platform-id = 0
device-type = gpu
device-id = local-rank
gimmik-max-nnz = 512
================================================
FILE: doc/src/backends/backend-openmp.rst
================================================
****************
[backend-openmp]
****************
Parameterises the OpenMP backend with
#. ``cc`` --- C compiler:
*string*
#. ``cflags`` --- additional C compiler flags:
*string*
#. ``alignb`` --- alignment requirement in bytes; must be a power of
two and at least 32:
*int*
#. ``schedule`` --- OpenMP loop scheduling scheme:
``static`` | ``dynamic`` | ``dynamic, n`` | ``guided`` | ``guided, n``
where *n* is a positive integer.
Example:
.. code-block:: ini
[backend-openmp]
cc = gcc
================================================
FILE: doc/src/backends/backend.rst
================================================
*********
[backend]
*********
Parameterises the backend with
#. ``precision`` --- number precision, note not all backends support
double precision:
``single`` | ``double``
#. ``memory-model`` --- if to enable support for large working sets;
should be ``normal`` unless a memory-model error is encountered:
``normal`` | ``large``
#. ``collect-wait-times`` --- if to track MPI request wait times or not:
``True`` | ``False``
#. ``collect-wait-times-len`` --- size of the wait time history buffer:
*int*
Example:
.. code-block:: ini
[backend]
precision = double
================================================
FILE: doc/src/boundary-initial-conditions/soln-bcs.rst
================================================
*****************
[soln-bcs-*name*]
*****************
Parameterises constant, or if available space (x, y, [z]) and time (t)
dependent, boundary condition labelled *name* in the .pyfrm file with
1. ``type`` --- type of boundary condition:
``ac-char-riem-inv`` | ``ac-in-fv`` | ``ac-out-fp`` | ``char-riem-inv`` |
``char-riem-inv-mass-flow`` | ``char-riem-inv-pressure`` | ``no-slp-adia-wall`` |
``no-slp-isot-wall`` | ``no-slp-wall`` | ``slp-adia-wall`` | ``slp-wall`` |
``sub-in-frv`` | ``sub-in-ftpttang`` | ``sub-out-fp`` | ``sup-in-fa`` |
``sup-out-fn``
where
``char-riem-inv`` requires
- ``rho`` --- density
*float* | *string*
- ``u`` --- x-velocity
*float* | *string*
- ``v`` --- y-velocity
*float* | *string*
- ``w`` --- z-velocity
*float* | *string*
- ``p`` --- static pressure
*float* | *string*
``char-riem-inv-mass-flow`` requires
- ``rho`` --- density
*float* | *string*
- ``u`` --- x-velocity
*float* | *string*
- ``v`` --- y-velocity
*float* | *string*
- ``w`` --- z-velocity
*float* | *string*
- ``p`` --- initial static pressure, the controller will vary this to
target a mass flow rate.
*float* | *string*
- ``mass-flow-rate`` --- target mass flow rate across the boundary.
*float* | *string*
- ``alpha`` --- parameter between 0 and 1 for the exponentially
weighted moving average of the mass flow rate.
*float* | *string*
- ``eta`` --- parameter greater than 0 controlling the strength of the
controller. The appropriate strength is problem specific and varies
depending on if the simulation has been nondimensionalised.
*float* | *string*
- ``nsteps`` --- number of Runge-Kutta steps between activations of the
controller. Typically between 10 and 500.
*int*
- ``tstart`` --- start time of the mass flow controller, before this
time the Riemann invariant remains fixed.
*float*
- ``quad-deg-{etype}`` --- degree of quadrature rule for mass flow
integration (optional).
*int*
- ``quad-pts-{etype}`` --- name of quadrature rule (optional).
*string*
- ``file`` --- name of a CSV file to output statistics to (optional).
*string*
- ``flushsteps`` --- frequency to flush output to the CSV file
(optional).
*int*
``char-riem-inv-pressure`` only works with ``euler`` | ``navier-stokes``
and requires
- ``rho`` --- density
*float* | *string*
- ``u`` --- x-velocity
*float* | *string*
- ``v`` --- y-velocity
*float* | *string*
- ``w`` --- z-velocity
*float* | *string*
- ``pressure`` --- target area-averaged static pressure on the
boundary. Also used as the initial Riemann invariant pressure.
*float* | *string*
- ``alpha`` --- parameter between 0 and 1 for the exponentially
weighted moving average of the pressure.
*float* | *string*
- ``eta`` --- parameter greater than 0 setting the strength of the controller.
The appropriate strength is problem specific, and varies depending on if the
simulation has been non-dimensionalised.
*float* | *string*
- ``nsteps`` --- number of Runge-Kutta steps between activations of the
controller. Typically between 10 and 500.
*int*
- ``tstart`` --- start time of the pressure controller, before this
time the Riemann invariant remains fixed.
*float*
- ``quad-deg-{etype}`` --- degree of quadrature rule for pressure
integration (optional).
*int*
- ``quad-pts-{etype}`` --- name of quadrature rule (optional).
*string*
- ``file`` --- name of a CSV file to output statistics to (optional).
*string*
- ``flushsteps`` --- frequency to flush output to the CSV file
(optional).
*int*
``no-slp-adia-wall`` has no parameters
``no-slp-isot-wall`` requires
- ``u`` --- x-velocity of wall
*float*
- ``v`` --- y-velocity of wall
*float*
- ``w`` --- z-velocity of wall
*float*
- ``cpTw`` --- product of specific heat capacity at constant
pressure and temperature of wall
*float*
``slp-adia-wall`` has no parameters
``sub-in-frv`` only works with ``navier-stokes`` and
requires
- ``rho`` --- density
*float* | *string*
- ``u`` --- x-velocity
*float* | *string*
- ``v`` --- y-velocity
*float* | *string*
- ``w`` --- z-velocity
*float* | *string*
``sub-in-ftpttang`` only works with ``navier-stokes``
and requires
- ``pt`` --- total pressure
*float*
- ``cpTt`` --- product of specific heat capacity at constant
pressure and total temperature
*float*
- ``theta`` --- azimuth angle (in degrees) of inflow measured
in the x-y plane relative to the positive x-axis
*float*
- ``phi`` --- inclination angle (in degrees) of inflow measured
relative to the positive z-axis
*float*
``sub-out-fp`` only works with ``navier-stokes`` and
requires
- ``p`` --- static pressure
*float* | *string*
``sup-in-fa`` requires
- ``rho`` --- density
*float* | *string*
- ``u`` --- x-velocity
*float* | *string*
- ``v`` --- y-velocity
*float* | *string*
- ``w`` --- z-velocity
*float* | *string*
- ``p`` --- static pressure
*float* | *string*
``sup-out-fn`` has no parameters
Example:
.. code-block:: ini
[soln-bcs-bcwallupper]
type = no-slp-isot-wall
cpTw = 10.0
u = 1.0
Simple periodic boundary conditions are supported; however, their
behaviour is not controlled through the ``.ini`` file, instead it is
handled at the mesh generation stage. Two faces may be tagged with
``periodic_x_l`` and ``periodic_x_r``, where ``x`` is a unique
identifier for the pair of boundaries. Currently, only periodicity in a
single cardinal direction is supported, for example, the planes
``(x,y,0)`` and ``(x,y,10)``.
================================================
FILE: doc/src/boundary-initial-conditions/soln-ics.rst
================================================
**********
[soln-ics]
**********
Parameterises space (x, y, [z]) dependent initial conditions with
#. ``rho`` --- initial density distribution:
*string*
#. ``u`` --- initial x-velocity distribution:
*string*
#. ``v`` --- initial y-velocity distribution:
*string*
#. ``w`` --- initial z-velocity distribution:
*string*
#. ``p`` --- initial static pressure distribution:
*string*
6. ``quad-deg-{etype}`` --- degree of quadrature rule to perform L2
projection (optional):
*int*
7. ``quad-pts-{etype}`` --- name of quadrature rule to perform L2
projection (optional):
*string*
Example:
.. code-block:: ini
[soln-ics]
rho = 1.0
u = x*y*sin(y)
v = z
w = 1.0
p = 1.0/(1.0+x)
quad-deg = 9
quad-pts-hex = gauss-legendre
================================================
FILE: doc/src/conf.py
================================================
import os
import sys
sys.path.insert(0, os.path.abspath('../../'))
# -- General configuration ------------------------------------------------
needs_sphinx = '5.0'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosectionlabel',
'sphinx.ext.graphviz',
'sphinx.ext.inheritance_diagram',
'sphinx.ext.viewcode',
'sphinxcontrib.contentui',
]
autosectionlabel_prefix_document = True
# Inheritance diagram settings
graphviz_output_format = 'svg'
inheritance_graph_attrs = dict(
center='true',
layout='dot',
rankdir='LR',
ranksep='0.05',
splines='ortho',
ratio='compress')
inheritance_node_attrs = dict(
color='"#333333"',
fillcolor='"#d8e6b8"',
fontsize='6.5',
penwidth='0.3',
shape='box',
style='"rounded,filled"')
inheritance_edge_attrs = dict(
color='"#333333"',
penwidth='0.3')
# Modules to mock for autodoc
autodoc_mock_imports = ['h5py', 'mpi4py', 'gimmik', 'numpy', 'mako',
'platformdirs', 'rtree', 'pyfr.mpiutil']
source_suffix = '.rst'
root_doc = 'index'
project = 'PyFR'
copyright = '2013\u20132026, Imperial College London'
version = '3.1'
release = '3.1'
exclude_patterns = []
# -- Options for HTML output ----------------------------------------------
html_theme = 'sphinx_rtd_theme'
html_logo = '../fig/logo.svg'
html_favicon = '../fig/pyfr_favicon.png'
html_theme_options = {
'analytics_anonymize_ip': False,
'logo_only': True,
'prev_next_buttons_location': 'bottom',
'style_external_links': False,
'vcs_pageview_mode': '',
'style_nav_header_background': '#94b24c',
'collapse_navigation': True,
'sticky_navigation': True,
'navigation_depth': 4,
'includehidden': True,
'titles_only': False,
}
html_title = 'Documentation'
html_short_title = 'PyFR - Documentation'
html_static_path = ['_static']
html_css_files = ['css/custom.css']
htmlhelp_basename = 'PyFRdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
'preamble': r'\setcounter{secnumdepth}{4}',
}
latex_documents = [
('index', 'PyFR.tex', 'PyFR Documentation',
'Imperial College London', 'manual'),
]
================================================
FILE: doc/src/developer_guide.rst
================================================
***************
Developer Guide
***************
======================================
A Brief Overview of the PyFR Framework
======================================
Where to Start
--------------
The symbolic link :code:`pyfr.scripts.pyfr` points to the script
:code:`pyfr.scripts.main`, which is where it all starts! Specifically,
the function :code:`process_run` calls the function
:code:`_process_common`, which in turn calls the function
:code:`get_solver`, returning an Integrator -- a composite of a
`Controller`_ and a `Stepper`_. The Integrator has a method named
:code:`run`, which is then called to run the simulation.
Controller
----------
A `Controller`_ acts to advance the simulation in time. Specifically, a
`Controller`_ has a method named :code:`advance_to` which advances a
`System`_ to a specified time. There are two types of `Controller`_
available in PyFR |release|:
.. toggle-header::
:header: *StdNoneController* **Click to show**
.. autoclass:: pyfr.integrators.std.controllers.StdNoneController
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *StdPIController* **Click to show**
.. autoclass:: pyfr.integrators.std.controllers.StdPIController
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `Controller`_ are related via the following inheritance diagram:
.. inheritance-diagram:: pyfr.integrators.std.controllers
:parts: 1
|
Stepper
-------
A `Stepper`_ acts to advance the simulation by a single time-step.
Specifically, a `Stepper`_ has a method named :code:`step` which
advances a `System`_ by a single time-step. There are five types of
`Stepper`_ available in PyFR |release|:
.. toggle-header::
:header: *StdEulerStepper* **Click to show**
.. autoclass:: pyfr.integrators.std.steppers.StdEulerStepper
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *StdRK4Stepper* **Click to show**
.. autoclass:: pyfr.integrators.std.steppers.StdRK4Stepper
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *StdRK34Stepper* **Click to show**
.. autoclass:: pyfr.integrators.std.steppers.StdRK34Stepper
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *StdRK45Stepper* **Click to show**
.. autoclass:: pyfr.integrators.std.steppers.StdRK45Stepper
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *StdTVDRK3Stepper* **Click to show**
.. autoclass:: pyfr.integrators.std.steppers.StdTVDRK3Stepper
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `Stepper`_ are related via the following inheritance diagram:
.. inheritance-diagram:: pyfr.integrators.std.steppers
:parts: 1
|
System
------
A `System`_ holds information/data for the system, including
`Elements`_, `Interfaces`_, and the `Backend`_ with which the
simulation is to run. A `System`_ has a method named :code:`rhs`, which
obtains the divergence of the flux (the 'right-hand-side') at each
solution point. The method :code:`rhs` invokes various kernels which
have been pre-generated and loaded into queues. A `System`_ also has a
method named :code:`_gen_kernels` which acts to generate all the
kernels required by a particular `System`_. A kernel is an instance of
a 'one-off' class with a method named :code:`run` that implements the
required kernel functionality. Individual kernels are produced by a
kernel provider. PyFR |release| has various types of kernel provider. A
`Pointwise Kernel Provider`_ produces point-wise kernels such as
Riemann solvers and flux functions etc. These point-wise kernels are
specified using an in-built platform-independent templating language
derived from `Mako <http://www.makotemplates.org/>`_, henceforth
referred to as `PyFR-Mako`_. There are two types of `System`_ available
in PyFR |release|:
.. toggle-header::
:header: *EulerSystem* **Click to show**
.. autoclass:: pyfr.solvers.euler.system.EulerSystem
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *NavierStokesSystem* **Click to show**
.. autoclass:: pyfr.solvers.navstokes.system.NavierStokesSystem
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `System`_ are related via the following inheritance diagram:
.. inheritance-diagram:: pyfr.solvers.navstokes.system
pyfr.solvers.euler.system
:top-classes: pyfr.solvers.base.system.BaseSystem
:parts: 1
|
Elements
--------
An `Elements`_ holds information/data for a group of elements. There are
two types of `Elements`_ available in PyFR |release|:
.. toggle-header::
:header: *EulerElements* **Click to show**
.. autoclass:: pyfr.solvers.euler.elements.EulerElements
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *NavierStokesElements* **Click to show**
.. autoclass:: pyfr.solvers.navstokes.elements.NavierStokesElements
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `Elements`_ are related via the following inheritance diagram:
.. inheritance-diagram:: pyfr.solvers.navstokes.elements
pyfr.solvers.euler.elements
:top-classes: pyfr.solvers.base.elements.BaseElements
:parts: 1
|
Interfaces
----------
An `Interfaces`_ holds information/data for a group of interfaces. There
are four types of (non-boundary) `Interfaces`_ available in PyFR
|release|:
.. toggle-header::
:header: *EulerIntInters* **Click to show**
.. autoclass:: pyfr.solvers.euler.inters.EulerIntInters
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *EulerMPIInters* **Click to show**
.. autoclass:: pyfr.solvers.euler.inters.EulerMPIInters
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *NavierStokesIntInters* **Click to show**
.. autoclass:: pyfr.solvers.navstokes.inters.NavierStokesIntInters
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *NavierStokesMPIInters* **Click to show**
.. autoclass:: pyfr.solvers.navstokes.inters.NavierStokesMPIInters
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of (non-boundary) `Interfaces`_ are related via the following
inheritance diagram:
.. inheritance-diagram:: pyfr.solvers.navstokes.inters.NavierStokesMPIInters
pyfr.solvers.navstokes.inters.NavierStokesIntInters
pyfr.solvers.euler.inters.EulerMPIInters
pyfr.solvers.euler.inters.EulerIntInters
:top-classes: pyfr.solvers.base.inters.BaseInters
:parts: 1
|
Backend
-------
A `Backend`_ holds information/data for a backend. There are five types
of `Backend`_ available in PyFR |release|:
.. toggle-header::
:header: *CUDABackend* **Click to show**
.. autoclass:: pyfr.backends.cuda.base.CUDABackend
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *HIPBackend* **Click to show**
.. autoclass:: pyfr.backends.hip.base.HIPBackend
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *OpenCLBackend* **Click to show**
.. autoclass:: pyfr.backends.opencl.base.OpenCLBackend
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *OpenMPBackend* **Click to show**
.. autoclass:: pyfr.backends.openmp.base.OpenMPBackend
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *MetalBackend* **Click to show**
.. autoclass:: pyfr.backends.metal.base.MetalBackend
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `Backend`_ are related via the following inheritance diagram:
.. inheritance-diagram:: pyfr.backends.cuda.base
pyfr.backends.hip.base
pyfr.backends.opencl.base
pyfr.backends.openmp.base
pyfr.backends.metal.base
:top-classes: pyfr.backends.base.base.BaseBackend
:parts: 1
|
Pointwise Kernel Provider
-------------------------
A `Pointwise Kernel Provider`_ produces point-wise kernels.
Specifically, a `Pointwise Kernel Provider`_ has a method named
:code:`register`, which adds a new method to an instance of a
`Pointwise Kernel Provider`_. This new method, when called, returns a
kernel. A kernel is an instance of a 'one-off' class with a method
named :code:`run` that implements the required kernel functionality.
The kernel functionality itself is specified using `PyFR-Mako`_. Hence,
a `Pointwise Kernel Provider`_ also has a method named
:code:`_render_kernel`, which renders `PyFR-Mako`_ into low-level
platform-specific code. The :code:`_render_kernel` method first sets
the context for Mako (i.e. details about the `Backend`_ etc.) and then
uses Mako to begin rendering the `PyFR-Mako`_ specification. When Mako
encounters a :code:`pyfr:kernel` an instance of a `Kernel Generator`_
is created, which is used to render the body of the
:code:`pyfr:kernel`. There are four types of `Pointwise Kernel
Provider`_ available in PyFR |release|:
.. toggle-header::
:header: *CUDAPointwiseKernelProvider* **Click to show**
.. autoclass:: pyfr.backends.cuda.provider.CUDAPointwiseKernelProvider
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *HIPPointwiseKernelProvider* **Click to show**
.. autoclass:: pyfr.backends.hip.provider.HIPPointwiseKernelProvider
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *OpenCLPointwiseKernelProvider* **Click to show**
.. autoclass:: pyfr.backends.opencl.provider.OpenCLPointwiseKernelProvider
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *OpenMPPointwiseKernelProvider* **Click to show**
.. autoclass:: pyfr.backends.openmp.provider.OpenMPPointwiseKernelProvider
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *MetalPointwiseKernelProvider* **Click to show**
.. autoclass:: pyfr.backends.metal.provider.MetalPointwiseKernelProvider
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `Pointwise Kernel Provider`_ are related via the following
inheritance diagram:
.. inheritance-diagram:: pyfr.backends.openmp.provider
pyfr.backends.cuda.provider
pyfr.backends.hip.provider
pyfr.backends.opencl.provider
pyfr.backends.metal.provider
pyfr.backends.base.kernels.BasePointwiseKernelProvider
:top-classes: pyfr.backends.base.kernels.BaseKernelProvider
:parts: 1
|
Kernel Generator
----------------
A `Kernel Generator`_ renders the `PyFR-Mako`_ in a :code:`pyfr:kernel`
into low-level platform-specific code. Specifically, a `Kernel
Generator`_ has a method named :code:`render`, which applies `Backend`_
specific regex and adds `Backend`_ specific 'boiler plate' code to
produce the low-level platform-specific source -- which is compiled,
linked, and loaded. There are four types of `Kernel Generator`_
available in PyFR |release|:
.. toggle-header::
:header: *CUDAKernelGenerator* **Click to show**
.. autoclass:: pyfr.backends.cuda.generator.CUDAKernelGenerator
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *HIPKernelGenerator* **Click to show**
.. autoclass:: pyfr.backends.hip.generator.HIPKernelGenerator
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *OpenCLKernelGenerator* **Click to show**
.. autoclass:: pyfr.backends.opencl.generator.OpenCLKernelGenerator
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *OpenMPKernelGenerator* **Click to show**
.. autoclass:: pyfr.backends.openmp.generator.OpenMPKernelGenerator
:members:
:undoc-members:
:inherited-members:
:private-members:
.. toggle-header::
:header: *MetalKernelGenerator* **Click to show**
.. autoclass:: pyfr.backends.metal.generator.MetalKernelGenerator
:members:
:undoc-members:
:inherited-members:
:private-members:
|
Types of `Kernel Generator`_ are related via the following inheritance diagram:
.. inheritance-diagram:: pyfr.backends.cuda.generator.CUDAKernelGenerator
pyfr.backends.opencl.generator.OpenCLKernelGenerator
pyfr.backends.openmp.generator.OpenMPKernelGenerator
pyfr.backends.hip.generator.HIPKernelGenerator
pyfr.backends.metal.generator.MetalKernelGenerator
:top-classes: pyfr.backends.base.generator.BaseKernelGenerator
:parts: 1
|
=========
PyFR-Mako
=========
PyFR-Mako Kernels
-----------------
PyFR-Mako kernels are specifications of point-wise functionality that
can be invoked directly from within PyFR. They are opened with a header
of the form:
.. code-block:: none
<%pyfr:kernel name='kernel-name' ndim='data-dimensionality' [argument-name='argument-intent argument-attribute argument-data-type' ...]>
where
1. ``kernel-name`` --- name of kernel
*string*
2. ``data-dimensionality`` --- dimensionality of data
*int*
3. ``argument-name`` --- name of argument
*string*
4. ``argument-intent`` --- intent of argument
``in`` | ``out`` | ``inout``
5. ``argument-attribute`` --- attribute of argument
``mpi`` | ``scalar`` | ``view``
6. ``argument-data-type`` --- data type of argument
*string*
and are closed with a footer of the form:
.. code-block:: none
</%pyfr:kernel>
PyFR-Mako Macros
----------------
PyFR-Mako macros are specifications of point-wise functionality that
cannot be invoked directly from within PyFR, but can be embedded into
PyFR-Mako kernels. PyFR-Mako macros can be viewed as building blocks
for PyFR-mako kernels. They are opened with a header of the form:
.. code-block:: none
<%pyfr:macro name='macro-name' params='param1, param2, ..., py:arg1, ...'>
where
1. ``macro-name`` --- name of macro
*string*
2. ``param1, param2, ..., py:arg1, ...`` --- macro parameter/argument names
*string*
and are closed with a footer of the form:
.. code-block:: none
</%pyfr:macro>
Macro params can be either regular parameters (source code variables) or
Python arguments (when prefixed with ``py:``). Python arguments receive Python
objects that can be accessed during template rendering. All parameters prefixed
with ``py:`` must be accessed in the macro body within the usual ``${}``
expression *without the py: prefix*.
PyFR-Mako macros are embedded within a kernel using an expression of
the following form:
.. code-block:: none
${pyfr.expand('macro-name', 'value1', ..., data1, ..., param2='value2', ..., arg1=value, ...)};
where
1. ``macro-name`` --- name of the macro
*string*
2. ``'value1', ...`` --- positional values for regular parameters
*string*
3. ``data1, ...`` --- positional Python data
*Python object*
4. ``param2='value2', ...`` --- keyword arguments for regular parameter
*string* or *compilable*
5. ``arg1=value, ...`` --- keyword arguments for Python arguments
*Python object*
Syntax
------
Basic Functionality
^^^^^^^^^^^^^^^^^^^
Basic functionality can be expressed using a restricted subset of the C
programming language. Specifically, use of the following is allowed:
1. ``+,-,*,/`` --- basic arithmetic
2. ``sin, cos, tan`` --- basic trigonometric functions
3. ``exp`` --- exponential
4. ``pow`` --- power
5. ``fabs`` --- absolute value
6. ``output = ( condition ? satisfied : unsatisfied )`` --- ternary if
7. ``min`` --- minimum
8. ``max`` --- maximum
However, conditional if statements, as well as for/while loops, are
not allowed.
Expression Substitution
^^^^^^^^^^^^^^^^^^^^^^^
Mako expression substitution can be used to facilitate PyFR-Mako kernel
specification. A Python expression :code:`expression` prescribed thus
:code:`${expression}` is substituted for the result when the PyFR-Mako
kernel specification is interpreted at runtime.
Example:
.. code-block:: none
E = s[${ndims - 1}]
Conditionals
^^^^^^^^^^^^
Mako conditionals can be used to facilitate PyFR-Mako kernel
specification. Conditionals are opened with :code:`% if condition:` and
closed with :code:`% endif`. Note that such conditionals are evaluated
when the PyFR-Mako kernel specification is interpreted at runtime, they
are not embedded into the low-level kernel.
Example:
.. code-block:: none
% if ndims == 2:
fout[0][1] += t_xx; fout[1][1] += t_xy;
fout[0][2] += t_xy; fout[1][2] += t_yy;
fout[0][3] += u*t_xx + v*t_xy + ${-c['mu']*c['gamma']/c['Pr']}*T_x;
fout[1][3] += u*t_xy + v*t_yy + ${-c['mu']*c['gamma']/c['Pr']}*T_y;
% endif
Loops
^^^^^
Mako loops can be used to facilitate PyFR-Mako kernel specification.
Loops are opened with :code:`% for condition:` and closed with :code:`%
endfor`. Note that such loops are unrolled when the PyFR-Mako kernel
specification is interpreted at runtime, they are not embedded into the
low-level kernel.
Example:
.. code-block:: none
% for i in range(ndims):
rhov[${i}] = s[${i + 1}];
v[${i}] = invrho*rhov[${i}];
% endfor
================================================
FILE: doc/src/examples.rst
================================================
********
Examples
********
Test cases are available in the `PyFR-Test-Cases
<https://github.com/PyFR/PyFR-Test-Cases>`_ repository. It is important
to note, however, that these examples are all relatively small 2D/3D
simulations and, as such, are *not* suitable for scalability or
performance studies.
Euler Equations
===============
2D Euler Vortex
---------------
Proceed with the following steps to run a parallel 2D Euler vortex
simulation on a structured mesh:
#. Navigate to the ``PyFR-Test-Cases/2d-euler-vortex`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/2d-euler-vortex
#. Run pyfr to convert the `Gmsh <https://gmsh.info/>`_
mesh file into a PyFR mesh file called ``euler-vortex.pyfrm``:
.. code-block:: shell
pyfr import euler-vortex.msh euler-vortex.pyfrm
#. Run pyfr to add a partitioning to the mesh:
.. code-block:: shell
pyfr partition add euler-vortex.pyfrm 2
#. Run pyfr to solve the Euler equations on the mesh, generating a
series of PyFR solution files called ``euler-vortex*.pyfrs``:
.. code-block:: shell
mpiexec -n 2 pyfr -p run -b cuda euler-vortex.pyfrm euler-vortex.ini
#. Run pyfr on the solution file ``euler-vortex-100.0.pyfrs``
converting it into an unstructured VTK file called
``euler-vortex-100.0.vtu``:
.. code-block:: shell
pyfr export volume euler-vortex.pyfrm euler-vortex-100.0.pyfrs euler-vortex-100.0.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/2d-euler-vortex/2d-euler-vortex.png
:width: 450px
:figwidth: 450px
:alt: euler vortex
:align: center
Colour map of density distribution at 100 time units.
2D Double Mach Reflection
-------------------------
Proceed with the following steps to run a serial 2D double Mach reflection
simulation on a structured mesh:
#. Navigate to the ``PyFR-Test-Cases/2d-double-mach-reflection`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/2d-double-mach-reflection
#. Unzip the `Gmsh <https://gmsh.info/>`_
mesh file and run pyfr to convert it into a PyFR mesh file
called ``double-mach-reflection.pyfrm``:
.. code-block:: shell
unxz double-mach-reflection.msh.xz
pyfr import double-mach-reflection.msh double-mach-reflection.pyfrm
#. Run pyfr to solve the compressible Euler equations on the mesh,
generating a series of PyFR solution files called
``double-mach-reflection-*.pyfrs``:
.. code-block:: shell
pyfr -p run -b cuda double-mach-reflection.pyfrm double-mach-reflection.ini
#. Run pyfr on the solution file ``double-mach-reflection-0.20.pyfrs``
converting it into an unstructured VTK file called
``double-mach-reflection-0.20.vtu``:
.. code-block:: shell
pyfr export volume double-mach-reflection.pyfrm double-mach-reflection-0.20.pyfrs double-mach-reflection-0.20.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/2d-double-mach-reflection/2d-double-mach-reflection.jpg
:width: 450px
:figwidth: 450px
:alt: double mach
:align: center
Colour map of density distribution at 0.2 time units.
Navier--Stokes Equations
========================
2D Couette Flow
---------------
Proceed with the following steps to run a serial 2D Couette flow
simulation on a mixed unstructured mesh:
#. Navigate to the ``PyFR-Test-Cases/2d-couette-flow`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/2d-couette-flow
#. Run pyfr to convert the `Gmsh <https://gmsh.info/>`_
mesh file into a PyFR mesh file called ``couette-flow.pyfrm``:
.. code-block:: shell
pyfr import couette-flow.msh couette-flow.pyfrm
#. Run pyfr to solve the Navier-Stokes equations on the mesh,
generating a series of PyFR solution files called
``couette-flow-*.pyfrs``:
.. code-block:: shell
pyfr -p run -b cuda couette-flow.pyfrm couette-flow.ini
#. Run pyfr on the solution file ``couette-flow-040.pyfrs``
converting it into an unstructured VTK file called
``couette-flow-040.vtu``:
.. code-block:: shell
pyfr export volume couette-flow.pyfrm couette-flow-040.pyfrs couette-flow-040.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/2d-couette-flow/2d-couette-flow.png
:width: 450px
:figwidth: 450px
:alt: couette flow
:align: center
Colour map of steady-state density distribution.
2D Incompressible Cylinder Flow
-------------------------------
Proceed with the following steps to run a serial 2D incompressible cylinder
flow simulation on a mixed unstructured mesh:
#. Navigate to the ``PyFR-Test-Cases/2d-inc-cylinder`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/2d-inc-cylinder
#. Run pyfr to convert the `Gmsh <https://gmsh.info/>`_
mesh file into a PyFR mesh file called ``inc-cylinder.pyfrm``:
.. code-block:: shell
pyfr import inc-cylinder.msh inc-cylinder.pyfrm
#. Run pyfr to solve the incompressible Navier-Stokes equations on the mesh,
generating a series of PyFR solution files called
``inc-cylinder-*.pyfrs``:
.. code-block:: shell
pyfr -p run -b cuda inc-cylinder.pyfrm inc-cylinder.ini
#. Run pyfr on the solution file ``inc-cylinder-75.00.pyfrs``
converting it into an unstructured VTK file called
``inc-cylinder-75.00.vtu``:
.. code-block:: shell
pyfr export volume inc-cylinder.pyfrm inc-cylinder-75.00.pyfrs inc-cylinder-75.00.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/2d-inc-cylinder/2d-inc-cylinder.png
:width: 450px
:figwidth: 450px
:alt: cylinder
:align: center
Colour map of velocity magnitude distribution at 75 time units.
2D Viscous Shock Tube
---------------------
Proceed with the following steps to run a serial 2D viscous shock tube
simulation on a structured mesh:
#. Navigate to the ``PyFR-Test-Cases/2d-viscous-shock-tube`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/2d-viscous-shock-tube
#. Unzip the the `Gmsh <https://gmsh.info/>`_
mesh file and run pyfr to convert it into a PyFR mesh file
called ``viscous-shock-tube.pyfrm``:
.. code-block:: shell
unxz viscous-shock-tube.msh.xz
pyfr import viscous-shock-tube.msh viscous-shock-tube.pyfrm
#. Run pyfr to solve the compressible Navier-Stokes equations on the mesh,
generating a series of PyFR solution files called
``viscous-shock-tube-*.pyfrs``:
.. code-block:: shell
pyfr -p run -b cuda viscous-shock-tube.pyfrm viscous-shock-tube.ini
#. Run pyfr on the solution file ``viscous-shock-tube-1.00.pyfrs``
converting it into an unstructured VTK file called
``viscous-shock-tube-1.00.vtu``:
.. code-block:: shell
pyfr export volume viscous-shock-tube.pyfrm viscous-shock-tube-1.00.pyfrs viscous-shock-tube-1.00.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/2d-viscous-shock-tube/2d-viscous-shock-tube.jpg
:width: 450px
:figwidth: 450px
:alt: shock tube
:align: center
Colour map of density distribution at 1 time unit.
3D Triangular Aerofoil
----------------------
Proceed with the following steps to run a serial 3D triangular aerofoil
simulation with inflow turbulence:
#. Navigate to the ``PyFR-Test-Cases/3d-triangular-aerofoil`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/3d-triangular-aerofoil
#. Unzip the `Gmsh <https://gmsh.info/>`_
mesh file and run pyfr to convert it into a PyFR mesh file called
``triangular-aerofoil.pyfrm``:
.. code-block:: shell
unxz triangular-aerofoil.msh.xz
pyfr import triangular-aerofoil.msh triangular-aerofoil.pyfrm
#. Run pyfr to solve the Navier-Stokes equations on the mesh,
generating a series of PyFR solution files called
``triangular-aerofoil-*.pyfrs``:
.. code-block:: shell
pyfr -p run -b cuda triangular-aerofoil.pyfrm triangular-aerofoil.ini
#. Run pyfr on the solution file ``triangular-aerofoil-5.00.pyfrs``
converting it into an unstructured VTK file called
``triangular-aerofoil-5.00.vtu``:
.. code-block:: shell
pyfr export volume triangular-aerofoil.pyfrm triangular-aerofoil-5.00.pyfrs triangular-aerofoil-5.00.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/3d-triangular-aerofoil/3d-triangular-aerofoil.jpg
:width: 450px
:figwidth: 450px
:alt: triangular
:align: center
Colour map of velocity magnitude distribution at 5 time units.
#. If you have installed :ref:`installation:ascent` you can run the same case with the
:ref:`soln-plugin-ascent` plugin activated, which will produce a series
of .png images that can then be merged into an animation using a utility
such as ffmpeg:
.. code-block:: shell
pyfr -p run -b cuda triangular-aerofoil.pyfrm triangular-aerofoil-ascent.ini
3D Taylor-Green
---------------
Proceed with the following steps to run a serial 3D Taylor-Green simulation:
#. Navigate to the ``PyFR-Test-Cases/3d-taylor-green`` directory:
.. code-block:: shell
cd PyFR-Test-Cases/3d-taylor-green
#. Unzip the `Gmsh <https://gmsh.info/>`_
mesh file and run pyfr to convert it into a PyFR mesh file called
``taylor-green.pyfrm``:
.. code-block:: shell
unxz taylor-green.msh.xz
pyfr import taylor-green.msh taylor-green.pyfrm
#. Run pyfr to solve the Navier-Stokes equations on the mesh,
generating a series of PyFR solution files called
``taylor-green-*.pyfrs``:
.. code-block:: shell
pyfr -p run -b cuda taylor-green.pyfrm taylor-green.ini
#. Run pyfr on the solution file ``taylor-green-5.00.pyfrs``
converting it into an unstructured VTK file called
``taylor-green-5.00.vtu``:
.. code-block:: shell
pyfr export volume taylor-green.pyfrm taylor-green-5.00.pyfrs taylor-green-5.00.vtu
#. Visualise the unstructured VTK file in `Paraview
<http://www.paraview.org/>`_
.. figure:: ../fig/3d-taylor-green/3d-taylor-green.jpg
:width: 450px
:figwidth: 450px
:alt: triangular
:align: center
Colour map of velocity magnitude distribution at 5 time units.
#. If you have installed :ref:`installation:ascent` you can run the same case with the
:ref:`soln-plugin-ascent` plugin activated, which will produce a series
of .png images that can then be merged into an animation using a utility
such as ffmpeg:
.. code-block:: shell
pyfr -p run -b cuda taylor-green.pyfrm taylor-green-ascent.ini
================================================
FILE: doc/src/file_format.rst
================================================
***********
File Format
***********
The PyFR mesh and solution file formats are based around HDF5. All
arrays are stored using little-endian byte-ordering. Floating point data
can be either single or double precision. Strings are represented as
fixed-size ``H5T_STRING`` datasets with either ASCII or UTF-8 encoding.
Certain records are stored as serialised INI files.
For this tutorial we will make use of the 2D incompressible cylinder
test case which ships with PyFR. This is a mixed element case containing
quadratically curved elements and a range of boundaries. We begin by
importing the mesh and adding a partitioning:
.. code-block:: shell
$ pyfr import inc-cylinder.msh inc-cylinder.pyfrm
$ pyfr partition add inc-cylinder.pyfrm 3 -equad:2 -etri:1 -pmetis
Mesh Format
===========
Inspecting the structure of our mesh we find:
.. code-block:: none
/ Group
/codec Dataset {13}
/creator Dataset {SCALAR}
/eles Group
/eles/quad Dataset {196}
/eles/tri Dataset {3231}
/mesh-uuid Dataset {SCALAR}
/nodes Dataset {7345}
/partitionings Group
/partitionings/1 Group
/partitionings/1/eles Dataset {3427}
/partitionings/3 Group
/partitionings/3/eles Dataset {3427}
/partitionings/3/neighbours Dataset {4}
/version Dataset {SCALAR}
The ``/creator`` dataset is a string corresponding to the program which
created the file. This is usually ``pyfr vX.Y.Z`` where X, Y, and Z,
correspond to the major, minor, and patch versions. The ``/version`` is
an integer which contains the specific revision of the format; currently
it is required to be 2. The ``/mesh-uuid`` is a hex-encoded unique
identifier which is derived from hashing the nodes and elements of a
mesh. Whenever a solution is written the ``/mesh-uuid`` from the current
mesh is copied over. As such it can be used to check that a solution is
indeed associated with a particular mesh.
The elements of the mesh are defined in the ``eles`` group. Each
distinct element type present in the mesh is given its own dataset.
Hence, in the above example we see that the mesh in question has 196
``quad`` elements and 3231 ``tri`` elements.
Inspecting the structure of the ``/eles/quad`` dataset we find:
.. code-block:: none
DATASET "/eles/quad" {
DATATYPE H5T_COMPOUND {
H5T_ARRAY { (9) H5T_STD_I64LE } "nodes";
H5T_ENUM {
H5T_STD_I8LE;
"FALSE" 0;
"TRUE" 1;
} "curved";
H5T_ARRAY { (4) H5T_COMPOUND {
H5T_STD_I16LE "cidx";
H5T_STD_I64LE "off";
} } "faces";
H5T_STD_U8LE "colour";
H5T_STD_U64LE "tags";
}
DATASPACE SIMPLE { ( 196 ) / ( 196 ) }
}
The ``nodes`` field defines the *node numbers* which specify the shape
points of each quad. Each node number is an index into the ``/nodes``
dataset. The degree of curvature for each element type is inferred from
the length of this array. In the above we conclude that our elements are
quadratically curved on account of the array having a length of 9. The
``curved`` field is a convenience member which can be used to quickly
determine if a particular element is actually curved or not. Finally,
the ``faces`` field contains information about the connectivity of each
face. The length of this array is given by the number of faces on the
element; in the above case it is four. Each element of this array is
made up of two pieces of information: a ``cidx`` number and an ``off``.
The ``cidx`` field is an entry into the ``/codec`` array and is used to
determine *what* the face is connected to. Inspecting the ``/codec``
array for our mesh we find:
.. code-block:: none
DATASET "/codec" {
DATATYPE H5T_STRING {
STRSIZE 16;
STRPAD H5T_STR_NULLPAD;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
}
DATASPACE SIMPLE { ( 13 ) / ( 13 ) }
DATA {
(0): "eles/tri", "eles/tri/face/0", "eles/tri/face/1",
(3): "eles/tri/face/2", "eles/quad", "eles/quad/face/0",
(6): "eles/quad/face/1", "eles/quad/face/2", "eles/quad/face/3",
(9): "bc/wall", "bc/inlet", "bc/outlet",
(12): "tag/fluid"
}
}
This is always an array of null-padded strings. The codec contains
four kinds of entry:
- **Element type entries** of the form ``eles/<type>`` identify a
particular element type. These are used by the point locator to
associate query points with element types.
- **Face entries** of the form ``eles/<type>/face/<n>`` identify a
particular face of an element type. A ``cidx`` pointing to a face
entry means the face is connected to another element; the ``off``
member gives the element number. For example, here
``/eles/quad[98].faces[0] = (3, 334)`` which means that face 0 of
quad 98 is connected to face 2 of triangle 334. Correspondingly,
``/eles/tri[334].faces[2] = (5, 98)`` with
``/codec[5] = "eles/quad/face/0"``.
- **Boundary entries** of the form ``bc/<name>`` identify a boundary.
When the ``cidx`` is that of a boundary the ``off`` field is
unnecessary and is guaranteed to be -1. Boundary names are, in
general, arbitrary.
- **Tag entries** of the form ``tag/<name>`` identify a material or
volume region. The per-element ``tags`` field is a bitmask where
bit *n* corresponds to the *n*-th ``tag/`` entry in the codec. An
element may belong to multiple tags simultaneously. Up to 64 tags
are supported. For meshes with a single volume region the only tag
is typically ``tag/fluid``.
The ``colour`` field is used for element colouring in implicit solvers
and contains a small integer indicating which colour group the element
belongs to.
Inspecting the ``/nodes`` array we have:
.. code-block:: none
DATASET "/nodes" {
DATATYPE H5T_COMPOUND {
H5T_ARRAY { (2) H5T_IEEE_F64LE } "location";
H5T_STD_U16LE "valency";
}
DATASPACE SIMPLE { ( 7345 ) / ( 7345 ) }
}
Here, each record consists of two fields: a ``location`` array which
gives the position of the node in space, and a ``valency`` number which
notes how many elements share this node. The dimension of the location
array is equal to the number of spatial dimensions in the mesh; in our
case this is two.
Node ordering
-------------
All nodes are specified with regards to a standard element. These
elements are:
+-------------------------+--------------------------------------------+
| Element | Shape points |
+=========================+============================================+
| Tri | (-1, -1), (1, -1), (-1, 1) |
+-------------------------+--------------------------------------------+
| Quad | (-1, -1), (1, -1), (-1, 1), (1, 1) |
+-------------------------+--------------------------------------------+
| Hex | (-1, -1, -1), ( 1, -1,-1), (-1, 1, -1), ( |
| | 1, 1, -1), (-1, -1, 1), ( 1, -1, 1), (-1, |
| | 1, 1), ( 1, 1, 1) |
+-------------------------+--------------------------------------------+
| Pri | (-1, -1, -1), (1, -1, -1), (-1, 1, -1), |
| | (-1, -1, 1), ( 1, -1, 1), (-1, 1, 1) |
+-------------------------+--------------------------------------------+
| Pyr | (-1, -1, -1), (1, -1, -1), (-1, 1, -1), |
| | (1, 1, -1), (0, 0, 1) |
+-------------------------+--------------------------------------------+
| Tet | (-1, -1, -1), (1, -1, -1), (-1, 1, -1), |
| | (-1, -1, 1) |
+-------------------------+--------------------------------------------+
The ordering of the shape points is such that the x-axis counts
quickest, followed by the y-axis, and then finally the z-axis.
Higher-order elements are always of the Lagrange type and correspond to
equi-spaced subdivisions of the first-order standard elements.
For convenience the shape points are also stored in the ``pts``
attribute of each element. In our mesh, for ``/eles/quad`` we find:
.. code-block:: none
ATTRIBUTE "pts" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 9, 2 ) / ( 9, 2 ) }
DATA {
(0,0): -1, -1,
(1,0): 0, -1,
(2,0): 1, -1,
(3,0): -1, 0,
(4,0): 0, 0,
(5,0): 1, 0,
(6,0): -1, 1,
(7,0): 0, 1,
(8,0): 1, 1
}
}
Face numbering
--------------
Face numbering is established through consideration of the
outward-facing normal vector for each face of a standard element in a
right-hand coordinate system.
+-----------------------------------+-----------------------------------+
| Element type | Face normals |
+===================================+===================================+
| Tri | (0, -1), (1, 1), (-1, 0) |
+-----------------------------------+-----------------------------------+
| Quad | (0,-1), (1, 0), (0, 1), (-1, 1) |
+-----------------------------------+-----------------------------------+
| Hex | (0, 0, -1), (0, -1, 0), (1, 0, |
| | 0), (0, 1, 0), (-1, 0, 0), (0, 0, |
| | 1) |
+-----------------------------------+-----------------------------------+
| Pri | (0, 0, -1), (0, 0, 1), (0, -1, |
| | 0), (1, 1, 0), (-1, 0, 0) |
+-----------------------------------+-----------------------------------+
| Pyr | (0, 0, -1), (0, -1, 0.5), (1, 0, |
| | 0.5), (0, 1, 0.5), (-1, 0, 0.5) |
+-----------------------------------+-----------------------------------+
| Tet | (0, 0, -1), (0, -1, 0), (-1, 0, |
| | 0), (1, 1, 1) |
+-----------------------------------+-----------------------------------+
Partitioning
------------
Every mesh contains one of more named *partitionings*. These are used to
specify how elements of a mesh should be distributed between MPI ranks.
Each partitioning is a sub-group of the ``/partitionings`` group. For
non-trivial partitionings this group will contain two integer-array
datasets: ``eles`` and ``neighbours``.
The length of the ``eles`` dataset is *always* equal to the total number
of elements in the mesh. To interpret these element numbers it is
necessary to consult the ``regions`` attribute. This is a two
dimensional dataset where the number of rows is equal to the number of
partitions and the number of columns is equal to the number of distinct
element types plus one. For ``/partitionings/3/eles`` we have:
.. code-block:: none
ATTRIBUTE "regions" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 3, 3 ) / ( 3, 3 ) }
DATA {
(0,0): 0, 0, 1207,
(1,0): 1207, 1207, 2415,
(2,0): 2415, 2611, 3427
}
}
The numbers correspond to offsets in the ``eles`` array. To use this
array we begin by alphabetically sorting the element types in our mesh.
The starting offset for the elements of sorted index *i* in partition
*p* is ``eles.regions[p, i]`` and the ending offset is
``eles.regions[p, i+1]``.
In our example there are two element types in the mesh: *quad* and
*tri*. Hence, the ``quad`` element numbers for partition 2 are
``eles[2415:2611]`` while the ``tri`` element numbers are between
``eles[2611:3427]``. It is also immediately clear from this that neither
partition 0 or 1 contain any quad elements since their starting and
ending offsets are the same.
The ``neighbours`` dataset is a representation of the connectivity
*between* partitions. As with ``eles`` to interpret this dataset it is
necessary to consult the ``regions`` attribute. This is a one
dimensional array of offsets whose length is equal to the number of
partitions plus one. The connectivity information for partition ``p`` is
between ``neighbours.regions[p]`` and ``neighbours.regions[p+1]``. For
``/partitionings/3/neighbours`` we have:
.. code-block:: none
ATTRIBUTE "regions" {
DATATYPE H5T_STD_I64LE
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): 0, 1, 3, 4
}
}
The connectivity for partition 0 is hence given by ``neighbours[0:1]``
while the connectivity for partition 1 is given by ``neighbours[1:3]``.
Just by looking at this array we conclude that partitions 0 and 2 only
have a single neighbouring partition, whilst partition 1 has two
neighbours.
Periodic interfaces
-------------------
For meshes which contain periodic boundaries, information about these
boundaries is stored in the ``/periodic`` group. In order to showcase
this we need to first switch to a mesh with periodic boundaries. Thus,
for this section we will consider the 2D Euler vortex test case.
Inspecting the structure of this mesh we find:
.. code-block:: none
/periodic Group
/periodic/0 Dataset {20, 2}
/periodic/1 Dataset {20, 2}
This tells us that our mesh has two periodic boundaries which are named
``0`` and ``1``, respectively. The names, in general, are entirely
arbitrary. The entries in these datasets describe which faces in the
mesh are paired together. In this mesh we observe that each of our two
periodic boundaries pair together 20 faces.
Inspecting the structure of ``0`` we find:
.. code-block:: none
DATASET "/periodic/0" {
DATATYPE H5T_COMPOUND {
H5T_STD_I16LE "cidx";
H5T_STD_I64LE "off";
}
DATASPACE SIMPLE { ( 20, 2 ) / ( 20, 2 ) }
}
Here, the ``cidx`` and ``off`` members have the same meaning as in the
elements arrays.
Note that this data is not currently used by the solver.
Solution Format
===============
The general structure of a solution file is:
.. code-block:: none
/ Group
/config Dataset {SCALAR}
/config-0 Dataset {SCALAR}
/creator Dataset {SCALAR}
/mesh-uuid Dataset {SCALAR}
/soln Group
/soln/p3-quad Dataset {196}
/soln/p3-tri Dataset {3231}
/stats Dataset {SCALAR}
/version Dataset {SCALAR}
The ``/creator``, ``/mesh-uuid``, and ``/version`` datasets have
identical meanings to those in the mesh file format. When opening a
solution it is important to check that the UUID matches that of the
associated mesh.
The ``/config`` dataset contains the INI file which was used to generate
the solution. In instances where a simulation has been restarted from a
different config file the full history is available in the
``/config-<n>`` datasets with ``/config-0`` corresponding to the
initial INI file.
To obtain the path to the solution data it is necessary to consult the
``/stats`` dataset. This is an INI file which contains information
about the solution. Of interest to us is the ``[data]`` section:
.. code-block:: ini
[data]
prefix = soln
The ``prefix`` key tells us which group contains the solution data
itself. Usually, the prefix is either *soln* for solutions or *tavg* for
time-average data.
Solution data is stored using HDF5 compound types. The compound dtype
names and shapes define the field layout, and the dataset itself has
one entry per element. In our above example ``/soln/p3-tri`` has a
length of 3231 since there are 3231 triangular elements in our mesh.
The ``p3`` prefix indicates that each of these triangles contains a
third order solution polynomial which, in turn, leads to 10 solution
points. The locations of the solution points can be determined in one
of two ways. The first is to parse the ``/config`` dataset and the
second is to inspect the ``pts`` attribute. For ``/soln/p3-tri`` we
find:
.. code-block:: none
ATTRIBUTE "pts" {
DATATYPE H5T_IEEE_F64LE
DATASPACE SIMPLE { ( 10, 2 ) / ( 10, 2 ) }
DATA {
(0,0): -0.333333, -0.333333,
(1,0): -0.888872, 0.777744,
(2,0): 0.777744, -0.888872,
(3,0): -0.888872, -0.888872,
(4,0): 0.268421, -0.408933,
(5,0): -0.859489, -0.408933,
(6,0): -0.408933, -0.859489,
(7,0): 0.268421, -0.859489,
(8,0): -0.859489, 0.268421,
(9,0): -0.408933, 0.268421
}
}
Field discovery is automatic via the compound dtype which contains
nested sub-compounds for each field group:
- Solution fields are grouped under ``soln`` (e.g., ``soln.rho``,
``soln.rhou``)
- Gradient fields, if present, are grouped under ``grad``
- Auxiliary data are grouped under ``aux`` (e.g., ``aux.part-id``,
``aux.ef-filter``)
The ``aux.part-id`` field contains the MPI rank number responsible for
each element.
Subset solutions
----------------
It is permissible for solutions to be subset. If a particular element
type is subset then there will be an ``-idxs`` suffixed array in the
data group. This array will be of the same length as the data array and
will contain the numbers of the elements in the solution array. These
element numbers are guaranteed to be ascending.
================================================
FILE: doc/src/index.rst
================================================
####
PyFR
####
.. _website: https://www.pyfr.org/
.. _forum: https://pyfr.discourse.group/
PyFR |release| is an open-source flow solver that uses the high-order
flux reconstruction method. For more information on the PyFR project
visit our website_, or to ask a question visit our forum_.
.. toctree::
:maxdepth: 3
:caption: Contents
installation
user_guide
meshing
post_processing
performance_tuning
examples
developer_guide
file_format
io
Indices and Tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
================================================
FILE: doc/src/installation.rst
================================================
************
Installation
************
Quick-start
===========
PyFR |release| can be installed using
`pip <https://pypi.python.org/pypi/pip>`_ and
`virtualenv <https://pypi.python.org/pypi/virtualenv>`_, as shown in the
quick-start guides below.
macOS
-----
It is assumed that the Xcode Command Line Tools and
`Homebrew <https://brew.sh/>`_ are already installed. Follow the steps
below to setup the OpenMP backend on macOS:
#. Install MPI:
.. code-block:: shell
brew install mpi4py
#. Download and install libxsmm and set the library path:
.. code-block:: shell
git clone https://github.com/libxsmm/libxsmm.git
cd libxsmm
make -j4
export PYFR_XSMM_LIBRARY_PATH=`pwd`/lib/libxsmm.dylib
#. Make a venv and activate it:
.. code-block:: shell
python3.12 -m venv pyfr-venv
source pyfr-venv/bin/activate
#. Install PyFR:
.. code-block:: shell
pip install pyfr
#. Add the following to your :ref:`configuration-file`:
.. code-block:: ini
[backend-openmp]
cc = gcc-13
Note the version of the compiler which must support the ``openmp``
flag. This has been tested on macOS 13.6.2 with an Apple M1 Max.
Ubuntu
------
Follow the steps below to setup the OpenMP backend on Ubuntu:
#. Install Python and MPI:
.. code-block:: shell
sudo apt install python3 python3-pip libopenmpi-dev openmpi-bin
pip3 install virtualenv
#. Download and install libxsmm and set the library path:
.. code-block:: shell
git clone https://github.com/libxsmm/libxsmm.git
cd libxsmm
make -j4
export PYFR_XSMM_LIBRARY_PATH=`pwd`/lib/libxsmm.so
#. Make a virtualenv and activate it:
.. code-block:: shell
python3 -m virtualenv pyfr-venv
source pyfr-venv/bin/activate
#. Install PyFR:
.. code-block:: shell
pip install pyfr
This has been tested on Ubuntu 22.04.
.. _compile-from-source:
Compiling from source
=====================
PyFR can be obtained
`here <https://github.com/PyFR/PyFR/tree/master>`_. To install the
software from source, use the provided ``setup.py`` installer or add
the root PyFR directory to ``PYTHONPATH`` using:
.. code-block:: shell
user@computer ~/PyFR$ export PYTHONPATH=.:$PYTHONPATH
When installing from source, we strongly recommend using
`pip <https://pypi.python.org/pypi/pip>`_ and
`virtualenv <https://pypi.python.org/pypi/virtualenv>`_ to manage the
Python dependencies.
Dependencies
------------
PyFR |release| has a hard dependency on Python 3.12+ and the following
Python packages:
#. `gimmik <https://github.com/PyFR/GiMMiK>`_ >= 3.2.1
#. `h5py <https://www.h5py.org/>`_ >= 2.10
#. `mako <https://www.makotemplates.org/>`_ >= 1.0.0
#. `mpi4py <https://mpi4py.readthedocs.io/en/stable/>`_ >= 4.0
#. `numpy <https://www.numpy.org/>`_ >= 2.3.5
#. `platformdirs <https://pypi.org/project/platformdirs/>`_ >= 2.2.0
#. `pytools <https://pypi.python.org/pypi/pytools>`_ >= 2016.2.1
#. `rtree <https://pypi.org/project/Rtree/>`_ >= 1.4.1
In addition an MPI library supporting version 4 of the MPI standard is
required.
.. _install cuda backend:
CUDA Backend
^^^^^^^^^^^^
The CUDA backend targets NVIDIA GPUs with a compute capability of 3.5
or greater. The backend requires:
#. `CUDA <https://developer.nvidia.com/cuda-downloads>`_ >= 11.4
HIP Backend
^^^^^^^^^^^
The HIP backend targets AMD GPUs which are supported by the ROCm stack.
The backend requires:
#. `ROCm <https://docs.amd.com/>`_ >= 6.4.1
#. `rocBLAS <https://github.com/ROCmSoftwarePlatform/rocBLAS>`_ >=
4.0.0
Metal Backend
^^^^^^^^^^^^^
The Metal backend targets Apple silicon GPUs. The backend requires:
#. `pyobjc-framework-Metal <https://pyobjc.readthedocs.io/en/latest>`_ >= 9.0
OpenCL Backend
^^^^^^^^^^^^^^
The OpenCL backend targets a range of accelerators including GPUs from
AMD, Intel, and NVIDIA. The backend requires:
#. OpenCL >= 2.1
#. Optionally `CLBlast <https://github.com/CNugteren/CLBlast>`_
#. Optionally `TinyTC <https://intel.github.io/tiny-tensor-compiler/>`_
>= 0.3.1
.. note::
When running on NVIDIA GPUs the OpenCL backend may terminate with a
segmentation fault after the simulation has finished. This is due
to a long-standing bug in how the NVIDIA OpenCL implementation
handles sub-buffers. As it occurs during the termination phase ---
after all data has been written out to disk --- the issue does *not*
impact the functionality or correctness of PyFR.
.. _install openmp backend:
OpenMP Backend
^^^^^^^^^^^^^^
The OpenMP backend targets multi-core x86-64 and ARM CPUs. The backend
requires:
#. GCC >= 12.0 or another C compiler with OpenMP 5.1 support
#. `libxsmm <https://github.com/hfp/libxsmm>`_ >= commit
5424ec5e122172ec263ef0cc6473d44b8be16fb2 in the ``main`` branch.
In order for PyFR to find libxsmm it must be located in a directory
which is on the library search path. Alternatively, the path can be
specified explicitly by exporting the environment variable
``PYFR_XSMM_LIBRARY_PATH=/path/to/libxsmm.so``.
Parallel
^^^^^^^^
To partition meshes for running in parallel it is also necessary to
have one of the following partitioners installed:
#. `METIS <http://glaros.dtc.umn.edu/gkhome/views/metis>`_ >= 5.2
#. `SCOTCH <https://www.labri.fr/perso/pelegrin/scotch/>`_ >= 7.0
#. `KaHIP <https://kahip.github.io/>`_ >= 3.24
In order for PyFR to find these libraries they must be located in a
directory which is on the library search path. Alternatively, the
paths can be specified explicitly by exporting environment
variables e.g. ``PYFR_METIS_LIBRARY_PATH=/path/to/libmetis.so``,
``PYFR_SCOTCH_LIBRARY_PATH=/path/to/libscotch.so``, and/or
``PYFR_KAHIP_LIBRARY_PATH=/path/to/libkahip.so``.
Ascent
^^^^^^
To run the :ref:`soln-plugin-ascent` plugin, MPI, VTK-m, and Conduit are required.
VTK-m is a supplementary VTK library, and Conduit is a library that implements
the data classes used in Ascent. Detailed information on compilation and installation
of `Conduit <https://llnl-conduit.readthedocs.io>`_ and `Ascent <https://ascent.readthedocs.io>`_ can
be found in the respective documentation. Ascent must be version >=0.9.0.
When compiling Ascent a renderer must be selected to be compiled, currently
PyFR only supports the VTK-h option that comes with Ascent. The paths to the
libraries may need to be set as an environment variable. For example, on linux
you will need:
.. code-block:: shell
PYFR_CONDUIT_LIBRARY_PATH=/path/to/libconduit.so
PYFR_ASCENT_MPI_LIBRARY_PATH=/path/to/libascent_mpi.so
Currently the plugin requires that Ascent and Conduit are 64-bit, this is
default when compiling in most cases.
================================================
FILE: doc/src/io.rst
================================================
********
Disk I/O
********
Solution File Writing
=====================
Plugins in PyFR which write ``.pyfrs`` solution files support several
different modes of operation. Specifically, file write operations can
be *serial* or *parallel* and can be performed *synchronously* or
*asynchronously*. These modes have implications for both performance
and robustness. Irrespective of what mode is employed the writes
themselves are *always* performed using Python's I/O routines in lieu
of MPI I/O.
In *serial* mode all data is written out by the root rank. As such
this method is not suitable for large-scale simulations with practical
I/O rates being limited to a few gigabytes per second. This
limitation can be overcome by the use of *parallel* writing where
each rank writes its own data into the output file. However, for this
deliver any benefits in terms of performance it is necessary for the
file to reside on a parallel file system. Indeed, issuing parallel
I/O operations on a non-parallel file system, such as NFS, frequently
results in data corruption. Thus, PyFR will only enable parallel I/O
when it detects that the output directory resides on a parallel file
system.
Currently, the only such supported file system is Lustre, which PyFR
is capable of both detecting and automatically configuring. When
running PyFR on a Lustre system there is no need to manually specify
the stripe size or the OST count; instead PyFR will automatically
configure these when creating the output file.
The *synchronous* and *asynchronous* writing modes determine if file
I/O is allowed to overlap with computation. This can greatly improve
performance on systems with limited I/O bandwidth since the
simulation is no longer stalled waiting for a file write operation to
complete. Asynchronous writing is enabled by default with an
approximate timeout of 60 seconds for writes to complete. After this
timeout has elapsed PyFR will explicitly wait for the file write to
finish before proceed with the next time step.
The downside of asynchronous writing is that should the simulation
terminate abnormally while the write operation is in progress the
output file will be corrupted. Given this, it is possible to disable
asynchronous writing by setting the timeout to be zero. Further
details can be found in the documentation for the relevant plugins.
VTU Export
==========
When exporting solution files to ``.vtu`` format, PyFR uses MPI I/O
for parallel operations. However, this approach can cause problems if
the output directory is located on a non-parallel file system (such
as NFS) and MPI ranks are distributed across multiple compute nodes.
Under these conditions, concurrent write operations from different
nodes may corrupt the output file.
To avoid this issue there are two options:
Single-node execution
Restrict all of the ranks to a single node to eliminate
cross-node I/O conflicts.
PVTU format
Export to ``.pvtu`` format instead, which avoids shared file I/O
and hence does not suffer from cross-node I/O issues.
================================================
FILE: doc/src/meshing.rst
================================================
*******
Meshing
*******
Importing Meshes
================
PyFR is capable of importing meshes in the Gmsh .msh format;
specifically versions 2.2 and 4.1 of the ASCII format with the latter
being recommended. Although these files can include partitioning
information this is ignored by PyFR. In order to be imported by PyFR
the following guidelines must be followed:
* The mesh must contain at least one physical group at the *volume*
dimension (the top dimension of the mesh: Physical Volume in 3D,
Physical Surface in 2D). The name of such a group is not
constrained and every volume physical group becomes a *region tag*
on the elements it contains. Multiple volume groups may be defined
and a single element may belong to more than one region. Region
tags can subsequently be used for
:ref:`tag-weighted partitioning <perf region tags>` and referenced
in plugin region expressions of the form ``tag/<name>``.
* Boundaries can be assigned any physical name. However, the node
numbers of faces on the boundary *must* match perfectly with the
faces of the corresponding volume elements. Any discrepancies here
will result in ``KeyError`` exceptions being raised on import. Such
errors usually arise when Gmsh is asked to make a volume mesh whose
characteristic size near a boundary is greater than the spacing of
points used to define the boundary itself. The result is a boundary
mesh which is inconsistent with the surface of the volume mesh.
* Periodic boundary conditions can be defined by assigning one of the
boundaries a physical name of "periodic-*name*-l" and the other a
physical name of "periodic-*name*-r" where *name* is an arbitrary
identifier. Note that only translational periodicity is currently
supported.
* Curved elements are supported up to quartic order. Such elements must
be *complete* Lagrange elements as opposed to *incomplete* serendipity
elements.
================================================
FILE: doc/src/nodal-point-sets/solver-elements-hex.rst
================================================
*********************
[solver-elements-hex]
*********************
Parameterises the hexahedral elements, with
#. ``soln-pts`` --- location of the solution points in a hexahedral
element:
``gauss-legendre`` | ``gauss-legendre-lobatto``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing in a
hexahedral element:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing in a hexahedral element:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing in a
hexahedral element:
``gauss-legendre`` | ``gauss-legendre-lobatto`` |
``witherden-vincent``
Example:
.. code-block:: ini
[solver-elements-hex]
soln-pts = gauss-legendre
quad-npts = 216
quad-pts = gauss-legendre
================================================
FILE: doc/src/nodal-point-sets/solver-elements-pri.rst
================================================
*********************
[solver-elements-pri]
*********************
Parameterises the prismatic elements, with
#. ``soln-pts`` --- location of the solution points in a prismatic
element:
``alpha-opt~gauss-legendre-lobatto`` |
``williams-shunn~gauss-legendre`` |
``williams-shunn~gauss-legendre-lobatto``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing in a
prismatic element:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing in a prismatic element:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing in a
prismatic element:
``williams-shunn~gauss-legendre`` |
``williams-shunn~gauss-legendre-lobatto`` | ``witherden-vincent``
Example:
.. code-block:: ini
[solver-elements-pri]
soln-pts = williams-shunn~gauss-legendre
quad-deg = 10
quad-pts = williams-shunn~gauss-legendre
================================================
FILE: doc/src/nodal-point-sets/solver-elements-pyr.rst
================================================
*********************
[solver-elements-pyr]
*********************
Parameterises the pyramidal elements, with
#. ``soln-pts`` --- location of the solution points in a pyramidal
element:
``gauss-legendre`` | ``gauss-legendre-lobatto``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing in a
pyramidal element:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing in a pyramidal element:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing in a
pyramidal element:
``witherden`` | ``witherden-vincent``
Example:
.. code-block:: ini
[solver-elements-pyr]
soln-pts = gauss-legendre
quad-deg = 10
quad-pts = witherden-vincent
================================================
FILE: doc/src/nodal-point-sets/solver-elements-quad.rst
================================================
**********************
[solver-elements-quad]
**********************
Parameterises the quadrilateral elements, with
#. ``soln-pts`` --- location of the solution points in a quadrilateral
element:
``gauss-legendre`` | ``gauss-legendre-lobatto``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing in a
quadrilateral element:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing in a quadrilateral element:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing in a
quadrilateral element:
``gauss-legendre`` | ``gauss-legendre-lobatto`` |
``witherden-vincent``
Example:
.. code-block:: ini
[solver-elements-quad]
soln-pts = gauss-legendre
quad-deg = 10
quad-pts = gauss-legendre
================================================
FILE: doc/src/nodal-point-sets/solver-elements-tet.rst
================================================
*********************
[solver-elements-tet]
*********************
Parameterises the tetrahedral elements, with
#. ``soln-pts`` --- location of the solution points in a tetrahedral
element:
``alpha-opt`` | ``shunn-ham``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing in a
tetrahedral element:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing in a tetrahedral element:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing in a
tetrahedral element:
``shunn-ham`` | ``witherden`` | ``witherden-vincent``
Example:
.. code-block:: ini
[solver-elements-tet]
soln-pts = shunn-ham
quad-deg = 9
quad-pts = shunn-ham
================================================
FILE: doc/src/nodal-point-sets/solver-elements-tri.rst
================================================
*********************
[solver-elements-tri]
*********************
Parameterises the triangular elements, with
#. ``soln-pts`` --- location of the solution points in a triangular
element:
``alpha-opt`` | ``williams-shunn``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing in a
triangular element:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing in a triangular element:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing in a
triangular element:
``williams-shunn`` | ``witherden-vincent``
Example:
.. code-block:: ini
[solver-elements-tri]
soln-pts = williams-shunn
quad-deg = 10
quad-pts = williams-shunn
================================================
FILE: doc/src/nodal-point-sets/solver-interfaces-line.rst
================================================
************************
[solver-interfaces-line]
************************
Parameterises the line interfaces, with
#. ``flux-pts`` --- location of the flux points on a line interface:
``gauss-legendre`` | ``gauss-legendre-lobatto``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing on a
line interface:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing on a line interface:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing on a
line interface:
``gauss-legendre`` | ``gauss-legendre-lobatto``
Example:
.. code-block:: ini
[solver-interfaces-line]
flux-pts = gauss-legendre
quad-deg = 10
quad-pts = gauss-legendre
================================================
FILE: doc/src/nodal-point-sets/solver-interfaces-quad.rst
================================================
************************
[solver-interfaces-quad]
************************
Parameterises the quadrilateral interfaces, with
#. ``flux-pts`` --- location of the flux points on a quadrilateral
interface:
``gauss-legendre`` | ``gauss-legendre-lobatto``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing on a
quadrilateral interface:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing on a quadrilateral interface:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing on a
quadrilateral interface:
``gauss-legendre`` | ``gauss-legendre-lobatto`` |
``witherden-vincent``
Example:
.. code-block:: ini
[solver-interfaces-quad]
flux-pts = gauss-legendre
quad-deg = 10
quad-pts = gauss-legendre
================================================
FILE: doc/src/nodal-point-sets/solver-interfaces-tri.rst
================================================
***********************
[solver-interfaces-tri]
***********************
Parameterises the triangular interfaces, with
#. ``flux-pts`` --- location of the flux points on a triangular
interface:
``alpha-opt`` | ``williams-shunn``
#. ``quad-deg`` --- degree of quadrature rule for anti-aliasing on a
triangular interface:
*int*
#. ``quad-npts`` --- number of points of the quadrature rule for
anti-aliasing on a triangular interface:
*int*
#. ``quad-pts`` --- name of quadrature rule for anti-aliasing on a
triangular interface:
``williams-shunn`` | ``witherden-vincent``
Example:
.. code-block:: ini
[solver-interfaces-tri]
flux-pts = williams-shunn
quad-deg = 10
quad-pts = williams-shunn
================================================
FILE: doc/src/performance_tuning.rst
================================================
******************
Performance Tuning
******************
The following sections contain best practices for *tuning* the
performance of PyFR. Note, however, that it is typically not worth
pursuing the advice in this section until a simulation is working
acceptably and generating the desired results.
.. _perf openmp backend:
OpenMP Backend
==============
AVX-512
-------
When running on an AVX-512 capable CPU Clang and GCC will, by default,
only make use of 256-bit vectors. Given that the kernels in PyFR
benefit meaningfully from longer vectors it is desirable to override
this behaviour. This can be accomplished through the ``cflags`` key
as:
.. code-block:: ini
[backend-openmp]
cflags = -mprefer-vector-width=512
Cores vs. threads
-----------------
PyFR does not typically derive any benefit from SMT. As such the number
of OpenMP threads should be chosen to be equal to the number of physical
cores.
Loop Scheduling
---------------
By default PyFR employs static scheduling for loops, with work being
split evenly across cores. For systems with a single type of core this
is usually the right choice. However, on heterogeneous systems it
typically results in load imbalance. Here, it can be beneficial to
experiment with the *guided* and *dynamic* loop schedules as:
.. code-block:: ini
[backend-openmp]
schedule = dynamic, 5
MPI processes vs. OpenMP threads
--------------------------------
When using the OpenMP backend it is recommended to employ *one MPI rank
per NUMA zone*. For most systems each socket represents its own NUMA
zone. Thus, on a two socket system it is suggested to run PyFR with two
MPI ranks, with each process being bound to a single socket. The
specifics of how to accomplish this depend on both the job scheduler and
MPI distribution.
Asynchronous MPI progression
----------------------------
The parallel scalability of the OpenMP backend depends *heavily* on MPI
having support for asynchronous progression; that is to say the ability
for non-blocking send and receive requests to complete *without* the
need for the host application to make explicit calls into MPI routines.
A lack of support for asynchronous progression prevents PyFR from being
able to overlap computation with communication.
.. _perf cuda backend:
CUDA Backend
============
CUDA-aware MPI
--------------
PyFR is capable of taking advantage of CUDA-aware MPI. This enables
CUDA device pointers to be directly to passed MPI routines. Under the
right circumstances this can result in improved performance for
simulations which are near the strong scaling limit. Assuming mpi4py
has been built against an MPI distribution which is CUDA-aware this
functionality can be enabled through the ``mpi-type`` key as:
.. code-block:: ini
[backend-cuda]
mpi-type = cuda-aware
.. _perf hip backend:
HIP Backend
===========
HIP-aware MPI
-------------
PyFR is capable of taking advantage of HIP-aware MPI. This enables HIP
device pointers to be directly to passed MPI routines. Under the right
circumstances this can result in improved performance for simulations
which are near the strong scaling limit. Assuming mpi4py has been built
against an MPI distribution which is HIP-aware this functionality can be
enabled through the ``mpi-type`` key as:
.. code-block:: ini
[backend-hip]
mpi-type = hip-aware
Partitioning
============
Partitioner comparison
----------------------
PyFR includes support for four graph partitioners. The following table
summarises their capabilities:
.. list-table::
:header-rows: 1
:widths: 18 12 15 15 15 25
* - Partitioner
- Speed
- Element weights
- Balanced (``-e balanced``)
- Partition weights
- External library
* - METIS
- Fast
- Yes
- Yes
- Yes
- `METIS <https://github.com/KarypisLab/METIS>`_
* - SCOTCH
- Very fast
- Yes
- No
- Yes
- `SCOTCH <https://gitlab.inria.fr/scotch/scotch>`_
* - KaHIP
- Reasonable
- No
- No
- No
- `KaHIP <https://github.com/KaHIP/KaHIP>`_
* - Baseline
- Slow
- Yes
- Yes
- Yes
- None
METIS is the recommended default. It is fast, produces high-quality
decompositions, and supports both element weights and balanced
partitioning. SCOTCH is often the fastest option and typically
produces comparable results; however, it does not support balanced
partitioning. KaHIP can be useful for obtaining an alternative
decomposition but lacks support for element weights and partition
weights.
The baseline partitioner requires no external libraries and is suitable
for situations where installing a third-party partitioner is
impractical. It supports all features, including balanced partitioning
for mixed grids. However, it is substantially slower than the
alternatives---especially for large partition counts---and the resulting
decompositions may have a somewhat higher edge cut. The balanced modes
(``-e balanced`` and ``-r balanced``) work best with moderate partition
counts (up to approximately 16 parts); for larger counts explicit
weights should be used instead.
The ``Balanced`` column in the table above also determines whether a
partitioner supports balanced *tag* partitioning (``-r balanced``), as
both modes rely on multi-constraint graph partitioning.
.. _perf mixed grids:
Mixed grids
-----------
When running PyFR in parallel on mixed element grids it is necessary to
take additional care when partitioning the grid. A good domain
decomposition is one where each partition contains the same amount of
computational work. For grids with a single element type, the amount of
computational work is very well approximated by the number of elements
assigned to a partition. Thus the goal is simply to ensure that all of
the partitions have roughly the same number of elements. However, when
considering mixed grids this relationship begins to break down since the
computational cost of one element type can be appreciably more than that
of another.
There are two main solutions to this problem. The first is to require
that each partition contain the same number of elements of each type.
For example, if partitioning a mesh with 500 quadrilaterals and 1,500
triangles into two parts, then a sensible goal would be to aim for each
domain to have 250 quadrilaterals and 750 triangles. Irrespective of
what the relative performance differential between the element types is,
both partitions will have nearly identical amounts of work. In PyFR
this is known as the *balanced* approach and can be requested via:
.. code-block:: shell
pyfr partition add -e balanced ...
This approach typically works well when the number of partitions is
small. However, for larger partition counts it can become difficult to
achieve such a balance whilst simultaneously minimising communication
volume. Thus, to obtain a good decomposition a secondary approach is
required in which each type of element in the domain is assigned a
*weight*. Element types which are more computationally intensive are
assigned a larger weight than those that are less intensive. Through
this mechanism the total cost of each partition can remain balanced.
Unfortunately, the relative cost of different element types depends on a
variety of factors, including:
- The polynomial order.
- If anti-aliasing is enabled in the simulation, and if so, to what
extent.
- The hardware which the simulation will be run on.
Weights can be specified when partitioning the mesh as
``-e shape:weight``. For example, if on a particular system a
quadrilateral is found to be 50% more expensive than a triangle this
can be specified as:
.. code-block:: shell
pyfr partition add -e quad:3 -e tri:2 ...
If precise profiling data is not available regarding the performance of
each element type in a given configuration a helpful rule of thumb is to
under-weight the dominant element type in the domain. For example, if a
domain is 90% tetrahedra and 10% prisms then, absent any additional
information about the relative performance of tetrahedra and prisms, a
safe choice is to assume the prisms are considerably *more* expensive
than the tetrahedra.
.. _perf region tags:
Region tag weighting
--------------------
Element *region tags* introduced at mesh import (see
:ref:`meshing:Importing Meshes`) can be used to further influence the
partitioning. This is useful when a physically or numerically
distinguished subset of the mesh carries a different per-element cost
or should be distributed uniformly across ranks.
Tag weights are specified using the ``-r`` flag on
``pyfr partition add`` and have two modes of operation.
The *multiplicative* mode scales the weight of any element carrying a
given tag by the supplied factor. The flag may be repeated to compose
multiple tag weights; the combined multiplier applied to an element is
the product of the weights of all tags which it carries. For example,
to give every element carrying ``near-wall`` four times the base weight
of an untagged element:
.. code-block:: shell
pyfr partition add -r near-wall:4 ...
This mode is available with every partitioner that supports element
weights.
The *balanced* mode adds an additional graph constraint for each tag in
the mesh so that every partition receives approximately the same number
of elements carrying each tag. This is requested as:
.. code-block:: shell
pyfr partition add -r balanced ...
Balanced tag partitioning is only available with partitioners that
support multi-constraint partitioning---currently METIS and the
baseline partitioner---and can be combined with ``-e balanced`` or with
explicit element weights. The balanced mode is most effective when the
number of tagged elements is appreciably larger than the number of
partitions.
Detecting load imbalances
-------------------------
PyFR includes code for monitoring the amount of time each rank spends
waiting for MPI transfers to complete. This can be used, among other
things, to detect load imbalances. Such imbalances are typically
observed on mixed-element grids with an incorrect weighting factor.
Wait time tracking can be enabled as:
.. code-block:: ini
[backend]
collect-wait-times = true
with the resulting statistics being recorded in the
``[backend-wait-times]`` section of the ``/stats`` object which is
included in all PyFR solution files. This can be extracted as:
.. code-block:: shell
h5dump -d /stats -b --output=stats.ini soln.pyfrs
Note that the number of graphs depends on the system, and not all graphs
initiate MPI requests. The average amount of time each rank spends
waiting for MPI requests per right hand side evaluation can be obtained
by vertically summing all of the ``-median`` fields together.
There exists an inverse relationship between the amount of computational
work a rank has to perform and the amount of time it spends waiting for
MPI requests to complete. Hence, ranks which spend comparatively less
time waiting than their peers are likely to be overloaded, whereas those
which spend comparatively more time waiting are likely to be
underloaded. This information can then be used to explicitly re-weight
the partitions and/or the per-element weights.
Scaling
=======
The general recommendation when running PyFR in parallel is to aim for a
parallel efficiency of :math:`\epsilon \simeq 0.8` with the parallel
efficiency being defined as:
.. math::
\epsilon = \frac{1}{N}\frac{T_1}{T_N},
where :math:`N` is the number of ranks, :math:`T_1` is the simulation
time with one rank, and :math:`T_N` is the simulation time with
:math:`N` ranks. This represents a reasonable trade-off between the
overall time-to-solution and efficient resource utilisation.
Plugins
=======
A common source of performance issues is running plugins too frequently.
PyFR records the amount of time spent in plugins in the
``[solver-time-integrator]`` section of the ``/stats`` object which is
included in all PyFR solution files. This can be extracted as:
.. code-block:: shell
h5dump -d /stats -b --output=stats.ini soln.pyfrs
Here, the *common* field contains the amount of time spent obtaining
properties which are not directly attributable to any specific plugin.
Examples include fetching the solution, computing its gradient, and
computing its time derivative. The *other* field accounts for time
spent in unnamed plugins such as the progress bar.
Given the time steps taken by PyFR are typically much smaller than those
associated with the underlying physics there is seldom any benefit to
running integration and/or time average accumulation plugins more
frequently than once every 50 steps. Further, when running with
adaptive time stepping there is no need to run the NaN check plugin.
For simulations with fixed time steps, it is not recommended to run the
NaN check plugin more frequently than once every 10 steps.
Start-up Time
=============
The start-up time required by PyFR can be reduced by ensuring that
Python is compiled from source with profile guided optimisations (PGO)
which can be enabled by passing ``--enable-optimizations --with-lto``
to the ``configure`` script.
It is also important that NumPy be configured to use an optimised
BLAS/LAPACK distribution. Further details can be found in the `NumPy
building from source <https://numpy.org/doc/stable/building/index.html>`_
guide.
================================================
FILE: doc/src/plugins/soln-plugin-ascent.rst
================================================
.. _soln-plugin-ascent:
[soln-plugin-ascent]
^^^^^^^^^^^^^^^^^^^^
Uses `Alpine Ascent <https://github.com/Alpine-DAV/ascent>`_ to plot
on-the-fly. The following parameters can then be set:
#. ``nsteps`` --- produce the plots every ``nsteps`` time steps:
*int*
#. ``division`` --- the level of linear subdivison to use
*int*
#. ``region`` --- region to be written, specified as either the
entire domain using ``*``, a combination of the geometric shapes
specified in :ref:`user_guide:regions`, or a sub-region of elements that have
faces on a specific domain boundary via the name of the domain
boundary:
``*`` | ``shape(args, ...)`` | *string*
#. ``region-expand`` --- how many layers to grow the region by:
*int*
There are then three components that can be used to build plots. Scenes
which define the render, Pipelines that can be used to apply filers and
build sequenceces of data manipulations, and Fields which are used to
define field expresions.
#. ``field-{name}`` --- this is an extension to the Ascent library where
users define expressions for the fields used. This can either be a
scalar or a vector, where the latter is defined by a comma separted
list of expressions.
*string* | *string*, *string* (, *string*)
#. ``scene-{name}`` --- a scene to plot with Ascent options passed in a
dictionary. Each scene needs a field, and the expression for that
field must have been set either via a field command or a pipeline.
Additionally, one or multiple ``render-{name}`` dictionaries must be
defined to configure the rendering of the scene. Multiple render
dictionaries give multiple views of the same scene.
*dict*
#. ``pipeline-{name}`` --- a pipeline of data manipulations that can be
used within a scene. The value is a dictionary containing the valid
configuration options. Pipeline objects can be stacked together to
form a pipeline of filters by making a list of dictionaries.
Finally, the q-criterion and vorticity filters require that a field
called velocity is defined.
*dict* | [*dict*]
Example:
.. code-block:: ini
[soln-plugin-ascent]
nsteps = 200
division = 5
field-kenergy = 0.5*rho*(u*u + v*v)
scene-ke = {'render-1': {'image-name': 'ke-{t:.1f}'}, 'field': 'kenergy', 'type': 'pseudocolor'}
field-mom = rho*u, rho*v
pipeline-amom = {'type': 'vector_magnitude', 'field': 'mom', 'output-name': 'mag'}
scene-va = {'type': 'pseudocolor', 'pipeline': 'amom', 'field': 'mag', 'render-1': {'image-width': 128, 'image-name': 'm1-{t:4.2f}'}, 'render-2': {'image-width': 256, 'image-name': 'm2-{t:4.2f}'}}
Note that setting ``nsteps`` to be too small can have a significant
impact on performance as generating each image has overhead and may
require some MPI communication to occur.
This plugin also exposes functionality via a CLI. The following functions
are available
- ``pyfr ascent render`` --- render an image from a pre-existing mesh
and solution file. It must be run with the same number of ranks as
partitions in the mesh. By default it will use settings from the first
section of the settings file that it is passed. Alternatively, a
specific section name can be provided. In both cases all other
sections are ignored.
Example:
.. code-block:: ini
pyfr ascent render mesh.pyfrm solution.pyfrs settings.ini
================================================
FILE: doc/src/plugins/soln-plugin-dtstats.rst
================================================
*********************
[soln-plugin-dtstats]
*********************
Write time-step statistics out to a CSV file. For implicit integrators,
an optional stage file can be specified to record per-stage convergence
information (Newton iterations, GMRES iterations, residuals).
Parameterised with
#. ``file`` --- output file path for step statistics; should the file
already exist it will be appended to:
*string*
#. ``flushsteps`` --- flush to disk every ``flushsteps``:
*int*
#. ``header`` --- if to output a header row or not:
*boolean*
#. ``stage-file`` --- output file path for per-stage convergence
statistics (implicit integrators only); if not specified, no stage
file is written:
*string*
Example:
.. code-block:: ini
[soln-plugin-dtstats]
file = dtstats.csv
flushsteps = 100
; For implicit integrators, optionally output stage convergence info
stage-file = dtstats-stages.csv
================================================
FILE: doc/src/plugins/soln-plugin-fluid-force.rst
================================================
*******************************
[soln-plugin-fluidforce-*name*]
*******************************
Periodically integrates the pressure and viscous stress on the boundary
labelled ``name`` and writes out the resulting force and moment (if
requested) vectors to a CSV or HDF5 file. Parameterised with
#. ``nsteps`` --- integrate every ``nsteps``:
*int*
#. ``file`` --- output file path; should the file already exist it
will be appended to:
*string*
#. ``file-format`` --- output file type (defaults to CSV):
``csv`` | ``hdf5``
#. ``file-header`` --- for CSV output if to write a header row or not:
*boolean*
#. ``file-dataset`` --- for HDF5 output where in the HDF5 to write the
data:
*string*
#. ``morigin`` --- origin used to compute moments (optional):
``(x, y, [z])``
#. ``quad-deg-{etype}`` --- degree of quadrature rule for fluid force
integration, optionally this can be specified for different element
types:
*int*
#. ``quad-pts-{etype}`` --- name of quadrature rule (optional):
*string*
#. ``publish-as`` --- expose computed force components under a name
for use by triggers (optional):
*string*
Published fields: ``px``, ``py`` (pressure forces), ``vx``, ``vy``
(viscous forces), and the *z* components in 3D.
Example:
.. code-block:: ini
[soln-plugin-fluidforce-wing]
nsteps = 10
file = wing-forces.h5
file-dataset = /forces
quad-deg = 6
morigin = (0.0, 0.0, 0.5)
================================================
FILE: doc/src/plugins/soln-plugin-fwh.rst
================================================
*****************
[soln-plugin-fwh]
*****************
Use Ffowcs Williams--Hawkings equation to approximate far field noise in
a uniformly moving medium:
#. ``dt`` --- time step between samples:
*float*
#. ``file`` --- output file path; should the file already exist it
will be appended to:
*string*
#. ``file-header`` --- if to output a header row or not:
*boolean*
#. ``surface`` --- a region the surface of which is saple for the FWH
sovler, only use a combination of the geometric shapes specified in
:ref:`user_guide:regions`:
``shape(args, ...)``
#. ``quad-deg`` --- degree of surface quadrature rule (optional):
*int*
#. ``quad-pts-{etype}`` --- name of surface quadrature rule (optional):
*string*
#. ``observer-pts`` --- the obversation point in the far field at which
noise is approximated:
``[(x, y), (x, y), ...]`` | ``[(x, y, z), (x, y, z), ...]``
#. ``rho, u, v, (w), p, (c)`` --- the constant far field properties of
the flow. For incompressible calculations the sound speed ``c`` and
the dnsity ``rho`` must be given:
*float*
Example:
.. code-block:: ini
[soln-plugin-fwh]
file = fwh.csv
file-header = true
region = box((1, -5), (10, 5))
dt = 1e-2
observer-pts = [(1, 10), (1, 30), (1, 100), (1, 300)]
rho = 1
u = 1
v = 0
p = 10
================================================
FILE: doc/src/plugins/soln-plugin-integrate.rst
================================================
.. _soln-plugin-integrate:
***********************
[soln-plugin-integrate]
***********************
Integrate quantities over the compuational domain. Parameterised with:
#. ``nsteps`` --- calculate the integral every ``nsteps`` time steps:
*int*
#. ``file`` --- output file path; should the file already exist it will
be appended to:
*string*
#. ``file-header`` --- if to output a header row or not:
*boolean*
#. ``quad-deg`` --- degree of quadrature rule (optional):
*int*
#. ``quad-pts-{etype}`` --- name of quadrature rule (optional):
*string*
#. ``norm`` --- sets the degree and calculates an :math:`L_p` norm,
otherwise standard integration is performed:
*float* | ``inf`` | ``none``
#. ``region`` --- region to integrate, specified as either the
entire domain using ``*`` or a combination of the geometric shapes
specified in :ref:`user_guide:regions`:
``*`` | ``shape(args, ...)``
#. ``int``-*name* --- expression to integrate, written as a function of
the primitive variables and gradients thereof, the physical
coordinates [x, y, [z]] and/or the physical time [t]; multiple
expressions, each with their own *name*, may be specified:
*string*
#. ``publish-as`` --- expose computed integral values under a name
for use by triggers (optional):
*string*
Published fields correspond to the ``int-`` names defined in the
section.
Example:
.. code-block:: ini
[soln-plugin-integrate]
nsteps = 50
file = integral.csv
file-header = true
quad-deg = 9
vor1 = (grad_w_y - grad_v_z)
vor2 = (grad_u_z - grad_w_x)
vor3 = (grad_v_x - grad_u_y)
int-E = rho*(u*u + v*v + w*w)
int-enst = rho*(%(vor1)s*%(vor1)s + %(vor2)s*%(vor2)s + %(vor3)s*%(vor3)s)
================================================
FILE: doc/src/plugins/soln-plugin-nancheck.rst
================================================
**********************
[soln-plugin-nancheck]
**********************
Periodically checks the solution for NaN values. Parameterised with
#. ``nsteps`` --- check every ``nsteps``:
*int*
#. ``trigger-set`` --- fire a named trigger when NaN is detected
(optional); this can be used to gate a writer that dumps the
solution before the abort:
*string*
Example:
.. code-block:: ini
[soln-plugin-nancheck]
nsteps = 10
================================================
FILE: doc/src/plugins/soln-plugin-pseudostats.rst
================================================
*************************
[soln-plugin-pseudostats]
*************************
Write pseudo-step convergence history out to a CSV file. Parameterised
with
#. ``flushsteps`` --- flush to disk every ``flushsteps``:
*int*
#. ``file`` --- output file path; should the file already exist it
will be appended to:
*string*
#. ``file-header`` --- if to output a header row or not:
*boolean*
Example:
.. code-block:: ini
[soln-plugin-pseudostats]
flushsteps = 100
file = pseudostats.csv
file-header = true
================================================
FILE: doc/src/plugins/soln-plugin-residual.rst
================================================
**********************
[soln-plugin-residual]
**********************
Periodically calculates the residual and writes it out to a CSV file.
Parameterised with
#. ``nsteps`` --- calculate every ``nsteps``:
*int*
#. ``file`` --- output file path; should the file already exist it
will be appended to:
*string*
#. ``file-header`` --- if to output a header row or not:
*boolean*
#. ``norm`` --- sets the degree and calculates an :math:`L_p` norm,
default is ``2``:
*float* | ``inf``
#. ``publish-as`` --- expose computed residual norms under a name
for use by triggers (optional):
*string*
Published fields correspond to the conserved variable names
(e.g. ``rho``, ``rhou``, ``rhov``, ``E``).
Example:
.. code-block:: ini
[soln-plugin-residual]
nsteps = 10
file = residual.csv
file-header = true
norm = inf
================================================
FILE: doc/src/plugins/soln-plugin-sampler.rst
================================================
*********************
[soln-plugin-sampler]
*********************
Periodically samples specific points in the volume and writes them out
to a CSV or HDF5 file. Parameterised with
#. ``nsteps`` --- sample every ``nsteps``:
*int*
#. ``samp-pts`` --- list of points to sample or a *named* point set:
``[(x, y), (x, y), ...]`` | ``[(x, y, z), (x, y, z), ...]`` | *name*
#. ``format`` --- output variable format:
``primitive`` | ``conservative``
#. ``sample-gradients`` --- if to sample gradient information or not:
*boolean*
#. ``file`` --- output file path; should the file already exist it
will be appended to:
*string*
#. ``file-format`` --- type of file to output:
``csv`` | ``hdf5``
#. ``file-dataset`` --- for HDF5 output the dataset to write into:
*string*
#. ``file-header`` --- for CSV output to output a header row or not:
*boolean*
Example:
.. code-block:: ini
[soln-plugin-sampler]
nsteps = 10
samp-pts = [(1.0, 0.7, 0.0), (1.0, 0.8, 0.0)]
format = primitive
file = point-data.csv
file-header = true
This plugin also exposes functionality via a CLI. The following
functions are available
- ``pyfr sampler add`` --- preprocesses and adds a set of points to a
mesh. This command can be run under MPI. Example:
.. code-block:: ini
pyfr sampler add mesh.pyfrm mypoints.csv
- ``pyfr sampler list`` --- lists the named point sets in a mesh.
Example:
.. code-block:: ini
pyfr sampler list mesh.pyfrm
- ``pyfr sampler dump`` --- dumps the locations of all points in a
named point set. Example:
.. code-block:: ini
pyfr sampler dump mesh.pyfrm mypoints
- ``pyfr sampler remove`` --- removes a named point set from a mesh.
Example:
.. code-block:: ini
pyfr sampler remove mesh.pyfrm mypoints
- ``pyfr sampler sample`` --- samples a solution file. This command
can be run in parallel using ``mpiexec -np n``. Example:
.. code-block:: ini
pyfr sampler sample --pts=mypoints.csv mesh.pyfrm soln.pyfrs
================================================
FILE: doc/src/plugins/soln-plugin-tavg.rst
================================================
******************
[soln-plugin-tavg]
******************
Time average quantities. Parameterised with
#. ``nsteps`` --- accumulate the average every ``nsteps`` time steps:
*int*
#. ``dt-out`` --- write to disk every ``dt-out`` time units:
*float*
#. ``mode`` --- output file accumulation mode:
``continuous`` | ``windowed``
In continuous mode each output file contains average data from
``tstart`` up until the time at which the file is written. In windowed
mode each output file only contains average data for the preceding
``dt-out`` time units. The default is ``windowed``. Average data files
obtained using the windowed mode can be accumulated after-the-fact using
the CLI.
#. ``std-mode`` --- standard deviation reporting mode:
``summary`` | ``all``
If to output full standard deviation fields or just summary
statistics. In lieu of a complete field, summary instead reports
the maximum and average standard deviation for each field. The
default is ``summary`` with ``all`` doubling the size of the
resulting files.
#. ``basedir`` --- relative path to directory where outputs will be
written:
*string*
#. ``basename`` --- pattern of output names:
*string*
#. ``precision`` --- output file number precision:
``single`` | ``double``
The default is ``single``. Note that this only impacts the output,
with statistic accumulation *always* being performed in double
precision.
#. ``region`` --- region to be averaged, specified as either the entire
domain using ``*``, a combination of the geometric shapes specified
in :ref:`user_guide:regions`, or a sub-region of elements that have faces on a
specific domain boundary via the name of the domain boundary:
``*`` | ``shape(args, ...)`` | *string*
#. ``region-type`` --- if to average all of the elements contained inside
the region or only those which are on its surface:
``volume`` | ``surface``
#. ``region-expand`` --- how many layers to grow the region by:
*int*
#. ``avg``-*name* --- expression to time average, written as a function
of the primitive variables and gradients thereof; multiple
expressions, each with their own *name*, may be specified:
*string*
#. ``fun-avg``-*name* --- expression to compute at file output time:
written as a function of any ordinary average terms; multiple
expressions, each with their own *name*, may be specified:
*string*
Example:
.. code-block:: ini
[soln-plugin-tavg]
nsteps = 10
dt-out = 2.0
mode = windowed
basedir = .
basename = files-{t:06.2f}
avg-u = u
avg-v = v
avg-uu = u*u
avg-vv = v*v
avg-uv = u*v
fun-avg-upup = uu - u*u
fun-avg-vpvp = vv - v*v
fun-avg-upvp = uv - u*v
This plugin also exposes functionality via a CLI. The following
functions are available
- ``pyfr tavg merge`` --- average together multiple time average files
into a single time average file. The averaging times are read from the
file and do not need to be evenly spaced in time. Example:
.. code-block:: ini
pyfr tavg merge avg-1.00.pyfrs avg-2.00.pyfrs avg-10.00.pyfrs merged_avg.pyfrs
================================================
FILE: doc/src/plugins/soln-plugin-writer.rst
================================================
********************
[soln-plugin-writer]
********************
Periodically write the solution to disk in the pyfrs format.
Parameterised with
#. ``dt-out`` --- write to disk every ``dt-out`` time units. This
parameter may be omitted when the writer is gated by a trigger
(``trigger-action = gate``), in which case the writer outputs
whenever the trigger is active:
*float*
#. ``basedir`` --- relative path to directory where outputs will be
written:
*string*
#. ``basename`` --- pattern of output names:
*string*
#. ``write-gradients`` --- if to write out gradient data:
*bool*
#. ``async-timeout`` --- how long asynchronous file writes are allowed
to take before becoming blocking:
*float*
#. ``post-action`` --- command to execute after writing the file:
*string*
#. ``post-action-mode`` --- how the post-action command should be
executed:
``blocking`` | ``non-blocking``
#. ``region`` --- region to be written, specified as either the
entire domain using ``*``, a combination of the geometric shapes
specified in :ref:`user_guide:regions`, or a sub-region of elements that have
faces on a specific domain boundary via the name of the domain
boundary:
``*`` | ``shape(args, ...)`` | *string*
#. ``region-type`` --- if to write all of the elements contained inside
the region or only those which are on its surface:
``volume`` | ``surface``
#. ``region-expand`` --- how many layers to grow the region by:
*int*
Example:
.. code-block:: ini
[soln-plugin-writer]
dt-out = 0.01
basedir = .
basename = files-{t:.2f}
async-timeout = 0
post-action = echo "Wrote file {soln} at time {t} for mesh {mesh}."
post-action-mode = blocking
region = box((-5, -5, -5), (5, 5, 5))
region-type = volume
region-expand = 0
================================================
FILE: doc/src/plugins/solver-plugin-source.rst
================================================
**********************
[solver-plugin-source]
**********************
Injects solution, space (x, y, [z]), and time (t) dependent
source terms with
#. ``rho`` --- density source term:
*string*
#. ``rhou`` --- x-momentum source term:
*string*
#. ``rhov`` --- y-momentum source term:
*string*
#. ``rhow`` --- z-momentum source term:
*string*
#. ``E`` --- energy source term:
*string*
Example:
.. code-block:: ini
[solver-plugin-source]
rho = t
rhou = x*y*sin(y)
rhov = z*rho
rhow = 1.0
E = 1.0/(1.0+x)
================================================
FILE: doc/src/plugins/solver-plugin-turbulence.rst
================================================
**************************
[solver-plugin-turbulence]
**************************
Injects synthetic eddies into a region of the domain. Parameterised with
1. ``avg-rho`` --- average free-stream density:
*float*
2. ``avg-u`` --- average free-stream velocity magnitude:
*float*
3. ``avg-mach`` --- averge free-stream Mach number:
*float*
4. ``turbulence-intensity`` --- percentage turbulence intensity:
*float*
5. ``turbulence-length-scale`` --- turbulent length scale:
*float*
6. ``sigma`` --- standard deviation of Gaussian sythetic eddy profile:
*float*
7. ``centre`` --- centre of plane on which synthetic eddies are injected:
(*float*, *float*, *float*)
8. ``y-dim`` --- y-dimension of plane:
*float*
9. ``z-dim`` --- z-dimension of plane:
*float*
10. ``rot-axis`` --- axis about which plane is rotated:
(*float*, *float*, *float*)
11. ``rot-angle`` --- angle in degrees that plane is rotated:
*float*
Example:
.. code-block:: ini
[solver-plugin-turbulence]
avg-rho = 1.0
avg-u = 1.0
avg-mach = 0.2
turbulence-intensity = 1.0
turbulence-length-scale = 0.075
sigma = 0.7
centre = (0.15, 2.0, 2.0)
y-dim = 3.0
z-dim = 3.0
rot-axis = (0, 0, 1)
rot-angle = 0.0
================================================
FILE: doc/src/plugins/triggers.rst
================================================
********
Triggers
********
Triggers extend the plugin system with conditional execution. Instead
of running on a fixed schedule, plugins can be gated by trigger
conditions---for example, starting time averaging only after the flow
has settled, or writing a snapshot when a NaN is detected.
Triggers are defined in ``[trigger-name]`` sections and referenced by
name from plugin sections. Trigger state is included in solution
checkpoint files, so restarts preserve trigger history.
Concepts
========
Trigger Modes
-------------
Each trigger has a *mode* that controls how its raw condition is
translated into an active/inactive state:
``latch``
Once the condition becomes true the trigger stays active permanently.
This is the default.
``level``
The trigger is active only while the condition is true.
``edge``
The trigger fires for a single evaluation cycle on the rising edge
(false |rarr| true transition).
Plugin Options
--------------
Every plugin supports the following optional trigger-related keys:
``enabled``
*boolean* --- if ``false`` the plugin is never called.
``trigger``
*string* --- name(s) of trigger(s) that control this plugin.
Use ``&`` to require **all** triggers (AND) and ``|`` to require
**any** trigger (OR). Examples: ``trigger = settled & lift``,
``trigger = timeout | converged``.
``trigger-action``
``activate`` | ``gate``
With ``activate`` (the default) the plugin remains dormant until the
trigger condition is met, after which it runs on its normal schedule
permanently. With ``gate`` the plugin runs only while the trigger
condition is met.
``trigger-write``
*string* --- name of a trigger; when active the plugin's
``trigger_write`` method is called (if it has one) to perform a
non-destructive snapshot. This does not affect the plugin's normal
output schedule.
``trigger-set``
*string* --- name of a trigger to fire programmatically when the
plugin detects a condition (e.g. NaN detection).
``publish-as``
*string* --- expose the plugin's scalar outputs under the given name
so that expression and steady-state triggers can reference them.
Trigger Types
=============
[trigger-*name*] type = manual
-------------------------------
A trigger that is never true on its own. It can only be activated
programmatically by a plugin via ``trigger-set``. Parameterised with:
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-nan-detected]
type = manual
mode = edge
[trigger-*name*] type = time
----------------------------
Becomes true once the simulation time reaches a threshold.
Parameterised with:
#. ``t`` --- simulation time at which to fire:
*float*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-flow-developed]
type = time
t = 5.0
[trigger-*name*] type = wallclock
---------------------------------
Becomes true once wall-clock time since the start of the run reaches a
threshold. Useful for graceful shutdown before a queue limit.
Parameterised with:
#. ``t`` --- wall-clock seconds since the run started:
*float*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-wall-limit]
type = wallclock
t = 82800
mode = edge
[trigger-*name*] type = signal
------------------------------
Becomes true when a Unix signal is received. The signal is blocked on
startup and consumed non-destructively via ``sigpending``/``sigwait``.
Only the root MPI rank listens for the signal; the result is broadcast
to all ranks. Parameterised with:
#. ``signal`` --- signal name (e.g. ``USR1``, ``SIGUSR1``):
*string*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-dump]
type = signal
signal = USR1
mode = edge
[trigger-*name*] type = file
-----------------------------
Becomes true when a file exists on disk. Only evaluated on the root
rank. Parameterised with:
#. ``path`` --- path to the sentinel file:
*string*
#. ``watch`` --- what to monitor:
``exists`` | ``mtime`` | ``ctime`` | ``atime``
With ``exists`` (the default) the trigger fires when the file is
present. With ``mtime``, ``ctime``, or ``atime`` the trigger
fires whenever the corresponding timestamp changes, producing a
single-cycle pulse per change. This allows retriggering by simply
touching the file rather than deleting and recreating it. The
last-seen timestamp is included in checkpoint files.
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-stop]
type = file
path = /scratch/job/please_stop
mode = latch
[trigger-*name*] type = expression
-----------------------------------
Evaluates a mathematical expression against integrator scalars (``t``,
``dt``, ``step``) and published plugin values. Parameterised with:
#. ``condition`` --- condition of the form ``expr cmp threshold``
where *cmp* is one of ``<``, ``<=``, ``>``, ``>=``:
*string*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Published values are referenced as ``publisher.field``, where
*publisher* is the ``publish-as`` name of a plugin and *field* is one
of its output fields.
Example:
.. code-block:: ini
[trigger-high-drag]
type = expression
condition = forces.px > 100.0
[trigger-*name*] type = field
-----------------------------
Evaluates a field expression over the domain (or a region), reduces it,
and compares against a threshold. This is a collective operation
across all MPI ranks. Parameterised with:
#. ``condition`` --- condition of the form
``reduction(expr) cmp threshold`` where *reduction* is one of
``min``, ``max``, ``sum``, ``avg``, ``l2norm`` and *cmp* is one of
``<``, ``<=``, ``>``, ``>=``:
*string*
#. ``nsteps`` --- evaluate every *nsteps* steps:
*int*
#. ``region`` --- region to evaluate over (default ``*``):
``*`` | ``shape(args, ...)``
#. ``quad-deg`` --- quadrature degree (optional):
*int*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-pressure-spike]
type = field
condition = max(p) > 1e6
region = box((-1, -1), (1, 1))
nsteps = 5
[trigger-*name*] type = point
------------------------------
Samples the solution at one or more discrete probe points, evaluates
an expression in primitive variables, reduces over the points, and
compares against a threshold. This reuses the point sampling
infrastructure from the sampler plugin. Parameterised with:
#. ``condition`` --- condition of the form
``reduction(expr) cmp threshold`` where *reduction* is one of
``min``, ``max``, ``avg`` and *cmp* is one of
``<``, ``<=``, ``>``, ``>=``:
*string*
#. ``pts`` --- probe point coordinates:
``[(x, y), ...]`` | ``[(x, y, z), ...]``
#. ``nsteps`` --- evaluate every *nsteps* steps:
*int*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-probe-temp]
type = point
condition = max(p / rho) > 350.0
pts = [(0.5, 0.0), (1.0, 0.0)]
nsteps = 20
[trigger-*name*] type = steady
-------------------------------
Monitors a published scalar value over a sliding window and fires when
it has converged according to a criterion. Parameterised with:
#. ``source`` --- published value to monitor, as
``publisher.field``:
*string*
#. ``window`` --- number of published samples in the sliding window:
*int*
#. ``tolerance`` --- convergence threshold (relative to mean):
*float*
#. ``criterion`` --- convergence metric:
``range`` | ``gradient`` | ``std``
``range`` fires when (max |minus| min) / |mean| < tolerance.
``gradient`` fires when the normalised slope over the window is
below tolerance. ``std`` fires when std / |mean| < tolerance.
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-cd-converged]
type = steady
source = forces.px
window = 200
tolerance = 0.001
criterion = range
[trigger-*name*] type = duration
--------------------------------
Becomes true a fixed time or number of steps after another trigger
fires. Parameterised with:
#. ``after`` --- name of the trigger to wait for:
*string*
#. ``duration`` --- time to wait after the *after* trigger fires:
*float*
#. ``steps`` --- steps to wait (alternative to ``duration``):
*int*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-warm-up-done]
type = duration
after = flow-developed
duration = 10.0
[trigger-*name*] type = all
---------------------------
Logical AND of multiple triggers. Parameterised with:
#. ``triggers`` --- space-separated list of trigger names:
*string*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-ready]
type = all
triggers = flow-developed cd-converged
[trigger-*name*] type = any
---------------------------
Logical OR of multiple triggers. Parameterised with:
#. ``triggers`` --- space-separated list of trigger names:
*string*
#. ``mode`` --- trigger mode:
``latch`` | ``level`` | ``edge``
Example:
.. code-block:: ini
[trigger-should-stop]
type = any
triggers = wall-limit dump-requested
Examples
========
Write a Snapshot Before NaN Abort
---------------------------------
When NaN values are detected, fire a trigger that causes a second
writer instance to dump the solution before the solver aborts. This
gives a file that can be inspected to diagnose the instability.
.. code-block:: ini
[soln-plugin-nancheck]
nsteps = 10
trigger-set = nan-detected
[trigger-nan-detected]
type = manual
mode = edge
[soln-plugin-writer]
dt-out = 1.0
basedir = .
basename = soln-{t:.4f}
[soln-plugin-writer-crashdump]
basedir = .
basename = crash-{t:.4f}
trigger = nan-detected
trigger-action = gate
Here the nancheck plugin fires ``nan-detected`` on the step a NaN
appears. The ``writer-crashdump`` instance has no ``dt-out`` and is
gated by the trigger, so it writes exactly once---immediately before
the abort.
Dump Solution and Time Averages on a Signal
--------------------------------------------
Send ``SIGUSR1`` to the running process to trigger an immediate dump
of both the instantaneous solution and the current time-average
accumulation, without interrupting the normal output schedule.
.. code-block:: ini
[trigger-dump]
type = signal
signal = USR1
mode = edge
[soln-plugin-writer]
dt-out = 5.0
basedir = .
basename = soln-{t:.4f}
trigger-write = dump
[soln-plugin-tavg]
nsteps = 10
dt-out = 50.0
basedir = .
basename = tavg-{t:.4f}
avg-u = u
avg-v = v
trigger-write = dump
With ``trigger-write`` the plugins continue their normal periodic
output; when the signal arrives, each plugin additionally performs a
non-destructive snapshot.
On-Demand Snapshot via File Touch
----------------------------------
Use a file trigger with ``watch = mtime`` to dump a snapshot each time
a sentinel file is touched. Because the trigger fires only when the
timestamp changes, each ``touch`` produces exactly one write:
.. code-block:: ini
[trigger-snap-now]
type = file
path = /tmp/pyfr-snap
watch = mtime
[soln-plugin-writer]
dt-out = 5.0
basedir = .
basename = soln-{t:.4f}
trigger-write = snap-now
Run ``touch /tmp/pyfr-snap`` at any time to get an immediate snapshot;
touch it again later for another. The normal ``dt-out`` schedule is
unaffected. Alternatively, use ``watch = exists`` (the default) with
``mode = edge`` for a delete-and-recreate workflow.
Start Time Averaging When the Flow Settles
-------------------------------------------
Use the fluid force plugin to publish the drag coefficient, monitor it
with a steady-state trigger, and only begin accumulating time averages
once the drag has converged.
.. code-block:: ini
[soln-plugin-fluidforce-cylinder]
nsteps = 10
file = forces.csv
file-header = true
publish-as = forces
[trigger-cd-converged]
type = steady
source = forces.px
window = 200
tolerance = 0.01
criterion = range
[soln-plugin-tavg]
nsteps = 10
dt-out = 20.0
basedir = .
basename = tavg-{t:.4f}
avg-u = u
avg-v = v
avg-uu = u*u
avg-vv = v*v
avg-uv = u*v
fun-avg-upup = uu - u*u
fun-avg-vpvp = vv - v*v
fun-avg-upvp = uv - u*v
trigger = cd-converged
trigger-action = activate
The time averaging plugin stays dormant until the drag converges, then
runs permanently on its normal schedule.
Graceful Shutdown Before Queue Limit
-------------------------------------
Write a final checkpoint and stop the simulation cleanly 30 minutes
before an HPC queue's wall-clock limit (assuming a 24-hour allocation).
.. code-block:: ini
[trigger-wall-limit]
type = wallclock
t = 82800
mode = edge
[soln-plugin-writer-final]
basedir = .
basename = checkpoint-{t:.4f}
trigger = wall-limit
trigger-action = gate
Conditional Field Monitoring
----------------------------
Fire a trigger when the maximum pressure anywhere in a region exceeds
a threshold---useful for detecting shocks or instabilities.
.. code-block:: ini
[trigger-pressure-spike]
type = field
condition = max(p) > 1.5e5
region = box((-2, -2), (2, 2))
nsteps = 20
[soln-plugin-writer-spike]
basedir = .
basename = spike-{t:.4f}
trigger = pressure-spike
trigger-action = gate
Composite: Start Averaging After Vortex Shedding Onset
-------------------------------------------------------
For a cylinder flow, wait for the initial transient to pass and for
vortex shedding to develop before starting time averaging. A time
trigger prevents early activation from impulsive-start force spikes,
while an expression trigger detects the onset of lift oscillation.
.. code-block:: ini
[soln-plugin-fluidforce-wall]
nsteps = 10
quad-deg = 9
file = forces.csv
publish-as = forces
[trigger-settled]
type = time
t = 10.0
[trigger-lift]
type = expression
condition = abs(forces.py) > 0.01
mode = level
[trigger-shedding]
type = all
triggers = settled lift
mode = latch
[soln-plugin-tavg]
nsteps = 10
dt-out = 20.0
basedir = .
basename = tavg-{t:.4f}
avg-u = u
avg-v = v
avg-uu = u*u
avg-vv = v*v
avg-uv = u*v
fun-avg-upup = uu - u*u
fun-avg-vpvp = vv - v*v
fun-avg-upvp = uv - u*v
trigger = shedding
trigger-action = activate
.. |rarr| unicode:: U+2192
.. |minus| unicode:: U+2212
.. |mean| unicode:: U+007C mean U+007C
================================================
FILE: doc/src/post_processing.rst
================================================
.. _ParaViewPar: https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html
***************
Post Processing
***************
The following sections contain best practices for post processing a
simulation using ParaView.
High-Order Export
-----------------
By default PyFR will output a high-order VTK file. However, to take
full advantage of this functionality it is necessary to adjust the
*Nonlinear Subdivision Level* property in ParaView. This property is
configured on a per-filter basis and defaults to one. This results in
each high-order element being internally subdivided once by ParaView
prior to further processing. While this is often a reasonable first
approximation it is typically inadequate for moderate-order simulations.
It may therefore be necessary to move the slider to two or three levels
of subdivision. Note, however, that ParaView subdivides *recursively*
and hence a quadrilateral subject to two levels of subdivision is broken
down into 16 elements. This is in contrast to PyFR where, when
employing subdivision, ``--eopts=divisor:2`` results in each
quadrilateral being divided into four elements.
Clean to Grid
-------------
Upon opening an exported file in ParaView one should *always* run the
*Clean to Grid* filter. This will eliminate duplicate vertices along
the faces and edges between elements that arise as a consequence of the
discontinuous nature of the FR approach. For best results it is
recommended to set the *Point Data Weighting Strategy* to *Average by
Number*. Running this filter will not only result in cleaner visuals
but will also improve the performance of ParaView.
Tessellate
----------
When working with high-order outputs an alternative to the *Clean to
Grid* filter is the *Tessellate* filter. This takes a high-order grid
with potentially discontinuous field values and *adaptively* subdivides
it into a larger number of linear elements. Here, there are two primary
parameters: *Chord Error* which controls the amount of permitted
geometrical error and the unnamed *Field Error* list-box which controls
the amount of permitted error in the field values themselves. Although
not obvious from the user interface, it is possible to provide a
separate error tolerance for each field. Secondary parameters include
the *Maximum Number of Subdivisions* and *Merge Points* with the latter
subsuming the functionality of *Clean to Grid*. Note that this filter
can be **extremely computationally expensive**, especially when tight
error tolerances are chosen.
Avoiding Seams
--------------
When working with mixed element meshes or with .pvtu files obtained by
running pyfr export in parallel, it is possible for seams to appear.
These can be avoided by adding the *Ghost Cells* plugin to the filter
pipeline. This filter should be added immediately after *Clean to Grid*
and/or *Tessellate*.
Parallel Processing
-------------------
When post-processing large data sets it is important to run ParaView in
parallel. This can be done either interactively using *pvserver* or in
a batch capacity using *pvbatch*. Full details can be found in the
`ParaView documentation <ParaViewPar_>`_. Upon opening a file the
recommended filter stack is as follows:
#. *Redistribute Dataset* which will distribute the cells such that each
ParaView rank has a roughly equivalent amount of data.
#. *Clean to Grid* and/or *Tessellate* for the reasons described above.
#. *Ghost Cells* to avoid seams.
When working with extremely large datasets in parallel it is recommended
to use the .pvtu file format. This has the advantage of being already
partitioned such that there is no need to run the *Redistribute Dataset*
filter. Here, the number parts in the .pvtu file is equal to the number
of ranks *pyfr export* is run with. For optimal performance, the number
of parts should be an integer multiple of the number of ranks *pvserver*
or *pvbatch* will be run with. Furthermore, it is important that each
of these ranks have a similar number of elements. This is not usually
an issue except when *pyfr export* is using a weighted partitioning or
when the .pyfrs files are subset. In the former case the solution is to
add a uniform partitioning to the mesh and employ this for the export.
In the latter case the only robust solution is to use the *Redistribute
Dataset* to rebalance the file.
Boundary and STL Export
-----------------------
When working with surface data, be it from a boundary or an STL file, it
is recommended to start with the following filter pipeline:
#. *Clean to Grid* for the reasons outlined above.
#. *Extract Surface* which will convert the internal representation of
the surface from an unstructured grid to polygonal data.
#. *Generate Surface Normals* which will yield a much smoother surface.
The normal data is also needed for computing quantities such as the
skin-friction coefficient :math:`C_f`.
To reduce the computational cost associated with exporting boundary data
it is recommended to use *regions*. For example, if our ultimate goal
is to analyse data on a boundary called *wall* then we can configure our
solution writer as:
.. code-block:: ini
[soln-plugin-writer]
...
write-gradients = true
region = wall
which will output the solution and gradient data for the elements on our
boundary. Then, we can pass this subset solution file to ``pyfr export
boundary``. Alternatively, if our goal is to export an STL region
called *rgn* then we can configure our solution writer as:
.. code-block:: ini
[soln-plugin-writer]
...
write-gradients = true
region = stl('rgn')
region-expand = 1
region-type = surface
which will write out approximately three layers of elements around the
surface defined by our STL region. The need for multiple layers is due
to the coarse-grained nature of the region code and ensures that the
subsequent export step will have enough elements to work with.
================================================
FILE: doc/src/systems/constants.rst
================================================
***********
[constants]
***********
Sets constants used in the simulation
#. ``gamma`` --- ratio of specific heats:
*float*
#. ``mu`` --- dynamic viscosity for ``navier-stokes``:
*float*
#. ``Pr`` --- Prandtl number for ``navier-stokes``:
*float*
#. ``cpTref`` --- product of specific heat at constant pressure and
reference temperature for ``navier-stokes`` with Sutherland's Law:
*float*
#. ``cpTs`` --- product of specific heat at constant pressure and
Sutherland temperature for ``navier-stokes`` with Sutherland's Law:
*float*
Other constant may be set by the user which can then be used throughout the
``.ini`` file.
Example:
.. code-block:: ini
[constants]
; PyFR Constants
gamma = 1.4
mu = 0.001
Pr = 0.72
; User Defined Constants
V_in = 1.0
P_out = 20.0
================================================
FILE: doc/src/systems/solver-artificial-viscosity.rst
================================================
*****************************
[solver-artificial-viscosity]
*****************************
Parameterises artificial viscosity for shock capturing with
1. ``max-artvisc`` --- maximum artificial viscosity:
*float*
2. ``s0`` --- sensor cut-off:
*float*
3. ``kappa`` --- sensor range:
*float*
Example:
.. code-block:: ini
[solver-artificial-viscosity]
max-artvisc = 0.01
s0 = 0.01
kappa = 5.0
================================================
FILE: doc/src/systems/solver-entropy-filter.rst
================================================
***********************
[solver-entropy-filter]
***********************
Parameterises entropy filter for shock capturing with
1. ``d-min`` --- minimum allowable density:
*float*
2. ``p-min`` --- minimum allowable pressure:
*float*
3. ``e-tol`` --- entropy tolerance:
*float*
4. ``niters`` --- number of filter strength solver iterations:
*int*
5. ``formulation`` --- formulation for constraints and filter kernel:
``nonlinear`` | ``linearised``
Example:
.. code-block:: ini
[solver-entropy-filter]
d-min = 1e-6
p-min = 1e-6
e-tol = 1e-6
niters = 2
formulation = nonlinear
Used in the following Examples:
1. :ref:`examples:2d double mach reflection`
2. :ref:`examples:2d viscous shock tube`
================================================
FILE: doc/src/systems/solver-interfaces.rst
================================================
*******************
[solver-interfaces]
*******************
Parameterises the interfaces with
1. ``riemann-solver`` --- type of Riemann solver:
``rusanov`` | ``hll`` | ``hllc`` | ``roe`` | ``roem`` | ``exact``
2. ``ldg-beta`` --- beta parameter used for LDG:
*float*
3. ``ldg-tau`` --- tau parameter used for LDG:
*float*
Example:
.. code-block:: ini
[solver-interfaces]
riemann-solver = rusanov
ldg-beta = 0.5
ldg-tau = 0.1
================================================
FILE: doc/src/systems/solver-time-integrator.rst
================================================
************************
[solver-time-integrator]
************************
Parameterises the time-integration scheme used by the solver.
Common Options
==============
The following options are common to both explicit and implicit
formulations:
#. ``formulation`` --- time-stepping formulation
``explicit`` | ``implicit``
Defaults to ``explicit`` if not specified.
#. ``tstart`` --- initial time
*float*
#. ``tend`` --- final time
*float*
#. ``dt`` --- time-step
*float*
#. ``dt-min`` --- minimum permissible time-step
*float* (default: 1e-12)
#. ``dt-lookahead`` --- number of steps over which to smooth the
time-step when approaching a target time (e.g., a plugin output
time). Distributes the remaining time into equal steps to avoid
a single undersized step at the end.
*int* (default: 10)
Explicit Formulation
====================
For explicit time-stepping (``formulation = explicit`` or omitted):
#. ``scheme`` --- time-integration scheme
``euler`` | ``rk34`` | ``rk4`` | ``rk45`` | ``tvd-rk3``
#. ``controller`` --- time-step controller
``none`` | ``pi`` | ``cfl``
where ``pi`` only works with ``rk34`` and ``rk45`` and requires
- ``atol`` --- absolute error tolerance
*float*
- ``atol-<var>`` --- per-variable absolute tolerance
*float*
For problems with disparate variable scales (e.g., high-pressure
compressible flow where energy is much larger than density),
per-variable tolerances can be used instead of a scalar ``atol``.
If any ``atol-<var>`` is set, all must be set. Variable names
depend on the system; for Euler and Navier-Stokes in 2D these
are ``rho``, ``rhou``, ``rhov``, ``E``.
- ``rtol`` --- relative error tolerance
*float*
- ``errest-norm`` --- norm to use for estimating the error
``uniform`` | ``l2``
- ``safety-fact`` --- safety factor for step size adjustment
(suitable range 0.80-0.95)
*float*
- ``min-fact`` --- minimum factor by which the time-step can
change between iterations (suitable range 0.1-0.5)
*float*
- ``max-fact`` --- maximum factor by which the time-step can
change between iterations (suitable range 2.0-6.0)
*float*
- ``dt-max`` --- maximum permissible time-step
*float*
and ``cfl`` works with all explicit schemes and computes the
time-step from the CFL condition as
``dt = cfl / (max_wavespeed * (2*order + 1))``. It requires
- ``cfl`` --- CFL number
*float*
Maximum stable values for linear advection are:
========== =====
Scheme CFL
========== =====
euler 1.00
tvd-rk3 2.51
rk4 2.79
rk34 2.79
rk45 4.82
========== =====
- ``dt-max`` --- maximum permissible time-step
*float* (default: 100.0)
- ``cfl-nsteps`` --- recompute the CFL-based time-step every
N accepted steps
*int* (default: 1)
Example:
.. code-block:: ini
[solver-time-integrator]
scheme = rk45
controller = pi
tstart = 0.0
tend = 10.0
dt = 0.001
atol = 0.00001
rtol = 0.00001
errest-norm = l2
safety-fact = 0.9
min-fact = 0.3
max-fact = 2.5
Per-variable tolerances for problems with large dynamic range:
.. code-block:: ini
[solver-time-integrator]
scheme = rk45
controller = pi
tstart = 0.0
tend = 10.0
dt = 0.001
atol-rho = 1e-8
atol-rhou = 1e-6
atol-rhov = 1e-8
atol-E = 1e-3
rtol = 0.00001
errest-norm = l2
safety-fact = 0.9
min-fact = 0.3
max-fact = 2.5
CFL-based time-stepping:
.. code-block:: ini
[solver-time-integrator]
scheme = rk45
controller = cfl
tstart = 0.0
tend = 10.0
dt = 0.001
cfl = 2.4
Implicit Formulation
====================
For implicit time-stepping (``formulation = implicit``), PyFR employs
a Jacobian-free Newton-Krylov (JFNK) method. Each time step requires
solving a nonlinear system using Newton's method, where the linear
systems arising at each Newton iteration are solved using a Krylov
subspace method.
Scheme Selection
----------------
#. ``scheme`` --- implicit time-integration scheme
``euler`` | ``trapezium`` | ``trbdf2`` | ``kvaerno43``
where
- ``euler`` --- first-order backward Euler (L-stable)
- ``trapezium`` --- second-order trapezoidal rule (A-stable)
- ``trbdf2`` --- second-order TR-BDF2 (L-stable)
- ``kvaerno43`` --- third-order ESDIRK with embedded second-order
error estimator (L-stable)
Schemes with embedded error estimators (i.e., ``kvaerno43``) are
required for adaptive time-stepping with the ``pi`` controller.
Controller Selection
--------------------
#. ``controller`` --- time-step controller
``none`` | ``pi`` | ``throughput``
where ``pi`` requires a scheme with an embedded error estimator
and the following additional parameters:
- ``atol`` --- absolute error tolerance for step acceptance
*float*
- ``atol-<var>`` --- per-variable absolute tolerance
*float*
For problems with disparate variable scales, per-variable
tolerances can be used instead of a scalar ``atol``. If any
``atol-<var>`` is set, all must be set. Variable names for
Euler and Navier-Stokes: ``rho``, ``rhou``, ``rhov``, ``E``.
- ``rtol`` --- relative error tolerance for step acceptance
*float*
- ``errest-norm`` --- norm to use for estimating the error
``uniform`` | ``l2``
- ``safety-fact`` --- safety factor for step size adjustment
(suitable range 0.80-0.95)
*float*
- ``min-fact`` --- minimum factor by which the time-step can
change between iterations (suitable range 0.1-0.5)
*float*
- ``max-fact`` --- maximum factor by which the time-step can
change between iterations (suitable range 2.0-6.0)
*float*
- ``dt-max`` --- maximum permissible time-step
*float* (default: 100.0)
- ``pi-alpha`` --- PI controller alpha parameter
*float* (default: 0.7)
- ``pi-beta`` --- PI controller beta parameter
*float* (default: 0.4)
and ``throughput`` adaptively adjusts the time step to maximise
wall-clock throughput using a Gaussian process (GP) optimiser.
It does not require an embedded error estimator. The GP search
range is bounded by ``dt-min`` and ``dt-max``. Additional
parameters:
- ``dt-max`` --- maximum permissible time-step
*float* (default: 100.0)
- ``dt-update-interval`` --- number of steps per evaluation
window; the GP is updated once per window
*int* (default: 100)
- ``growth-fact`` --- growth factor used during the initial
exploration phase
*float* (default: 1.2)
- ``failure-fact`` --- time-step reduction factor on Newton
divergence
*float* (default: 0.5)
- ``max-failures`` --- maximum consecutive Newton failures
before raising an error
*int* (default: 5)
Krylov Solver Options
---------------------
#. ``krylov-solver`` --- Krylov subspace method
``gmres``
#. ``krylov-max-iter`` --- maximum Krylov iterations per solve
*int* (default: 10)
#. ``krylov-rtol`` --- relative tolerance for Krylov convergence
*float* (default: 1e-2)
#. ``krylov-precond`` --- preconditioner type
``none`` | ``block-jacobi``
where ``block-jacobi`` is an element-wise block Jacobi
preconditioner. For many problems, ``none`` is sufficient
when using a modest ``krylov-rtol``.
#. ``krylov-tol-controller`` --- Krylov tolerance controller
``none`` | ``windowed-gp`` | ``list`` (default: ``none``)
When set to ``windowed-gp``, the Krylov tolerance is
adaptively adjusted using a GP-based optimiser to balance
solve cost against accuracy. When set to ``list``, the
controller cycles through a fixed set of candidate
tolerances (see ``krylov-rtol-list``) and exploits the
one with lowest cost.
#. ``krylov-probe-nsolves`` --- number of solves per probe
window (used by ``windowed-gp`` and ``list``)
*int* (default: 20)
#. ``krylov-rtol-min`` --- minimum Krylov tolerance for
``windowed-gp`` controller
*float* (default: 1e-3)
#. ``krylov-rtol-max`` --- maximum Krylov tolerance for
``windowed-gp`` controller
*float* (default: 1e-1)
#. ``krylov-max-retries`` --- maximum retries with loosened
tolerance on Newton failure (``windowed-gp`` controller)
*int* (default: 2)
#. ``krylov-rtol-list`` --- candidate tolerances for ``list``
controller
*list of floats*
Example: ``[1e-1, 3e-2, 1e-2, 3e-3, 1e-3]``. Each
candidate is probed for ``krylov-probe-nsolves`` steps and
the cheapest is used until the next re-probe cycle.
#. ``krylov-reprobe-interval`` --- re-probe interval for
``list`` controller
*int* (default: 200)
Number of steps between re-probe cycles.
#. ``gmres-arnoldi`` --- Arnoldi orthogonalisation method
``cgs`` | ``mgs``
Classical Gram-Schmidt (``cgs``) or Modified Gram-Schmidt
(``mgs``). Default is ``cgs``.
#. ``gmres-restart`` --- GMRES restart size
*int* (default: 0)
When set to a positive integer *m*, GMRES restarts every *m*
iterations. Total iterations are still bounded by
``krylov-max-iter``. When 0 (default), no restart is
performed.
Newton Solver Options
---------------------
#. ``newton-rtol`` --- relative tolerance for Newton convergence
*float* (default: 1e-4)
#. ``newton-atol`` --- absolute tolerance for Newton convergence
*float* (default: 1e-8)
#. ``newton-max-iter`` --- maximum Newton iterations per stage
*int* (default: 10)
#. ``newton-atol-<var>`` --- per-variable absolute tolerance
*float*
For problems with disparate variable scales (e.g., high-pressure
compressible flow where energy is much larger than density),
per-variable tolerances can improve convergence. The variable
names depend on the system; for Euler and Navier-Stokes in 2D
these are ``rho``, ``rhou``, ``rhov``, ``E``. Example:
.. code-block:: ini
newton-atol-rho = 1e-8
newton-atol-rhou = 1e-6
newton-atol-rhov = 1e-8
newton-atol-E = 1e-3
Line Search
-----------
#. ``newton-linesearch`` --- enable backtracking line search
``true`` | ``false`` (default: ``false``)
A backtracking line search can improve robustness for
difficult problems by ensuring the Newton step reduces the
residual. However, it adds computational overhead and is not
necessary for well-conditioned problems.
#. ``newton-linesearch-max-iter`` --- maximum line search iterations
*int* (default: 5)
#. ``newton-linesearch-fact`` --- line search reduction factor
*float* (default: 0.5)
#. ``newton-linesearch-c1`` --- Armijo condition constant
*float* (default: 1e-4)
Example (Fixed Time-Step)
-------------------------
A basic implicit configuration with fixed time-step:
.. code-block:: ini
[solver-time-integrator]
formulation = implicit
scheme = trapezium
controller = none
tstart = 0.0
tend = 10.0
dt = 0.005
krylov-solver = gmres
krylov-max-iter = 50
krylov-rtol = 1e-3
krylov-precond = none
Example (Adaptive Time-Step --- PI)
------------------------------------
An implicit configuration with adaptive time-stepping using
the PI controller:
.. code-block:: ini
[solver-time-integrator]
formulation = implicit
scheme = kvaerno43
controller = pi
tstart = 0.0
tend = 10.0
dt = 0.01
dt-max = 0.1
atol = 1e-5
rtol = 1e-5
krylov-solver = gmres
krylov-max-iter = 50
krylov-rtol = 1e-3
krylov-precond = none
Example (Adaptive Time-Step --- Throughput)
--------------------------------------------
An implicit configuration with throughput-based adaptive
time-stepping:
.. code-block:: ini
[solver-time-integrator]
formulation = implicit
scheme = trapezium
controller = throughput
tstart = 0.0
tend = 10.0
dt = 0.01
dt-max = 1.0
krylov-solver = gmres
krylov-max-iter = 50
krylov-rtol = 1e-3
krylov-precond = none
Example (Per-Variable Scaling)
------------------------------
For high-pressure compressible flow with large dynamic range:
.. code-block:: ini
[solver-time-integrator]
formulation = implicit
scheme = trapezium
controller = none
tstart = 0.0
tend = 1.0
dt = 0.0001
krylov-solver = gmres
krylov-max-iter = 50
krylov-rtol = 1e-3
krylov-precond = none
newton-rtol = 1e-4
newton-atol-rho = 1e-8
newton-atol-rhou = 1e-6
newton-atol-rhov = 1e-8
newton-atol-E = 1e-3
================================================
FILE: doc/src/systems/solver.rst
================================================
********
[solver]
********
Parameterises the solver with
1. ``system`` --- governing system:
``euler`` | ``navier-stokes``
where
``euler`` requires
- ``shock-capturing`` --- shock capturing scheme:
``none`` | ``entropy-filter``
``navier-stokes`` requires
- ``viscosity-correction`` --- viscosity correction:
``none`` | ``sutherland``
- ``shock-capturing`` --- shock capturing scheme:
``none`` | ``artificial-viscosity`` | ``entropy-filter``
2. ``order`` --- order of polynomial solution basis:
*int*
3. ``anti-alias`` --- type of anti-aliasing:
``flux`` | ``surf-flux`` | ``flux, surf-flux``
Example:
.. code-block:: ini
[solver]
system = navier-stokes
order = 3
anti-alias = flux
viscosity-correction = none
shock-capturing = none
================================================
FILE: doc/src/user_guide.rst
================================================
**********
User Guide
**********
For information on how to install PyFR see :ref:`installation:installation`.
.. _running-pyfr:
Running PyFR
============
PyFR |release| uses three distinct file formats:
#. .ini --- configuration file
#. .pyfrm --- mesh file
#. .pyfrs --- solution file
The following core commands are available from the ``pyfr`` program:
pyfr import
Convert a `Gmsh <https://gmsh.info/>`_ .msh file into a PyFR
.pyfrm file. Example:
.. code-block:: shell
pyfr import mesh.msh mesh.pyfrm
pyfr partition
Handles mesh partitioning.
pyfr partition add
Adds a new partitioning to mesh. Example:
.. code-block:: shell
pyfr partition add mesh.pyfrm 10 ten_parts
Here, ``ten_parts`` is the *name* of the partitioning and is an
arbitrary identifier. If no name is provided it defaults to the
number of parts.
For mixed grids one must include the ``-e`` flag followed by
weights for each element type, or the ``balanced`` argument.
Further details can be found in the
:ref:`performance guide <perf mixed grids>`.
Element region tags can also influence the partitioning via the
``-r`` flag. See :ref:`perf region tags` for details.
pyfr partition reconstruct
Reconstructs a partitioning from a solution file. Example:
.. code-block:: shell
pyfr partition reconstruct mesh.pyfrm soln.pyfrm part_name
pyfr partition list
Lists partitionings in a mesh. Example:
.. code-block:: shell
pyfr partition list mesh.pyfrm
pyfr partition info
Shows information about a specific partitioning in a mesh.
Example:
.. code-block:: shell
pyfr partition info mesh.pyfrm ten_parts
pyfr partition remove
Deletes a partitioning from a mesh. Example:
.. code-block:: shell
pyfr partition remove mesh.pyfrm ten_parts
pyfr run
Start a new PyFR simulation. Example:
.. code-block:: shell
pyfr run mesh.pyfrm configuration.ini
pyfr restart
Restart a PyFR simulation from an existing solution file. Example:
.. code-block:: shell
pyfr restart mesh.pyfrm solution.pyfrs
It is also possible to restart with a different configuration file.
Example:
.. code-block:: shell
pyfr restart mesh.pyfrm solution.pyfrs configuration.ini
pyfr export
Convert a PyFR ``.pyfrs`` file into an unstructured VTK ``.vtu`` or
``.pvtu`` file.
pyfr export volume
Exports a volume grid. If ``--eopt=order:n`` is provided then
PyFR elements are converted where possible to high-order VTK
elements. Example:
.. code-block:: shell
pyfr export volume --eopt=order:4 mesh.pyfrm solution.pyfrs solution.vtu
If a ``--eopt=divisor:n`` flag is provided with an integer
argument then elements are subdivided into linear VTK cells.
Example:
.. code-block:: shell
pyfr export volume --eopt=divisor:4 mesh.pyfrm solution.pyfrs solution.vtu
By default elements are converted to high-order VTK cells which
are exported, where the order of the cells is equal to the order
of the solution data in the file.
Additionally, by default, all of the fields in the solution file
will be exported. If only a specific field is desired this can be
specified with the ``-f`` flag; for example ``-f density -f
velocity`` will only export the *density* and *velocity* fields.
pyfr export boundary
Exports one of more boundaries. Example:
.. code-block:: shell
pyfr export boundary mesh.pyfrm solution.pyfrs solution.vtu lower_wall upper_wall
Note that boundary export is only supported for 3D grids.
pyfr export stl
Exports one or more STL surfaces. Example:
.. code-block:: shell
pyfr export stl mesh.pyfrm solution.pyfrs solution.vtu teapot
The STL surfaces must have already been added to the mesh with
``pyfr region add``.
If an ``--eopt=subdiv:spherigon`` flag is provided then the STL
mesh will be smoothed using C1 spherigon interpolation. This
uses angle-weighted vertex normals to lift subdivided points
onto curved tangent planes, yielding a smoother surface. By
default, linear subdivision is used. Example:
.. code-block:: shell
pyfr export stl --eopt=divisor:4 --eopt=subdiv:spherigon mesh.pyfrm solution.pyfrs solution.vtu teapot
All of the export commands also support a *batch* processing mode
wherein the list of input solution files and output files are read in
from disk. This option is activated by passing ``-`` for the
solution file and output file. By default, the file is taken to be
*stdin* although this can be overridden with the ``--batchfile``
option. Example:
.. code-block:: shell
for f in *.pyfrs; do echo "$f ${f%.pyfrs}.vtu"; done | pyfr -p export volume mesh.pyfrm - -
This command will export each solution file in the current directory
to a VTU file.
pyfr region
Handles STL region processing.
pyfr region add
Adds an STL region to the mesh. Example:
.. code-block:: shell
pyfr region add mesh.pyfrm teapot.stl teapot
pyfr region list
Lists the STL regions in the mesh. Example:
.. code-block:: shell
pyfr region list mesh.pyfrm
pyfr region remove
Removes an STL region from the mesh. Example:
.. code-block:: shell
pyfr region remove mesh.pyfrm teapot
pyfr upgrade
Upgrade a mesh (``.pyfrm``) or solution (``.pyfrs``) file from an
older format version to the latest. Example:
.. code-block:: shell
pyfr upgrade old-mesh.pyfrm new-mesh.pyfrm
If no output file is given the upgrade is performed in-place:
.. code-block:: shell
pyfr upgrade mesh.pyfrm
The upgrade is atomic; a temporary file is written first and only
renamed on success. Currently the following upgrades are supported:
- **Mesh v1 to v2** --- adds element colouring data.
- **Solution v1 to v2** --- converts flat solution arrays to the
compound dtype format with field groups and per-element partition
IDs.
If the file is already at the latest version an error is raised.
pyfr resample
Resample a solution from one mesh onto another using point cloud
interpolation. This is useful for initialising a simulation on a
new mesh from an existing solution, including across different
element types and polynomial orders. Example:
.. code-block:: shell
pyfr resample src.pyfrm src.pyfrs tgt.pyfrm tgt.ini tgt.pyfrs
By default the ``weno`` (point cloud WENO) interpolator is used.
The polynomial degree and stencil size are automatically derived
from the source solution order: the central degree is set to
min(*p*, 3) where *p* is the source polynomial order, and the
stencil size is chosen to keep the least-squares system roughly
3x overdetermined. These defaults can be overridden with the
``--iopt`` flag. For example, to use TENO mode with a quartic
central fit:
.. code-block:: shell
pyfr resample src.pyfrm src.pyfrs tgt.pyfrm tgt.ini tgt.pyfrs \
--iopt mode:teno --iopt degree:4
The ``-i`` flag selects the interpolation method (default:
``weno``). The available interpolators are:
``idw``
Inverse distance weighting.
``weno``
Point cloud WENO interpolation. Multiple overlapping polynomial
stencils are fitted and combined with nonlinear WENO-Z or TENO
weights to suppress oscillations near discontinuities.
Options for ``idw``:
``n``
Number of nearest neighbours (default: 2\ :sup:`ndims`).
``rho``
Distance exponent (default: ndims + 1).
Options for ``weno``:
``degree``
Central stencil polynomial degree (default: auto from source
order, capped at 3).
``sub-degree``
Directional sub-stencil polynomial degree (default: degree - 1,
minimum 1).
``n``
Number of nearest neighbours (default: auto, at least
3x the number of monomial terms).
``nsub``
Number of directional sub-stencils (default: 2\ :sup:`ndims`).
``mode``
Nonlinear weighting scheme; ``wenoz`` (default) or ``teno``.
``q``
WENO weight exponent (default: 4).
``gamma0``
Ideal weight for the central stencil (default: 0.85).
``ct``
TENO cut-off threshold (default: 1.0e-3).
``cond``
Condition number threshold for rejecting stencils
(default: 1.0e8).
``dir-bias``
Directional bias factor for sub-stencil selection
(default: 2.5).
``rho``
IDW fallback distance exponent (default: ndims + 1).
If the mesh has been partitioned, a partitioning can be specified
with the ``-P`` flag.
pyfr mesh
Analyse mesh quality. Example:
.. code-block:: shell
pyfr mesh mesh.pyfrm config.ini
This outputs statistics on the scaled Jacobian, mesh scale, and
aspect ratio for each element type. The mesh scale is particularly
useful for estimating CFL-limited time steps.
For each element type the number of curved elements is reported.
When curved elements are present, a separate *Scaled Jacobian
(curved)* section is shown with statistics and a histogram
filtered to just the curved population. The scaled Jacobian is
defined as min(J)/max(J) within each element, where J is the
Jacobian determinant. A value of 1 indicates a perfectly uniform
mapping, values approaching 0 indicate the element is close to
self-intersection, and negative values indicate an invalid
(self-intersecting) element. Uniform curvature that does not
distort the mapping---such as a boundary layer where both sides
curve together---will retain a scaled Jacobian close to 1.
The summary section includes the minimum scaled Jacobian among
curved elements, which is highlighted when it falls below the
threshold. This makes it straightforward to determine whether
curvature is the dominant source of mesh quality issues.
When enabled (the default), the command also reports the
*neighbour size ratio* for each element: the ratio of
volume-based characteristic lengths between an element and its
worst face-connected neighbour. A value of 1 means all
neighbours are the same size; large values indicate abrupt mesh
grading. This check works under MPI---element sizes are
exchanged across partition boundaries so the result is
independent of the number of ranks.
Optional arguments:
``--order``
Override the polynomial order from the configuration file.
``--worst N``
Show the N worst elements by scaled Jacobian, mesh scale,
and neighbour size ratio.
``--export FILE``
Export quality fields to a ``.pyfrs`` file for visualisation.
The exported fields are *scaled-jacobian*, *mesh-scale*,
*aspect-ratio*, *is-curved*, and *size-ratio* (when enabled).
``--jac-thresh J``
Scaled Jacobian threshold (default 0.5).
``--ar-thresh AR``
Aspect ratio threshold (default 20).
``--nsr-thresh NSR``
Neighbour size ratio threshold (default 5). Set to 0 to
disable neighbour size ratio checking (avoids building mesh
connectivity).
``--json``
Output results as JSON for scripting.
The ``run``, ``restart``, ``resample``, ``mesh``, and ``export`` commands can
be run in parallel. To do so prefix ``pyfr`` with
``mpiexec -n <cores/devices>``. Note that there must exist a partitioning
in the mesh with an appropriate number of parts.
MPI Distribution
----------------
MPICH is the recommended MPI distribution for use with PyFR.
When using OpenMPI the ``-p`` progress flag will not function correctly
in parallel. This is because OpenMPI buffers output into complete
lines before forwarding it, which breaks the ANSI escape sequences
used by the progress bar. To work around this, pass the ``--output``
flag to ``mpiexec`` as:
.. code-block:: shell
mpiexec --output :raw -n <cores/devices> pyfr -p ...
The ``:raw`` qualifier instructs OpenMPI to forward output as it is
received, without line buffering.
.. _configuration-file:
Configuration File (.ini)
=========================
The .ini configuration file parameterises the simulation. It is written
in the `INI <https://en.wikipedia.org/wiki/INI_file>`_ format.
Parameters are grouped into sections. The roles of each section and
their associated parameters are described below. Note that both ``;``
and ``#`` may be used as comment characters. Additionally, all
parameter values support environment variable expansion.
Backends
--------
These sections detail how the solver will be configured for a range of
different hardware platforms. If a hardware specific backend section is
omitted, then PyFR will fall back to built-in default settings.
.. toctree::
:maxdepth: 3
backends/backend.rst
backends/backend-cuda.rst
backends/backend-hip.rst
backends/backend-metal.rst
backends/backend-opencl.rst
backends/backend-openmp.rst
Systems
-------
These sections setup and control the physical system being solved, as
well as characteristics of the spatial and temporal schemes to be used.
.. toctree::
:maxdepth: 3
systems/constants.rst
systems/solver.rst
systems/solver-time-integrator.rst
systems/solver-entropy-filter.rst
systems/solver-artificial-viscosity.rst
systems/solver-interfaces.rst
Boundary and Initial Conditions
-------------------------------
These sections allow users to set the boundary and initial
conditions of calculations.
.. toctree::
:maxdepth: 3
boundary-initial-conditions/soln-bcs.rst
boundary-initial-conditions/soln-ics.rst
Nodal Point Sets
----------------
Solution point sets must be specified for each element type that is used
and flux point sets must be specified for each interface type that is
used. If anti-aliasing is enabled then quadrature point sets for each
element and interface type that is used must also be specified. For
example, a 3D mesh comprised only of prisms requires a solution point
set for prism elements and flux point sets for quadrilateral and
triangular interfaces.
.. toctree::
:maxdepth: 3
nodal-point-sets/solver-interfaces-line.rst
nodal-point-sets/solver-interfaces-quad.rst
nodal-point-sets/solver-interfaces-tri.rst
nodal-point-sets/solver-elements-quad.rst
nodal-point-sets/solver-elements-tri.rst
nodal-point-sets/solver-elements-hex.rst
nodal-point-sets/solver-elements-tet.rst
nodal-point-sets/solver-elements-pri.rst
nodal-point-sets/solver-elements-pyr.rst
Plugins
-------
Plugins allow for powerful additional functionality to be swapped in and
out. There are two classes of plugin available; solution plugins which
are prefixed by ``soln-`` and solver plugins which are prefixed by
``solver-``. It is possible to create multiple instances of the same
solution plugin by appending a suffix, for example:
.. code-block:: ini
[soln-plugin-writer]
...
[soln-plugin-writer-2]
...
[soln-plugin-writer-three]
...
Certain plugins also expose functionality via a CLI, which can
be invoked independently of a PyFR run.
Solution Plugins
^^^^^^^^^^^^^^^^
.. toctree::
:maxdepth: 3
plugins/soln-plugin-ascent.rst
plugins/soln-plugin-dtstats.rst
plugins/soln-plugin-fluid-force.rst
plugins/soln-plugin-fwh.rst
plugins/soln-plugin-integrate.rst
plugins/soln-plugin-nancheck.rst
plugins/soln-plugin-pseudostats.rst
plugins/soln-plugin-residual.rst
plugins/soln-plugin-sampler.rst
plugins/soln-plugin-tavg.rst
plugins/soln-plugin-writer.rst
Solver Plugins
^^^^^^^^^^^^^^
.. toctree::
:maxdepth: 3
plugins/solver-plugin-source.rst
plugins/solver-plugin-turbulence.rst
Triggers
^^^^^^^^
.. toctree::
:maxdepth: 3
plugins/triggers.rst
Regions
^^^^^^^
Certain plugins are capable of performing operations on a subset of the
elements inside the domain. One means of constructing these element
subsets is through parameterised regions. Note that an element is
considered part of a region if *any* of its shape points are found to be
contained within the region. A consequence of this is that a region may
not strictly enclose a shape; this can be resolved through the
`region-expand` directive. Supported regions:
Rectangular cuboid ``box(x0, x1)``
A rectangular cuboid defined by two diametrically opposed vertices.
Valid in both 2D and 3D.
Conical frustum ``conical_frustum(x0, x1, r0, r1)``
A conical frustum whose end caps are at *x0* and *x1* with radii
*r0* and *r1*, respectively. Only valid in 3D.
Cone ``cone(x0, x1, r)``
A cone of radius *r* whose centre-line is defined by *x0* and *x1*.
Equivalent to ``conical_frustum(x0, x1, r, 0)``. Only valid in 3D.
Cylinder ``cylinder(x0, x1, r)``
A circular cylinder of radius *r* whose centre-line is defined by
*x0* and *x1*. Equivalent to ``conical_frustum(x0, x1, r, r)``.
Only valid in 3D.
Cartesian ellipsoid ``ellipsoid(x0, a, b, c)``
An ellipsoid centred at *x0* with Cartesian coordinate axes whose
extents in the *x*, *y*, and *z* directions are given by *a*, *b*,
and *c*, respectively. Only valid in 3D.
Sphere ``sphere(x0, r)``
A sphere centred at *x0* with a radius of *r*. Equivalent to
``ellipsoid(x0, r, r, r)``. Only valid in 3D.
STL ``stl('name')``
An STL region. Note that the region *name* must have been already
added to the mesh file with ``pyfr region add``. Only valid in 3D.
Additionally, region itself *must* be closed.
All region also support rotation. In 2D this is accomplished by passing
a trailing `rot=angle` argument where `angle` is a rotation angle in
degrees; for example ``box((-5, 2), (2, 0), rot=30)``. In 3D the syntax
is `rot=(phi, theta, psi)` and corresponds to a sequence of Euler angles
in the so-called *ZYX convention*. Region expressions can also be added
and subtracted together arbitrarily. For example ``box((-10, -10,
-10), (10, 10, 10)) - sphere((0, 0, 0), 3)`` will result in a
cube-shaped region with a sphere cut out of the middle.
Additional Information
----------------------
The :ref:`INI<configuration-file>` file format is very versatile. A
feature that can be useful in defining initial conditions is the
substitution feature and this is demonstrated in the
:ref:`soln-plugin-integrate` plugin example.
To prevent situations where you have solutions files for unknown
configurations, the contents of the ``.ini`` file are added as an
attribute to ``.pyfrs`` files. These files use the HDF5 format and can
be straightforwardly probed with tools such as h5dump.
In several places within the ``.ini`` file expressions may be used. As
well as the constant ``pi``, expressions containing the following
functions are supported:
#. ``+, -, *, /`` --- basic arithmetic
#. ``sin, cos, tan`` --- basic trigonometric functions (radians)
#. ``asin, acos, atan, atan2`` --- inverse trigonometric functions
#. ``exp, log`` --- exponential and the natural logarithm
#. ``tanh`` --- hyperbolic tangent
#. ``pow`` --- power, note ``**`` is not supported
#. ``sqrt`` --- square root
#. ``abs`` --- absolute value
#. ``min, max`` --- two variable minimum and maximum functions,
arguments can be arrays
================================================
FILE: pyfr/__init__.py
================================================
from pyfr._version import __version__
================================================
FILE: pyfr/__main__.py
================================================
#!/usr/bin/env python
from argparse import ArgumentParser, FileType
import csv
import io
from pathlib import Path
import re
import uuid
import h5py
import mpi4py.rc
import numpy as np
mpi4py.rc.initialize = False
from pyfr._version import __version__
from pyfr.backends import BaseBackend, get_backend
from pyfr.inifile import Inifile
from pyfr.mpiutil import get_comm_rank_root, init_mpi
from pyfr.partitioners import (BasePartitioner, get_partitioner,
reconstruct_partitioning, write_partitioning)
from pyfr.plugins import BaseCLIPlugin, BasePlugin
from pyfr.progress import (NullProgressSequence, ProgressBar,
ProgressSequenceAction, format_dofs)
from pyfr.readers import BaseReader, get_reader_by_extn, get_reader_by_name
from pyfr.readers.native import NativeReader
from pyfr.readers.stl import read_stl
from pyfr.resamplers import (BaseInterpolator, NativeCloudResampler,
get_interpolator)
from pyfr.solvers import get_solver
from pyfr.util import first, subclasses
from pyfr.writers import BaseWriter, get_writer_by_extn, get_writer_by_name
from pyfr.writers.native import NativeWriter
from pyfr.writers.upgrade import upgrade
def main():
ap = ArgumentParser(prog='pyfr')
sp = ap.add_subparsers(help='sub-command help', metavar='command')
# Common options
ap.add_argument('-v', '--verbose', action='count',
help='increase verbosity')
ap.add_argument('-V', '--version', action='version',
version=f'%(prog)s {__version__}')
ap.add_argument('-p', '--progress', action=ProgressSequenceAction,
help='show progress')
# Import command
ap_import = sp.add_parser('import', help='import --help')
ap_import.add_argument('inmesh', type=FileType('r'),
help='input mesh file')
ap_import.add_argument('outmesh', help='output PyFR mesh file')
types = sorted(cls.name for cls in subclasses(BaseReader))
ap_import.add_argument('-t', dest='type', choices=types,
help='input file type; this is usually inferred '
'from the extension of inmesh')
ap_import.add_argument('-l', dest='lintol', type=float, default=1e-5,
help='linearisation tolerance')
ap_import.set_defaults(process=process_import)
# Partition subcommand
ap_partition = sp.add_parser('partition', help='partition --help')
ap_partition = ap_partition.add_subparsers()
# List partitionings
ap_partition_list = ap_partition.add_parser('list',
help='partition list --help')
ap_partition_list.add_argument('mesh', help='input mesh file')
ap_partition_list.add_argument('-s', '--sep', default='\t',
help='separator')
ap_partition_list.set_defaults(process=process_partition_list)
# Get info about a partitioning
ap_partition_info = ap_partition.add_parser('info',
help='partition info --help')
ap_partition_info.add_argument('mesh', help='input mesh file')
ap_partition_info.add_argument('name', help='partitioning name')
ap_partition_info.add_argument('-s', '--sep', default='\t',
help='separator')
ap_partition_info.set_defaults(process=process_partition_info)
# Add partitioning
ap_partition_add = ap_partition.add_parser('add',
help='partition add --help')
ap_partition_add.add_argument('mesh', help='input mesh file')
ap_partition_add.add_argument('np', help='number of partitions or a colon '
'delimited list of weights')
ap_partition_add.add_argument('name', nargs='?', help='partitioning name')
ap_partition_add.add_argument('-f', '--force', action='count',
help='overwrite existing partitioning')
partitioners = sorted(cls.name for cls in subclasses(BasePartitioner))
ap_partition_add.add_argument(
'-p', dest='partitioner', choices=partitioners,
help='partitioner to use'
)
ap_partition_add.add_argument(
'-e', dest='elewts', action='append', default=[],
metavar='shape:weight', help='element weighting factor or "balanced"'
)
ap_partition_add.add_argument(
'-r', dest='regwts', action='append', default=[],
metavar='tag:weight',
help='region tag weighting factor or "balanced"'
)
ap_partition_add.add_argument(
'--popt', dest='popts', action='append', default=[],
metavar='key:value', help='partitioner-specific option'
)
ap_partition_add.set_defaults(process=process_partition_add)
# Reconstruct partitioning
ap_partition_reconstruct = ap_partition.add_parser(
'reconstruct', help='partition reconstruct --help'
)
ap_partition_reconstruct.add_argument('mesh', help='input mesh file')
ap_partition_reconstruct.add_argument('soln', help='input solution file')
ap_partition_reconstruct.add_argument('name', help='partitioning name')
ap_partition_reconstruct.add_argument(
'-f', '--force', action='count', help='overwrite existing partitioning'
)
ap_partition_reconstruct.set_defaults(
process=process_partition_reconstruct
)
# Remove partitioning
ap_partition_remove = ap_partition.add_parser(
'remove', help='partition remove --help'
)
ap_partition_remove.add_argument('mesh', help='input mesh file')
ap_partition_remove.add_argument('name', help='partitioning')
ap_partition_remove.set_defaults(process=process_partition_remove)
# Export command
ap_export = sp.add_parser('export', help='export --help')
ap_export = ap_export.add_subparsers()
for etype in ('boundary', 'stl', 'volume'):
ap_export_type = ap_export.add_parser(etype,
help=f'export {etype} --help')
ap_export_type.add_argument('meshf', help='input mesh file')
ap_export_type.add_argument('solnf', help='input solution file')
ap_export_type.add_argument('outf', help='output file')
if etype == 'boundary':
ap_export_type.add_argument('eargs', nargs='+', metavar='boundary',
help='boundary to output')
elif etype == 'stl':
ap_export_type.add_argument('eargs', nargs='+', metavar='stl',
help='STL region to output')
ap_export_type.add_argument('-b', '--batchfile', type=FileType('r'),
default='-', help='batch export file')
ftypes = [c.name for c in subclasses(BaseWriter) if c.type == etype]
ap_export_type.add_argument(
'-t', dest='ftype', choices=ftypes, required=False,
help='output file type; this is usually inferred from the '
'extension of outf'
)
ap_export_type.add_argument(
'-f', '--field', dest='fields', action='append', metavar='FIELD',
help='what fields should be output; may be repeated, by default '
'all fields are output'
)
ap_export_type.add_argument(
'-p', '--precision', choices=['single', 'double'],
default='single', help='output number precision; defaults to '
'single'
)
ap_export_type.add_argument(
'--eopt', dest='eopts', action='append', default=[],
metavar='key:value', help='exporter-specific option'
)
ap_export_type.add_argument('-P', '--pname',
help='partitioning to use')
ap_export_type.set_defaults(etype=etype, process=process_export)
# Region subcommand
ap_region = sp.add_parser('region', help='region --help')
ap_region = ap_region.add_subparsers()
# Add region
ap_region_add = ap_region.add_parser('add', help='region add --help')
ap_region_add.add_argument('mesh', help='input mesh file')
ap_region_add.add_argument('stl', type=FileType('rb'), help='STL file')
ap_region_add.add_argument('name', help='region name')
ap_region_add.set_defaults(process=process_region_add)
# List regions
ap_region_list = ap_region.add_parser('list', help='region list --help')
ap_region_list.add_argument('mesh', help='input mesh file')
ap_region_list.add_argument('-s', '--sep', default='\t', help='separator')
ap_region_list.set_defaults(process=process_region_list)
# Remove region
ap_region_remove = ap_region.add_parser('remove',
help='region remove --help')
ap_region_remove.add_argument('mesh', help='input mesh file')
ap_region_remove.add_argument('name', help='region name')
ap_region_remove.set_defaults(process=process_region_remove)
# Upgrade command
ap_upgrade = sp.add_parser('upgrade', help='upgrade --help')
ap_upgrade.add_argument('inf', metavar='in', type=Path,
help='input mesh or solution file')
ap_upgrade.add_argument('outf', metavar='out', nargs='?', default=None,
type=Path, help='output file (default: in-place)')
ap_upgrade.set_defaults(process=process_upgrade)
# Resample command
ap_resample = sp.add_parser('resample', help='resample --help')
ap_resample.add_argument('srcmesh', help='source mesh file')
ap_resample.add_argument('srcsoln', help='source solution file')
ap_resample.add_argument('tgtmesh', help='target mesh file')
ap_resample.add_argument('tgtcfg', help='target config file')
ap_resample.add_argument('tgtsoln', help='target solution file')
itypes = [i.name for i in subclasses(BaseInterpolator, just_leaf=True)]
ap_resample.add_argument('-i', '--interpolator', choices=itypes,
default='weno', help='interpolator to use')
ap_resample.add_argument(
'--iopt', dest='iopts', action='append', default=[],
metavar='key:value', help='interpolator-specific option'
)
ap_resample.add_argument('-P', '--pname', help='partitioning to use')
ap_resample.set_defaults(process=process_resample)
# Run command
ap_run = sp.add_parser('run', help='run --help')
ap_run.add_argument('mesh', help='mesh file')
ap_run.add_argument('cfg', type=FileType('r'), help='config file')
ap_run.set_defaults(process=process_run)
# Restart command
ap_restart = sp.add_parser('restart', help='restart --help')
ap_restart.add_argument('mesh', help='mesh file')
ap_restart.add_argument('soln', help='solution file')
ap_restart.add_argument('cfg', nargs='?', type=FileType('r'),
help='new config file')
ap_restart.set_defaults(process=process_restart)
# Options common to run and restart
backends = sorted(cls.name for cls in subclasses(BaseBackend))
for p in [ap_run, ap_restart]:
p.add_argument('-b', '--backend', choices=backends, required=True,
help='backend to use')
p.add_argument('-P', '--pname', help='partitioning to use')
# Plugin commands
for scls in subclasses(BaseCLIPlugin, just_leaf=True):
scls.add_cli(sp.add_parser(scls.name, help=f'{scls.name} --help'))
# Parse the arguments
args = ap.parse_args()
# Invoke the process method
if hasattr(args, 'process'):
args.process(args)
else:
ap.print_help()
def process_import(args):
# Get a suitable mesh reader instance
if args.type:
reader = get_reader_by_name(args.type, args.inmesh, args.progress)
else:
extn = Path(args.inmesh.name).suffix
reader = get_reader_by_extn(extn, args.inmesh, args.progress)
# Write out the mesh
reader.write(args.outmesh, args.lintol)
def process_upgrade(args):
outf = args.outf or args.inf
with h5py.File(args.inf, 'r') as src:
tmp = outf.parent / f'pyfr-{uuid.uuid4()}{outf.suffix}'
try:
with h5py.File(tmp, 'w', libver='latest') as dst:
upgrade(src, dst)
tmp.rename(outf)
except:
tmp.unlink(missing_ok=True)
raise
def process_partition_list(args):
with h5py.File(args.mesh, 'r') as mesh:
print('name', 'parts', sep=args.sep)
for name, part in sorted(mesh['partitionings'].items()):
nparts = len(part['eles'].attrs['regions'])
print(name, nparts, sep=args.sep)
def process_partition_info(args):
with h5py.File(args.mesh, 'r') as mesh:
# Read the partition region info from the mesh
regions = mesh[f'partitionings/{args.name}/eles'].attrs['regions']
# Print out the header
print('part', *mesh['eles'], sep=args.sep)
# Compute and output the number of elements in each partition
for i, neles in enumerate(regions[:, 1:] - regions[:, :-1]):
print(i, *neles, sep=args.sep)
def process_partition_add(args):
with h5py.File(args.mesh, 'r+') as mesh:
# Determine the element types
etypes = list(mesh['eles'])
# Partition weights
if ':' in args.np or '*' in args.np:
def psub(m): return ':'.join([m[1]]*int(m[2]))
pwts = re.sub(r'(\d+)\*(\d+)', psub, args.np)
pwts = [int(w) for w in pwts.split(':')]
else:
pwts = [1]*int(args.np)
# Element weights
if args.elewts == ['balanced']:
ewts = 'balanced'
elif len(etypes) == 1:
ewts = {etypes[0]: 1}
else:
ewts = (ew.split(':') for ew in args.elewts)
ewts = {e: int(w) for e, w in ewts}
# Ensure all weights have been provided
if len(ewts) != len(etypes):
missing = ', '.join(set(etypes) - set(ewts))
raise ValueError(f'Missing element weights for: {missing}')
# Region tag weights
if args.regwts == ['balanced']:
twts = 'balanced'
else:
twts = (rw.split(':') for rw in args.regwts)
twts = {n: int(w) for n, w in twts}
# Get the partitioning name
pname = args.name or str(len(pwts))
if not re.match(r'\w+$', pname):
raise ValueError('Invalid partitioning name')
# Check it does not already exist unless --force is given
if pname in mesh['partitionings'] and not args.force:
raise ValueError('Partitioning already exists; use -f to replace')
# Partitioner-specific options
opts = dict(s.split(':', 1) for s in args.popts)
# Create the partitioner
if args.partitioner:
part = get_partitioner(args.partitioner, pwts, ewts, twts,
opts=opts)
else:
parts = sorted(cls.name for cls in subclasses(BasePartitioner))
for name in parts:
try:
part = get_partitioner(name, pwts, ewts, twts)
break
except OSError:
pass
else:
raise RuntimeError('No partitioners available')
# Partition the mesh
pinfo = part.partition(mesh, args.progress)
# Write out the new partitioning
with args.progress.start('Write partitioning'):
write_partitioning(mesh, pname, pinfo)
def process_partition_reconstruct(args):
with (h5py.File(args.mesh, 'r+') as mesh,
h5py.File(args.soln, 'r') as soln):
# Validate the partitioning name
if not re.match(r'\w+$', args.name):
raise ValueError('Invalid partitioning name')
# Check it does not already exist unless --force is given
if args.name in mesh['partitionings'] and not args.force:
raise ValueError('Partitioning already exists; use -f to replace')
# Reconstruct the partitioning used in the solution
pinfo = reconstruct_partitioning(mesh, soln, args.progress)
# Write out the new partitioning
with args.progress.start('Write partitioning'):
write_partitioning(mesh, args.name, pinfo)
def process_partition_remove(args):
with h5py.File(args.mesh, 'r+') as mesh:
mparts = mesh['partitionings']
if args.name not in mparts:
raise ValueError(f'Partitioning {args.name} does not exist')
del mparts[args.name]
def process_region_add(args):
# Read the STL file
stl = read_stl(args.stl)
# See if the surface is closed
edges = np.vstack([stl[:, 1:3], stl[:, 2:4], stl[:, [3, 1]]])
edges.view('f4,f4,f4').sort(axis=1)
closed = (np.unique(edges, axis=0, return_counts=True)[1] == 2).all()
# Validate the name
gitextract__nojc1no/ ├── AUTHORS ├── LICENSE ├── README.md ├── doc/ │ ├── Makefile │ ├── requirements.txt │ └── src/ │ ├── _static/ │ │ └── css/ │ │ └── custom.css │ ├── backends/ │ │ ├── backend-cuda.rst │ │ ├── backend-hip.rst │ │ ├── backend-metal.rst │ │ ├── backend-opencl.rst │ │ ├── backend-openmp.rst │ │ └── backend.rst │ ├── boundary-initial-conditions/ │ │ ├── soln-bcs.rst │ │ └── soln-ics.rst │ ├── conf.py │ ├── developer_guide.rst │ ├── examples.rst │ ├── file_format.rst │ ├── index.rst │ ├── installation.rst │ ├── io.rst │ ├── meshing.rst │ ├── nodal-point-sets/ │ │ ├── solver-elements-hex.rst │ │ ├── solver-elements-pri.rst │ │ ├── solver-elements-pyr.rst │ │ ├── solver-elements-quad.rst │ │ ├── solver-elements-tet.rst │ │ ├── solver-elements-tri.rst │ │ ├── solver-interfaces-line.rst │ │ ├── solver-interfaces-quad.rst │ │ └── solver-interfaces-tri.rst │ ├── performance_tuning.rst │ ├── plugins/ │ │ ├── soln-plugin-ascent.rst │ │ ├── soln-plugin-dtstats.rst │ │ ├── soln-plugin-fluid-force.rst │ │ ├── soln-plugin-fwh.rst │ │ ├── soln-plugin-integrate.rst │ │ ├── soln-plugin-nancheck.rst │ │ ├── soln-plugin-pseudostats.rst │ │ ├── soln-plugin-residual.rst │ │ ├── soln-plugin-sampler.rst │ │ ├── soln-plugin-tavg.rst │ │ ├── soln-plugin-writer.rst │ │ ├── solver-plugin-source.rst │ │ ├── solver-plugin-turbulence.rst │ │ └── triggers.rst │ ├── post_processing.rst │ ├── systems/ │ │ ├── constants.rst │ │ ├── solver-artificial-viscosity.rst │ │ ├── solver-entropy-filter.rst │ │ ├── solver-interfaces.rst │ │ ├── solver-time-integrator.rst │ │ └── solver.rst │ └── user_guide.rst ├── pyfr/ │ ├── __init__.py │ ├── __main__.py │ ├── _version.py │ ├── backends/ │ │ ├── __init__.py │ │ ├── base/ │ │ │ ├── __init__.py │ │ │ ├── backend.py │ │ │ ├── blasext.py │ │ │ ├── generator.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ └── packing.mako │ │ │ ├── makoutil.py │ │ │ ├── provider.py │ │ │ └── types.py │ │ ├── cuda/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── blasext.py │ │ │ ├── compiler.py │ │ │ ├── cublaslt.py │ │ │ ├── driver.py │ │ │ ├── generator.py │ │ │ ├── gimmik.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── axnpby.mako │ │ │ │ ├── base.mako │ │ │ │ ├── packing.mako │ │ │ │ └── reduction.mako │ │ │ ├── nvtools.py │ │ │ ├── packing.py │ │ │ ├── provider.py │ │ │ └── types.py │ │ ├── hip/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── blasext.py │ │ │ ├── compiler.py │ │ │ ├── driver.py │ │ │ ├── generator.py │ │ │ ├── gimmik.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── axnpby.mako │ │ │ │ ├── base.mako │ │ │ │ ├── packing.mako │ │ │ │ └── reduction.mako │ │ │ ├── packing.py │ │ │ ├── provider.py │ │ │ ├── rocblas.py │ │ │ ├── roctx.py │ │ │ └── types.py │ │ ├── metal/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── blasext.py │ │ │ ├── compiler.py │ │ │ ├── generator.py │ │ │ ├── gimmik.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── axnpby.mako │ │ │ │ ├── base.mako │ │ │ │ ├── packing.mako │ │ │ │ └── reduction.mako │ │ │ ├── mps.py │ │ │ ├── packing.py │ │ │ ├── provider.py │ │ │ ├── types.py │ │ │ └── util.py │ │ ├── opencl/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── blasext.py │ │ │ ├── clblast.py │ │ │ ├── compiler.py │ │ │ ├── driver.py │ │ │ ├── generator.py │ │ │ ├── gimmik.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── axnpby.mako │ │ │ │ ├── base.mako │ │ │ │ ├── packing.mako │ │ │ │ └── reduction.mako │ │ │ ├── packing.py │ │ │ ├── provider.py │ │ │ ├── tinytc.py │ │ │ └── types.py │ │ └── openmp/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── blasext.py │ │ ├── compiler.py │ │ ├── generator.py │ │ ├── kernels/ │ │ │ ├── __init__.py │ │ │ ├── axnpby.mako │ │ │ ├── base.mako │ │ │ ├── batch-gemm.mako │ │ │ ├── packing.mako │ │ │ ├── par-memcpy.mako │ │ │ ├── par-memop.mako │ │ │ ├── reduction.mako │ │ │ └── run-kernels.mako │ │ ├── packing.py │ │ ├── provider.py │ │ ├── types.py │ │ └── xsmm.py │ ├── cache.py │ ├── ctypesutil.py │ ├── inifile.py │ ├── integrators/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── controllers.py │ │ ├── explicit/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── controllers.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ └── rkvdh2.mako │ │ │ └── steppers.py │ │ ├── implicit/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── controllers.py │ │ │ ├── gmres.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── applyprecond.mako │ │ │ │ ├── precondextract.mako │ │ │ │ ├── precondperturb.mako │ │ │ │ └── precondscale.mako │ │ │ ├── krylov.py │ │ │ ├── newton.py │ │ │ ├── steppers.py │ │ │ └── tolerance.py │ │ └── registers.py │ ├── mpiutil.py │ ├── nputil.py │ ├── partitioners/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── baseline.py │ │ ├── kahip.py │ │ ├── metis.py │ │ ├── reconstruct.py │ │ └── scotch.py │ ├── plugins/ │ │ ├── __init__.py │ │ ├── ascent.py │ │ ├── base.py │ │ ├── dtstats.py │ │ ├── fieldeval.py │ │ ├── fluidforce.py │ │ ├── fwh.py │ │ ├── integrate.py │ │ ├── kernels/ │ │ │ ├── __init__.py │ │ │ ├── fieldeval.mako │ │ │ ├── fluidforce.mako │ │ │ ├── sample.mako │ │ │ ├── source.mako │ │ │ ├── tavg.mako │ │ │ └── turbulence.mako │ │ ├── mesh.py │ │ ├── nancheck.py │ │ ├── residual.py │ │ ├── sampler.py │ │ ├── source.py │ │ ├── tavg.py │ │ ├── triggers/ │ │ │ ├── __init__.py │ │ │ ├── base.py │ │ │ ├── field.py │ │ │ ├── point.py │ │ │ ├── sources.py │ │ │ └── steady.py │ │ ├── turbulence.py │ │ └── writer.py │ ├── points.py │ ├── polys.py │ ├── progress.py │ ├── quadrules/ │ │ ├── __init__.py │ │ ├── hex/ │ │ │ ├── gauss-legendre-lobatto-n125-d7-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n216-d9-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n27-d3-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n343-d11-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n512-d13-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n64-d5-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n729-d15-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n8-d1-pstu.txt │ │ │ ├── gauss-legendre-n1-d1-pstu.txt │ │ │ ├── gauss-legendre-n125-d9-pstu.txt │ │ │ ├── gauss-legendre-n216-d11-pstu.txt │ │ │ ├── gauss-legendre-n27-d5-pstu.txt │ │ │ ├── gauss-legendre-n343-d13-pstu.txt │ │ │ ├── gauss-legendre-n512-d15-pstu.txt │ │ │ ├── gauss-legendre-n64-d7-pstu.txt │ │ │ ├── gauss-legendre-n729-d17-pstu.txt │ │ │ ├── gauss-legendre-n8-d3-pstu.txt │ │ │ ├── witherden-n148-d13-sp.txt │ │ │ ├── witherden-n199-d15-sp.txt │ │ │ ├── witherden-n282-d17-sp.txt │ │ │ ├── witherden-n369-d19-sp.txt │ │ │ ├── witherden-n505-d21-sp.txt │ │ │ ├── witherden-vincent-n1-d1-sp.txt │ │ │ ├── witherden-vincent-n14-d5-sp.txt │ │ │ ├── witherden-vincent-n34-d7-sp.txt │ │ │ ├── witherden-vincent-n58-d9-sp.txt │ │ │ ├── witherden-vincent-n6-d3-sp.txt │ │ │ └── witherden-vincent-n90-d11-sp.txt │ │ ├── line/ │ │ │ ├── gauss-legendre-lobatto-n10-d17-spu.txt │ │ │ ├── gauss-legendre-lobatto-n11-d19-spu.txt │ │ │ ├── gauss-legendre-lobatto-n12-d21-spu.txt │ │ │ ├── gauss-legendre-lobatto-n13-d23-spu.txt │ │ │ ├── gauss-legendre-lobatto-n14-d25-spu.txt │ │ │ ├── gauss-legendre-lobatto-n15-d27-spu.txt │ │ │ ├── gauss-legendre-lobatto-n16-d29-spu.txt │ │ │ ├── gauss-legendre-lobatto-n17-d31-spu.txt │ │ │ ├── gauss-legendre-lobatto-n18-d33-spu.txt │ │ │ ├── gauss-legendre-lobatto-n19-d35-spu.txt │ │ │ ├── gauss-legendre-lobatto-n2-d1-spu.txt │ │ │ ├── gauss-legendre-lobatto-n20-d37-spu.txt │ │ │ ├── gauss-legendre-lobatto-n3-d3-spu.txt │ │ │ ├── gauss-legendre-lobatto-n4-d5-spu.txt │ │ │ ├── gauss-legendre-lobatto-n5-d7-spu.txt │ │ │ ├── gauss-legendre-lobatto-n6-d9-spu.txt │ │ │ ├── gauss-legendre-lobatto-n7-d11-spu.txt │ │ │ ├── gauss-legendre-lobatto-n8-d13-spu.txt │ │ │ ├── gauss-legendre-lobatto-n9-d15-spu.txt │ │ │ ├── gauss-legendre-n1-d1-spu.txt │ │ │ ├── gauss-legendre-n10-d19-spu.txt │ │ │ ├── gauss-legendre-n11-d21-spu.txt │ │ │ ├── gauss-legendre-n12-d23-spu.txt │ │ │ ├── gauss-legendre-n13-d25-spu.txt │ │ │ ├── gauss-legendre-n14-d27-spu.txt │ │ │ ├── gauss-legendre-n15-d29-spu.txt │ │ │ ├── gauss-legendre-n16-d31-spu.txt │ │ │ ├── gauss-legendre-n17-d33-spu.txt │ │ │ ├── gauss-legendre-n18-d35-spu.txt │ │ │ ├── gauss-legendre-n19-d37-spu.txt │ │ │ ├── gauss-legendre-n2-d3-spu.txt │ │ │ ├── gauss-legendre-n20-d39-spu.txt │ │ │ ├── gauss-legendre-n3-d5-spu.txt │ │ │ ├── gauss-legendre-n4-d7-spu.txt │ │ │ ├── gauss-legendre-n5-d9-spu.txt │ │ │ ├── gauss-legendre-n6-d11-spu.txt │ │ │ ├── gauss-legendre-n7-d13-spu.txt │ │ │ ├── gauss-legendre-n8-d15-spu.txt │ │ │ └── gauss-legendre-n9-d17-spu.txt │ │ ├── pri/ │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n126-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n18-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n196-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n288-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n40-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n405-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n6-stu.txt │ │ │ ├── alpha-opt~gauss-legendre-lobatto-n75-stu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n126-d8-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n18-d3-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n196-d10-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n288-d12-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n40-d5-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n405-d14-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n6-d1-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-lobatto-n75-d7-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n1-d1-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n126-d8-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n18-d4-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n196-d10-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n288-d12-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n40-d5-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n405-d14-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n6-d2-pstu.txt │ │ │ ├── williams-shunn~gauss-legendre-n75-d7-pstu.txt │ │ │ ├── witherden-n128-d12-sp.txt │ │ │ ├── witherden-n145-d13-sp.txt │ │ │ ├── witherden-n182-d14-sp.txt │ │ │ ├── witherden-n217-d15-sp.txt │ │ │ ├── witherden-n263-d16-sp.txt │ │ │ ├── witherden-n292-d17-sp.txt │ │ │ ├── witherden-n362-d18-sp.txt │ │ │ ├── witherden-n421-d19-sp.txt │ │ │ ├── witherden-n46-d8-sp.txt │ │ │ ├── witherden-n483-d20-sp.txt │ │ │ ├── witherden-n59-d9-sp.txt │ │ │ ├── witherden-n82-d10-sp.txt │ │ │ ├── witherden-n97-d11-sp.txt │ │ │ ├── witherden-vincent-n1-d1-sp.txt │ │ │ ├── witherden-vincent-n11-d4-sp.txt │ │ │ ├── witherden-vincent-n16-d5-sp.txt │ │ │ ├── witherden-vincent-n28-d6-sp.txt │ │ │ ├── witherden-vincent-n35-d7-sp.txt │ │ │ ├── witherden-vincent-n46-d8-sp.txt │ │ │ ├── witherden-vincent-n5-d2-sp.txt │ │ │ ├── witherden-vincent-n60-d9-sp.txt │ │ │ ├── witherden-vincent-n8-d3-sp.txt │ │ │ └── witherden-vincent-n85-d10-sp.txt │ │ ├── pyr/ │ │ │ ├── gauss-legendre-lobatto-n14-su.txt │ │ │ ├── gauss-legendre-lobatto-n140-su.txt │ │ │ ├── gauss-legendre-lobatto-n30-su.txt │ │ │ ├── gauss-legendre-lobatto-n5-su.txt │ │ │ ├── gauss-legendre-lobatto-n55-su.txt │ │ │ ├── gauss-legendre-lobatto-n91-su.txt │ │ │ ├── gauss-legendre-n1-su.txt │ │ │ ├── gauss-legendre-n14-su.txt │ │ │ ├── gauss-legendre-n140-su.txt │ │ │ ├── gauss-legendre-n30-su.txt │ │ │ ├── gauss-legendre-n5-su.txt │ │ │ ├── gauss-legendre-n55-su.txt │ │ │ ├── gauss-legendre-n91-su.txt │ │ │ ├── witherden-n120-d12-sp.txt │ │ │ ├── witherden-n142-d13-sp.txt │ │ │ ├── witherden-n174-d14-sp.txt │ │ │ ├── witherden-n206-d15-sp.txt │ │ │ ├── witherden-n258-d16-sp.txt │ │ │ ├── witherden-n291-d17-sp.txt │ │ │ ├── witherden-n357-d18-sp.txt │ │ │ ├── witherden-n415-d19-sp.txt │ │ │ ├── witherden-n44-d8-sp.txt │ │ │ ├── witherden-n482-d20-sp.txt │ │ │ ├── witherden-n56-d9-sp.txt │ │ │ ├── witherden-n76-d10-sp.txt │ │ │ ├── witherden-n92-d11-sp.txt │ │ │ ├── witherden-vincent-n1-d1-sp.txt │ │ │ ├── witherden-vincent-n10-d4-sp.txt │ │ │ ├── witherden-vincent-n15-d5-sp.txt │ │ │ ├── witherden-vincent-n24-d6-sp.txt │ │ │ ├── witherden-vincent-n31-d7-sp.txt │ │ │ ├── witherden-vincent-n47-d8-sp.txt │ │ │ ├── witherden-vincent-n5-d2-sp.txt │ │ │ ├── witherden-vincent-n6-d3-sp.txt │ │ │ ├── witherden-vincent-n62-d9-sp.txt │ │ │ └── witherden-vincent-n83-d10-sp.txt │ │ ├── quad/ │ │ │ ├── gauss-legendre-lobatto-n100-d17-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n121-d19-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n144-d21-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n16-d5-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n169-d23-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n196-d25-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n25-d7-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n36-d9-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n4-d1-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n49-d11-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n64-d13-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n81-d15-pstu.txt │ │ │ ├── gauss-legendre-lobatto-n9-d3-pstu.txt │ │ │ ├── gauss-legendre-n1-d1-pstu.txt │ │ │ ├── gauss-legendre-n100-d19-pstu.txt │ │ │ ├── gauss-legendre-n121-d21-pstu.txt │ │ │ ├── gauss-legendre-n144-d23-pstu.txt │ │ │ ├── gauss-legendre-n16-d7-pstu.txt │ │ │ ├── gauss-legendre-n169-d25-pstu.txt │ │ │ ├── gauss-legendre-n196-d27-pstu.txt │ │ │ ├── gauss-legendre-n25-d9-pstu.txt │ │ │ ├── gauss-legendre-n36-d11-pstu.txt │ │ │ ├── gauss-legendre-n4-d3-pstu.txt │ │ │ ├── gauss-legendre-n49-d13-pstu.txt │ │ │ ├── gauss-legendre-n64-d15-pstu.txt │ │ │ ├── gauss-legendre-n81-d17-pstu.txt │ │ │ ├── gauss-legendre-n9-d5-pstu.txt │ │ │ ├── witherden-vincent-n1-d1-sp.txt │ │ │ ├── witherden-vincent-n12-d7-sp.txt │ │ │ ├── witherden-vincent-n20-d9-sp.txt │ │ │ ├── witherden-vincent-n28-d11-sp.txt │ │ │ ├── witherden-vincent-n37-d13-sp.txt │ │ │ ├── witherden-vincent-n4-d3-sp.txt │ │ │ ├── witherden-vincent-n48-d15-sp.txt │ │ │ ├── witherden-vincent-n60-d17-sp.txt │ │ │ ├── witherden-vincent-n72-d19-sp.txt │ │ │ ├── witherden-vincent-n8-d5-sp.txt │ │ │ └── witherden-vincent-n85-d21-sp.txt │ │ ├── surface.py │ │ ├── tet/ │ │ │ ├── alpha-opt-n10-su.txt │ │ │ ├── alpha-opt-n120-su.txt │ │ │ ├── alpha-opt-n165-su.txt │ │ │ ├── alpha-opt-n20-su.txt │ │ │ ├── alpha-opt-n220-su.txt │ │ │ ├── alpha-opt-n35-su.txt │ │ │ ├── alpha-opt-n4-su.txt │ │ │ ├── alpha-opt-n56-su.txt │ │ │ ├── alpha-opt-n84-su.txt │ │ │ ├── shunn-ham-n1-d1-spu.txt │ │ │ ├── shunn-ham-n10-d3-spu.txt │ │ │ ├── shunn-ham-n20-d5-spu.txt │ │ │ ├── shunn-ham-n35-d6-spu.txt │ │ │ ├── shunn-ham-n4-d2-spu.txt │ │ │ ├── shunn-ham-n56-d8-spu.txt │ │ │ ├── shunn-ham-n84-d9-spu.txt │ │ │ ├── witherden-n123-d12-sp.txt │ │ │ ├── witherden-n145-d13-sp.txt │ │ │ ├── witherden-n172-d14-sp.txt │ │ │ ├── witherden-n213-d15-sp.txt │ │ │ ├── witherden-n251-d16-sp.txt │ │ │ ├── witherden-n290-d17-sp.txt │ │ │ ├── witherden-n352-d18-sp.txt │ │ │ ├── witherden-n411-d19-sp.txt │ │ │ ├── witherden-n474-d20-sp.txt │ │ │ ├── witherden-n79-d10-sp.txt │ │ │ ├── witherden-n96-d11-sp.txt │ │ │ ├── witherden-vincent-n1-d1-sp.txt │ │ │ ├── witherden-vincent-n14-d5-sp.txt │ │ │ ├── witherden-vincent-n24-d6-sp.txt │ │ │ ├── witherden-vincent-n35-d7-sp.txt │ │ │ ├── witherden-vincent-n4-d2-sp.txt │ │ │ ├── witherden-vincent-n46-d8-sp.txt │ │ │ ├── witherden-vincent-n59-d9-sp.txt │ │ │ ├── witherden-vincent-n8-d3-sp.txt │ │ │ └── witherden-vincent-n81-d10-sp.txt │ │ └── tri/ │ │ ├── alpha-opt-n10-su.txt │ │ ├── alpha-opt-n15-su.txt │ │ ├── alpha-opt-n21-su.txt │ │ ├── alpha-opt-n28-su.txt │ │ ├── alpha-opt-n3-su.txt │ │ ├── alpha-opt-n36-su.txt │ │ ├── alpha-opt-n45-su.txt │ │ ├── alpha-opt-n6-su.txt │ │ ├── williams-shunn-n1-d1-spu.txt │ │ ├── williams-shunn-n10-d5-spu.txt │ │ ├── williams-shunn-n15-d7-spu.txt │ │ ├── williams-shunn-n21-d8-spu.txt │ │ ├── williams-shunn-n28-d10-spu.txt │ │ ├── williams-shunn-n3-d2-spu.txt │ │ ├── williams-shunn-n36-d12-spu.txt │ │ ├── williams-shunn-n45-d14-spu.txt │ │ ├── williams-shunn-n6-d4-spu.txt │ │ ├── witherden-vincent-n1-d1-sp.txt │ │ ├── witherden-vincent-n12-d6-sp.txt │ │ ├── witherden-vincent-n15-d7-sp.txt │ │ ├── witherden-vincent-n16-d8-sp.txt │ │ ├── witherden-vincent-n19-d9-sp.txt │ │ ├── witherden-vincent-n25-d10-sp.txt │ │ ├── witherden-vincent-n28-d11-sp.txt │ │ ├── witherden-vincent-n3-d2-sp.txt │ │ ├── witherden-vincent-n33-d12-sp.txt │ │ ├── witherden-vincent-n37-d13-sp.txt │ │ ├── witherden-vincent-n42-d14-sp.txt │ │ ├── witherden-vincent-n49-d15-sp.txt │ │ ├── witherden-vincent-n55-d16-sp.txt │ │ ├── witherden-vincent-n6-d4-sp.txt │ │ ├── witherden-vincent-n60-d17-sp.txt │ │ ├── witherden-vincent-n67-d18-sp.txt │ │ ├── witherden-vincent-n7-d5-sp.txt │ │ ├── witherden-vincent-n73-d19-sp.txt │ │ └── witherden-vincent-n79-d20-sp.txt │ ├── readers/ │ │ ├── __init__.py │ │ ├── base.py │ │ ├── gmsh.py │ │ ├── native.py │ │ ├── shared_nodes.py │ │ └── stl.py │ ├── regions.py │ ├── resamplers.py │ ├── shapes.py │ ├── solvers/ │ │ ├── __init__.py │ │ ├── base/ │ │ │ ├── __init__.py │ │ │ ├── elements.py │ │ │ ├── inters.py │ │ │ └── system.py │ │ ├── baseadvec/ │ │ │ ├── __init__.py │ │ │ ├── elements.py │ │ │ ├── entfilter.py │ │ │ ├── inters.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── evalsrcmacros.mako │ │ │ │ ├── intcent.mako │ │ │ │ ├── mpicent.mako │ │ │ │ ├── negdivconf.mako │ │ │ │ ├── smats.mako │ │ │ │ └── transform.mako │ │ │ └── system.py │ │ ├── baseadvecdiff/ │ │ │ ├── __init__.py │ │ │ ├── artvisc.py │ │ │ ├── elements.py │ │ │ ├── inters.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── artvisc.mako │ │ │ │ ├── avfill.mako │ │ │ │ ├── gradcoru.mako │ │ │ │ ├── shocksensor.mako │ │ │ │ ├── transform_grad.mako │ │ │ │ └── vtxreduce.mako │ │ │ └── system.py │ │ ├── euler/ │ │ │ ├── __init__.py │ │ │ ├── elements.py │ │ │ ├── inters.py │ │ │ ├── kernels/ │ │ │ │ ├── __init__.py │ │ │ │ ├── bccent.mako │ │ │ │ ├── bccflux.mako │ │ │ │ ├── bcs/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── char-riem-inv-controlled.mako │ │ │ │ │ ├── char-riem-inv-mass-flow.mako │ │ │ │ │ ├── char-riem-inv-pressure.mako │ │ │ │ │ ├── char-riem-inv.mako │ │ │ │ │ ├── slp-adia-wall.mako │ │ │ │ │ ├── sup-in-fa.mako │ │ │ │ │ └── sup-out-fn.mako │ │ │ │ ├── entropy.mako │ │ │ │ ├── entropyfilter.mako │ │ │ │ ├── entropylocal.mako │ │ │ │ ├── eos.mako │ │ │ │ ├── flux.mako │ │ │ │ ├── intcflux.mako │ │ │ │ ├── mpicflux.mako │ │ │ │ ├── rsolvers/ │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── exact.mako │ │ │ │ │ ├── hll.mako │ │ │ │ │ ├── hllc.mako │ │ │ │ │ ├── roe.mako │ │ │ │ │ ├── roem.mako │ │ │ │ │ ├── rsolve1d.mako │ │ │ │ │ └── rusanov.mako │ │ │ │ ├── tflux.mako │ │ │ │ └── wavespeed.mako │ │ │ └── system.py │ │ └── navstokes/ │ │ ├── __init__.py │ │ ├── elements.py │ │ ├── inters.py │ │ ├── kernels/ │ │ │ ├── __init__.py │ │ │ ├── bccent.mako │ │ │ ├── bccflux.mako │ │ │ ├── bcconu.mako │ │ │ ├── bcs/ │ │ │ │ ├── __init__.py │ │ │ │ ├── char-riem-inv-mass-flow.mako │ │ │ │ ├── char-riem-inv-pressure.mako │ │ │ │ ├── char-riem-inv.mako │ │ │ │ ├── common.mako │ │ │ │ ├── ghost-imperm.mako │ │ │ │ ├── ghost.mako │ │ │ │ ├── no-slp-adia-wall.mako │ │ │ │ ├── no-slp-isot-wall.mako │ │ │ │ ├── slp-adia-wall.mako │ │ │ │ ├── sub-in-frv.mako │ │ │ │ ├── sub-in-ftpttang.mako │ │ │ │ ├── sub-out-fp.mako │ │ │ │ ├── sup-in-fa.mako │ │ │ │ └── sup-out-fn.mako │ │ │ ├── flux.mako │ │ │ ├── intcflux.mako │ │ │ ├── intconu.mako │ │ │ ├── mpicflux.mako │ │ │ ├── mpiconu.mako │ │ │ └── tflux.mako │ │ └── system.py │ ├── template.py │ ├── tests/ │ │ ├── __init__.py │ │ ├── hex-gleg-ord3.npz │ │ └── test_ele_mats.py │ ├── util.py │ └── writers/ │ ├── __init__.py │ ├── base.py │ ├── csv.py │ ├── native.py │ ├── serialise.py │ ├── upgrade.py │ └── vtk/ │ ├── __init__.py │ ├── base.py │ ├── boundary.py │ ├── stl.py │ └── volume.py └── pyproject.toml
SYMBOL INDEX (2186 symbols across 153 files)
FILE: pyfr/__main__.py
function main (line 35) | def main():
function process_import (line 262) | def process_import(args):
function process_upgrade (line 274) | def process_upgrade(args):
function process_partition_list (line 289) | def process_partition_list(args):
function process_partition_info (line 298) | def process_partition_info(args):
function process_partition_add (line 311) | def process_partition_add(args):
function process_partition_reconstruct (line 380) | def process_partition_reconstruct(args):
function process_partition_remove (line 399) | def process_partition_remove(args):
function process_region_add (line 409) | def process_region_add(args):
function process_region_list (line 432) | def process_region_list(args):
function process_region_remove (line 441) | def process_region_remove(args):
function process_export (line 451) | def process_export(args):
function process_resample (line 497) | def process_resample(args):
class _ProgressBarPlugin (line 553) | class _ProgressBarPlugin(BasePlugin):
method __init__ (line 556) | def __init__(self, pbar, gndofs):
method __call__ (line 562) | def __call__(self, intg):
function _process_common (line 576) | def _process_common(args, soln, cfg):
function process_run (line 612) | def process_run(args):
function process_restart (line 616) | def process_restart(args):
FILE: pyfr/backends/__init__.py
function get_backend (line 10) | def get_backend(name, cfg):
FILE: pyfr/backends/base/backend.py
function recordmat (line 19) | def recordmat(fn):
class BaseBackend (line 32) | class BaseBackend:
method __init__ (line 37) | def __init__(self, cfg):
method _extent_alloc_bytes (line 75) | def _extent_alloc_bytes(self, nbytes):
method lookup (line 79) | def lookup(self):
method malloc (line 94) | def malloc(self, obj, extent):
method commit (line 108) | def commit(self):
method _malloc_checked (line 114) | def _malloc_checked(self, nbytes):
method _malloc_impl (line 121) | def _malloc_impl(self, nbytes):
method _track_extent (line 124) | def _track_extent(self, ext):
method memory_info (line 129) | def memory_info(self):
method const_matrix (line 134) | def const_matrix(self, initval, dtype=None, tags=set()):
method matrix (line 147) | def matrix(self, ioshape, initval=None, extent=None, tags=set(),
method storage_view (line 152) | def storage_view(self, parent, offset, nbytes):
method matrix_slice (line 156) | def matrix_slice(self, mat, ra, rb, ca, cb):
method xchg_matrix (line 160) | def xchg_matrix(self, ioshape, initval=None, extent=None, tags=set()):
method xchg_matrix_for_view (line 164) | def xchg_matrix_for_view(self, view, tags=set()):
method view (line 167) | def view(self, matmap, rmap, cmap, rstridemap=1, vshape=(), tags=set()):
method xchg_view (line 171) | def xchg_view(self, matmap, rmap, cmap, rstridemap=1, vshape=(),
method region (line 177) | def region(self, name):
method kernel (line 188) | def kernel(self, name, *args, **kwargs):
method ordered_meta_kernel (line 218) | def ordered_meta_kernel(self, kerns):
method unordered_meta_kernel (line 221) | def unordered_meta_kernel(self, kerns, splits=None):
method graph (line 224) | def graph(self):
FILE: pyfr/backends/base/blasext.py
class BaseBlasExtKernels (line 8) | class BaseBlasExtKernels:
method axnpby (line 9) | def axnpby(self, *arr, in_scale=(), in_scale_idxs=(), out_scale=()):
method reduction (line 21) | def reduction(self, rop, expr, vvars, svars=[], pvars={}):
FILE: pyfr/backends/base/generator.py
class Arg (line 9) | class Arg:
method __init__ (line 10) | def __init__(self, name, spec, body):
class BaseKernelGenerator (line 77) | class BaseKernelGenerator:
method __init__ (line 78) | def __init__(self, name, ndim, args, body, fpdtype, ixdtype):
method argspec (line 109) | def argspec(self):
method ldim_size (line 145) | def ldim_size(self, name, factor=1):
method needs_ldim (line 148) | def needs_ldim(self, arg):
method render (line 151) | def render(self):
method _match_arg (line 154) | def _match_arg(self, arg):
method _deref_arg (line 161) | def _deref_arg(self, arg):
method _deref_arg_view_1d (line 171) | def _deref_arg_view_1d(self, arg):
method _deref_arg_view_2d (line 186) | def _deref_arg_view_2d(self, arg):
method _deref_arg_array_1d (line 204) | def _deref_arg_array_1d(self, arg):
method _deref_arg_array_2d (line 235) | def _deref_arg_array_2d(self, arg):
method _render_body (line 278) | def _render_body(self, body):
method _reduce_ident (line 301) | def _reduce_ident(self, reduceop):
method _accum_expr (line 307) | def _accum_expr(self, reduceop, dst, src):
method _render_reduce (line 314) | def _render_reduce(self, va, body, subp, darg):
method _render_body_preamble_epilogue (line 352) | def _render_body_preamble_epilogue(self, body):
class BaseGPUKernelGenerator (line 356) | class BaseGPUKernelGenerator(BaseKernelGenerator):
method __init__ (line 371) | def __init__(self, *args, **kwargs):
method ldim_size (line 385) | def ldim_size(self, name, factor=1):
method needs_ldim (line 388) | def needs_ldim(self, arg):
method _preload_arg (line 391) | def _preload_arg(self, arg):
method _render_body_preamble_epilogue (line 432) | def _render_body_preamble_epilogue(self, body):
method _render_reduce_2d (line 472) | def _render_reduce_2d(self):
method render (line 513) | def render(self):
FILE: pyfr/backends/base/makoutil.py
function carray (line 14) | def carray(context, vals):
function ndrange (line 18) | def ndrange(context, *args):
function ilog2range (line 22) | def ilog2range(context, x):
function npdtype_to_ctype (line 26) | def npdtype_to_ctype(context, dtype):
function dot (line 30) | def dot(context, a_, b_=None, /, **kwargs):
function axnpby_expr (line 40) | def axnpby_expr(context, k, idx, start=0, *, nv, in_scale_idxs=(),
function array (line 57) | def array(context, expr_, vals_={}, /, **kwargs):
function polyfit (line 72) | def polyfit(context, f, a, b, n, var, nqpts=500):
function _strip_parens (line 82) | def _strip_parens(s):
function _locals (line 94) | def _locals(body):
function mfilttag (line 120) | def mfilttag(source):
function macro (line 149) | def macro(context, name, params, externs='', id=''):
function _parse_expand_args (line 177) | def _parse_expand_args(name, mparams, margsig, args, kwargs):
function expand (line 208) | def expand(context, name, /, *args, **kwargs):
function fp_precise (line 243) | def fp_precise(context):
function kernel (line 250) | def kernel(context, name, ndim, **kwargs):
function alias (line 281) | def alias(context, name, func):
FILE: pyfr/backends/base/provider.py
class Kernel (line 10) | class Kernel:
method __init__ (line 14) | def __init__(self, mats=[], views=[], misc=[], dt=float('nan')):
method retval (line 21) | def retval(self):
method run (line 24) | def run(self, *args):
class NullKernel (line 28) | class NullKernel(Kernel):
class BaseMetaKernel (line 32) | class BaseMetaKernel(Kernel):
method __init__ (line 33) | def __init__(self, kernels):
method _bind (line 44) | def _bind(self, **kwargs):
method run (line 48) | def run(self, *args):
class BaseOrderedMetaKernel (line 53) | class BaseOrderedMetaKernel(BaseMetaKernel):
class BaseUnorderedMetaKernel (line 57) | class BaseUnorderedMetaKernel(BaseMetaKernel):
method __init__ (line 58) | def __init__(self, kernels, splits):
class BaseKernelProvider (line 69) | class BaseKernelProvider:
method __init__ (line 70) | def __init__(self, backend):
class BasePointwiseKernelProvider (line 74) | class BasePointwiseKernelProvider(BaseKernelProvider):
method _render_kernel (line 78) | def _render_kernel(self, name, mod, extrns, tplargs):
method _build_kernel (line 108) | def _build_kernel(self, name, src, args, argn=[]):
method _build_arglst (line 111) | def _build_arglst(self, dims, argn, argt, argdict):
method _instantiate_kernel (line 170) | def _instantiate_kernel(self, dims, fun, arglst, argmv):
method register (line 173) | def register(self, mod):
class NotSuitableError (line 209) | class NotSuitableError(Exception):
FILE: pyfr/backends/base/types.py
class _StorageBase (line 10) | class _StorageBase:
method storage_root (line 12) | def storage_root(self):
method same_storage (line 15) | def same_storage(self, other):
class Extent (line 19) | class Extent(_StorageBase):
method __init__ (line 20) | def __init__(self, name=None):
method reserve (line 28) | def reserve(self, obj, nbytes):
method commit (line 32) | def commit(self, alloc_fn):
class MatrixBase (line 40) | class MatrixBase(_StorageBase):
method __init__ (line 43) | def __init__(self, backend, dtype, ioshape, initval, extent, tags):
method get (line 102) | def get(self):
method _get (line 113) | def _get(self):
method _pack (line 116) | def _pack(self, ary, out=None):
method _unpack (line 134) | def _unpack(self, ary):
method slice (line 146) | def slice(self, ra=None, rb=None, ca=None, cb=None):
class Matrix (line 153) | class Matrix(MatrixBase):
method set (line 154) | def set(self, ary):
method _set (line 165) | def _set(self, ary):
class MatrixSlice (line 169) | class MatrixSlice(_StorageBase):
method __init__ (line 170) | def __init__(self, backend, mat, ra, rb, ca, cb):
method basedata (line 203) | def basedata(self):
method offset (line 207) | def offset(self):
method storage_root (line 216) | def storage_root(self):
class StorageRegion (line 220) | class StorageRegion(_StorageBase):
method __init__ (line 221) | def __init__(self, parent, offset, nbytes):
method basedata (line 231) | def basedata(self):
method offset (line 235) | def offset(self):
method storage_root (line 239) | def storage_root(self):
class ConstMatrix (line 243) | class ConstMatrix(MatrixBase):
method __init__ (line 246) | def __init__(self, backend, dtype, initval, tags):
class XchgMatrix (line 250) | class XchgMatrix(Matrix):
method recvreq (line 253) | def recvreq(self, comm, pid, tag):
method sendreq (line 256) | def sendreq(self, comm, pid, tag):
class View (line 260) | class View:
method __init__ (line 261) | def __init__(self, backend, matmap, rmap, cmap, rstridemap, vshape, ta...
class XchgView (line 323) | class XchgView:
method __init__ (line 324) | def __init__(self, backend, matmap, rmap, cmap, rstridemap, vshape, ta...
method recvreq (line 336) | def recvreq(self, comm, pid, tag):
method sendreq (line 339) | def sendreq(self, comm, pid, tag):
class Graph (line 343) | class Graph:
method __init__ (line 344) | def __init__(self, backend):
method _alldeps (line 383) | def _alldeps(self, k):
method add (line 387) | def add(self, kern, deps=[], pdeps=[]):
method add_all (line 398) | def add_all(self, kerns, deps=[], pdeps=[]):
method add_mpi_req (line 402) | def add_mpi_req(self, req, deps=[]):
method add_mpi_reqs (line 408) | def add_mpi_reqs(self, reqs, deps=[]):
method group (line 412) | def group(self, kerns, subs=[]):
method _build_dag (line 418) | def _build_dag(self):
method _mpi_urgent (line 445) | def _mpi_urgent(self, gmembers, to_super):
method _topo_sort (line 459) | def _topo_sort(self):
method _add_mpi_req (line 484) | def _add_mpi_req(self, req, deps):
method _group (line 488) | def _group(self, kerns, subs):
method _commit (line 491) | def _commit(self):
method commit (line 494) | def commit(self):
method run (line 529) | def run(self, *args):
method get_wait_times (line 532) | def get_wait_times(self):
FILE: pyfr/backends/cuda/base.py
class CUDABackend (line 9) | class CUDABackend(BaseBackend):
method __init__ (line 13) | def __init__(self, cfg):
method xfer_buf (line 101) | def xfer_buf(self, shape, dtype):
method platform_id (line 112) | def platform_id(self):
method run_kernels (line 115) | def run_kernels(self, kernels, wait=False):
method run_graph (line 123) | def run_graph(self, graph, wait=False):
method wait (line 129) | def wait(self):
method memory_info (line 132) | def memory_info(self):
method _malloc_impl (line 137) | def _malloc_impl(self, nbytes):
FILE: pyfr/backends/cuda/blasext.py
class CUDABlasExtKernels (line 8) | class CUDABlasExtKernels(BaseBlasExtKernels, CUDAKernelProvider):
method batched_inv (line 11) | def batched_inv(self, m):
method _axnpby (line 19) | def _axnpby(self, arr, tplargs):
method copy (line 48) | def copy(self, dst, src):
method zero (line 63) | def zero(self, m):
method _reduction (line 75) | def _reduction(self, fvvar, vvars, svars, tplargs):
FILE: pyfr/backends/cuda/compiler.py
class NVRTCError (line 12) | class NVRTCError(Exception): pass
class NVRTCOutOfMemory (line 13) | class NVRTCOutOfMemory(NVRTCError): pass
class NVRTCProgCreationFailure (line 14) | class NVRTCProgCreationFailure(NVRTCError): pass
class NVRTCInvalidInput (line 15) | class NVRTCInvalidInput(NVRTCError): pass
class NVRTCInvalidProgram (line 16) | class NVRTCInvalidProgram(NVRTCError): pass
class NVRTCInvalidOption (line 17) | class NVRTCInvalidOption(NVRTCError): pass
class NVRTCCompilationError (line 18) | class NVRTCCompilationError(NVRTCError): pass
class NVRTCInternalError (line 19) | class NVRTCInternalError(NVRTCError): pass
class NVRTCWrappers (line 22) | class NVRTCWrappers(LibWrapper):
class NVRTC (line 52) | class NVRTC:
method __init__ (line 53) | def __init__(self):
method compile (line 56) | def compile(self, name, src, flags=[]):
class CUDACompiler (line 105) | class CUDACompiler:
method __init__ (line 106) | def __init__(self, cuda):
method build (line 115) | def build(self, name, src, flags=[]):
class CUDACompilerModule (line 127) | class CUDACompilerModule:
method __init__ (line 128) | def __init__(self, backend, src):
method get_function (line 155) | def get_function(self, name, argtypes):
FILE: pyfr/backends/cuda/cublaslt.py
class CUBLASLtError (line 12) | class CUBLASLtError(Exception): pass
class CUBLASLtNotInitialized (line 13) | class CUBLASLtNotInitialized(CUBLASLtError): pass
class CUBLASLtAllocFailed (line 14) | class CUBLASLtAllocFailed(CUBLASLtError): pass
class CUBLASLtInvalidValue (line 15) | class CUBLASLtInvalidValue(CUBLASLtError): pass
class CUBLASLtArchMismatch (line 16) | class CUBLASLtArchMismatch(CUBLASLtError): pass
class CUBLASLtMappingError (line 17) | class CUBLASLtMappingError(CUBLASLtError): pass
class CUBLASLtExecutionFailed (line 18) | class CUBLASLtExecutionFailed(CUBLASLtError): pass
class CUBLASLtInternalError (line 19) | class CUBLASLtInternalError(CUBLASLtError): pass
class CUBLASLtStatusNotSupported (line 20) | class CUBLASLtStatusNotSupported(CUBLASLtError): pass
class CUBLASLtMatmulAlgo (line 23) | class CUBLASLtMatmulAlgo(Structure):
class CUBLASLtMatmulHeuristicResult (line 27) | class CUBLASLtMatmulHeuristicResult(Structure):
class CUBLASLtWrappers (line 37) | class CUBLASLtWrappers(LibWrapper):
class _CUBLASLtBase (line 89) | class _CUBLASLtBase:
method __init__ (line 92) | def __init__(self, cublaslt, ptr, attrs=[]):
method __del__ (line 100) | def __del__(self):
class CUBLASLtMatmulDesc (line 107) | class CUBLASLtMatmulDesc(_CUBLASLtBase):
method __init__ (line 110) | def __init__(self, cublaslt, ctype, dtype, attrs=[]):
class CUBLASLtMatmulPreference (line 117) | class CUBLASLtMatmulPreference(_CUBLASLtBase):
method __init__ (line 120) | def __init__(self, cublaslt, attrs=[]):
class CUBLASLtMatrixLayout (line 127) | class CUBLASLtMatrixLayout(_CUBLASLtBase):
method __init__ (line 130) | def __init__(self, cublaslt, mat, dtype):
class CUDACUBLASLtKernels (line 144) | class CUDACUBLASLtKernels(CUDAKernelProvider):
method __init__ (line 148) | def __init__(self, backend):
method __del__ (line 165) | def __del__(self):
method mul (line 169) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/cuda/driver.py
class CUDAError (line 12) | class CUDAError(Exception): pass
class CUDAInvalidValue (line 13) | class CUDAInvalidValue(CUDAError): pass
class CUDAOutofMemory (line 14) | class CUDAOutofMemory(CUDAError): pass
class CUDANotInitalized (line 15) | class CUDANotInitalized(CUDAError): pass
class CUDANoDevice (line 16) | class CUDANoDevice(CUDAError): pass
class CUDAInvalidDevice (line 17) | class CUDAInvalidDevice(CUDAError): pass
class CUDAECCUncorrectable (line 18) | class CUDAECCUncorrectable(CUDAError): pass
class CUDAErrorInvalidPTX (line 19) | class CUDAErrorInvalidPTX(CUDAError): pass
class CUDAErrorUnsupportedPTXVersion (line 20) | class CUDAErrorUnsupportedPTXVersion(CUDAError): pass
class CUDAOSError (line 21) | class CUDAOSError(CUDAError, OSError): pass
class CUDAInvalidHandle (line 22) | class CUDAInvalidHandle(CUDAError): pass
class CUDAIllegalAddress (line 23) | class CUDAIllegalAddress(CUDAError): pass
class CUDALaunchOutOfResources (line 24) | class CUDALaunchOutOfResources(CUDAError): pass
class CUDALaunchFailed (line 25) | class CUDALaunchFailed(CUDAError): pass
class CUDASystemDriverMismatch (line 26) | class CUDASystemDriverMismatch(CUDAError): pass
class CUDAKernelNodeParams (line 29) | class CUDAKernelNodeParams(Structure):
method __init__ (line 39) | def __init__(self, func, grid, block, sharedb):
method set_arg (line 58) | def set_arg(self, i, v):
method set_args (line 61) | def set_args(self, *kargs, start=0):
class CUDAMemcpy3D (line 66) | class CUDAMemcpy3D(Structure):
class CUDAMemsetNodeParams (line 96) | class CUDAMemsetNodeParams(Structure):
class CUDAWrappers (line 107) | class CUDAWrappers(LibWrapper):
method _transname (line 202) | def _transname(self, name):
method __init__ (line 205) | def __init__(self, *args, **kwargs):
class _CUDABase (line 216) | class _CUDABase:
method __init__ (line 219) | def __init__(self, cuda, ptr):
method __del__ (line 223) | def __del__(self):
method __int__ (line 231) | def __int__(self):
class CUDADevAlloc (line 235) | class CUDADevAlloc(_CUDABase):
method __init__ (line 238) | def __init__(self, cuda, nbytes):
class CUDAHostAlloc (line 246) | class CUDAHostAlloc(_CUDABase):
method __init__ (line 249) | def __init__(self, cuda, nbytes):
class CUDAStream (line 258) | class CUDAStream(_CUDABase):
method __init__ (line 261) | def __init__(self, cuda):
method begin_capture (line 267) | def begin_capture(self):
method end_capture (line 270) | def end_capture(self):
method synchronize (line 276) | def synchronize(self):
class CUDAEvent (line 280) | class CUDAEvent(_CUDABase):
method __init__ (line 283) | def __init__(self, cuda, timing=False):
method record (line 294) | def record(self, stream):
method synchronize (line 297) | def synchronize(self):
method elapsed_time (line 300) | def elapsed_time(self, start):
class CUDAModule (line 307) | class CUDAModule(_CUDABase):
method __init__ (line 310) | def __init__(self, cuda, cucode):
method get_function (line 316) | def get_function(self, name, argspec):
class CUDAFunction (line 320) | class CUDAFunction(_CUDABase):
method __init__ (line 321) | def __init__(self, cuda, module, name, argtypes):
method _get_attr (line 336) | def _get_attr(self, attr):
method _set_attr (line 344) | def _set_attr(self, attr, val):
method set_shared_size (line 348) | def set_shared_size(self, *, dynm_shared=0, carveout=None):
method make_params (line 354) | def make_params(self, grid, block, sharedb=0):
method exec_async (line 357) | def exec_async(self, stream, params):
class CUDAGraph (line 363) | class CUDAGraph(_CUDABase):
method __init__ (line 366) | def __init__(self, cuda, ptr=None):
method _make_deps (line 374) | def _make_deps(deps):
method add_empty (line 380) | def add_empty(self, deps=None):
method add_event_record (line 386) | def add_event_record(self, event, deps=None):
method add_kernel (line 393) | def add_kernel(self, kparams, deps=None):
method add_memcpy (line 400) | def add_memcpy(self, dst, src, nbytes, deps=None):
method add_memset (line 426) | def add_memset(self, dst, val, nbytes, deps=None):
method add_graph (line 443) | def add_graph(self, graph, deps=None):
method instantiate (line 450) | def instantiate(self):
class CUDAExecGraph (line 454) | class CUDAExecGraph(_CUDABase):
method __init__ (line 457) | def __init__(self, cuda, graph):
method set_kernel_node_params (line 466) | def set_kernel_node_params(self, node, kparams):
method launch (line 469) | def launch(self, stream):
class CUDA (line 473) | class CUDA:
method __init__ (line 474) | def __init__(self):
method __del__ (line 480) | def __del__(self):
method device_count (line 485) | def device_count(self):
method device_uuid (line 491) | def device_uuid(self, devid):
method set_device (line 500) | def set_device(self, devid):
method device_name (line 510) | def device_name(self):
method compute_capability (line 515) | def compute_capability(self):
method mem_info (line 524) | def mem_info(self):
method mem_alloc (line 529) | def mem_alloc(self, nbytes):
method pagelocked_empty (line 532) | def pagelocked_empty(self, shape, dtype):
method memcpy (line 545) | def memcpy(self, dst, src, nbytes, stream=None):
method memset (line 557) | def memset(self, dst, val, nbytes, stream=None):
method load_module (line 563) | def load_module(self, cucode):
method create_stream (line 566) | def create_stream(self):
method create_event (line 569) | def create_event(self, timing=False):
method create_graph (line 572) | def create_graph(self):
FILE: pyfr/backends/cuda/generator.py
class CUDAKernelGenerator (line 6) | class CUDAKernelGenerator(BaseGPUKernelGenerator):
method _render_spec (line 12) | def _render_spec(self):
FILE: pyfr/backends/cuda/gimmik.py
class CUDAGiMMiKKernels (line 10) | class CUDAGiMMiKKernels(CUDAKernelProvider):
method __init__ (line 11) | def __init__(self, backend):
method mul (line 23) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/cuda/nvtools.py
class NVTXEventAttributes (line 7) | class NVTXEventAttributes(Structure):
class NVTXWrappers (line 22) | class NVTXWrappers(LibWrapper):
class NVTXAnnotator (line 34) | class NVTXAnnotator:
method __init__ (line 40) | def __init__(self, name='PyFR'):
method __del__ (line 45) | def __del__(self):
method _make_attr (line 49) | def _make_attr(self, name):
method push (line 60) | def push(self, name):
method pop (line 64) | def pop(self, name):
FILE: pyfr/backends/cuda/packing.py
class CUDAPackingKernels (line 8) | class CUDAPackingKernels(CUDAKernelProvider):
method _extract_args (line 9) | def _extract_args(self, xmv):
method _packing_kern (line 15) | def _packing_kern(self, type, v, xm):
method pack (line 34) | def pack(self, xmv):
method unpack (line 73) | def unpack(self, xmv):
FILE: pyfr/backends/cuda/provider.py
function get_grid_for_block (line 11) | def get_grid_for_block(block, nrow, ncol=1):
class CUDAKernel (line 15) | class CUDAKernel(Kernel):
method __init__ (line 16) | def __init__(self, *args, **kwargs):
class CUDAOrderedMetaKernel (line 23) | class CUDAOrderedMetaKernel(BaseOrderedMetaKernel):
method add_to_graph (line 24) | def add_to_graph(self, graph, dnodes):
class CUDAUnorderedMetaKernel (line 31) | class CUDAUnorderedMetaKernel(BaseUnorderedMetaKernel):
method add_to_graph (line 32) | def add_to_graph(self, graph, dnodes):
class CUDAKernelProvider (line 38) | class CUDAKernelProvider(BaseKernelProvider):
method _build_kernel (line 40) | def _build_kernel(self, name, src, argtypes, argn=[]):
method _benchmark (line 44) | def _benchmark(self, kfunc, nbench=4, nwarmup=1):
class CUDAPointwiseKernelProvider (line 67) | class CUDAPointwiseKernelProvider(CUDAKernelProvider,
method __init__ (line 69) | def __init__(self, *args, **kwargs):
method _instantiate_kernel (line 82) | def _instantiate_kernel(self, dims, fun, arglst, argm, argv):
FILE: pyfr/backends/cuda/types.py
class _CUDAMatrixCommon (line 8) | class _CUDAMatrixCommon:
method _as_parameter_ (line 10) | def _as_parameter_(self):
class CUDAMatrixBase (line 14) | class CUDAMatrixBase(_CUDAMatrixCommon, base.MatrixBase):
method onalloc (line 15) | def onalloc(self, basedata, offset):
method _get (line 27) | def _get(self):
method _set (line 37) | def _set(self, ary):
class CUDAMatrixSlice (line 44) | class CUDAMatrixSlice(_CUDAMatrixCommon, base.MatrixSlice):
method data (line 46) | def data(self):
class CUDAMatrix (line 50) | class CUDAMatrix(CUDAMatrixBase, base.Matrix): pass
class CUDAConstMatrix (line 51) | class CUDAConstMatrix(CUDAMatrixBase, base.ConstMatrix): pass
class CUDAView (line 52) | class CUDAView(base.View): pass
class CUDAXchgView (line 53) | class CUDAXchgView(base.XchgView): pass
class CUDAXchgMatrix (line 56) | class CUDAXchgMatrix(CUDAMatrix, base.XchgMatrix):
method __init__ (line 57) | def __init__(self, backend, dtype, ioshape, initval, extent, tags):
class CUDAGraph (line 79) | class CUDAGraph(base.Graph):
method __init__ (line 80) | def __init__(self, backend):
method _add_mpi_req (line 87) | def _add_mpi_req(self, req, deps):
method _commit (line 96) | def _commit(self):
method run (line 99) | def run(self, stream):
FILE: pyfr/backends/hip/base.py
class HIPBackend (line 9) | class HIPBackend(BaseBackend):
method __init__ (line 13) | def __init__(self, cfg):
method xfer_buf (line 97) | def xfer_buf(self, shape, dtype):
method platform_id (line 108) | def platform_id(self):
method run_kernels (line 111) | def run_kernels(self, kernels, wait=False):
method run_graph (line 119) | def run_graph(self, graph, wait=False):
method wait (line 125) | def wait(self):
method memory_info (line 128) | def memory_info(self):
method _malloc_impl (line 133) | def _malloc_impl(self, nbytes):
FILE: pyfr/backends/hip/blasext.py
class HIPBlasExtKernels (line 8) | class HIPBlasExtKernels(BaseBlasExtKernels, HIPKernelProvider):
method batched_inv (line 11) | def batched_inv(self, m):
method _axnpby (line 19) | def _axnpby(self, arr, tplargs):
method copy (line 49) | def copy(self, dst, src):
method zero (line 64) | def zero(self, m):
method _reduction (line 76) | def _reduction(self, fvvar, vvars, svars, tplargs):
FILE: pyfr/backends/hip/compiler.py
class HIPRTCError (line 11) | class HIPRTCError(Exception): pass
class HIPRTCOutOfMemory (line 12) | class HIPRTCOutOfMemory(HIPRTCError): pass
class HIPRTCProgCreationFailure (line 13) | class HIPRTCProgCreationFailure(HIPRTCError): pass
class HIPRTCInvalidInput (line 14) | class HIPRTCInvalidInput(HIPRTCError): pass
class HIPRTCInvalidProgram (line 15) | class HIPRTCInvalidProgram(HIPRTCError): pass
class HIPRTCInvalidOption (line 16) | class HIPRTCInvalidOption(HIPRTCError): pass
class HIPRTCCompilationError (line 17) | class HIPRTCCompilationError(HIPRTCError): pass
class HIPRTCInternalError (line 18) | class HIPRTCInternalError(HIPRTCError): pass
class HIPRTCWrappers (line 21) | class HIPRTCWrappers(LibWrapper):
class HIPRTC (line 49) | class HIPRTC:
method __init__ (line 50) | def __init__(self):
method compile (line 53) | def compile(self, name, src, flags=[]):
class HIPCompiler (line 95) | class HIPCompiler:
method __init__ (line 96) | def __init__(self, hip):
method build (line 105) | def build(self, name, src, flags=[]):
class HIPCompilerModule (line 117) | class HIPCompilerModule:
method __init__ (line 118) | def __init__(self, backend, src):
method get_function (line 136) | def get_function(self, name, argtypes):
FILE: pyfr/backends/hip/driver.py
class HIPError (line 12) | class HIPError(Exception): pass
class HIPInvalidValue (line 13) | class HIPInvalidValue(HIPError): pass
class HIPNotInitialized (line 14) | class HIPNotInitialized(HIPError): pass
class HIPOutOfMemory (line 15) | class HIPOutOfMemory(HIPError): pass
class HIPInsufficientDriver (line 16) | class HIPInsufficientDriver(HIPError): pass
class HIPPriorLaunchFailure (line 17) | class HIPPriorLaunchFailure(HIPError): pass
class HIPInvalidDevice (line 18) | class HIPInvalidDevice(HIPError): pass
class HIPECCNotCorrectable (line 19) | class HIPECCNotCorrectable(HIPError): pass
class HIPFileNotFound (line 20) | class HIPFileNotFound(HIPError): pass
class HIPNotFound (line 21) | class HIPNotFound(HIPError): pass
class HIPIllegalAddress (line 22) | class HIPIllegalAddress(HIPError): pass
class HIPLaunchFailure (line 23) | class HIPLaunchFailure(HIPError): pass
class HIPKernelNodeParams (line 26) | class HIPKernelNodeParams(Structure):
method __init__ (line 36) | def __init__(self, func, grid, block, sharedb):
method set_arg (line 55) | def set_arg(self, i, v):
method set_args (line 58) | def set_args(self, *kargs, start=0):
class HIPMemsetParams (line 63) | class HIPMemsetParams(Structure):
class HIPWrappers (line 74) | class HIPWrappers(LibWrapper):
method __init__ (line 155) | def __init__(self, *args, **kwargs):
method _transname (line 168) | def _transname(self, name):
class _HIPBase (line 172) | class _HIPBase:
method __init__ (line 175) | def __init__(self, hip, ptr):
method __del__ (line 179) | def __del__(self):
method __int__ (line 186) | def __int__(self):
class HIPDevAlloc (line 190) | class HIPDevAlloc(_HIPBase):
method __init__ (line 193) | def __init__(self, hip, nbytes):
class HIPHostAlloc (line 202) | class HIPHostAlloc(_HIPBase):
method __init__ (line 205) | def __init__(self, hip, nbytes):
class HIPStream (line 214) | class HIPStream(_HIPBase):
method __init__ (line 217) | def __init__(self, hip):
method begin_capture (line 223) | def begin_capture(self):
method end_capture (line 226) | def end_capture(self):
method synchronize (line 232) | def synchronize(self):
class HIPEvent (line 236) | class HIPEvent(_HIPBase):
method __init__ (line 239) | def __init__(self, hip):
method record (line 245) | def record(self, stream):
method synchronize (line 248) | def synchronize(self):
method elapsed_time (line 251) | def elapsed_time(self, start):
class HIPModule (line 258) | class HIPModule(_HIPBase):
method __init__ (line 261) | def __init__(self, hip, code):
method get_function (line 267) | def get_function(self, name, argspec):
class HIPFunction (line 271) | class HIPFunction(_HIPBase):
method __init__ (line 272) | def __init__(self, hip, module, name, argtypes):
method _get_attr (line 286) | def _get_attr(self, attr):
method make_params (line 294) | def make_params(self, grid, block, sharedb=0):
method exec_async (line 297) | def exec_async(self, stream, params):
class HIPGraph (line 303) | class HIPGraph(_HIPBase):
method __init__ (line 306) | def __init__(self, hip, ptr=None):
method _make_deps (line 314) | def _make_deps(deps):
method add_empty (line 320) | def add_empty(self, deps=None):
method add_event_record (line 326) | def add_event_record(self, event, deps=None):
method add_kernel (line 333) | def add_kernel(self, kparams, deps=None):
method add_memcpy (line 340) | def add_memcpy(self, dst, src, nbytes, deps=None):
method add_memset (line 355) | def add_memset(self, dst, val, nbytes, deps=None):
method add_graph (line 372) | def add_graph(self, graph, deps=None):
method instantiate (line 379) | def instantiate(self):
class HIPExecGraph (line 383) | class HIPExecGraph(_HIPBase):
method __init__ (line 386) | def __init__(self, hip, graph):
method set_kernel_node_params (line 395) | def set_kernel_node_params(self, node, kparams):
method launch (line 398) | def launch(self, stream):
class HIP (line 402) | class HIP:
method __init__ (line 403) | def __init__(self):
method device_count (line 406) | def device_count(self):
method device_properties (line 412) | def device_properties(self, devid):
method device_uuid (line 422) | def device_uuid(self, devid):
method set_device (line 428) | def set_device(self, devid):
method mem_info (line 431) | def mem_info(self):
method mem_alloc (line 436) | def mem_alloc(self, nbytes):
method pagelocked_empty (line 439) | def pagelocked_empty(self, shape, dtype):
method memcpy (line 452) | def memcpy(self, dst, src, nbytes, stream=None):
method memset (line 466) | def memset(self, dst, val, nbytes, stream=None):
method load_module (line 472) | def load_module(self, code):
method create_stream (line 475) | def create_stream(self):
method create_event (line 478) | def create_event(self):
method create_graph (line 481) | def create_graph(self):
FILE: pyfr/backends/hip/generator.py
class HIPKernelGenerator (line 6) | class HIPKernelGenerator(BaseGPUKernelGenerator):
method _render_spec (line 12) | def _render_spec(self):
FILE: pyfr/backends/hip/gimmik.py
class HIPGiMMiKKernels (line 11) | class HIPGiMMiKKernels(HIPKernelProvider):
method __init__ (line 12) | def __init__(self, backend):
method mul (line 24) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/hip/packing.py
class HIPPackingKernels (line 8) | class HIPPackingKernels(HIPKernelProvider):
method _extract_args (line 9) | def _extract_args(self, xmv):
method _packing_kern (line 15) | def _packing_kern(self, type, v, xm):
method pack (line 36) | def pack(self, xmv):
method unpack (line 75) | def unpack(self, xmv):
FILE: pyfr/backends/hip/provider.py
function get_grid_for_block (line 11) | def get_grid_for_block(block, nrow, ncol=1):
class HIPKernel (line 15) | class HIPKernel(Kernel):
method __init__ (line 16) | def __init__(self, *args, **kwargs):
class HIPOrderedMetaKernel (line 23) | class HIPOrderedMetaKernel(BaseOrderedMetaKernel):
method add_to_graph (line 24) | def add_to_graph(self, graph, dnodes):
class HIPUnorderedMetaKernel (line 30) | class HIPUnorderedMetaKernel(BaseUnorderedMetaKernel):
method add_to_graph (line 31) | def add_to_graph(self, graph, dnodes):
class HIPKernelProvider (line 37) | class HIPKernelProvider(BaseKernelProvider):
method _build_kernel (line 39) | def _build_kernel(self, name, src, argtypes, argn=[]):
method _benchmark (line 43) | def _benchmark(self, kfunc, nbench=4, nwarmup=1):
class HIPPointwiseKernelProvider (line 66) | class HIPPointwiseKernelProvider(HIPKernelProvider,
method __init__ (line 68) | def __init__(self, *args, **kwargs):
method _instantiate_kernel (line 81) | def _instantiate_kernel(self, dims, fun, arglst, argm, argv):
FILE: pyfr/backends/hip/rocblas.py
class RocBLASError (line 12) | class RocBLASError(Exception): pass
class RocBLASInvalidHandle (line 13) | class RocBLASInvalidHandle(RocBLASError): pass
class RocBLASNotImplemented (line 14) | class RocBLASNotImplemented(RocBLASError): pass
class RocBLASInvalidPointer (line 15) | class RocBLASInvalidPointer(RocBLASError): pass
class RocBLASInvalidSize (line 16) | class RocBLASInvalidSize(RocBLASError): pass
class RocBLASInternalError (line 17) | class RocBLASInternalError(RocBLASError): pass
class RocBLASInvalidValue (line 18) | class RocBLASInvalidValue(RocBLASError): pass
class RocBLASWrappers (line 21) | class RocBLASWrappers(LibWrapper):
class HIPRocBLASKernels (line 63) | class HIPRocBLASKernels(HIPKernelProvider):
method __init__ (line 64) | def __init__(self, backend):
method __del__ (line 85) | def __del__(self):
method mul (line 93) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/hip/roctx.py
class ROCTXWrappers (line 6) | class ROCTXWrappers(LibWrapper):
class ROCTXAnnotator (line 15) | class ROCTXAnnotator:
method __init__ (line 16) | def __init__(self):
method push (line 19) | def push(self, name):
method pop (line 22) | def pop(self, name):
FILE: pyfr/backends/hip/types.py
class _HIPMatrixCommon (line 8) | class _HIPMatrixCommon:
method _as_parameter_ (line 10) | def _as_parameter_(self):
class HIPMatrixBase (line 14) | class HIPMatrixBase(_HIPMatrixCommon, base.MatrixBase):
method onalloc (line 15) | def onalloc(self, basedata, offset):
method _get (line 27) | def _get(self):
method _set (line 37) | def _set(self, ary):
class HIPMatrixSlice (line 44) | class HIPMatrixSlice(_HIPMatrixCommon, base.MatrixSlice):
method data (line 46) | def data(self):
class HIPMatrix (line 50) | class HIPMatrix(HIPMatrixBase, base.Matrix): pass
class HIPConstMatrix (line 51) | class HIPConstMatrix(HIPMatrixBase, base.ConstMatrix): pass
class HIPView (line 52) | class HIPView(base.View): pass
class HIPXchgView (line 53) | class HIPXchgView(base.XchgView): pass
class HIPXchgMatrix (line 56) | class HIPXchgMatrix(HIPMatrix, base.XchgMatrix):
method __init__ (line 57) | def __init__(self, backend, dtype, ioshape, initval, extent, tags):
class HIPGraph (line 79) | class HIPGraph(base.Graph):
method __init__ (line 80) | def __init__(self, backend):
method _add_mpi_req (line 87) | def _add_mpi_req(self, req, deps):
method _commit (line 96) | def _commit(self):
method run (line 99) | def run(self, stream):
FILE: pyfr/backends/metal/base.py
class MetalBackend (line 7) | class MetalBackend(BaseBackend):
method __init__ (line 12) | def __init__(self, cfg):
method platform_id (line 74) | def platform_id(self):
method new_command_buffer (line 77) | def new_command_buffer(self):
method run_kernels (line 80) | def run_kernels(self, kernels, wait=False):
method run_graph (line 94) | def run_graph(self, graph, wait=False):
method wait (line 103) | def wait(self):
method memory_info (line 108) | def memory_info(self):
method _malloc_impl (line 114) | def _malloc_impl(self, nbytes):
FILE: pyfr/backends/metal/blasext.py
class MetalBlasExtKernels (line 8) | class MetalBlasExtKernels(BaseBlasExtKernels, MetalKernelProvider):
method batched_inv (line 11) | def batched_inv(self, m):
method _axnpby (line 19) | def _axnpby(self, arr, tplargs):
method copy (line 44) | def copy(self, dst, src):
method zero (line 58) | def zero(self, m):
method _reduction (line 71) | def _reduction(self, fvvar, vvars, svars, tplargs):
FILE: pyfr/backends/metal/compiler.py
class MetalCompiler (line 4) | class MetalCompiler:
method __init__ (line 5) | def __init__(self, backend):
method build_program (line 9) | def build_program(self, src):
method build_pipeline (line 22) | def build_pipeline(self, src, name):
FILE: pyfr/backends/metal/generator.py
class MetalKernelGenerator (line 6) | class MetalKernelGenerator(BaseGPUKernelGenerator):
method _render_spec (line 12) | def _render_spec(self):
FILE: pyfr/backends/metal/gimmik.py
class MetalGiMMiKKernels (line 10) | class MetalGiMMiKKernels(MetalKernelProvider):
method __init__ (line 11) | def __init__(self, backend):
method mul (line 27) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/metal/mps.py
class MetalMPSKernels (line 5) | class MetalMPSKernels(MetalKernelProvider):
method __init__ (line 8) | def __init__(self, backend):
method mul (line 14) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/metal/packing.py
class MetalPackingKernels (line 6) | class MetalPackingKernels(MetalKernelProvider):
method _extract_args (line 7) | def _extract_args(self, xmv):
method _packing_kern (line 13) | def _packing_kern(self, type, v, xm):
method pack (line 29) | def pack(self, xmv):
method unpack (line 45) | def unpack(self, xmv):
FILE: pyfr/backends/metal/provider.py
class MetalKernel (line 13) | class MetalKernel(Kernel):
method add_to_graph (line 14) | def add_to_graph(self, graph, dnodes):
class _MetalMetaKernel (line 20) | class _MetalMetaKernel:
method add_to_graph (line 21) | def add_to_graph(self, graph, dnodes):
class MetalOrderedMetaKernel (line 28) | class MetalOrderedMetaKernel(_MetalMetaKernel, BaseOrderedMetaKernel): pass
class MetalUnorderedMetaKernel (line 29) | class MetalUnorderedMetaKernel(_MetalMetaKernel, BaseUnorderedMetaKernel...
class MetalKernelProvider (line 32) | class MetalKernelProvider(BaseKernelProvider):
method _benchmark (line 33) | def _benchmark(self, kfunc, nbench=40, nwarmup=25):
method _build_kernel (line 50) | def _build_kernel(self, name, src, argtypes, argn=[]):
class MetalPointwiseKernelProvider (line 83) | class MetalPointwiseKernelProvider(MetalKernelProvider,
method __init__ (line 85) | def __init__(self, *args, **kwargs):
method _instantiate_kernel (line 98) | def _instantiate_kernel(self, dims, fun, arglst, argm, argv):
FILE: pyfr/backends/metal/types.py
class MetalMatrixBase (line 9) | class MetalMatrixBase(base.MatrixBase):
method onalloc (line 10) | def onalloc(self, basedata, offset):
method _get (line 26) | def _get(self):
method _set (line 33) | def _set(self, ary):
class MetalMatrixSlice (line 41) | class MetalMatrixSlice(base.MatrixSlice):
method data (line 43) | def data(self):
class MetalMatrix (line 47) | class MetalMatrix(MetalMatrixBase, base.Matrix): pass
class MetalConstMatrix (line 48) | class MetalConstMatrix(MetalMatrixBase, base.ConstMatrix): pass
class MetalView (line 49) | class MetalView(base.View): pass
class MetalXchgView (line 50) | class MetalXchgView(base.XchgView): pass
class MetalXchgMatrix (line 51) | class MetalXchgMatrix(MetalMatrix, base.XchgMatrix): pass
class MetalGraph (line 54) | class MetalGraph(base.Graph):
method __init__ (line 55) | def __init__(self, backend):
method _add_mpi_req (line 61) | def _add_mpi_req(self, req, deps):
method _commit (line 68) | def _commit(self):
method run (line 80) | def run(self, queue):
FILE: pyfr/backends/metal/util.py
function call_ (line 1) | def call_(obj, name_, **kwargs):
function init_ (line 9) | def init_(cls, **kwargs):
FILE: pyfr/backends/opencl/base.py
class OpenCLBackend (line 7) | class OpenCLBackend(BaseBackend):
method __init__ (line 11) | def __init__(self, cfg):
method xfer_buf (line 110) | def xfer_buf(self, shape, dtype):
method platform_id (line 121) | def platform_id(self):
method run_kernels (line 124) | def run_kernels(self, kernels, wait=False):
method run_graph (line 135) | def run_graph(self, graph, wait=False):
method wait (line 143) | def wait(self):
method memory_info (line 146) | def memory_info(self):
method _malloc_impl (line 151) | def _malloc_impl(self, nbytes):
FILE: pyfr/backends/opencl/blasext.py
class OpenCLBlasExtKernels (line 7) | class OpenCLBlasExtKernels(BaseBlasExtKernels, OpenCLKernelProvider):
method batched_inv (line 10) | def batched_inv(self, m):
method _axnpby (line 18) | def _axnpby(self, arr, tplargs):
method copy (line 41) | def copy(self, dst, src):
method zero (line 54) | def zero(self, m):
method _reduction (line 64) | def _reduction(self, fvvar, vvars, svars, tplargs):
FILE: pyfr/backends/opencl/clblast.py
class CLBlastError (line 10) | class CLBlastError(Exception): pass
class CLBlastWrappers (line 13) | class CLBlastWrappers(LibWrapper):
class OpenCLCLBlastKernels (line 40) | class OpenCLCLBlastKernels(OpenCLKernelProvider):
method __init__ (line 41) | def __init__(self, backend):
method mul (line 49) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/opencl/compiler.py
class OpenCLCompiler (line 5) | class OpenCLCompiler:
method __init__ (line 6) | def __init__(self, cl):
method build (line 11) | def build(self, src, flags=[]):
FILE: pyfr/backends/opencl/driver.py
class OpenCLError (line 12) | class OpenCLError(Exception): pass
class OpenCLDeviceNotFound (line 13) | class OpenCLDeviceNotFound(OpenCLError): pass
class OpenCLDeviceNotAvailable (line 14) | class OpenCLDeviceNotAvailable(OpenCLError): pass
class OpenCLAllocationFailure (line 15) | class OpenCLAllocationFailure(OpenCLError): pass
class OpenCLOutOfResources (line 16) | class OpenCLOutOfResources(OpenCLError): pass
class OpenCLBuildProgramFailure (line 17) | class OpenCLBuildProgramFailure(OpenCLError): pass
class OpenCLMisalignedSubBufferOffset (line 18) | class OpenCLMisalignedSubBufferOffset(OpenCLError): pass
class OpenCLDevicePartitioningFailed (line 19) | class OpenCLDevicePartitioningFailed(OpenCLError): pass
class OpenCLInvalidValue (line 20) | class OpenCLInvalidValue(OpenCLError): pass
class OpenCLInvalidKernelName (line 21) | class OpenCLInvalidKernelName(OpenCLError): pass
class OpenCLInvalidKernelArgs (line 22) | class OpenCLInvalidKernelArgs(OpenCLError): pass
class OpenCLInvalidWorkGroupSize (line 23) | class OpenCLInvalidWorkGroupSize(OpenCLError): pass
class OpenCLInvalidWorkItemSize (line 24) | class OpenCLInvalidWorkItemSize(OpenCLError): pass
class OpenCLInvalidGlobalWorkSize (line 25) | class OpenCLInvalidGlobalWorkSize(OpenCLError): pass
class OpenCLWrappers (line 28) | class OpenCLWrappers(LibWrapper):
method __init__ (line 147) | def __init__(self):
method _argerrcheck (line 156) | def _argerrcheck(self, fn):
class _OpenCLBase (line 172) | class _OpenCLBase:
method __init__ (line 175) | def __init__(self, lib, ptr):
method __del__ (line 179) | def __del__(self):
method __int__ (line 186) | def __int__(self):
class _OpenCLWaitFor (line 190) | class _OpenCLWaitFor:
method _make_wait_for (line 191) | def _make_wait_for(self, events):
class OpenCLPlatform (line 208) | class OpenCLPlatform(_OpenCLBase):
method __init__ (line 209) | def __init__(self, lib, ptr):
method get_devices (line 214) | def get_devices(self, devtype='all'):
method _query_str (line 228) | def _query_str(self, param):
class OpenCLDevice (line 240) | class OpenCLDevice(_OpenCLBase):
method __init__ (line 243) | def __init__(self, lib, ptr):
method subdevices (line 263) | def subdevices(self):
method _query_type (line 280) | def _query_type(self, type_t, param, prefix='device'):
method _query_str (line 288) | def _query_str(self, param, prefix='device'):
class OpenCLBuffer (line 300) | class OpenCLBuffer(_OpenCLBase):
method __init__ (line 303) | def __init__(self, lib, ctx, nbytes):
method slice (line 310) | def slice(self, off, nbytes):
class OpenCLSubBuffer (line 314) | class OpenCLSubBuffer(_OpenCLBase):
method __init__ (line 317) | def __init__(self, lib, buf, off, nbytes):
class OpenCLHostAlloc (line 328) | class OpenCLHostAlloc(_OpenCLBase):
method __init__ (line 331) | def __init__(self, lib, ctx, queue, nbytes):
method __del__ (line 344) | def __del__(self):
class OpenCLEvent (line 352) | class OpenCLEvent(_OpenCLBase):
method _profile_param (line 355) | def _profile_param(self, param):
method start_time (line 363) | def start_time(self):
method end_time (line 367) | def end_time(self):
class OpenCLQueue (line 371) | class OpenCLQueue(_OpenCLWaitFor, _OpenCLBase):
method __init__ (line 374) | def __init__(self, lib, ctx, dev, out_of_order, profiling):
method marker (line 390) | def marker(self, wait_for=None):
method barrier (line 398) | def barrier(self, wait_for=None):
method finish (line 403) | def finish(self):
method flush (line 406) | def flush(self):
class OpenCLProgram (line 410) | class OpenCLProgram(_OpenCLBase):
method __init__ (line 413) | def __init__(self, lib, ctx, dev, src, flags):
method get_kernel (line 447) | def get_kernel(self, name, argtypes):
method get_binary (line 451) | def get_binary(self):
class OpenCLKernel (line 464) | class OpenCLKernel(_OpenCLWaitFor, _OpenCLBase):
method __init__ (line 470) | def __init__(self, lib, ptr, argtypes):
method clone (line 478) | def clone(self):
method set_arg (line 482) | def set_arg(self, i, v):
method set_args (line 488) | def set_args(self, *kargs, start=0):
method set_dims (line 492) | def set_dims(self, gs, ls=None):
method exec_async (line 497) | def exec_async(self, queue, wait_for=None, ret_evt=False):
class OpenCL (line 508) | class OpenCL(_OpenCLWaitFor):
method __init__ (line 509) | def __init__(self):
method __del__ (line 513) | def __del__(self):
method get_platforms (line 517) | def get_platforms(self):
method set_device (line 526) | def set_device(self, dev):
method mem_alloc (line 537) | def mem_alloc(self, nbytes):
method pagelocked_empty (line 540) | def pagelocked_empty(self, shape, dtype):
method _get_zero_kernel (line 553) | def _get_zero_kernel(self):
method zero (line 572) | def zero(self, dst, nbytes, queue=None, wait_for=None, ret_evt=False):
method memcpy (line 587) | def memcpy(self, queue, dst, src, nbytes, blocking=False, wait_for=None,
method program (line 612) | def program(self, src, flags=None):
method event (line 615) | def event(self, evt):
method wait_for_events (line 618) | def wait_for_events(self, events):
method queue (line 621) | def queue(self, out_of_order=False, profiling=False):
FILE: pyfr/backends/opencl/generator.py
class OpenCLKernelGenerator (line 4) | class OpenCLKernelGenerator(BaseGPUKernelGenerator):
method _render_spec (line 10) | def _render_spec(self):
FILE: pyfr/backends/opencl/gimmik.py
class OpenCLGiMMiKKernels (line 10) | class OpenCLGiMMiKKernels(OpenCLKernelProvider):
method __init__ (line 11) | def __init__(self, backend):
method mul (line 27) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/opencl/packing.py
class OpenCLPackingKernels (line 6) | class OpenCLPackingKernels(OpenCLKernelProvider):
method _extract_args (line 7) | def _extract_args(self, xmv):
method _packing_kern (line 13) | def _packing_kern(self, type, v, xm):
method pack (line 26) | def pack(self, xmv):
method unpack (line 47) | def unpack(self, xmv):
FILE: pyfr/backends/opencl/provider.py
class OpenCLKernel (line 9) | class OpenCLKernel(Kernel):
method add_to_graph (line 10) | def add_to_graph(self, graph, deps):
class OpenCLOrderedMetaKernel (line 14) | class OpenCLOrderedMetaKernel(BaseOrderedMetaKernel):
method add_to_graph (line 15) | def add_to_graph(self, graph, deps):
method run (line 18) | def run(self, queue, wait_for=None, ret_evt=False):
class OpenCLUnorderedMetaKernel (line 25) | class OpenCLUnorderedMetaKernel(BaseUnorderedMetaKernel):
method add_to_graph (line 26) | def add_to_graph(self, graph, deps):
method run (line 29) | def run(self, queue, wait_for=None, ret_evt=False):
class OpenCLKernelProvider (line 38) | class OpenCLKernelProvider(BaseKernelProvider):
method _benchmark (line 39) | def _benchmark(self, kfunc, nbench=4, nwarmup=1):
method _build_program (line 58) | def _build_program(self, src):
method _build_kernel (line 63) | def _build_kernel(self, name, src, argtypes, argn=[]):
class OpenCLPointwiseKernelProvider (line 69) | class OpenCLPointwiseKernelProvider(OpenCLKernelProvider,
method __init__ (line 71) | def __init__(self, *args, **kwargs):
method _instantiate_kernel (line 84) | def _instantiate_kernel(self, dims, fun, arglst, argm, argv):
FILE: pyfr/backends/opencl/tinytc.py
class TinyTCError (line 11) | class TinyTCError(Exception): pass
class TinyTCWrappers (line 14) | class TinyTCWrappers(LibWrapper):
class OpenCLTinyTCKernels (line 47) | class OpenCLTinyTCKernels(OpenCLKernelProvider):
method __init__ (line 48) | def __init__(self, backend):
method __del__ (line 70) | def __del__(self):
method _get_tall_and_skinny_recipe (line 77) | def _get_tall_and_skinny_recipe(self, stype, n, k):
method _mul (line 89) | def _mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/backends/opencl/types.py
class _OpenCLMatrixCommon (line 8) | class _OpenCLMatrixCommon:
method _as_parameter_ (line 10) | def _as_parameter_(self):
class OpenCLMatrixBase (line 14) | class OpenCLMatrixBase(_OpenCLMatrixCommon, base.MatrixBase):
method onalloc (line 15) | def onalloc(self, basedata, offset):
method _get (line 32) | def _get(self):
method _set (line 44) | def _set(self, ary):
class OpenCLMatrixSlice (line 53) | class OpenCLMatrixSlice(_OpenCLMatrixCommon, base.MatrixSlice):
method data (line 55) | def data(self):
class OpenCLMatrix (line 63) | class OpenCLMatrix(OpenCLMatrixBase, base.Matrix): pass
class OpenCLConstMatrix (line 64) | class OpenCLConstMatrix(OpenCLMatrixBase, base.ConstMatrix): pass
class OpenCLView (line 65) | class OpenCLView(base.View): pass
class OpenCLXchgView (line 66) | class OpenCLXchgView(base.XchgView): pass
class OpenCLXchgMatrix (line 69) | class OpenCLXchgMatrix(OpenCLMatrix, base.XchgMatrix):
method __init__ (line 70) | def __init__(self, backend, dtype, ioshape, initval, extent, tags):
class OpenCLGraph (line 78) | class OpenCLGraph(base.Graph):
method _commit (line 79) | def _commit(self):
method run (line 101) | def run(self, queue):
FILE: pyfr/backends/openmp/base.py
class OpenMPBackend (line 12) | class OpenMPBackend(BaseBackend):
method __init__ (line 16) | def __init__(self, cfg):
method platform_id (line 67) | def platform_id(self):
method run_kernels (line 70) | def run_kernels(self, kernels, wait=False):
method run_graph (line 74) | def run_graph(self, graph, wait=False):
method wait (line 77) | def wait(self):
method lookup (line 81) | def lookup(self):
method krunner (line 88) | def krunner(self):
method _malloc_impl (line 93) | def _malloc_impl(self, nbytes):
FILE: pyfr/backends/openmp/blasext.py
class OpenMPBlasExtKernels (line 7) | class OpenMPBlasExtKernels(BaseBlasExtKernels, OpenMPKernelProvider):
method batched_inv (line 10) | def batched_inv(self, m):
method _axnpby (line 26) | def _axnpby(self, arr, tplargs):
method copy (line 47) | def copy(self, dst, src):
method zero (line 67) | def zero(self, m):
method _reduction (line 84) | def _reduction(self, fvvar, vvars, svars, tplargs):
FILE: pyfr/backends/openmp/compiler.py
class OpenMPCompiler (line 16) | class OpenMPCompiler:
method __init__ (line 19) | def __init__(self, cfg):
method build (line 41) | def build(self, src, *, fast_math=True):
method cc_cmd (line 76) | def cc_cmd(self, srcname, libname, *, fast_math=True):
method cc_option (line 98) | def cc_option(self, opts):
method _cache_loadlib (line 119) | def _cache_loadlib(self, ckey):
method _cache_set_and_loadlib (line 126) | def _cache_set_and_loadlib(self, ckey, lpath):
class OpenMPCompilerModule (line 142) | class OpenMPCompilerModule:
method __init__ (line 143) | def __init__(self, mod):
method function (line 146) | def function(self, name, restype=None, argtypes=None):
FILE: pyfr/backends/openmp/generator.py
class OpenMPKernelGenerator (line 7) | class OpenMPKernelGenerator(BaseKernelGenerator):
method _render_body_preamble_epilogue (line 8) | def _render_body_preamble_epilogue(self, body):
method _render_reduce (line 14) | def _render_reduce(self, va, body, subp, darg):
method _render_staging (line 44) | def _render_staging(self):
method _render_bcol_reduce_init (line 68) | def _render_bcol_reduce_init(self):
method render (line 79) | def render(self):
method ldim_size (line 180) | def ldim_size(self, name, factor=1):
method needs_ldim (line 183) | def needs_ldim(self, arg):
method _displace_arg (line 186) | def _displace_arg(self, arg):
method _render_args (line 210) | def _render_args(self, argn):
FILE: pyfr/backends/openmp/packing.py
class OpenMPPackingKernels (line 7) | class OpenMPPackingKernels(OpenMPKernelProvider):
method _packing_kern (line 8) | def _packing_kern(self, type, v, xm):
method pack (line 20) | def pack(self, xmv):
method unpack (line 28) | def unpack(self, xmv):
FILE: pyfr/backends/openmp/provider.py
class OpenMPKernel (line 13) | class OpenMPKernel(Kernel):
method __init__ (line 14) | def __init__(self, mats=[], views=[], misc=[], kernel=None):
method add_to_graph (line 20) | def add_to_graph(self, graph, dnodes):
method run (line 25) | def run(self):
class _OpenMPMetaKernel (line 29) | class _OpenMPMetaKernel:
method add_to_graph (line 30) | def add_to_graph(self, graph, dnodes):
class OpenMPOrderedMetaKernel (line 37) | class OpenMPOrderedMetaKernel(_OpenMPMetaKernel, BaseOrderedMetaKernel):
class OpenMPUnorderedMetaKernel (line 41) | class OpenMPUnorderedMetaKernel(_OpenMPMetaKernel, BaseUnorderedMetaKern...
class OpenMPRegularRunArgs (line 45) | class OpenMPRegularRunArgs(Structure):
class OpenMPBlockKernelArgs (line 49) | class OpenMPBlockKernelArgs(Structure):
class OpenMPBlockRunArgs (line 57) | class OpenMPBlockRunArgs(Structure):
class _OpenMPKRunArgsUnion (line 66) | class _OpenMPKRunArgsUnion(Union):
class OpenMPKRunArgs (line 70) | class OpenMPKRunArgs(Structure):
class OpenMPKernelFunction (line 78) | class OpenMPKernelFunction:
method __init__ (line 79) | def __init__(self, backend, fun, argcls, argidxs={}):
method runargs (line 91) | def runargs(self):
method arg_off (line 105) | def arg_off(self, i):
method set_argidxs (line 108) | def set_argidxs(self, arg_idxs):
method arg_idx (line 111) | def arg_idx(self, name):
method arg_blocksz (line 114) | def arg_blocksz(self, i):
method subs_off (line 117) | def subs_off(self, i):
method set_arg (line 120) | def set_arg(self, i, v):
method set_args (line 133) | def set_args(self, *args, start=0):
method set_nblocks (line 137) | def set_nblocks(self, nblocks):
method __call__ (line 140) | def __call__(self):
class OpenMPKernelProvider (line 144) | class OpenMPKernelProvider(BaseKernelProvider):
method _get_arg_cls (line 146) | def _get_arg_cls(self, argtypes):
method _build_library (line 153) | def _build_library(self, src):
method _build_function (line 157) | def _build_function(self, name, src, argtypes, restype=None):
method _build_kernel (line 162) | def _build_kernel(self, name, src, argtypes, argnames=[]):
class OpenMPPointwiseKernelProvider (line 172) | class OpenMPPointwiseKernelProvider(OpenMPKernelProvider,
method _instantiate_kernel (line 176) | def _instantiate_kernel(self, dims, fun, arglst, argm, argv):
FILE: pyfr/backends/openmp/types.py
class OpenMPMatrixBase (line 13) | class OpenMPMatrixBase(base.MatrixBase):
method onalloc (line 14) | def onalloc(self, basedata, offset):
method _get (line 33) | def _get(self):
method _set (line 36) | def _set(self, ary):
class OpenMPMatrix (line 40) | class OpenMPMatrix(OpenMPMatrixBase, base.Matrix):
method hdata (line 42) | def hdata(self):
class OpenMPMatrixSlice (line 46) | class OpenMPMatrixSlice(base.MatrixSlice):
method data (line 48) | def data(self):
method _as_parameter_ (line 52) | def _as_parameter_(self):
class OpenMPConstMatrix (line 56) | class OpenMPConstMatrix(OpenMPMatrixBase, base.ConstMatrix): pass
class OpenMPXchgMatrix (line 57) | class OpenMPXchgMatrix(OpenMPMatrix, base.XchgMatrix): pass
class OpenMPXchgView (line 58) | class OpenMPXchgView(base.XchgView): pass
class OpenMPView (line 59) | class OpenMPView(base.View): pass
class OpenMPGraph (line 62) | class OpenMPGraph(base.Graph):
method __init__ (line 63) | def __init__(self, backend):
method _get_kranges (line 70) | def _get_kranges(self):
method _get_nblocks (line 79) | def _get_nblocks(self, idxs):
method _add_mpi_req (line 82) | def _add_mpi_req(self, req, deps):
method _group_splits (line 90) | def _group_splits(self, kerns, kranges):
method _group_subs (line 117) | def _group_subs(self, subs, kranges):
method _group (line 136) | def _group(self, kerns, subs):
method _commit (line 188) | def _commit(self):
method run (line 204) | def run(self):
FILE: pyfr/backends/openmp/xsmm.py
class XSMMWrappers (line 11) | class XSMMWrappers(LibWrapper):
class OpenMPXSMMKernels (line 26) | class OpenMPXSMMKernels(OpenMPKernelProvider):
method __init__ (line 27) | def __init__(self, backend):
method _destroy_kern (line 42) | def _destroy_kern(self, k):
method __del__ (line 50) | def __del__(self):
method mul (line 54) | def mul(self, a, b, out, alpha=1.0, beta=0.0):
FILE: pyfr/cache.py
function memoize (line 12) | def memoize(origfn=None, maxsize=None):
class ObjectCache (line 52) | class ObjectCache:
method __init__ (line 53) | def __init__(self, suffix, *, maxsize=128*1024**2):
method get_path (line 70) | def get_path(self, k):
method get_bytes (line 73) | def get_bytes(self, k):
method set_with_bytes (line 79) | def set_with_bytes(self, k, bytes):
method set_with_path (line 91) | def set_with_path(self, k, fpath):
method _prune_cache (line 101) | def _prune_cache(self, maxsize):
FILE: pyfr/ctypesutil.py
class LibWrapper (line 8) | class LibWrapper:
method __init__ (line 16) | def __init__(self):
method _load_library (line 29) | def _load_library(self):
method _transname (line 32) | def _transname(self, fname):
method _errcheck (line 35) | def _errcheck(self, status, fn, args):
function get_libc_function (line 43) | def get_libc_function(fn):
function load_library (line 52) | def load_library(name, mode=ctypes.DEFAULT_MODE):
function make_array (line 72) | def make_array(vals, type=None):
function platform_libname (line 84) | def platform_libname(name):
function platform_libdirs (line 93) | def platform_libdirs():
FILE: pyfr/inifile.py
function _ensure_float (line 9) | def _ensure_float(m):
function process_expr (line 14) | def process_expr(expr, subs={}):
class Inifile (line 31) | class Inifile:
method __init__ (line 32) | def __init__(self, inistr=None):
method load (line 42) | def load(file):
method set (line 48) | def set(self, section, option, value):
method hasopt (line 57) | def hasopt(self, section, option):
method get (line 60) | def get(self, section, option, default=_sentinel, vars=None):
method getpath (line 78) | def getpath(self, section, option, default=_sentinel, vars=None,
method getexpr (line 87) | def getexpr(self, section, option, default=_sentinel, subs={}):
method getbool (line 93) | def getbool(self, section, option, default=_sentinel):
method getfloat (line 97) | def getfloat(self, section, option, default=_sentinel):
method getint (line 100) | def getint(self, section, option, default=_sentinel):
method getliteral (line 103) | def getliteral(self, section, option, default=_sentinel):
method items (line 106) | def items(self, section, prefix=''):
method items_as (line 109) | def items_as(self, section, type, prefix=''):
method remove_option (line 121) | def remove_option(self, section, option):
method sect_eq (line 124) | def sect_eq(self, other, section):
method sect_diff (line 132) | def sect_diff(self, other, section):
method sections (line 145) | def sections(self):
method rename_section (line 148) | def rename_section(self, sfrom, sto):
method tostr (line 158) | def tostr(self):
FILE: pyfr/integrators/__init__.py
function get_integrator (line 11) | def get_integrator(backend, systemcls, mesh, initsoln, cfg):
FILE: pyfr/integrators/base.py
function _common_plugin_prop (line 22) | def _common_plugin_prop(attr):
function kernel_getter (line 40) | def kernel_getter(fn):
class BaseIntegrator (line 48) | class BaseIntegrator(metaclass=RegisterMeta):
method __init__ (line 49) | def __init__(self, backend, mesh, initsoln, cfg):
method _rhs (line 107) | def _rhs(self, t, uin, uout):
method plugin_abort (line 111) | def plugin_abort(self, reason):
method plugin_end (line 115) | def plugin_end(self):
method fire_trigger (line 118) | def fire_trigger(self, name):
method _get_plugins (line 121) | def _get_plugins(self, initsoln):
method _init_plugin_activated (line 168) | def _init_plugin_activated(self, plugins, initsoln):
method _run_plugins (line 194) | def _run_plugins(self):
method _plugin_should_run (line 231) | def _plugin_should_run(self, plugin):
method _finalise_plugins (line 250) | def _finalise_plugins(self):
method call_plugin_dt (line 254) | def call_plugin_dt(self, tstart, dt):
method _invalidate_caches (line 271) | def _invalidate_caches(self):
method compute_grads (line 277) | def compute_grads(self):
method _advance_time (line 282) | def _advance_time(self, dt):
method _clamp_dt (line 289) | def _clamp_dt(self, dt_want, t):
method step (line 298) | def step(self, t, dt):
method _timed_step (line 301) | def _timed_step(self, t, dt):
method advance_to (line 315) | def advance_to(self, t):
method run (line 318) | def run(self):
method nsteps (line 325) | def nsteps(self):
method collect_stats (line 328) | def collect_stats(self, stats):
method cfgmeta (line 370) | def cfgmeta(self):
method _check_abort (line 383) | def _check_abort(self):
method _get_gndofs (line 392) | def _get_gndofs(self):
method _get_add_kerns (line 402) | def _get_add_kerns(self, emats, *rs, in_scale=(), in_scale_idxs=(),
method _addv (line 408) | def _addv(self, consts, regidxs, in_scale=(), in_scale_idxs=(),
method _add (line 425) | def _add(self, *args, in_scale=(), in_scale_idxs=(), out_scale=()):
method _size_register (line 428) | def _size_register(self, reg, n):
method _assign_registers (line 442) | def _assign_registers(self):
method _nregs (line 460) | def _nregs(self):
FILE: pyfr/integrators/controllers.py
class CFLControllerMixin (line 7) | class CFLControllerMixin:
method __init__ (line 13) | def __init__(self, *args, **kwargs):
method _compute_dt_cfl (line 22) | def _compute_dt_cfl(self, uinbank):
method advance_to (line 28) | def advance_to(self, t):
class PIControllerMixin (line 43) | class PIControllerMixin:
method _init_pi_controller (line 49) | def _init_pi_controller(self):
method _errest (line 87) | def _errest(self, rcurr, rerr):
method _get_errest_kerns (line 105) | def _get_errest_kerns(self, emats, rcurr, rerr, *, norm):
FILE: pyfr/integrators/explicit/base.py
class BaseExplicitIntegrator (line 6) | class BaseExplicitIntegrator(BaseIntegrator):
method __init__ (line 9) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method soln (line 45) | def soln(self):
method grad_soln (line 50) | def grad_soln(self):
method dt_soln (line 56) | def dt_soln(self):
FILE: pyfr/integrators/explicit/controllers.py
class BaseExplicitController (line 6) | class BaseExplicitController(BaseExplicitIntegrator):
method __init__ (line 7) | def __init__(self, *args, **kwargs):
method _accept_step (line 17) | def _accept_step(self, dt, idxcurr, wtime, err=None):
method _reject_step (line 32) | def _reject_step(self, dt, idxold, wtime, err=None):
class ExplicitNoneController (line 42) | class ExplicitNoneController(BaseExplicitController):
method advance_to (line 48) | def advance_to(self, t):
class ExplicitCFLController (line 63) | class ExplicitCFLController(CFLControllerMixin, BaseExplicitController):
class ExplicitPIController (line 67) | class ExplicitPIController(PIControllerMixin, BaseExplicitController):
method __init__ (line 68) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method advance_to (line 90) | def advance_to(self, t):
FILE: pyfr/integrators/explicit/steppers.py
class BaseExplicitStepper (line 7) | class BaseExplicitStepper(BaseExplicitIntegrator):
class ExplicitEulerStepper (line 11) | class ExplicitEulerStepper(BaseExplicitStepper):
method step (line 19) | def step(self, t, dt):
class TVDRK3Stepper (line 26) | class TVDRK3Stepper(BaseExplicitStepper):
method step (line 33) | def step(self, t, dt):
class RK4Stepper (line 60) | class RK4Stepper(BaseExplicitStepper):
method step (line 67) | def step(self, t, dt):
class RKVdH2RStepper (line 111) | class RKVdH2RStepper(BaseExplicitStepper):
method __init__ (line 119) | def __init__(self, *args, **kwargs):
method _get_rkvdh2_kerns (line 136) | def _get_rkvdh2_kerns(self, stage, r1, r2, rold=None, rerr=None):
method stepper_has_errest (line 162) | def stepper_has_errest(self):
method step (line 165) | def step(self, t, dt):
class RK34Stepper (line 193) | class RK34Stepper(RKVdH2RStepper):
class RK45Stepper (line 218) | class RK45Stepper(RKVdH2RStepper):
FILE: pyfr/integrators/implicit/base.py
class BaseImplicitIntegrator (line 6) | class BaseImplicitIntegrator(BaseIntegrator):
method __init__ (line 9) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method _pre_commit (line 43) | def _pre_commit(self):
method soln (line 47) | def soln(self):
method grad_soln (line 51) | def grad_soln(self):
method dt_soln (line 56) | def dt_soln(self):
method _norm2 (line 68) | def _norm2(self, r, *, weights=(), norm_gndofs=False):
method _get_norm2_kerns (line 82) | def _get_norm2_kerns(self, emats, x, *, weights=()):
method _dot (line 88) | def _dot(self, a, b):
method _get_dot_kerns (line 100) | def _get_dot_kerns(self, emats, a, b):
method _multidot (line 104) | def _multidot(self, a, b0, *bn):
method _get_multidot_kerns (line 116) | def _get_multidot_kerns(self, emats, a, *bn):
FILE: pyfr/integrators/implicit/controllers.py
class ThroughputLimitMixin (line 10) | class ThroughputLimitMixin:
method _init_tput_limit (line 17) | def _init_tput_limit(self, sect, initsoln):
method _reset_tput (line 35) | def _reset_tput(self, dt):
method _check_expand_bounds (line 56) | def _check_expand_bounds(self, best_dt):
method _throughput_limit (line 79) | def _throughput_limit(self, dt, wtime, fac):
method _update_tput (line 109) | def _update_tput(self, dt, med_tput, med_fac):
class BaseImplicitController (line 163) | class BaseImplicitController(BaseImplicitIntegrator):
method __init__ (line 164) | def __init__(self, *args, **kwargs):
method _accept_step (line 175) | def _accept_step(self, dt, idxcurr, wtime, err=None):
method _reject_step (line 193) | def _reject_step(self, dt, idxold, wtime, err=None):
class ImplicitNoneController (line 206) | class ImplicitNoneController(BaseImplicitController):
method advance_to (line 212) | def advance_to(self, t):
class ImplicitPIController (line 227) | class ImplicitPIController(ThroughputLimitMixin, PIControllerMixin,
method __init__ (line 229) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method advance_to (line 252) | def advance_to(self, t):
class ImplicitCFLController (line 287) | class ImplicitCFLController(CFLControllerMixin, BaseImplicitController):
class ImplicitThroughputController (line 291) | class ImplicitThroughputController(ThroughputLimitMixin,
method __init__ (line 298) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method _init_dt (line 312) | def _init_dt(self, initsoln):
method _adapt_dt (line 320) | def _adapt_dt(self, dt, wtime):
method advance_to (line 326) | def advance_to(self, t):
FILE: pyfr/integrators/implicit/gmres.py
class GMRESMixin (line 8) | class GMRESMixin(BaseKrylovSolver):
method __init__ (line 12) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method _reset_gmres_arrays (line 45) | def _reset_gmres_arrays(self):
method _arnoldi_cgs (line 51) | def _arnoldi_cgs(self, w_reg, v, H, j):
method _arnoldi_mgs (line 56) | def _arnoldi_mgs(self, w_reg, v, H, j):
method _compute_givens (line 61) | def _compute_givens(self, h_jj, h_jp1_j):
method _apply_givens (line 68) | def _apply_givens(self, H, beta, cs, sn, j):
method _krylov_solve (line 81) | def _krylov_solve(self, matvec, residual, out_reg, precond_apply=None,
FILE: pyfr/integrators/implicit/kernels/__init__.py
function get_integrator (line 7) | def get_integrator(backend, systemcls, mesh, initsoln, cfg):
FILE: pyfr/integrators/implicit/krylov.py
class BaseKrylovSolver (line 9) | class BaseKrylovSolver(BaseImplicitIntegrator):
method __init__ (line 13) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method _init_precond (line 36) | def _init_precond(self):
method _get_precond_perturb_extract_kerns (line 66) | def _get_precond_perturb_extract_kerns(self, u_reg, up_reg, f0_reg, eps,
method _get_precond_scale_inv_kerns (line 93) | def _get_precond_scale_inv_kerns(self, u_reg):
method _compute_precond (line 108) | def _compute_precond(self, t, u_reg, gamma_dt, rhs_fn, f0_reg, up_reg,
method _apply_precond (line 168) | def _apply_precond(self, in_reg, out_reg, in_scale=(), out_scale=()):
method _get_precond_kerns (line 175) | def _get_precond_kerns(self, emats, in_reg, out_reg, *, in_scale,
FILE: pyfr/integrators/implicit/newton.py
class NewtonDivergenceError (line 14) | class NewtonDivergenceError(Exception):
class NewtonSolver (line 18) | class NewtonSolver(BaseKrylovSolver):
method __init__ (line 23) | def __init__(self, backend, systemcls, mesh, initsoln, cfg):
method _calc_rnorm (line 67) | def _calc_rnorm(self, r):
method _jfnk_matvec (line 71) | def _jfnk_matvec(self, t, u, f, gamma_dt, eps, v_s, result):
method _line_search (line 79) | def _line_search(self, t, u_reg, f_reg, delta_reg, residual_fn, rnorm_...
method _newton_iterate (line 105) | def _newton_iterate(self, t, u_reg, f_reg, gamma_dt, residual_fn,
method _newton_stage_solve (line 174) | def _newton_stage_solve(self, t, u_reg, f_reg, residual_fn,
FILE: pyfr/integrators/implicit/steppers.py
class BaseImplicitStepper (line 9) | class BaseImplicitStepper(BaseImplicitIntegrator):
class BaseSDIRKStepper (line 13) | class BaseSDIRKStepper(BaseImplicitStepper, NewtonSolver):
method __init__ (line 25) | def __init__(self, *args, **kwargs):
method stepper_has_errest (line 44) | def stepper_has_errest(self):
method _compute_guess_weights (line 47) | def _compute_guess_weights(self):
method _compute_stage_residual (line 66) | def _compute_stage_residual(self, u_n, r_f_prev, u_i, f_i, dt, result):
method _compute_stage_initial_guess (line 74) | def _compute_stage_initial_guess(self, stage, u_n, f_prev_list, dt,
method step (line 95) | def step(self, t, dt):
method _compute_error_estimate (line 144) | def _compute_error_estimate(self, dt, r_f):
class ImplicitEulerStepper (line 153) | class ImplicitEulerStepper(BaseSDIRKStepper):
class TrapeziumStepper (line 161) | class TrapeziumStepper(BaseSDIRKStepper):
class TRBDF2Stepper (line 171) | class TRBDF2Stepper(BaseSDIRKStepper):
class Kvaerno43Stepper (line 184) | class Kvaerno43Stepper(BaseSDIRKStepper):
FILE: pyfr/integrators/implicit/tolerance.py
function get_krylov_tol_controller (line 7) | def get_krylov_tol_controller(cfg, serialiser, initsoln):
class BaseToleranceController (line 15) | class BaseToleranceController:
method update (line 20) | def update(self, wall_time, gamma_dt, success):
method reset (line 23) | def reset(self):
method soft_reset (line 26) | def soft_reset(self):
class NullToleranceController (line 30) | class NullToleranceController(BaseToleranceController):
method __init__ (line 33) | def __init__(self, cfg, serialiser, initsoln):
method select_tolerance (line 37) | def select_tolerance(self):
class BaseProbeController (line 41) | class BaseProbeController(BaseToleranceController):
method __init__ (line 42) | def __init__(self, cfg, serialiser, initsoln):
method _abort_probe (line 54) | def _abort_probe(self):
method _start_probe (line 59) | def _start_probe(self, tol):
method update (line 65) | def update(self, wall_time, gamma_dt, success):
method select_tolerance (line 89) | def select_tolerance(self):
class WindowedGPController (line 101) | class WindowedGPController(BaseProbeController):
method __init__ (line 106) | def __init__(self, cfg, serialiser, initsoln):
method settled (line 140) | def settled(self):
method _finalize_probe (line 143) | def _finalize_probe(self):
method _next_probe (line 186) | def _next_probe(self):
method reset (line 207) | def reset(self):
method soft_reset (line 216) | def soft_reset(self):
class ListController (line 225) | class ListController(BaseProbeController):
method __init__ (line 228) | def __init__(self, cfg, serialiser, initsoln):
method settled (line 245) | def settled(self):
method _finalize_probe (line 248) | def _finalize_probe(self):
method _next_probe (line 261) | def _next_probe(self):
method reset (line 274) | def reset(self):
method soft_reset (line 282) | def soft_reset(self):
FILE: pyfr/integrators/registers.py
class BaseRegister (line 1) | class BaseRegister:
class ScalarRegister (line 5) | class ScalarRegister(BaseRegister):
method __init__ (line 9) | def __init__(self, *, n=1, rhs=True, extent=None):
class DynamicScalarRegister (line 15) | class DynamicScalarRegister(BaseRegister):
method __init__ (line 19) | def __init__(self, *, rhs=True, extent=None):
class VectorRegister (line 25) | class VectorRegister(BaseRegister):
method __init__ (line 29) | def __init__(self, *, n, rhs=True, extent=None):
class DynamicVectorRegister (line 35) | class DynamicVectorRegister(BaseRegister):
method __init__ (line 39) | def __init__(self, *, rhs=True, extent=None):
class RegisterMeta (line 45) | class RegisterMeta(type):
method __new__ (line 46) | def __new__(mcls, name, bases, namespace):
FILE: pyfr/mpiutil.py
function init_mpi (line 13) | def init_mpi():
function autofree (line 67) | def autofree(obj):
function get_comm_rank_root (line 75) | def get_comm_rank_root():
function get_local_rank (line 82) | def get_local_rank():
function scal_coll (line 99) | def scal_coll(colfn, v, *args, **kwargs):
function home_rank (line 106) | def home_rank(gidxs, size):
function get_start_end_csize (line 111) | def get_start_end_csize(comm, n):
class AlltoallMixin (line 121) | class AlltoallMixin:
method _count_to_disp (line 123) | def _count_to_disp(count):
method _disp_to_count (line 130) | def _disp_to_count(disp, n):
method _get_mpi_dtype (line 134) | def _get_mpi_dtype(self, np_dtype, shape):
method _alltoallv_bufs (line 146) | def _alltoallv_bufs(self, sbuf, rbuf):
method _alltoallv (line 155) | def _alltoallv(self, comm, sbuf, rbuf):
method _alltoallv_init (line 158) | def _alltoallv_init(self, comm, sbuf, rbuf):
method _alltoallcv (line 161) | def _alltoallcv(self, comm, svals, scount, sdisps=None):
class DistributedDirectory (line 178) | class DistributedDirectory(AlltoallMixin):
method __init__ (line 179) | def __init__(self, comm, keys):
method lookup (line 199) | def lookup(self, keys):
class AlltoallFuture (line 223) | class AlltoallFuture:
method __init__ (line 224) | def __init__(self, parent, nsend, nrecv, shape, dtype, scountdisps,
method start (line 238) | def start(self, dset):
method test (line 243) | def test(self):
method wait (line 246) | def wait(self):
class BaseGathererScatterer (line 251) | class BaseGathererScatterer(AlltoallMixin):
method __init__ (line 252) | def __init__(self, comm, aidx):
class Scatterer (line 277) | class Scatterer(BaseGathererScatterer):
method __init__ (line 278) | def __init__(self, comm, idx):
method _prepare_sendbuf (line 289) | def _prepare_sendbuf(self, dset, out):
method future (line 292) | def future(self, shape, dtype):
method __call__ (line 296) | def __call__(self, dset):
class Gatherer (line 300) | class Gatherer(BaseGathererScatterer):
method __init__ (line 301) | def __init__(self, comm, idx):
method _prepare_sendbuf (line 324) | def _prepare_sendbuf(self, dset, out):
method future (line 327) | def future(self, shape, dtype):
method __call__ (line 331) | def __call__(self, dset):
class SparseScatterer (line 335) | class SparseScatterer(AlltoallMixin):
method __init__ (line 336) | def __init__(self, comm, iset, aidx):
method _prepare_sendbuf (line 381) | def _prepare_sendbuf(self, dset, out):
method future (line 384) | def future(self, shape, dtype):
method __call__ (line 388) | def __call__(self, dset):
class Sorter (line 392) | class Sorter(AlltoallMixin):
method __init__ (line 399) | def __init__(self, comm, keys):
method _transform_keys (line 425) | def _transform_keys(self, skeys):
method _splitters (line 444) | def _splitters(self, skeys, r):
method __call__ (line 487) | def __call__(self, svals):
method argidx (line 502) | def argidx(self):
class _MPI_Funcs (line 512) | class _MPI_Funcs:
method __init__ (line 513) | def __init__(self):
method __getattr__ (line 518) | def __getattr__(self, attr):
class _MPI (line 523) | class _MPI:
method __init__ (line 524) | def __init__(self):
method addrof (line 527) | def addrof(self, obj):
method __getattr__ (line 532) | def __getattr__(self, attr):
FILE: pyfr/nputil.py
function block_diag (line 10) | def block_diag(arrs):
function clean (line 23) | def clean(origfn=None, tol=1e-10, ckwarg='clean'):
function morton_encode (line 60) | def morton_encode(ipts, imax, dtype=np.uint64):
function npeval (line 103) | def npeval(expr, locals):
function fuzzysort (line 120) | def fuzzysort(arr, idx, dim=0, tol=1e-6):
function _batched_fuzzysort_rec (line 139) | def _batched_fuzzysort_rec(coords, perm, dim, s, e, ndims, tol):
function batched_fuzzysort (line 168) | def batched_fuzzysort(coords, tol=1e-6):
function iter_struct (line 184) | def iter_struct(arr, n=1000, axis=0):
function npdtype_to_ctype (line 196) | def npdtype_to_ctype(dtype):
function npdtype_to_ctypestype (line 207) | def npdtype_to_ctypestype(dtype):
class GPOptimiser (line 215) | class GPOptimiser:
method __init__ (line 219) | def __init__(self, wsize, x_bounds):
method reset (line 227) | def reset(self, x_bounds=None):
method record (line 233) | def record(self, x, y, noise_var=None):
method update (line 243) | def update(self, x, y, noise_var=None, tol=0.05):
method _norm_cdf (line 256) | def _norm_cdf(self, z):
method _norm_pdf (line 259) | def _norm_pdf(self, z):
method _fit (line 262) | def _fit(self):
method optimum (line 283) | def optimum(self, minimise=True, explore=False):
class LogGPOptimiser (line 304) | class LogGPOptimiser(GPOptimiser):
method __init__ (line 305) | def __init__(self, wsize, x_bounds):
method record (line 308) | def record(self, x, y, noise_var=None):
method update (line 311) | def update(self, x, y, noise_var=None, tol=0.05):
method optimum (line 314) | def optimum(self, minimise=True, explore=False):
method reset (line 318) | def reset(self, x_bounds=None):
FILE: pyfr/partitioners/__init__.py
function get_partitioner (line 10) | def get_partitioner(name, *args, **kwargs):
FILE: pyfr/partitioners/base.py
function write_partitioning (line 13) | def write_partitioning(mesh, pname, pinfo):
class BasePartitioner (line 28) | class BasePartitioner:
method __init__ (line 29) | def __init__(self, partwts, elewts='balanced', tagwts={}, opts={}):
method construct_global_con (line 58) | def construct_global_con(mesh):
method _get_elewts_fn (line 114) | def _get_elewts_fn(self, edisps, etags, tagwts):
method _construct_graph (line 165) | def _construct_graph(con, elewts_fn, exwts={}):
method _partition_graph (line 196) | def _partition_graph(self, graph, partwts):
method _group_periodic_eles (line 200) | def _group_periodic_eles(mesh, con, cdisps, elewts_fn):
method _ungroup_periodic_eles (line 257) | def _ungroup_periodic_eles(pmerge, vemap, vparts):
method _analyse_parts (line 269) | def _analyse_parts(nparts, con, vparts):
method construct_partitioning (line 301) | def construct_partitioning(cls, mesh, ecurved, edisps, con, vparts):
method _resolve_tag_weights (line 342) | def _resolve_tag_weights(self, mesh):
method partition (line 363) | def partition(self, mesh, progress=NullProgressSequence()):
FILE: pyfr/partitioners/baseline.py
class BaselinePartitioner (line 7) | class BaselinePartitioner(BasePartitioner):
method _wbincount (line 27) | def _wbincount(keys, vwts, n):
method _targets (line 36) | def _targets(partwts, vwts):
method _bounds (line 42) | def _bounds(self, partwts, vwts):
method _boundary_gains (line 50) | def _boundary_gains(rows, parts, boundary, nv=0):
method _best_dest (line 62) | def _best_dest(row, src):
method _can_move (line 70) | def _can_move(part_wts, src, dst, vw, upper, lower):
method _rollback_moves (line 75) | def _rollback_moves(parts, vtab, etab, nbr_cnt, moves, best_idx):
method __init__ (line 82) | def __init__(self, *args, **kwargs):
method _partition_graph (line 87) | def _partition_graph(self, graph, partwts):
method _multilevel_kway (line 107) | def _multilevel_kway(self, vtab, etab, vwts, partwts, edge_src):
method _greedy_kway (line 227) | def _greedy_kway(self, vtab, etab, vwts, partwts, edge_src):
method _rb_kway (line 256) | def _rb_kway(self, vtab, etab, vwts, partwts):
method _pick_seeds (line 297) | def _pick_seeds(self, vtab, etab, k, attempt=0):
method _grow_kway (line 325) | def _grow_kway(self, vtab, etab, vwts, targets, seeds):
method _extract_subgraph (line 414) | def _extract_subgraph(self, vidx, vtab, etab):
method _coarsen (line 450) | def _coarsen(self, vtab, etab, ewts, vwts, edge_src):
method _heavy_edge_match (line 506) | def _heavy_edge_match(self, vtab, etab, edge_src, ewts=None):
method _bisect (line 611) | def _bisect(self, vtab, etab, vwts, target_ratio):
method _bisect_balance (line 668) | def _bisect_balance(self, parts, vwts, partwts):
method _bisect_ggp (line 743) | def _bisect_ggp(self, start, vtab, etab, vwts, target_wt):
method _bfs (line 781) | def _bfs(self, start, vtab, etab):
method _greedy_refine (line 817) | def _greedy_refine(self, parts, vtab, etab, vwts, partwts, edge_src):
method _mc_greedy_pass (line 869) | def _mc_greedy_pass(self, parts, vtab, etab, vwts, nbr_cnt, bm, ubvec,
method _refine_kway (line 935) | def _refine_kway(self, parts, vtab, etab, vwts, partwts, edge_src,
method _fm_pass_edge_cut (line 996) | def _fm_pass_edge_cut(self, parts, vtab, etab, vwts, nbr_cnt, upper, l...
FILE: pyfr/partitioners/kahip.py
class KaHIPWrappers (line 9) | class KaHIPWrappers(LibWrapper):
method _load_library (line 12) | def _load_library(self):
method _functions (line 25) | def _functions(self):
class KaHIPPartitioner (line 34) | class KaHIPPartitioner(BasePartitioner):
method __init__ (line 53) | def __init__(self, *args, **kwargs):
method _partition_graph (line 59) | def _partition_graph(self, graph, partwts):
FILE: pyfr/partitioners/metis.py
class METISError (line 12) | class METISError(Exception): pass
class METISErrorInput (line 13) | class METISErrorInput(METISError): pass
class METISErrorMemory (line 14) | class METISErrorMemory(METISError): pass
class METISWrappers (line 17) | class METISWrappers(LibWrapper):
method _load_library (line 44) | def _load_library(self):
method _functions (line 88) | def _functions(self):
class METISPartitioner (line 102) | class METISPartitioner(BasePartitioner):
method __init__ (line 122) | def __init__(self, *args, **kwargs):
method _partition_graph (line 128) | def _partition_graph(self, graph, partwts):
FILE: pyfr/partitioners/reconstruct.py
function reconstruct_partitioning (line 11) | def reconstruct_partitioning(mesh, soln, progress=NullProgressSequence()):
FILE: pyfr/partitioners/scotch.py
class SCOTCHError (line 10) | class SCOTCHError(Exception): pass
class SCOTCHWrappers (line 13) | class SCOTCHWrappers(LibWrapper):
method _load_library (line 30) | def _load_library(self):
method _functions (line 43) | def _functions(self):
class SCOTCHPartitioner (line 71) | class SCOTCHPartitioner(BasePartitioner):
method __init__ (line 87) | def __init__(self, *args, **kwargs):
method _partition_graph (line 93) | def _partition_graph(self, graph, partwts):
FILE: pyfr/plugins/__init__.py
function get_plugin (line 19) | def get_plugin(prefix, name, *args, **kwargs):
FILE: pyfr/plugins/ascent.py
class AscentError (line 20) | class AscentError(Exception): pass
class ConduitError (line 21) | class ConduitError(Exception): pass
class ConduitWrappers (line 24) | class ConduitWrappers(LibWrapper):
method __init__ (line 50) | def __init__(self, *args, **kwargs):
method _errcheck (line 57) | def _errcheck(self, status, fn, args):
class ConduitNode (line 64) | class ConduitNode:
method __init__ (line 65) | def __init__(self, lib, ptr=None, child=False):
method __del__ (line 70) | def __del__(self):
method __setitem__ (line 74) | def __setitem__(self, key, value):
method append (line 102) | def append(self):
class AscentWrappers (line 107) | class AscentWrappers(LibWrapper):
class _IntegratorAdapter (line 120) | class _IntegratorAdapter:
method __init__ (line 121) | def __init__(self, intg, cfgsect):
method ndims (line 127) | def ndims(self):
method etypes (line 131) | def etypes(self):
method mesh_uuid (line 135) | def mesh_uuid(self):
method elementscls (line 139) | def elementscls(self):
method eidx (line 142) | def eidx(self, etype):
method dtype (line 146) | def dtype(self):
method region_data (line 150) | def region_data(self):
method soln_op_vpts (line 153) | def soln_op_vpts(self, ename, divisor):
method tcurr (line 164) | def tcurr(self):
method soln (line 168) | def soln(self):
method grad_soln (line 172) | def grad_soln(self):
class _CLIAdapter (line 176) | class _CLIAdapter:
method __init__ (line 177) | def __init__(self, mesh, soln, acfg, acfgsect):
method ndims (line 187) | def ndims(self):
method etypes (line 191) | def etypes(self):
method mesh_uuid (line 195) | def mesh_uuid(self):
method elementscls (line 199) | def elementscls(self):
method dtype (line 206) | def dtype(self):
method region_data (line 210) | def region_data(self):
method soln_op_vpts (line 213) | def soln_op_vpts(self, ename, divisor):
method tcurr (line 229) | def tcurr(self):
method soln (line 234) | def soln(self):
method grad_soln (line 238) | def grad_soln(self):
class _AscentRenderer (line 242) | class _AscentRenderer:
method __init__ (line 250) | def __init__(self, adapter, isrestart):
method __del__ (line 294) | def __del__(self):
method _build_blueprint (line 298) | def _build_blueprint(self, adapter, domid, etype, rgn, divisor):
method _init_ascent (line 358) | def _init_ascent(self, adapter):
method _init_fields (line 383) | def _init_fields(self, adapter, cfgsect):
method _init_gradients (line 396) | def _init_gradients(self, adapter):
method _init_pipelines (line 405) | def _init_pipelines(self, adapter, cfgsect):
method _init_scenes (line 433) | def _init_scenes(self, adapter, cfgsect):
method _eval_exprs (line 458) | def _eval_exprs(self, adapter):
method _render_options (line 511) | def _render_options(self, path, opts):
method render (line 521) | def render(self, adapter):
class AscentPlugin (line 537) | class AscentPlugin(BaseSolnPlugin):
method __init__ (line 542) | def __init__(self, intg, cfgsect, suffix=None):
method __call__ (line 548) | def __call__(self, intg):
class AscentCLIPlugin (line 552) | class AscentCLIPlugin(BaseCLIPlugin):
method add_cli (line 556) | def add_cli(cls, parser):
method render_cli (line 569) | def render_cli(self, args):
FILE: pyfr/plugins/base.py
function cli_external (line 19) | def cli_external(meth):
function init_csv (line 27) | def init_csv(cfg, cfgsect, header, *, filekey='file', headerkey='header',
function open_hdf5_a (line 38) | def open_hdf5_a(path):
function region_data (line 54) | def region_data(cfg, cfgsect, mesh, *, rtype=None):
function surface_data (line 95) | def surface_data(cfg, cfgsect, mesh):
class BasePlugin (line 123) | class BasePlugin:
method __init__ (line 136) | def __init__(self, intg, cfgsect, suffix=None):
method __call__ (line 162) | def __call__(self, intg):
method trigger_write (line 165) | def trigger_write(self, intg):
method finalise (line 168) | def finalise(self, intg):
method setup (line 171) | def setup(self, sdata, prevcfg, serialiser):
class PublishMixin (line 175) | class PublishMixin:
method __init__ (line 176) | def __init__(self, *args, **kwargs):
method _publish (line 184) | def _publish(self, intg, **values):
class BaseSolnPlugin (line 190) | class BaseSolnPlugin(BasePlugin):
method __init__ (line 193) | def __init__(self, intg, cfgsect, suffix=None):
class BaseSolverPlugin (line 223) | class BaseSolverPlugin(BasePlugin):
method __init__ (line 226) | def __init__(self, *args, **kwargs):
method _update_extern_values (line 233) | def _update_extern_values(self):
method _register_externs (line 236) | def _register_externs(self, intg, names, spec='scalar fpdtype_t'):
method _extern_callback (line 245) | def _extern_callback(self, kern):
method bind_externs (line 249) | def bind_externs(self):
class BaseCLIPlugin (line 254) | class BaseCLIPlugin:
method add_cli (line 258) | def add_cli(cls, parser):
class BackendMixin (line 262) | class BackendMixin:
method _init_backend (line 263) | def _init_backend(self, intg):
method _make_view (line 270) | def _make_view(self, mat, eidxs, vshape):
class PostactionMixin (line 278) | class PostactionMixin:
method __init__ (line 279) | def __init__(self, *args, **kwargs):
method finalise (line 294) | def finalise(self, intg):
method _invoke_postaction (line 300) | def _invoke_postaction(self, intg, **kwargs):
class RegionMixin (line 320) | class RegionMixin:
method __init__ (line 321) | def __init__(self, intg, *args, **kwargs):
class SurfaceRegionMixin (line 338) | class SurfaceRegionMixin:
method _surf_region (line 339) | def _surf_region(self, intg):
class DatasetAppender (line 351) | class DatasetAppender:
method __init__ (line 352) | def __init__(self, dset, flush=None, swmr=True):
method __del__ (line 362) | def __del__(self):
method __call__ (line 365) | def __call__(self, v):
method flush (line 372) | def flush(self):
FILE: pyfr/plugins/dtstats.py
class DtStatsPlugin (line 5) | class DtStatsPlugin(BaseSolnPlugin):
method __init__ (line 10) | def __init__(self, intg, cfgsect, prefix):
method __call__ (line 33) | def __call__(self, intg):
FILE: pyfr/plugins/fieldeval.py
function compile_expr (line 12) | def compile_expr(expr, privars, ndims):
class BackendFieldReducer (line 25) | class BackendFieldReducer:
method __init__ (line 26) | def __init__(self, backend, cfg, cfgsect, intg, exprs, reduceop):
method _get_quad_interp (line 76) | def _get_quad_interp(self, ename, eles):
method _get_wts_mask (line 100) | def _get_wts_mask(self, eles, r):
method _alloc_etype_mats (line 120) | def _alloc_etype_mats(self, eles, nqpts, m0, wts_np, mask_np, ploc_np):
method _prepare_etype (line 166) | def _prepare_etype(self, eidx, ename, eles):
method total_volume (line 175) | def total_volume(self):
method _get_kerns (line 179) | def _get_kerns(self, uidx):
method __call__ (line 223) | def __call__(self, intg):
FILE: pyfr/plugins/fluidforce.py
class FluidForceIntegrator (line 10) | class FluidForceIntegrator(SurfaceIntegrator):
method __init__ (line 11) | def __init__(self, cfg, cfgsect, system, bcname, morigin):
class FluidForcePlugin (line 21) | class FluidForcePlugin(PublishMixin, BackendMixin, BaseSolnPlugin):
method __init__ (line 26) | def __init__(self, intg, cfgsect, suffix):
method _header (line 80) | def _header(self):
method _init_csv (line 91) | def _init_csv(self):
method _write_csv (line 95) | def _write_csv(self, t, forces):
method _init_hdf5 (line 98) | def _init_hdf5(self):
method _write_hdf5 (line 117) | def _write_hdf5(self, t, forces):
method _init_kernels (line 120) | def _init_kernels(self, intg):
method _get_kerns (line 155) | def _get_kerns(self, uidx):
method __call__ (line 187) | def __call__(self, intg):
FILE: pyfr/plugins/fwh.py
class FWHIntegrator (line 18) | class FWHIntegrator(SurfaceIntegrator):
method __init__ (line 19) | def __init__(self, cfg, cfgsect, ndims, obsv_pts, qinf, elemap, con):
method _distances (line 42) | def _distances(self, surf_pts, Minf):
class FWHPlugin (line 65) | class FWHPlugin(SurfaceRegionMixin, BaseSolnPlugin):
method __init__ (line 70) | def __init__(self, intg, cfgsect, suffix=None, *args, **kwargs):
method _enforce_noslip_bc (line 117) | def _enforce_noslip_bc(self, pris):
method _fwh_solve (line 125) | def _fwh_solve(self, intg):
method __call__ (line 189) | def __call__(self, intg):
FILE: pyfr/plugins/integrate.py
class IntegratePlugin (line 7) | class IntegratePlugin(PublishMixin, BackendMixin, BaseSolnPlugin):
method __init__ (line 12) | def __init__(self, intg, cfgsect, suffix=None):
method __call__ (line 58) | def __call__(self, intg):
FILE: pyfr/plugins/mesh.py
function _compute_metrics (line 26) | def _compute_metrics(ele):
function _find_worst (line 65) | def _find_worst(arr, ploc, eidxs, n=10, minimise=True):
function _print_worst_table (line 73) | def _print_worst_table(worst, title, col):
function _render_histogram (line 90) | def _render_histogram(values=None, bins=10, width=30, highlight_min=False,
function _format_stats (line 140) | def _format_stats(arr, name, highlight_min=False):
class _MeshAnalyser (line 160) | class _MeshAnalyser:
method __init__ (line 161) | def __init__(self, mesh, elementscls, basismap, cfg, jac_thresh,
method _compute_nsr (line 224) | def _compute_nsr(self):
method _reduce_nsr (line 256) | def _reduce_nsr(self, nsr):
method _gather_worst (line 278) | def _gather_worst(self, get_arr, n, minimise=True):
method reduce (line 300) | def reduce(self, n_worst=0):
method output_text (line 330) | def output_text(self, n_worst):
method output_json (line 441) | def output_json(self):
method export (line 494) | def export(self, path):
class MeshCLIPlugin (line 541) | class MeshCLIPlugin(BaseCLIPlugin):
method add_cli (line 545) | def add_cli(cls, parser):
method process_cmd (line 568) | def process_cmd(self, args):
FILE: pyfr/plugins/nancheck.py
class NaNCheckPlugin (line 8) | class NaNCheckPlugin(BaseSolnPlugin):
method __init__ (line 13) | def __init__(self, intg, cfgsect, suffix=None):
method _sum_kerns (line 20) | def _sum_kerns(self, idx):
method __call__ (line 24) | def __call__(self, intg):
FILE: pyfr/plugins/residual.py
class ResidualPlugin (line 8) | class ResidualPlugin(PublishMixin, BaseSolnPlugin):
method __init__ (line 13) | def __init__(self, intg, cfgsect, suffix):
method __call__ (line 40) | def __call__(self, intg):
FILE: pyfr/plugins/sampler.py
function _read_pts (line 20) | def _read_pts(ptsf, ndims=None, skip=0):
function _process_con_to_pri (line 36) | def _process_con_to_pri(elementscls, ndims, cfg, *, has_grads=False):
class SamplerPlugin (line 62) | class SamplerPlugin(BackendMixin, BaseSolnPlugin):
method __init__ (line 67) | def __init__(self, intg, cfgsect, suffix):
method _init_kernels (line 104) | def _init_kernels(self, intg):
method _get_kerns (line 143) | def _get_kerns(self, uidx):
method _init_csv (line 163) | def _init_csv(self, intg):
method _write_csv (line 168) | def _write_csv(self, t, samps):
method _init_hdf5 (line 172) | def _init_hdf5(self, intg):
method _write_hdf5 (line 205) | def _write_hdf5(self, t, samps):
method _header (line 209) | def _header(self, intg):
method __call__ (line 221) | def __call__(self, intg):
class SamplerCLIPlugin (line 240) | class SamplerCLIPlugin(BaseCLIPlugin):
method add_cli (line 244) | def add_cli(cls, parser):
method add_cmd (line 298) | def add_cmd(self, args):
method list_cmd (line 352) | def list_cmd(self, args):
method dump_cmd (line 361) | def dump_cmd(self, args):
method remove_cmd (line 371) | def remove_cmd(self, args):
method sample_cmd (line 381) | def sample_cmd(self, args):
FILE: pyfr/plugins/source.py
class SourcePlugin (line 8) | class SourcePlugin(BaseSolverPlugin):
method __init__ (line 13) | def __init__(self, intg, cfgsect):
FILE: pyfr/plugins/tavg.py
class TavgMixin (line 19) | class TavgMixin:
method _fwd_diff (line 21) | def _fwd_diff(f, x, axis=0):
class TavgPlugin (line 38) | class TavgPlugin(PostactionMixin, RegionMixin, BackendMixin, TavgMixin,
method __init__ (line 44) | def __init__(self, intg, cfgsect, suffix=None):
method _prepare_exprs (line 128) | def _prepare_exprs(self):
method _init_kernels (line 155) | def _init_kernels(self, intg):
method _get_accum_kerns (line 204) | def _get_accum_kerns(self, uidx):
method _init_accumex (line 232) | def _init_accumex(self, intg):
method _eval_fun_avg (line 245) | def _eval_fun_avg(self, avars):
method _eval_fun_avg_var (line 251) | def _eval_fun_avg_var(self, dev, accex):
method _prepare_meta (line 266) | def _prepare_meta(self, intg, std_max, std_sum):
method _prepare_data (line 296) | def _prepare_data(self, intg):
method trigger_write (line 342) | def trigger_write(self, intg):
method __call__ (line 351) | def __call__(self, intg):
method _get_zero_kerns (line 404) | def _get_zero_kerns(self):
method _zero_accumulators (line 415) | def _zero_accumulators(self):
method _fetch_accumulators (line 418) | def _fetch_accumulators(self):
method finalise (line 424) | def finalise(self, intg):
class TavgCLIPlugin (line 430) | class TavgCLIPlugin(TavgMixin, BaseCLIPlugin):
method add_cli (line 434) | def add_cli(cls, parser):
method merge_cli (line 444) | def merge_cli(self, args):
method _eval_fun_avg (line 464) | def _eval_fun_avg(self, avars):
method _eval_fun_avg_var (line 469) | def _eval_fun_avg_var(self, acc, std):
method _init_tavg_merge (line 474) | def _init_tavg_merge(self):
method _prepare_output_file (line 536) | def _prepare_output_file(self, outf):
method _odtype (line 554) | def _odtype(self, idtype):
method _unpack (line 568) | def _unpack(self, data, group):
method _merge_data (line 572) | def _merge_data(self, outf, pbar=NullProgressBar()):
method _merge_stats (line 632) | def _merge_stats(self, outf):
method _preprocess_files (line 658) | def _preprocess_files(self, filenames):
FILE: pyfr/plugins/triggers/__init__.py
function get_trigger (line 16) | def get_trigger(name, *args, **kwargs):
FILE: pyfr/plugins/triggers/base.py
class BaseTriggerSource (line 18) | class BaseTriggerSource:
method __init__ (line 23) | def __init__(self, cfg, cfgsect, manager, intg):
method checkpoint (line 32) | def checkpoint(self):
method restore_checkpoint (line 35) | def restore_checkpoint(self, data):
method _parse_condition (line 38) | def _parse_condition(self, cfg, cfgsect, valid_reds):
method trigger_refs (line 57) | def trigger_refs(self):
method evaluate (line 60) | def evaluate(self, intg):
class TriggerManager (line 64) | class TriggerManager:
method __init__ (line 65) | def __init__(self):
method parse_config (line 72) | def parse_config(self, intg):
method __bool__ (line 91) | def __bool__(self):
method __iter__ (line 94) | def __iter__(self):
method evaluate (line 97) | def evaluate(self, intg):
method _check_name (line 136) | def _check_name(self, name):
method check_names (line 140) | def check_names(self, names):
method active (line 144) | def active(self, name):
method fire (line 148) | def fire(self, name):
method publish (line 153) | def publish(self, name, t, values):
method get_published (line 157) | def get_published(self, source):
method latest_published (line 165) | def latest_published(self):
method _register_serialiser (line 175) | def _register_serialiser(self, intg):
method restore (line 196) | def restore(self, state):
FILE: pyfr/plugins/triggers/field.py
class FieldTriggerSource (line 15) | class FieldTriggerSource(BaseTriggerSource):
method __init__ (line 19) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 45) | def evaluate(self, intg):
FILE: pyfr/plugins/triggers/point.py
class PointTriggerSource (line 10) | class PointTriggerSource(BaseTriggerSource):
method __init__ (line 16) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 38) | def evaluate(self, intg):
FILE: pyfr/plugins/triggers/sources.py
class ManualTriggerSource (line 12) | class ManualTriggerSource(BaseTriggerSource):
method evaluate (line 15) | def evaluate(self, intg):
class TimeTriggerSource (line 19) | class TimeTriggerSource(BaseTriggerSource):
method __init__ (line 22) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 26) | def evaluate(self, intg):
class WallclockTriggerSource (line 30) | class WallclockTriggerSource(BaseTriggerSource):
method __init__ (line 33) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 37) | def evaluate(self, intg):
class SignalTriggerSource (line 42) | class SignalTriggerSource(BaseTriggerSource):
method __init__ (line 45) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 65) | def evaluate(self, intg):
class FileTriggerSource (line 75) | class FileTriggerSource(BaseTriggerSource):
method __init__ (line 79) | def __init__(self, cfg, cfgsect, manager, intg):
method has_checkpoint (line 98) | def has_checkpoint(self):
method _stat_time (line 101) | def _stat_time(self):
method evaluate (line 107) | def evaluate(self, intg):
method checkpoint (line 119) | def checkpoint(self):
method restore_checkpoint (line 122) | def restore_checkpoint(self, data):
class ExpressionTriggerSource (line 127) | class ExpressionTriggerSource(BaseTriggerSource):
method __init__ (line 130) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 146) | def evaluate(self, intg):
class DurationTriggerSource (line 161) | class DurationTriggerSource(BaseTriggerSource):
method __init__ (line 165) | def __init__(self, cfg, cfgsect, manager, intg):
method trigger_refs (line 182) | def trigger_refs(self):
method evaluate (line 185) | def evaluate(self, intg):
method checkpoint (line 199) | def checkpoint(self):
method restore_checkpoint (line 205) | def restore_checkpoint(self, data):
class _CompositeTriggerSource (line 211) | class _CompositeTriggerSource(BaseTriggerSource):
method __init__ (line 212) | def __init__(self, cfg, cfgsect, manager, intg):
method trigger_refs (line 216) | def trigger_refs(self):
method evaluate (line 219) | def evaluate(self, intg):
class AllTriggerSource (line 223) | class AllTriggerSource(_CompositeTriggerSource):
class AnyTriggerSource (line 228) | class AnyTriggerSource(_CompositeTriggerSource):
FILE: pyfr/plugins/triggers/steady.py
class SteadyTriggerSource (line 6) | class SteadyTriggerSource(BaseTriggerSource):
method __init__ (line 9) | def __init__(self, cfg, cfgsect, manager, intg):
method evaluate (line 23) | def evaluate(self, intg):
FILE: pyfr/plugins/turbulence.py
class VortexData (line 13) | class VortexData:
function pcg32rxs_m_xs (line 22) | def pcg32rxs_m_xs(seed):
class TurbulencePlugin (line 40) | class TurbulencePlugin(BaseSolverPlugin):
method __init__ (line 45) | def __init__(self, intg, cfgsect):
method __call__ (line 104) | def __call__(self, intg):
method _update_buf (line 119) | def _update_buf(self, strms, strmoff, buf, tnext):
method _test_nvmax (line 144) | def _test_nvmax(self, strms, neles, nvmax):
method _find_nvmax (line 158) | def _find_nvmax(self, strms, neles):
method _get_vortex_buf (line 176) | def _get_vortex_buf(self):
method _get_vortex_data (line 198) | def _get_vortex_data(self, intg):
method _commit_vortex_data (line 272) | def _commit_vortex_data(self, backend, eles, strms):
FILE: pyfr/plugins/writer.py
class WriterPlugin (line 8) | class WriterPlugin(PostactionMixin, RegionMixin, BaseSolnPlugin):
method __init__ (line 13) | def __init__(self, intg, cfgsect, suffix=None):
method _prepare_metadata (line 79) | def _prepare_metadata(self, intg):
method _prepare_data (line 100) | def _prepare_data(self, intg):
method _do_write (line 126) | def _do_write(self, intg):
method __call__ (line 138) | def __call__(self, intg):
method trigger_write (line 149) | def trigger_write(self, intg):
method finalise (line 152) | def finalise(self, intg):
FILE: pyfr/points.py
class PointLocator (line 13) | class PointLocator:
method __init__ (line 14) | def __init__(self, mesh, fine_order=6):
method _reduce_elocs (line 18) | def _reduce_elocs(self, npts, elocator):
method _locate_nnode (line 44) | def _locate_nnode(self, pts):
method _locate_bbox (line 54) | def _locate_bbox(self, pts):
method locate (line 60) | def locate(self, pts):
method locate_disjoint (line 77) | def locate_disjoint(self, pts):
method _get_shape_basis (line 104) | def _get_shape_basis(self, etype, nspts):
method _minloc (line 111) | def _minloc(self, coll, x, y, ndim=None):
method _get_nodes_off_tree (line 134) | def _get_nodes_off_tree(self):
method _get_bbox_tree (line 148) | def _get_bbox_tree(self, etype, *, scale=1.05):
method _find_closest_node (line 163) | def _find_closest_node(self, pts):
method _find_closest_element_nnode (line 178) | def _find_closest_element_nnode(self, etype, pts, nearest):
method _find_closest_element_bbox (line 198) | def _find_closest_element_bbox(self, etype, pts):
method _find_closest_element (line 207) | def _find_closest_element(self, etype, pts, pidx, sidx):
method _initial_tlocs (line 225) | def _initial_tlocs(self, etype, spts, plocs):
method _compute_tlocs (line 240) | def _compute_tlocs(self, etype, spts, plocs):
class PointSampler (line 270) | class PointSampler:
method __init__ (line 271) | def __init__(self, mesh, spts, slocs=None):
method configure_with_intg_nvars (line 295) | def configure_with_intg_nvars(self, intg, nvars):
method configure_with_cfg_nvars (line 302) | def configure_with_cfg_nvars(self, cfg, nvars):
method _configure_ubases_nvars (line 311) | def _configure_ubases_nvars(self, ubases, nvars):
method gather (line 364) | def gather(self, samples):
method etype_pinfo (line 374) | def etype_pinfo(self):
method sample (line 386) | def sample(self, solns, process=None):
FILE: pyfr/polys.py
function jacobi (line 9) | def jacobi(n, a, b, z):
function jacobi_diff (line 31) | def jacobi_diff(n, a, b, z):
function get_polybasis (line 41) | def get_polybasis(name, order, pts=[]):
class BasePolyBasis (line 45) | class BasePolyBasis:
method __init__ (line 48) | def __init__(self, order, pts):
method ortho_basis_at (line 53) | def ortho_basis_at(self, pts):
method jac_ortho_basis_at (line 59) | def jac_ortho_basis_at(self, pts):
method nodal_basis_at (line 65) | def nodal_basis_at(self, epts):
method jac_nodal_basis_at (line 69) | def jac_nodal_basis_at(self, epts):
method vdm (line 73) | def vdm(self):
method vdm_at (line 76) | def vdm_at(self, pts):
method proj_to (line 79) | def proj_to(self, tobasis):
method invvdm (line 92) | def invvdm(self):
class LinePolyBasis (line 96) | class LinePolyBasis(BasePolyBasis):
method _ortho_basis_at (line 99) | def _ortho_basis_at(self, p):
method _jac_ortho_basis_at (line 103) | def _jac_ortho_basis_at(self, p):
method degrees (line 108) | def degrees(self):
class TriPolyBasis (line 112) | class TriPolyBasis(BasePolyBasis):
method _ortho_basis_at (line 115) | def _ortho_basis_at(self, p, q):
method _jac_ortho_basis_at (line 131) | def _jac_ortho_basis_at(self, p, q):
method degrees (line 157) | def degrees(self):
class QuadPolyBasis (line 163) | class QuadPolyBasis(BasePolyBasis):
method _ortho_basis_at (line 166) | def _ortho_basis_at(self, p, q):
method _jac_ortho_basis_at (line 173) | def _jac_ortho_basis_at(self, p, q):
method degrees (line 186) | def degrees(self):
class TetPolyBasis (line 192) | class TetPolyBasis(BasePolyBasis):
method _ortho_basis_at (line 195) | def _ortho_basis_at(self, p, q, r):
method _jac_ortho_basis_at (line 218) | def _jac_ortho_basis_at(self, p, q, r):
method degrees (line 262) | def degrees(self):
class PriPolyBasis (line 269) | class PriPolyBasis(BasePolyBasis):
method _ortho_basis_at (line 272) | def _ortho_basis_at(self, p, q, r):
method _jac_ortho_basis_at (line 292) | def _jac_ortho_basis_at(self, p, q, r):
method degrees (line 325) | def degrees(self):
class PyrPolyBasis (line 332) | class PyrPolyBasis(BasePolyBasis):
method _ortho_basis_at (line 335) | def _ortho_basis_at(self, p, q, r):
method _jac_ortho_basis_at (line 359) | def _jac_ortho_basis_at(self, p, q, r):
method degrees (line 395) | def degrees(self):
class HexPolyBasis (line 402) | class HexPolyBasis(BasePolyBasis):
method _ortho_basis_at (line 405) | def _ortho_basis_at(self, p, q, r):
method _jac_ortho_basis_at (line 413) | def _jac_ortho_basis_at(self, p, q, r):
method degrees (line 429) | def degrees(self):
FILE: pyfr/progress.py
function _format_scaled (line 9) | def _format_scaled(n, prefixes, suffix, scale, dps=2):
function format_bytes (line 23) | def format_bytes(n, dps=2):
function format_dofs (line 28) | def format_dofs(n, dps=2):
function format_hms (line 32) | def format_hms(delta):
function format_s (line 42) | def format_s(delta):
class ProgressBar (line 49) | class ProgressBar:
method __init__ (line 56) | def __init__(self, *, prefix='', suffix='\n', dps=2, fmt=format_hms):
method start (line 64) | def start(self, end, *, start=0, curr=None):
method start_with_iter (line 78) | def start_with_iter(self, iterable, n=None):
method __call__ (line 85) | def __call__(self, t=None, info=None):
method walltime (line 99) | def walltime(self):
method _bar (line 102) | def _bar(self, n, rfrac):
method _render (line 124) | def _render(self):
class NullProgressBar (line 164) | class NullProgressBar(ProgressBar):
method __init__ (line 165) | def __init__(self):
method start (line 168) | def start(self, end, *, start=0, curr=None):
method __call__ (line 171) | def __call__(self, t=None, info=None):
class ProgressSpinner (line 175) | class ProgressSpinner:
method __init__ (line 179) | def __init__(self, n=8):
method erase (line 189) | def erase(self):
method __call__ (line 193) | def __call__(self, v=None):
method wrap_file_lines (line 215) | def wrap_file_lines(self, iter, n):
class NullProgressSpinner (line 227) | class NullProgressSpinner(ProgressSpinner):
method __init__ (line 228) | def __init__(self):
method __call__ (line 231) | def __call__(self, v=None):
method wrap_file_lines (line 234) | def wrap_file_lines(self, iter, n):
class ProgressSequence (line 238) | class ProgressSequence:
method __init__ (line 239) | def __init__(self, *, prefix=''):
method _start_phase (line 242) | def _start_phase(self, phase):
method _finish_phase (line 245) | def _finish_phase(self, phase, prefix, tstart):
method start (line 250) | def start(self, phase):
method start_with_sequence (line 261) | def start_with_sequence(self, phase):
method start_with_bar (line 270) | def start_with_bar(self, phase):
method start_with_spinner (line 278) | def start_with_spinner(self, phase):
class NullProgressSequence (line 288) | class NullProgressSequence(ProgressSequence):
method __init__ (line 289) | def __init__(self):
method __bool__ (line 292) | def __bool__(self):
method start (line 296) | def start(self, phase):
method start_with_sequence (line 300) | def start_with_sequence(self, phase):
method start_with_spinner (line 304) | def start_with_spinner(self, phase):
method start_with_bar (line 308) | def start_with_bar(self, phase):
class ProgressSequenceAction (line 312) | class ProgressSequenceAction(Action):
method __init__ (line 313) | def __init__(self, *, nargs=0, default=NullProgressSequence(), **kwargs):
method __call__ (line 316) | def __call__(self, parser, namespace, values, option_string=None):
FILE: pyfr/quadrules/__init__.py
class BaseTabulatedQuadRule (line 7) | class BaseTabulatedQuadRule:
method __init__ (line 8) | def __init__(self, rule, flags=None):
class BaseStoredQuadRule (line 44) | class BaseStoredQuadRule(BaseTabulatedQuadRule):
method _iter_rules (line 46) | def _iter_rules(cls):
method __init__ (line 56) | def __init__(self, name=None, npts=None, qdeg=None, flags=None):
function get_quadrule (line 81) | def get_quadrule(eletype, rule=None, npts=None, qdeg=None, flags=None):
FILE: pyfr/quadrules/surface.py
class SurfaceIntegrator (line 8) | class SurfaceIntegrator:
method __init__ (line 9) | def __init__(self, cfg, cfgsect, elemap, con, flags=''):
method _surf_quad (line 34) | def _surf_quad(self, itype, proj, flags=''):
FILE: pyfr/readers/__init__.py
function get_reader_by_name (line 7) | def get_reader_by_name(name, *args, **kwargs):
function get_reader_by_extn (line 11) | def get_reader_by_extn(extn, *args, **kwargs):
FILE: pyfr/readers/base.py
class BaseReader (line 16) | class BaseReader:
method __init__ (line 17) | def __init__(self, progress):
method _get_default_partitioning (line 20) | def _get_default_partitioning(self, eles, codec):
method _get_nodes (line 49) | def _get_nodes(self, nodes, eles):
method _to_raw_mesh (line 64) | def _to_raw_mesh(self, lintol):
method write (line 67) | def write(self, fname, lintol):
class NodalMeshAssembler (line 107) | class NodalMeshAssembler:
method __init__ (line 126) | def __init__(self, nodepts, elenodes, volpent, bfacespents, pfacespents,
method _check_pyr_parallelogram (line 135) | def _check_pyr_parallelogram(self, foeles):
method _to_first_order (line 148) | def _to_first_order(self, elemap):
method _split_volume (line 165) | def _split_volume(self, elemap):
method _foface_info (line 173) | def _foface_info(self, petype, pftype, codec, foeles):
method _codec_conn (line 200) | def _codec_conn(self, eles, codec):
method _extract_faces (line 208) | def _extract_faces(self, foeles, codec):
method _pair_volume_faces (line 218) | def _pair_volume_faces(self, vfofaces, codec, eles):
method _pair_periodic_volume_faces (line 263) | def _pair_periodic_volume_faces(self, bpart, cconn, resid):
method _ident_boundary_faces (line 293) | def _ident_boundary_faces(self, bpart, cconn, codec, resid):
method compute_element_colouring (line 309) | def compute_element_colouring(eles, codec, spinner=NullProgressSpinner...
method get_eles (line 364) | def get_eles(self, lintol, progress=NullProgressSequence()):
method _connect_eles (line 415) | def _connect_eles(self, eles, codec, spinner):
method _linearise_eles (line 445) | def _linearise_eles(self, emap, lintol, spinner):
FILE: pyfr/readers/gmsh.py
function msh_section (line 9) | def msh_section(mshit, section):
class GmshReader (line 28) | class GmshReader(BaseReader):
method __init__ (line 195) | def __init__(self, msh, progress):
method _read_mesh_format (line 242) | def _read_mesh_format(self, mshit):
method _read_phys_names (line 262) | def _read_phys_names(self, mshit):
method _read_entities (line 320) | def _read_entities(self, mshit):
method _read_nodes (line 345) | def _read_nodes(self, mshit):
method _read_nodes_impl_v2 (line 348) | def _read_nodes_impl_v2(self, mshit):
method _read_nodes_impl_v41 (line 367) | def _read_nodes_impl_v41(self, mshit):
method _read_eles (line 385) | def _read_eles(self, mshit):
method _read_eles_impl_v2 (line 388) | def _read_eles_impl_v2(self, mshit):
method _read_eles_impl_v41 (line 405) | def _read_eles_impl_v41(self, mshit):
method _merge_vol (line 437) | def _merge_vol(self):
method _assign_tags (line 468) | def _assign_tags(eles, tagruns):
method _to_raw_mesh (line 474) | def _to_raw_mesh(self, lintol):
FILE: pyfr/readers/native.py
class Mesh (line 16) | class Mesh:
class Solution (line 50) | class Solution:
class Connectivity (line 61) | class Connectivity:
method __init__ (line 62) | def __init__(self, cidxs, eidxs, cidxmap):
method __len__ (line 68) | def __len__(self):
method items (line 71) | def items(self):
method foreach (line 76) | def foreach(self):
method map_eles (line 82) | def map_eles(self, data, dtype=None):
class NativeReader (line 89) | class NativeReader:
method __init__ (line 90) | def __init__(self, fname, pname=None, *, construct_con=True):
method close (line 104) | def close(self):
method load_soln (line 107) | def load_soln(self, sname, prefix=None):
method _read_soln_header (line 116) | def _read_soln_header(self, f):
method _soln_fields (line 159) | def _soln_fields(self, dtype):
method _unpack_esoln (line 169) | def _unpack_esoln(self, soln, etype, esoln, dtype):
method load_subset_mesh_soln (line 191) | def load_subset_mesh_soln(self, sname, prefix=None):
method _subset_mesh (line 240) | def _subset_mesh(self, subset):
method _read_metadata (line 261) | def _read_metadata(self):
method _read_with_idxs (line 278) | def _read_with_idxs(self, dset, idxs):
method _select_partitioning (line 286) | def _select_partitioning(self, size, pname=None):
method _read_partitioning (line 306) | def _read_partitioning(self, pname=None):
method _read_eles (line 341) | def _read_eles(self):
method _read_nodes (line 354) | def _read_nodes(self):
method _parse_codec (line 388) | def _parse_codec(self):
method _pack_pairs (line 404) | def _pack_pairs(*pairs):
method _pair_finder (line 409) | def _pair_finder(lhs, stride):
method _build_g2l (line 422) | def _build_g2l(self):
method _flatten_faces (line 432) | def _flatten_faces(self, g2l):
method _construct_con (line 445) | def _construct_con(self):
method _construct_mpi_con (line 497) | def _construct_mpi_con(self, g2l, cetmap, cidxmap, lhs, rhs, stride):
method _construct_shared_nodes (line 536) | def _construct_shared_nodes(self):
FILE: pyfr/readers/shared_nodes.py
class SharedNodes (line 13) | class SharedNodes:
class SharedNodesFinder (line 18) | class SharedNodesFinder(AlltoallMixin):
method __init__ (line 19) | def __init__(self, eles, node_idxs, node_valency):
method compute (line 26) | def compute(self):
method _get_corner_indices (line 39) | def _get_corner_indices(self, etype, nspts):
method _find_boundary_nodes (line 50) | def _find_boundary_nodes(self):
method _rendezvous_exchange (line 65) | def _rendezvous_exchange(self, bnodes):
method _build_responses (line 80) | def _build_responses(self, rnodes, rranks):
method _parse_responses (line 115) | def _parse_responses(self, rresp):
FILE: pyfr/readers/stl.py
function read_stl (line 4) | def read_stl(f):
FILE: pyfr/regions.py
function parse_region_expr (line 12) | def parse_region_expr(expr, rdata=None):
class FaceSet (line 26) | class FaceSet:
method __init__ (line 27) | def __init__(self, cidxmap, neles, interior_eles):
method _keys (line 45) | def _keys(self, cidx, eidx):
method eliminate_paired (line 48) | def eliminate_paired(self, lhs, rhs):
method remove (line 55) | def remove(self, con):
method check (line 58) | def check(self, con):
method remove_where (line 61) | def remove_where(self, con, mask):
method to_dict (line 65) | def to_dict(self):
class BaseRegion (line 76) | class BaseRegion:
method interior_eles (line 77) | def interior_eles(self, mesh):
method surface_faces (line 80) | def surface_faces(self, mesh, exclbcs=[]):
method expand (line 118) | def expand(mesh, eles, nlayers):
class TagRegion (line 177) | class TagRegion(BaseRegion):
method __init__ (line 178) | def __init__(self, tname):
method interior_eles (line 181) | def interior_eles(self, mesh):
class BoundaryRegion (line 190) | class BoundaryRegion(BaseRegion):
method __init__ (line 191) | def __init__(self, bcname):
method interior_eles (line 194) | def interior_eles(self, mesh):
class BaseGeometricRegion (line 212) | class BaseGeometricRegion(BaseRegion):
method __init__ (line 215) | def __init__(self, rdata=None, rot=None):
method interior_eles (line 238) | def interior_eles(self, mesh):
method pts_in_region (line 249) | def pts_in_region(self, pts):
class BoxRegion (line 256) | class BoxRegion(BaseGeometricRegion):
method __init__ (line 259) | def __init__(self, x0, x1, **kwargs):
method _pts_in_region (line 265) | def _pts_in_region(self, pts):
class ConicalFrustumRegion (line 275) | class ConicalFrustumRegion(BaseGeometricRegion):
method __init__ (line 278) | def __init__(self, x0, x1, r0, r1, **kwargs):
method _pts_in_region (line 290) | def _pts_in_region(self, pts):
class ConeRegion (line 306) | class ConeRegion(ConicalFrustumRegion):
method __init__ (line 309) | def __init__(self, x0, x1, r, **kwargs):
class CylinderRegion (line 313) | class CylinderRegion(ConicalFrustumRegion):
method __init__ (line 316) | def __init__(self, x0, x1, r, **kwargs):
class EllipsoidRegion (line 320) | class EllipsoidRegion(BaseGeometricRegion):
method __init__ (line 323) | def __init__(self, x0, a, b, c, **kwargs):
method _pts_in_region (line 329) | def _pts_in_region(self, pts):
class SphereRegion (line 333) | class SphereRegion(EllipsoidRegion):
method __init__ (line 336) | def __init__(self, x0, r, **kwargs):
class STLRegion (line 340) | class STLRegion(BaseGeometricRegion):
method __init__ (line 343) | def __init__(self, name, rdata, **kwargs):
method _pts_in_region (line 388) | def _pts_in_region(self, pts):
class ConstructiveRegion (line 413) | class ConstructiveRegion(BaseGeometricRegion):
method __init__ (line 414) | def __init__(self, expr, rdata=None):
method pts_in_region (line 453) | def pts_in_region(self, pts):
FILE: pyfr/resamplers.py
function get_interpolator (line 13) | def get_interpolator(name, ndims, opts, order=None):
function _ploc_op (line 18) | def _ploc_op(etype, nspts, cfg):
function str_group (line 27) | def str_group(gpts, nsplit):
class BaseInterpolator (line 44) | class BaseInterpolator:
method from_opts (line 53) | def from_opts(cls, ndims, opts={}, *, order=None):
class IDWInterpolator (line 74) | class IDWInterpolator(BaseInterpolator):
method __init__ (line 86) | def __init__(self, ndims, *, order=None, n=0, rho=0):
method __call__ (line 91) | def __call__(self, p, spts, svals):
class WENOInterpolator (line 102) | class WENOInterpolator(BaseInterpolator):
method __init__ (line 113) | def __init__(self, ndims, *, order=None, n=0, degree=0, sub_degree=0,
method __call__ (line 161) | def __call__(self, p, spts, svals):
method _monomial_powers (line 199) | def _monomial_powers(ndims, degree):
method _monomial_matrix (line 207) | def _monomial_matrix(pts, power_data):
method _wendland_c2 (line 218) | def _wendland_c2(r):
method _direction_vectors (line 223) | def _direction_vectors(ndims, nsub):
method _select_directional_stencil (line 235) | def _select_directional_stencil(self, spts, p, direction):
method _fit_stencil_data (line 280) | def _fit_stencil_data(self, p, spts, svals, power_data, scale):
method _fit_central_stencil (line 323) | def _fit_central_stencil(self, p, spts, svals, scale):
method _fit_sub_stencil (line 327) | def _fit_sub_stencil(self, p, spts, svals, scale):
method _linear_weights (line 331) | def _linear_weights(self, ncands):
method _wenoz_weights (line 341) | def _wenoz_weights(self, betas, gamma, eps=1.0e-14):
method _teno_weights (line 347) | def _teno_weights(self, betas, gamma, eps=1.0e-14):
method _nonlinear_weights (line 360) | def _nonlinear_weights(self, betas, has_central):
class BaseCloudResampler (line 370) | class BaseCloudResampler(AlltoallMixin):
method __init__ (line 371) | def __init__(self, pts, solns, interp, progress):
method _distribute_src_points (line 393) | def _distribute_src_points(self, pts, solns):
method _compute_pts_tree (line 414) | def _compute_pts_tree(self, pts):
method _compute_bbox_trees (line 419) | def _compute_bbox_trees(self, pts):
method sample_with_mesh_config (line 449) | def sample_with_mesh_config(self, mesh, cfg):
method sample_with_pts (line 476) | def sample_with_pts(self, tpts, dtype):
method _distribute_tgt_pts (line 486) | def _distribute_tgt_pts(self, pts):
method _compute_initial_tgt_dist (line 512) | def _compute_initial_tgt_dist(self, pts):
method _compute_resid_ranks (line 546) | def _compute_resid_ranks(self, resid):
method _sample_tgt_points (line 571) | def _sample_tgt_points(self, pts, dtype):
method _exchange_fringe_pts (line 619) | def _exchange_fringe_pts(self, frboxes, nn):
method _distribute_tgt_samples (line 669) | def _distribute_tgt_samples(self, tsolns, tcountdisp, tidx):
class NativeCloudResampler (line 677) | class NativeCloudResampler(BaseCloudResampler):
method __init__ (line 678) | def __init__(self, mesh, soln, interp, progress):
method _concat_pts_solns (line 683) | def _concat_pts_solns(self, mesh, soln):
FILE: pyfr/shapes.py
function _proj_pts (line 12) | def _proj_pts(projector, pts):
function proj_l2 (line 18) | def proj_l2(qrule, basis):
class BaseShape (line 22) | class BaseShape:
method __init__ (line 35) | def __init__(self, nspts, cfg):
method npts_from_order (line 63) | def npts_from_order(cls, sptord):
method order_from_npts (line 67) | def order_from_npts(cls, nspts):
method opmat (line 80) | def opmat(self, expr):
method m0 (line 90) | def m0(self):
method m1 (line 94) | def m1(self):
method m2 (line 99) | def m2(self):
method m3 (line 104) | def m3(self):
method m4 (line 116) | def m4(self):
method m6 (line 121) | def m6(self):
method m7 (line 126) | def m7(self):
method m8 (line 130) | def m8(self):
method m9 (line 134) | def m9(self):
method nupts (line 138) | def nupts(self):
method upts (line 143) | def upts(self):
method _get_qrule (line 147) | def _get_qrule(self, eleint, kind, **kwargs):
method _eqrule (line 178) | def _eqrule(self):
method _iqrules (line 182) | def _iqrules(self):
method qpts (line 187) | def qpts(self):
method nqpts (line 191) | def nqpts(self):
method fpts (line 195) | def fpts(self):
method fpts_wts (line 214) | def fpts_wts(self):
method gbasis_coeffs (line 232) | def gbasis_coeffs(self):
method gbasis_at (line 258) | def gbasis_at(self, pts):
method facenorms (line 262) | def facenorms(self):
method norm_fpts (line 266) | def norm_fpts(self):
method spts (line 271) | def spts(self):
method linspts (line 275) | def linspts(self):
method facebases (line 279) | def facebases(self):
method facefpts (line 293) | def facefpts(self):
method nfacefpts (line 298) | def nfacefpts(self):
method nfpts (line 307) | def nfpts(self):
method mpts (line 311) | def mpts(self):
method nmpts (line 315) | def nmpts(self):
method fpts_in_upts (line 319) | def fpts_in_upts(self):
method fpts_map_upts (line 323) | def fpts_map_upts(self):
class TensorProdShape (line 329) | class TensorProdShape:
method std_ele (line 331) | def std_ele(cls, sptord):
method valid_spt (line 336) | def valid_spt(cls, pt, tol=1e-9):
class QuadShape (line 340) | class QuadShape(TensorProdShape, BaseShape):
class HexShape (line 375) | class HexShape(TensorProdShape, BaseShape):
class TriShape (line 435) | class TriShape(BaseShape):
method std_ele (line 461) | def std_ele(cls, sptord):
method valid_spt (line 469) | def valid_spt(cls, spt, tol=1e-9):
class TetShape (line 476) | class TetShape(BaseShape):
method std_ele (line 504) | def std_ele(cls, sptord):
method valid_spt (line 513) | def valid_spt(cls, spt, tol=1e-9):
class PriShape (line 521) | class PriShape(BaseShape):
method std_ele (line 560) | def std_ele(cls, sptord):
method valid_spt (line 569) | def valid_spt(cls, spt, tol=1e-9):
class PyrShape (line 573) | class PyrShape(BaseShape):
method std_ele (line 619) | def std_ele(cls, sptord):
method valid_spt (line 629) | def valid_spt(cls, spt, tol=1e-9):
FILE: pyfr/solvers/__init__.py
function get_solver (line 8) | def get_solver(backend, mesh, initsoln, cfg):
FILE: pyfr/solvers/base/elements.py
class ExportableField (line 13) | class ExportableField:
function inters_map (line 20) | def inters_map(meth):
class BaseElements (line 36) | class BaseElements:
method __init__ (line 37) | def __init__(self, basiscls, eles, cfg):
method set_ics_from_cfg (line 86) | def set_ics_from_cfg(self):
method set_ics_from_soln (line 131) | def set_ics_from_soln(self, solnmat, solncfg):
method plocfpts (line 146) | def plocfpts(self):
method _scal_upts_cpy (line 157) | def _scal_upts_cpy(self):
method srtd_face_fpts (line 162) | def srtd_face_fpts(self):
method _scratch_bufs (line 174) | def _scratch_bufs(self):
method mesh_regions (line 178) | def mesh_regions(self):
method _slice_mat (line 191) | def _slice_mat(self, mat, region, ra=None, rb=None):
method _make_sliced_kernel (line 210) | def _make_sliced_kernel(self, kseq):
method set_backend (line 218) | def set_backend(self, backend, nonce, linoff):
method alloc_bank (line 268) | def alloc_bank(self, extent, ic=None):
method opmat (line 275) | def opmat(self, expr):
method sliceat (line 279) | def sliceat(fn):
method smat_at_np (line 293) | def smat_at_np(self, name):
method curved_smat_at (line 305) | def curved_smat_at(self, name):
method rcpdjac_at_np (line 310) | def rcpdjac_at_np(self, name):
method rcpdjac_at (line 327) | def rcpdjac_at(self, name):
method mean_wts (line 331) | def mean_wts(self):
method ploc_at_np (line 338) | def ploc_at_np(self, name):
method ploc_at (line 349) | def ploc_at(self, name):
method upts (line 353) | def upts(self):
method qpts (line 357) | def qpts(self):
method _pnorm_fpts (line 361) | def _pnorm_fpts(self):
method pnorm_at (line 365) | def pnorm_at(self, name, norm):
method _smats_djacs_mpts (line 383) | def _smats_djacs_mpts(self):
method get_pnorms (line 442) | def get_pnorms(self, eidx, fidx):
method get_pnorms_for_inters (line 446) | def get_pnorms_for_inters(self, eidxs, fidx):
method _get_vect_fpts_for_inters (line 452) | def _get_vect_fpts_for_inters(self, eidxs, fidx):
method _get_vect_upts_for_inters (line 457) | def _get_vect_upts_for_inters(self, eidxs, fidx):
method _get_comm_fpts_for_inters (line 463) | def _get_comm_fpts_for_inters(self, eidxs, fidx):
method get_ploc_for_inters (line 466) | def get_ploc_for_inters(self, eidxs, fidx):
FILE: pyfr/solvers/base/inters.py
function _get_inter_arrays (line 6) | def _get_inter_arrays(interside, meth, elemap, perm=Ellipsis):
class BaseInters (line 20) | class BaseInters:
method __init__ (line 21) | def __init__(self, be, lhs, elemap, cfg):
method set_external (line 49) | def set_external(self, name, spec, value=None):
method _const_mat (line 55) | def _const_mat(self, inter, meth):
method _get_perm_for_view (line 64) | def _get_perm_for_view(self, inter, meth):
method _get_perm_for_field (line 70) | def _get_perm_for_field(self, inter, field):
method _view (line 92) | def _view(self, inter, meth, vshape=(), with_perm=True):
method _scal_view (line 97) | def _scal_view(self, inter, meth):
method _vect_view (line 100) | def _vect_view(self, inter, meth):
method _xchg_view (line 103) | def _xchg_view(self, inter, meth, vshape=(), with_perm=True):
method _scal_xchg_view (line 108) | def _scal_xchg_view(self, inter, meth):
method _vect_xchg_view (line 111) | def _vect_xchg_view(self, inter, meth):
method setup (line 114) | def setup(self, sdata, prevcfg):
method serialisefn (line 118) | def serialisefn(cls, iface, prefix, srl):
FILE: pyfr/solvers/base/system.py
class BaseSystem (line 15) | class BaseSystem:
method __init__ (line 28) | def __init__(self, backend, mesh, initsoln, registers, cfg, serialiser):
method _alloc_register_banks (line 82) | def _alloc_register_banks(self, registers, eles, ics):
method register_kernel_callback (line 107) | def register_kernel_callback(self, names, callback):
method _field_view (line 115) | def _field_view(self, interside, field, layout, view_fn,
method _compute_perm (line 148) | def _compute_perm(self, interside, field):
method make_field_views (line 154) | def make_field_views(self, field, layout='fpts', bc_layout=None,
method register_mpi_exchange (line 185) | def register_mpi_exchange(self, name, mpi_views, send=None, recv=None):
method commit (line 204) | def commit(self):
method _load_eles (line 225) | def _load_eles(self, mesh, initsoln, nonce):
method _load_int_inters (line 250) | def _load_int_inters(self, mesh, elemap):
method _load_mpi_inters (line 256) | def _load_mpi_inters(self, mesh, elemap):
method _load_bc_inters (line 265) | def _load_bc_inters(self, mesh, elemap, initsoln, serialiser):
method _gen_kernels (line 308) | def _gen_kernels(self, nregs, eles, iint, mpiint, bcint):
method _gen_mpireqs (line 365) | def _gen_mpireqs(self, mpiint):
method _get_kernels (line 373) | def _get_kernels(self, uinbank, foutbank):
method _kdeps (line 398) | def _kdeps(self, kdict, kern, *dnames):
method _prepare_kernels (line 408) | def _prepare_kernels(self, t, uinbank, foutbank):
method _rhs_graphs (line 417) | def _rhs_graphs(self, uinbank, foutbank):
method rhs (line 420) | def rhs(self, t, uinbank, foutbank):
method _preproc_graphs (line 432) | def _preproc_graphs(self, uinbank):
method preproc (line 435) | def preproc(self, t, uinbank):
method postproc (line 444) | def postproc(self, uinbank):
method rhs_wait_times (line 447) | def rhs_wait_times(self):
method _compute_grads_graph (line 465) | def _compute_grads_graph(self, uinbank):
method compute_grads (line 469) | def compute_grads(self, t, uinbank):
method evalsrcmacros (line 478) | def evalsrcmacros(self, uinoutbank):
method ele_scal_upts (line 483) | def ele_scal_upts(self, idx):
method _group (line 486) | def _group(self, g, kerns, subs=[]):
FILE: pyfr/solvers/baseadvec/elements.py
class BaseAdvectionElements (line 5) | class BaseAdvectionElements(BaseElements):
method __init__ (line 6) | def __init__(self, *kargs, **kwargs):
method has_src_macros (line 24) | def has_src_macros(self):
method _scratch_bufs (line 28) | def _scratch_bufs(self):
method add_src_macro (line 34) | def add_src_macro(self, mod, name, tplargs, ploc=False, soln=False):
method set_external (line 49) | def set_external(self, name, spec, value=None):
method set_backend (line 55) | def set_backend(self, backend, nonce, linoff):
FILE: pyfr/solvers/baseadvec/entfilter.py
class EntropyFilter (line 6) | class EntropyFilter:
method __init__ (line 7) | def __init__(self, backend, cfg, system, int_inters, mpi_inters,
method _setup_etype (line 27) | def _setup_etype(self, etype, eles, cfg, nonce):
method _build_operators (line 81) | def _build_operators(self, eles, form):
method _build_tplargs (line 98) | def _build_tplargs(self, eles, cfg, nfaces, form):
method _setup_interfaces (line 119) | def _setup_interfaces(self, system, int_inters, mpi_inters, bc_inters):
method add_to_graph_pre_recv (line 148) | def add_to_graph_pre_recv(self, g, k, m):
method add_to_graph_post_recv (line 167) | def add_to_graph_post_recv(self, g, k, deps):
method preproc_graphs (line 175) | def preproc_graphs(self, be, k, m, deps):
method postproc (line 212) | def postproc(self, be, k):
FILE: pyfr/solvers/baseadvec/inters.py
class BaseAdvectionIntInters (line 8) | class BaseAdvectionIntInters(BaseInters):
method __init__ (line 9) | def __init__(self, be, lhs, rhs, elemap, cfg):
method _gen_perm (line 25) | def _gen_perm(self, lhs, rhs, scal):
class BaseAdvectionMPIInters (line 31) | class BaseAdvectionMPIInters(BaseInters):
method __init__ (line 32) | def __init__(self, be, lhs, rhsrank, elemap, cfg):
method next_mpi_tag (line 48) | def next_mpi_tag(self):
class BaseAdvectionBCInters (line 52) | class BaseAdvectionBCInters(BaseInters):
method __init__ (line 55) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
method preparefn (line 78) | def preparefn(cls, bciface, mesh, elemap):
method _eval_opts (line 81) | def _eval_opts(self, opts, default=None):
method _exp_opts (line 95) | def _exp_opts(self, opts, lhs, default={}):
FILE: pyfr/solvers/baseadvec/system.py
class BaseAdvectionSystem (line 8) | class BaseAdvectionSystem(BaseSystem):
method __init__ (line 11) | def __init__(self, backend, mesh, initsoln, registers, cfg, serialiser,
method commit (line 20) | def commit(self):
method _rhs_graphs (line 58) | def _rhs_graphs(self, uinbank, foutbank):
method _preproc_graphs (line 138) | def _preproc_graphs(self, uinbank):
method _preproc_graphs_ef (line 144) | def _preproc_graphs_ef(self, uinbank):
method postproc (line 150) | def postproc(self, uinbank):
method compute_max_wavespeed (line 157) | def compute_max_wavespeed(self, uinbank):
FILE: pyfr/solvers/baseadvecdiff/artvisc.py
class _VtxPeer (line 7) | class _VtxPeer:
method __init__ (line 8) | def __init__(self, be, vtx_comm, rank, xv, rm, mv, n):
class ArtificialViscosity (line 24) | class ArtificialViscosity:
method __init__ (line 27) | def __init__(self, backend, cfg, mesh, ele_map):
method _setup_etype (line 49) | def _setup_etype(self, etype, eles, mesh, c_av):
method _setup_vtx_views (line 79) | def _setup_vtx_views(self, eles, mesh, nverts, vnodes):
method _setup_kernels (line 100) | def _setup_kernels(self, eles, c_av, nverts, vnodes, linbasis,
method _av_at_vtx (line 133) | def _av_at_vtx(self, vnodes):
method _sensor_tplargs (line 141) | def _sensor_tplargs(self, eles, c_av):
method prepare_mpi (line 176) | def prepare_mpi(self):
method extra_kern_parts (line 218) | def extra_kern_parts(self):
method extra_mpi_parts (line 222) | def extra_mpi_parts(self):
method soln_deps (line 225) | def soln_deps(self, k):
method flux_deps (line 228) | def flux_deps(self, k):
method bc_flux_deps (line 231) | def bc_flux_deps(self, k):
method preproc_graphs (line 234) | def preproc_graphs(self, be, k, m, deps):
method postproc (line 237) | def postproc(self, be, k):
method add_to_graph_pre_recv (line 240) | def add_to_graph_pre_recv(self, g, k, m):
method add_to_graph_post_recv (line 249) | def add_to_graph_post_recv(self, g, k, deps):
FILE: pyfr/solvers/baseadvecdiff/elements.py
class BaseAdvectionDiffusionElements (line 5) | class BaseAdvectionDiffusionElements(BaseAdvectionElements):
method _scratch_bufs (line 7) | def _scratch_bufs(self):
method set_backend (line 22) | def set_backend(self, backend, nonce, linoff):
method _get_grad_upts_for_inters (line 134) | def _get_grad_upts_for_inters(self, eidxs, fidx):
FILE: pyfr/solvers/baseadvecdiff/inters.py
class BaseAdvectionDiffusionIntInters (line 7) | class BaseAdvectionDiffusionIntInters(BaseAdvectionIntInters):
method __init__ (line 8) | def __init__(self, be, lhs, rhs, elemap, cfg):
method _gen_perm (line 23) | def _gen_perm(self, lhs, rhs, scal):
class BaseAdvectionDiffusionMPIInters (line 33) | class BaseAdvectionDiffusionMPIInters(BaseAdvectionMPIInters):
method __init__ (line 34) | def __init__(self, be, lhs, rhsrank, elemap, cfg):
class BaseAdvectionDiffusionBCInters (line 64) | class BaseAdvectionDiffusionBCInters(BaseAdvectionBCInters):
method __init__ (line 65) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
FILE: pyfr/solvers/baseadvecdiff/system.py
class BaseAdvectionDiffusionSystem (line 8) | class BaseAdvectionDiffusionSystem(BaseAdvectionSystem):
method commit (line 11) | def commit(self):
method _rhs_graphs (line 54) | def _rhs_graphs(self, uinbank, foutbank):
method _compute_grads_graph (line 234) | def _compute_grads_graph(self, uinbank):
FILE: pyfr/solvers/euler/elements.py
class BaseFluidElements (line 7) | class BaseFluidElements:
method eos_tplargs (line 11) | def eos_tplargs(cls, ndims, cfg):
method set_backend (line 18) | def set_backend(self, *args, **kwargs):
method init_wavespeed (line 24) | def init_wavespeed(self):
method _wavespeed_kernel (line 38) | def _wavespeed_kernel(self, uin):
method privars (line 73) | def privars(ndims, cfg):
method convars (line 80) | def convars(ndims, cfg):
method visvars (line 89) | def visvars(ndims, cfg):
method pri_to_con (line 104) | def pri_to_con(pris, cfg):
method con_to_pri (line 117) | def con_to_pri(cons, cfg):
method diff_con_to_pri (line 130) | def diff_con_to_pri(cons, diff_cons, cfg):
class EulerElements (line 149) | class EulerElements(BaseFluidElements, BaseAdvectionElements):
method set_backend (line 150) | def set_backend(self, *args, **kwargs):
FILE: pyfr/solvers/euler/inters.py
class TplargsMixin (line 12) | class TplargsMixin:
method __init__ (line 13) | def __init__(self, *args, **kwargs):
class EulerIntInters (line 28) | class EulerIntInters(TplargsMixin, BaseAdvectionIntInters):
method __init__ (line 29) | def __init__(self, *args, **kwargs):
class EulerMPIInters (line 40) | class EulerMPIInters(TplargsMixin, BaseAdvectionMPIInters):
method __init__ (line 41) | def __init__(self, *args, **kwargs):
class EulerBaseBCInters (line 52) | class EulerBaseBCInters(TplargsMixin, BaseAdvectionBCInters):
method __init__ (line 53) | def __init__(self, *args, **kwargs):
method comm_entropy_kernel (line 66) | def comm_entropy_kernel(self, entmin_lhs):
class EulerSupInflowBCInters (line 77) | class EulerSupInflowBCInters(EulerBaseBCInters):
method __init__ (line 80) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class EulerSupOutflowBCInters (line 88) | class EulerSupOutflowBCInters(EulerBaseBCInters):
class EulerCharRiemInvBCInters (line 93) | class EulerCharRiemInvBCInters(EulerBaseBCInters):
method __init__ (line 96) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class EulerSlpAdiaWallBCInters (line 104) | class EulerSlpAdiaWallBCInters(EulerBaseBCInters):
class ControlledBCMixin (line 108) | class ControlledBCMixin:
method __init__ (line 109) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
method _init_extra (line 138) | def _init_extra(self, cfg, cfgsect):
method _interp_face (line 141) | def _interp_face(self, solns):
method setup (line 157) | def setup(self, sdata, prevcfg):
method preparefn (line 175) | def preparefn(cls, bciface, mesh, elemap):
method prepare (line 181) | def prepare(self, system, ubank, t, kerns):
method serialisefn (line 217) | def serialisefn(cls, bciface, prefix, srl):
class MassFlowBCMixin (line 226) | class MassFlowBCMixin(ControlledBCMixin):
method _init_extra (line 230) | def _init_extra(self, cfg, cfgsect):
method _default_interp_c (line 238) | def _default_interp_c(self):
method _measure (line 241) | def _measure(self, solns):
method _correction (line 249) | def _correction(self, p0, dt):
class EulerCharRiemInvMassFlowBCInters (line 253) | class EulerCharRiemInvMassFlowBCInters(MassFlowBCMixin, EulerBaseBCInters):
class PressureBCMixin (line 257) | class PressureBCMixin(ControlledBCMixin):
method _init_extra (line 261) | def _init_extra(self, cfg, cfgsect):
method _default_interp_c (line 275) | def _default_interp_c(self):
method _measure (line 278) | def _measure(self, solns):
method _correction (line 289) | def _correction(self, p0, dt):
class EulerCharRiemInvPressureBCInters (line 293) | class EulerCharRiemInvPressureBCInters(PressureBCMixin, EulerBaseBCInters):
FILE: pyfr/solvers/euler/system.py
class EulerSystem (line 7) | class EulerSystem(BaseAdvectionSystem):
FILE: pyfr/solvers/navstokes/elements.py
class NavierStokesElements (line 7) | class NavierStokesElements(BaseFluidElements, BaseAdvectionDiffusionElem...
method grad_con_to_pri (line 12) | def grad_con_to_pri(cons, grad_cons, cfg):
method set_backend (line 31) | def set_backend(self, *args, **kwargs):
FILE: pyfr/solvers/navstokes/inters.py
class TplargsMixin (line 9) | class TplargsMixin:
method __init__ (line 10) | def __init__(self, *args, **kwargs):
class NavierStokesIntInters (line 29) | class NavierStokesIntInters(TplargsMixin,
method __init__ (line 31) | def __init__(self, *args, **kwargs):
class NavierStokesMPIInters (line 50) | class NavierStokesMPIInters(TplargsMixin,
method __init__ (line 52) | def __init__(self, *args, **kwargs):
class NavierStokesBaseBCInters (line 70) | class NavierStokesBaseBCInters(TplargsMixin, BaseAdvectionDiffusionBCInt...
method __init__ (line 73) | def __init__(self, *args, **kwargs):
method comm_entropy_kernel (line 96) | def comm_entropy_kernel(self, entmin_lhs):
class NavierStokesNoSlpIsotWallBCInters (line 109) | class NavierStokesNoSlpIsotWallBCInters(NavierStokesBaseBCInters):
method __init__ (line 113) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class NavierStokesNoSlpAdiaWallBCInters (line 121) | class NavierStokesNoSlpAdiaWallBCInters(NavierStokesBaseBCInters):
class NavierStokesSlpAdiaWallBCInters (line 126) | class NavierStokesSlpAdiaWallBCInters(NavierStokesBaseBCInters):
class NavierStokesCharRiemInvBCInters (line 131) | class NavierStokesCharRiemInvBCInters(NavierStokesBaseBCInters):
method __init__ (line 135) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class NavierStokesSupInflowBCInters (line 143) | class NavierStokesSupInflowBCInters(NavierStokesBaseBCInters):
method __init__ (line 147) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class NavierStokesSupOutflowBCInters (line 155) | class NavierStokesSupOutflowBCInters(NavierStokesBaseBCInters):
class NavierStokesSubInflowFrvBCInters (line 160) | class NavierStokesSubInflowFrvBCInters(NavierStokesBaseBCInters):
method __init__ (line 164) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class NavierStokesSubInflowFtpttangBCInters (line 173) | class NavierStokesSubInflowFtpttangBCInters(NavierStokesBaseBCInters):
method __init__ (line 177) | def __init__(self, *args, **kwargs):
class NavierStokesSubOutflowBCInters (line 200) | class NavierStokesSubOutflowBCInters(NavierStokesBaseBCInters):
method __init__ (line 204) | def __init__(self, be, lhs, elemap, cfgsect, cfg, bccomm):
class NavierStokesCharRiemInvMassFlowBCInters (line 210) | class NavierStokesCharRiemInvMassFlowBCInters(MassFlowBCMixin,
class NavierStokesCharRiemInvPressureBCInters (line 216) | class NavierStokesCharRiemInvPressureBCInters(PressureBCMixin,
FILE: pyfr/solvers/navstokes/system.py
class NavierStokesSystem (line 8) | class NavierStokesSystem(BaseAdvectionDiffusionSystem):
FILE: pyfr/template.py
class DottedTemplateLookup (line 7) | class DottedTemplateLookup(TemplateLookup):
method __init__ (line 8) | def __init__(self, pkg, dfltargs):
method _apply_filters (line 13) | def _apply_filters(self, src):
method adjust_uri (line 19) | def adjust_uri(self, uri, relto):
method get_template (line 22) | def get_template(self, name):
FILE: pyfr/tests/test_ele_mats.py
function test_hex_gleg_ord3 (line 10) | def test_hex_gleg_ord3():
FILE: pyfr/util.py
class tty (line 13) | class tty:
class silence (line 23) | class silence:
method __init__ (line 24) | def __init__(self, stdout=os.devnull, stderr=os.devnull):
method __enter__ (line 32) | def __enter__(self):
method __exit__ (line 57) | def __exit__(self, *args):
function merge_intervals (line 77) | def merge_intervals(ivals, tol=1e-5):
class DisjointSet (line 96) | class DisjointSet:
method __init__ (line 97) | def __init__(self):
method find (line 100) | def find(self, i):
method union (line 107) | def union(self, i, j):
method merges (line 111) | def merges(self):
function first (line 115) | def first(v):
function subclasses (line 119) | def subclasses(cls, just_leaf=False):
function subclass_where (line 126) | def subclass_where(cls, **kwargs):
function ndrange (line 138) | def ndrange(*args):
function digest (line 142) | def digest(*args, hash='sha256'):
function rm (line 158) | def rm(path):
function mv (line 165) | def mv(src, dst):
function match_paired_paren (line 169) | def match_paired_paren(delim, n=5):
function file_path_gen (line 180) | def file_path_gen(basedir, basename, restore=False):
FILE: pyfr/writers/__init__.py
function get_writer_by_name (line 6) | def get_writer_by_name(name, type, /, *kargs, **kwargs):
function get_writer_by_extn (line 10) | def get_writer_by_extn(extn, type, /, *kargs, **kwargs):
FILE: pyfr/writers/base.py
class BaseWriter (line 5) | class BaseWriter:
method __init__ (line 6) | def __init__(self, meshf, pname=None):
method _load_soln (line 13) | def _load_soln(self, solnf):
FILE: pyfr/writers/csv.py
class CSVStream (line 3) | class CSVStream:
method __init__ (line 4) | def __init__(self, fname, *, header=None, nflush=100):
method __call__ (line 19) | def __call__(self, *args):
FILE: pyfr/writers/native.py
class NativeWriter (line 22) | class NativeWriter:
method __init__ (line 32) | def __init__(self, mesh, cfg, fpdtype, basedir, basename, prefix, *,
method from_integrator (line 75) | def from_integrator(intg, basedir, basename, prefix, *, extn='.pyfrs',
method _get_fstype (line 83) | def _get_fstype(basedir):
method _create_file (line 97) | def _create_file(self, path):
method set_shapes_eidxs (line 137) | def set_shapes_eidxs(self, shapes, eidxs, field_groups,
method _build_dtype (line 178) | def _build_dtype(self, field_groups, nupts, ndims, aux):
method probe (line 196) | def probe(self):
method flush (line 200) | def flush(self):
method _pack_element_data (line 205) | def _pack_element_data(self, data, aux, dtype, rank):
method write (line 221) | def write(self, data, tcurr, metadata=None, timeout=0, callback=None,
method _iter_bufs (line 288) | def _iter_bufs(self, data, callback):
method _get_writefn_parallel (line 296) | def _get_writefn_parallel(self, path, data, doffs):
method _get_writefn_serial (line 324) | def _get_writefn_serial(self, path, data, doffs):
method _prepare_file (line 378) | def _prepare_file(self, path, metadata):
class _AsyncCompleter (line 413) | class _AsyncCompleter:
method __init__ (line 414) | def __init__(self, th, timeout, callback):
method _test_with_timeout (line 422) | def _test_with_timeout(self, timeout):
method test (line 439) | def test(self):
method wait (line 442) | def wait(self):
FILE: pyfr/writers/serialise.py
class Serialiser (line 4) | class Serialiser:
method __init__ (line 5) | def __init__(self):
method register (line 8) | def register(self, prefix, datafn):
method serialise (line 25) | def serialise(self):
FILE: pyfr/writers/upgrade.py
function _copy_attrs (line 11) | def _copy_attrs(src_dset, dst_dset):
function _upgrade_mesh_v1_to_v2 (line 16) | def _upgrade_mesh_v1_to_v2(src, dst):
function _soln_field_groups (line 55) | def _soln_field_groups(stats):
function _upgrade_soln_v1_to_v2 (line 81) | def _upgrade_soln_v1_to_v2(src, dst):
function upgrade (line 138) | def upgrade(src, dst):
FILE: pyfr/writers/vtk/base.py
function interpolate_pts (line 12) | def interpolate_pts(op, pts):
class BaseVTKWriter (line 19) | class BaseVTKWriter(BaseWriter):
method __init__ (line 371) | def __init__(self, meshf, pname=None, *, prec='single', order=None,
method _pre_proc_fields_soln (line 393) | def _pre_proc_fields_soln(self, soln):
method _pre_proc_fields_scal (line 409) | def _pre_proc_fields_scal(self, soln):
method _post_proc_fields_soln (line 412) | def _post_proc_fields_soln(self, vsoln):
method _post_proc_fields_scal (line 422) | def _post_proc_fields_scal(self, vsoln):
method _get_npts_ncells_nnodes_lin (line 425) | def _get_npts_ncells_nnodes_lin(self, etype, neles):
method _get_npts_ncells_nnodes_ho (line 439) | def _get_npts_ncells_nnodes_ho(self, etype, neles):
method _get_array_attrs (line 452) | def _get_array_attrs(self, etype=None, neles=None):
method _load_soln (line 508) | def _load_soln(self, *args, **kwargs):
method process (line 569) | def process(self, solnf, outfname):
method _write_vtu (line 578) | def _write_vtu(self, fname):
method _write_pvtu (line 643) | def _write_pvtu(self, fname):
method _write_darray (line 696) | def _write_darray(self, array, write, dtype):
method _component_names (line 702) | def _component_names(self, ncomps):
method _vtk_dtype (line 722) | def _vtk_dtype(self, dtype):
method _extra_point_shapes (line 725) | def _extra_point_shapes(self, etype):
method _resolve_etype (line 730) | def _resolve_etype(self, etype):
method _extra_field_lists (line 733) | def _extra_field_lists(self, etype=None):
method _field_info (line 743) | def _field_info(self, name, etype):
method _write_serial_header (line 757) | def _write_serial_header(self, write_s, etype, neles, off):
method _write_parallel_header (line 787) | def _write_parallel_header(self, write_s):
method _write_time_value (line 808) | def _write_time_value(self, write_s):
method _write_data (line 815) | def _write_data(self, write, etype):
function get_subdiv (line 872) | def get_subdiv(name, n):
class BaseShapeSubDiv (line 876) | class BaseShapeSubDiv:
method __init__ (line 880) | def __init__(self, n):
method subcelloffs (line 884) | def subcelloffs(self):
method subcelltypes (line 888) | def subcelltypes(self):
class TensorProdShapeSubDiv (line 892) | class TensorProdShapeSubDiv(BaseShapeSubDiv):
method subcells (line 894) | def subcells(self):
method subnodes (line 898) | def subnodes(self):
class QuadShapeSubDiv (line 917) | class QuadShapeSubDiv(TensorProdShapeSubDiv):
class HexShapeSubDiv (line 922) | class HexShapeSubDiv(TensorProdShapeSubDiv):
class TriShapeSubDiv (line 927) | class TriShapeSubDiv(BaseShapeSubDiv):
method subcells (line 931) | def subcells(self):
method subnodes (line 935) | def subnodes(self):
class TetShapeSubDiv (line 956) | class TetShapeSubDiv(BaseShapeSubDiv):
method subcells (line 960) | def subcells(self):
method subnodes (line 964) | def subnodes(self):
class PriShapeSubDiv (line 995) | class PriShapeSubDiv(BaseShapeSubDiv):
method subcells (line 999) | def subcells(self):
method subnodes (line 1003) | def subnodes(self):
class PyrShapeSubDiv (line 1014) | class PyrShapeSubDiv(BaseShapeSubDiv):
method subcells (line 1018) | def subcells(self):
method subnodes (line 1028) | def subnodes(self):
FILE: pyfr/writers/vtk/boundary.py
function _search (line 12) | def _search(a, v):
class VTKBoundaryWriter (line 17) | class VTKBoundaryWriter(BaseVTKWriter):
method __init__ (line 21) | def __init__(self, meshf, boundaries, **kwargs):
method _load_soln (line 29) | def _load_soln(self, *args, **kwargs):
method _get_shape (line 67) | def _get_shape(self, etype, cfg):
method _itype_opmats (line 72) | def _itype_opmats(self, etype, fidx, cfg):
method _get_surface_info (line 96) | def _get_surface_info(self, etype, eoffs, fidxs):
method _extra_point_shapes (line 107) | def _extra_point_shapes(self, key):
method _resolve_etype (line 122) | def _resolve_etype(self, key):
method _prepare_pts (line 131) | def _prepare_pts(self, itype):
FILE: pyfr/writers/vtk/stl.py
function _vertex_normals_mwa (line 10) | def _vertex_normals_mwa(fnorms, verts, vids):
function _spherigon_smooth (line 33) | def _spherigon_smooth(flat_pts, bary, tri_verts, tri_norms):
class VTKSTLWriter (line 98) | class VTKSTLWriter(BaseVTKWriter):
method __init__ (line 102) | def __init__(self, meshf, stlrgns, *, subdiv='linear', **kwargs):
method _load_soln (line 131) | def _load_soln(self, *args, **kwargs):
method _resolve_etype (line 189) | def _resolve_etype(self, etype):
method _extra_field_lists (line 192) | def _extra_field_lists(self, etype=None):
method _prepare_pts (line 195) | def _prepare_pts(self, etype):
method _subdivide_pts (line 199) | def _subdivide_pts(self, stl, order, subdiv):
FILE: pyfr/writers/vtk/volume.py
class VTKVolumeWriter (line 10) | class VTKVolumeWriter(BaseVTKWriter):
method _load_soln (line 14) | def _load_soln(self, *args, **kwargs):
method _extra_point_shapes (line 20) | def _extra_point_shapes(self, etype):
method _opmats (line 28) | def _opmats(self, etype, cfg):
method _prepare_pts (line 52) | def _prepare_pts(self, etype):
Condensed preview — 598 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,619K chars).
[
{
"path": "AUTHORS",
"chars": 541,
"preview": "Semih Akkurt <s.akkurt18@imperial.ac.uk>\nHarry Davis <h.davis13@imperial.ac.uk>\nTarik Dzanic <tdzanic@tamu.edu>\nAntony F"
},
{
"path": "LICENSE",
"chars": 1504,
"preview": "Copyright (c) 2012–2026 Imperial College London\n\nAll rights reserved.\n\nRedistribution and use in source and binary forms"
},
{
"path": "README.md",
"chars": 1572,
"preview": "# PyFR\n\n## Overview\n\nPyFR is an open-source Python based framework for solving advection-diffusion\ntype problems on stre"
},
{
"path": "doc/Makefile",
"chars": 717,
"preview": "SPHINXOPTS =\nSPHINXBUILD = sphinx-build\nBUILDDIR = build\n\nALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(SPHINXOPTS) src\n"
},
{
"path": "doc/requirements.txt",
"chars": 55,
"preview": "sphinx >= 5.0\nsphinx-rtd-theme\nsphinxcontrib-contentui\n"
},
{
"path": "doc/src/_static/css/custom.css",
"chars": 832,
"preview": "section {\n text-align: justify;\n}\n\n.wy-side-nav-search, .wy-nav-top {\n background: #94b24d;\n}\n\n.rst-content sectio"
},
{
"path": "doc/src/backends/backend-cuda.rst",
"chars": 818,
"preview": "**************\n[backend-cuda]\n**************\n\nParameterises the CUDA backend with\n\n#. ``device-id`` --- method for selec"
},
{
"path": "doc/src/backends/backend-hip.rst",
"chars": 709,
"preview": "*************\n[backend-hip]\n*************\n\nParameterises the HIP backend with\n\n#. ``device-id`` --- method for selecting"
},
{
"path": "doc/src/backends/backend-metal.rst",
"chars": 519,
"preview": "****************\n[backend-metal]\n****************\n\nParameterises the Metal backend with\n\n#. ``gimmik-max-nnz`` --- cutof"
},
{
"path": "doc/src/backends/backend-opencl.rst",
"chars": 898,
"preview": "****************\n[backend-opencl]\n****************\n\nParameterises the OpenCL backend with\n\n#. ``platform-id`` --- for se"
},
{
"path": "doc/src/backends/backend-openmp.rst",
"chars": 530,
"preview": "****************\n[backend-openmp]\n****************\n\nParameterises the OpenMP backend with\n\n#. ``cc`` --- C compiler:\n\n "
},
{
"path": "doc/src/backends/backend.rst",
"chars": 603,
"preview": "*********\n[backend]\n*********\n\nParameterises the backend with\n\n#. ``precision`` --- number precision, note not all backe"
},
{
"path": "doc/src/boundary-initial-conditions/soln-bcs.rst",
"chars": 6690,
"preview": "*****************\n[soln-bcs-*name*]\n*****************\n\nParameterises constant, or if available space (x, y, [z]) and tim"
},
{
"path": "doc/src/boundary-initial-conditions/soln-ics.rst",
"chars": 796,
"preview": "**********\n[soln-ics]\n**********\n\nParameterises space (x, y, [z]) dependent initial conditions with\n\n#. ``rho`` --- init"
},
{
"path": "doc/src/conf.py",
"chars": 2197,
"preview": "import os\nimport sys\n\nsys.path.insert(0, os.path.abspath('../../'))\n\n# -- General configuration ------------------------"
},
{
"path": "doc/src/developer_guide.rst",
"chars": 18637,
"preview": "***************\nDeveloper Guide\n***************\n\n======================================\nA Brief Overview of the PyFR Fra"
},
{
"path": "doc/src/examples.rst",
"chars": 10696,
"preview": "********\nExamples\n********\n\nTest cases are available in the `PyFR-Test-Cases\n<https://github.com/PyFR/PyFR-Test-Cases>`_"
},
{
"path": "doc/src/file_format.rst",
"chars": 17693,
"preview": "***********\nFile Format\n***********\n\nThe PyFR mesh and solution file formats are based around HDF5. All\narrays are store"
},
{
"path": "doc/src/index.rst",
"chars": 570,
"preview": "####\nPyFR\n####\n\n.. _website: https://www.pyfr.org/\n.. _forum: https://pyfr.discourse.group/\n\nPyFR |release| is an open-s"
},
{
"path": "doc/src/installation.rst",
"chars": 6689,
"preview": "************\nInstallation\n************\n\nQuick-start\n===========\n\nPyFR |release| can be installed using\n`pip <https://pyp"
},
{
"path": "doc/src/io.rst",
"chars": 3047,
"preview": "********\nDisk I/O\n********\n\nSolution File Writing\n=====================\n\nPlugins in PyFR which write ``.pyfrs`` solution"
},
{
"path": "doc/src/meshing.rst",
"chars": 1925,
"preview": "*******\nMeshing\n*******\n\nImporting Meshes\n================\n\nPyFR is capable of importing meshes in the Gmsh .msh format;"
},
{
"path": "doc/src/nodal-point-sets/solver-elements-hex.rst",
"chars": 778,
"preview": "*********************\n[solver-elements-hex]\n*********************\n\nParameterises the hexahedral elements, with\n\n#. ``sol"
},
{
"path": "doc/src/nodal-point-sets/solver-elements-pri.rst",
"chars": 908,
"preview": "*********************\n[solver-elements-pri]\n*********************\n\nParameterises the prismatic elements, with\n\n#. ``soln"
},
{
"path": "doc/src/nodal-point-sets/solver-elements-pyr.rst",
"chars": 736,
"preview": "*********************\n[solver-elements-pyr]\n*********************\n\nParameterises the pyramidal elements, with\n\n#. ``soln"
},
{
"path": "doc/src/nodal-point-sets/solver-elements-quad.rst",
"chars": 795,
"preview": "**********************\n[solver-elements-quad]\n**********************\n\nParameterises the quadrilateral elements, with\n\n#."
},
{
"path": "doc/src/nodal-point-sets/solver-elements-tet.rst",
"chars": 730,
"preview": "*********************\n[solver-elements-tet]\n*********************\n\nParameterises the tetrahedral elements, with\n\n#. ``so"
},
{
"path": "doc/src/nodal-point-sets/solver-elements-tri.rst",
"chars": 730,
"preview": "*********************\n[solver-elements-tri]\n*********************\n\nParameterises the triangular elements, with\n\n#. ``sol"
},
{
"path": "doc/src/nodal-point-sets/solver-interfaces-line.rst",
"chars": 733,
"preview": "************************\n[solver-interfaces-line]\n************************\n\nParameterises the line interfaces, with\n\n#. "
},
{
"path": "doc/src/nodal-point-sets/solver-interfaces-quad.rst",
"chars": 809,
"preview": "************************\n[solver-interfaces-quad]\n************************\n\nParameterises the quadrilateral interfaces, "
},
{
"path": "doc/src/nodal-point-sets/solver-interfaces-tri.rst",
"chars": 744,
"preview": "***********************\n[solver-interfaces-tri]\n***********************\n\nParameterises the triangular interfaces, with\n\n"
},
{
"path": "doc/src/performance_tuning.rst",
"chars": 13446,
"preview": "******************\nPerformance Tuning\n******************\n\nThe following sections contain best practices for *tuning* the"
},
{
"path": "doc/src/plugins/soln-plugin-ascent.rst",
"chars": 3388,
"preview": ".. _soln-plugin-ascent:\n\n[soln-plugin-ascent]\n^^^^^^^^^^^^^^^^^^^^\n\nUses `Alpine Ascent <https://github.com/Alpine-DAV/a"
},
{
"path": "doc/src/plugins/soln-plugin-dtstats.rst",
"chars": 938,
"preview": "*********************\n[soln-plugin-dtstats]\n*********************\n\nWrite time-step statistics out to a CSV file. For imp"
},
{
"path": "doc/src/plugins/soln-plugin-fluid-force.rst",
"chars": 1479,
"preview": "*******************************\n[soln-plugin-fluidforce-*name*]\n*******************************\n\nPeriodically integrates"
},
{
"path": "doc/src/plugins/soln-plugin-fwh.rst",
"chars": 1354,
"preview": "*****************\n[soln-plugin-fwh]\n*****************\n\nUse Ffowcs Williams--Hawkings equation to approximate far field n"
},
{
"path": "doc/src/plugins/soln-plugin-integrate.rst",
"chars": 1776,
"preview": ".. _soln-plugin-integrate:\n\n***********************\n[soln-plugin-integrate]\n***********************\n\nIntegrate quantitie"
},
{
"path": "doc/src/plugins/soln-plugin-nancheck.rst",
"chars": 441,
"preview": "**********************\n[soln-plugin-nancheck]\n**********************\n\nPeriodically checks the solution for NaN values. P"
},
{
"path": "doc/src/plugins/soln-plugin-pseudostats.rst",
"chars": 537,
"preview": "*************************\n[soln-plugin-pseudostats]\n*************************\n\nWrite pseudo-step convergence history out"
},
{
"path": "doc/src/plugins/soln-plugin-residual.rst",
"chars": 875,
"preview": "**********************\n[soln-plugin-residual]\n**********************\n\nPeriodically calculates the residual and writes it"
},
{
"path": "doc/src/plugins/soln-plugin-sampler.rst",
"chars": 2067,
"preview": "*********************\n[soln-plugin-sampler]\n*********************\n\nPeriodically samples specific points in the volume an"
},
{
"path": "doc/src/plugins/soln-plugin-tavg.rst",
"chars": 3200,
"preview": "******************\n[soln-plugin-tavg]\n******************\n\nTime average quantities. Parameterised with\n\n#. ``nsteps`` ---"
},
{
"path": "doc/src/plugins/soln-plugin-writer.rst",
"chars": 1843,
"preview": "********************\n[soln-plugin-writer]\n********************\n\nPeriodically write the solution to disk in the pyfrs for"
},
{
"path": "doc/src/plugins/solver-plugin-source.rst",
"chars": 557,
"preview": "**********************\n[solver-plugin-source]\n**********************\n\nInjects solution, space (x, y, [z]), and time (t) "
},
{
"path": "doc/src/plugins/solver-plugin-turbulence.rst",
"chars": 1277,
"preview": "**************************\n[solver-plugin-turbulence]\n**************************\n\nInjects synthetic eddies into a region"
},
{
"path": "doc/src/plugins/triggers.rst",
"chars": 15090,
"preview": "********\nTriggers\n********\n\nTriggers extend the plugin system with conditional execution. Instead\nof running on a fixed"
},
{
"path": "doc/src/post_processing.rst",
"chars": 5979,
"preview": ".. _ParaViewPar: https://docs.paraview.org/en/latest/ReferenceManual/parallelDataVisualization.html\n\n***************\nPos"
},
{
"path": "doc/src/systems/constants.rst",
"chars": 835,
"preview": "***********\n[constants]\n***********\n\nSets constants used in the simulation\n\n#. ``gamma`` --- ratio of specific heats:\n\n "
},
{
"path": "doc/src/systems/solver-artificial-viscosity.rst",
"chars": 426,
"preview": "*****************************\n[solver-artificial-viscosity]\n*****************************\n\nParameterises artificial visc"
},
{
"path": "doc/src/systems/solver-entropy-filter.rst",
"chars": 751,
"preview": "***********************\n[solver-entropy-filter]\n***********************\n\nParameterises entropy filter for shock capturin"
},
{
"path": "doc/src/systems/solver-interfaces.rst",
"chars": 463,
"preview": "*******************\n[solver-interfaces]\n*******************\n\nParameterises the interfaces with\n\n1. ``riemann-solver`` --"
},
{
"path": "doc/src/systems/solver-time-integrator.rst",
"chars": 12906,
"preview": "************************\n[solver-time-integrator]\n************************\n\nParameterises the time-integration scheme us"
},
{
"path": "doc/src/systems/solver.rst",
"chars": 853,
"preview": "********\n[solver]\n********\n\nParameterises the solver with\n\n1. ``system`` --- governing system:\n\n ``euler`` | ``navier"
},
{
"path": "doc/src/user_guide.rst",
"chars": 19462,
"preview": "**********\nUser Guide\n**********\n\nFor information on how to install PyFR see :ref:`installation:installation`.\n\n.. _runn"
},
{
"path": "pyfr/__init__.py",
"chars": 38,
"preview": "from pyfr._version import __version__\n"
},
{
"path": "pyfr/__main__.py",
"chars": 23523,
"preview": "#!/usr/bin/env python\nfrom argparse import ArgumentParser, FileType\nimport csv\nimport io\nfrom pathlib import Path\nimport"
},
{
"path": "pyfr/_version.py",
"chars": 20,
"preview": "__version__ = '3.1'\n"
},
{
"path": "pyfr/backends/__init__.py",
"chars": 396,
"preview": "from pyfr.backends.base import BaseBackend\nfrom pyfr.backends.cuda import CUDABackend\nfrom pyfr.backends.hip import HIPB"
},
{
"path": "pyfr/backends/base/__init__.py",
"chars": 621,
"preview": "from pyfr.backends.base.backend import BaseBackend, MemoryInfo\nfrom pyfr.backends.base.provider import (BaseKernelProvid"
},
{
"path": "pyfr/backends/base/backend.py",
"chars": 7410,
"preview": "from collections import namedtuple\nfrom contextlib import contextmanager\nfrom functools import cached_property, wraps\nfr"
},
{
"path": "pyfr/backends/base/blasext.py",
"chars": 1673,
"preview": "import re\n\nimport numpy as np\n\nfrom pyfr.util import first\n\n\nclass BaseBlasExtKernels:\n def axnpby(self, *arr, in_sca"
},
{
"path": "pyfr/backends/base/generator.py",
"chars": 18714,
"preview": "from math import prod\nimport re\n\nimport numpy as np\n\nfrom pyfr.util import match_paired_paren\n\n\nclass Arg:\n def __ini"
},
{
"path": "pyfr/backends/base/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/backends/base/kernels/packing.mako",
"chars": 825,
"preview": "<%def name=\"pack_view_body()\">\n if (i < n && ncv == 1)\n pmat[i] = v[vix[i]];\n else if (i < n && nrv == 1)\n "
},
{
"path": "pyfr/backends/base/makoutil.py",
"chars": 8678,
"preview": "from collections import namedtuple\nfrom collections.abc import Iterable\nfrom inspect import signature\nimport itertools a"
},
{
"path": "pyfr/backends/base/provider.py",
"chars": 6228,
"preview": "import itertools as it\nimport re\nimport types\n\nimport numpy as np\n\nfrom pyfr.cache import memoize\n\n\nclass Kernel:\n co"
},
{
"path": "pyfr/backends/base/types.py",
"chars": 17247,
"preview": "from bisect import insort\nfrom collections import defaultdict, deque\nimport time\n\nimport numpy as np\n\nfrom pyfr.mpiutil "
},
{
"path": "pyfr/backends/cuda/__init__.py",
"chars": 48,
"preview": "from pyfr.backends.cuda.base import CUDABackend\n"
},
{
"path": "pyfr/backends/cuda/base.py",
"chars": 4723,
"preview": "import re\n\nimport numpy as np\n\nfrom pyfr.backends.base import BaseBackend\nfrom pyfr.mpiutil import get_local_rank\n\n\nclas"
},
{
"path": "pyfr/backends/cuda/blasext.py",
"chars": 4545,
"preview": "import numpy as np\n\nfrom pyfr.backends.base.blasext import BaseBlasExtKernels\nfrom pyfr.backends.cuda.provider import (C"
},
{
"path": "pyfr/backends/cuda/compiler.py",
"chars": 5019,
"preview": "from ctypes import (POINTER, create_string_buffer, c_char_p, c_int, c_size_t,\n c_void_p)\nimport shlex"
},
{
"path": "pyfr/backends/cuda/cublaslt.py",
"chars": 9340,
"preview": "from collections import namedtuple\nfrom ctypes import (POINTER, Structure, byref, c_double, c_float, c_int,\n "
},
{
"path": "pyfr/backends/cuda/driver.py",
"chars": 18079,
"preview": "from ctypes import (POINTER, Structure, addressof, byref, create_string_buffer,\n c_char, c_char_p, c_"
},
{
"path": "pyfr/backends/cuda/generator.py",
"chars": 1602,
"preview": "from math import prod\n\nfrom pyfr.backends.base.generator import BaseGPUKernelGenerator\n\n\nclass CUDAKernelGenerator(BaseG"
},
{
"path": "pyfr/backends/cuda/gimmik.py",
"chars": 4210,
"preview": "from weakref import finalize\n\nfrom gimmik import CUDAMatMul\nimport numpy as np\n\nfrom pyfr.backends.base import NotSuitab"
},
{
"path": "pyfr/backends/cuda/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/backends/cuda/kernels/axnpby.mako",
"chars": 1412,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n__global__ void\naxnpby(ixdtype_t"
},
{
"path": "pyfr/backends/cuda/kernels/base.mako",
"chars": 1173,
"preview": "<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n// AoSoA macros\n#define SOA_SZ ${soasz}\n#define SOA_IX(a"
},
{
"path": "pyfr/backends/cuda/kernels/packing.mako",
"chars": 783,
"preview": "<%inherit file='base'/>\n<%namespace file='pyfr.backends.base.kernels.packing' name='pkg'/>\n\n__global__ void\npack_view(ix"
},
{
"path": "pyfr/backends/cuda/kernels/reduction.mako",
"chars": 2727,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n__global__ void\nreduction(ixdtyp"
},
{
"path": "pyfr/backends/cuda/nvtools.py",
"chars": 1888,
"preview": "from ctypes import (POINTER, Structure, c_char_p, c_int, c_int32, c_uint16,\n c_uint32, c_uint64, c_vo"
},
{
"path": "pyfr/backends/cuda/packing.py",
"chars": 4000,
"preview": "import numpy as np\n\nfrom pyfr.backends.base import NullKernel\nfrom pyfr.backends.cuda.provider import (CUDAKernel, CUDAK"
},
{
"path": "pyfr/backends/cuda/provider.py",
"chars": 4166,
"preview": "from weakref import WeakKeyDictionary\n\nfrom pyfr.backends.base import (BaseKernelProvider, BaseOrderedMetaKernel,\n "
},
{
"path": "pyfr/backends/cuda/types.py",
"chars": 3689,
"preview": "from functools import cached_property\n\nimport numpy as np\n\nimport pyfr.backends.base as base\n\n\nclass _CUDAMatrixCommon:\n"
},
{
"path": "pyfr/backends/hip/__init__.py",
"chars": 46,
"preview": "from pyfr.backends.hip.base import HIPBackend\n"
},
{
"path": "pyfr/backends/hip/base.py",
"chars": 4393,
"preview": "import re\n\nimport numpy as np\n\nfrom pyfr.backends.base import BaseBackend\nfrom pyfr.mpiutil import get_local_rank\n\n\nclas"
},
{
"path": "pyfr/backends/hip/blasext.py",
"chars": 4512,
"preview": "import numpy as np\n\nfrom pyfr.backends.base.blasext import BaseBlasExtKernels\nfrom pyfr.backends.hip.provider import (HI"
},
{
"path": "pyfr/backends/hip/compiler.py",
"chars": 4317,
"preview": "from ctypes import (POINTER, create_string_buffer, c_char_p, c_int, c_size_t,\n c_void_p)\n\nfrom pyfr.c"
},
{
"path": "pyfr/backends/hip/driver.py",
"chars": 14686,
"preview": "from ctypes import (POINTER, Structure, addressof, byref, cast,\n create_string_buffer, c_char, c_char"
},
{
"path": "pyfr/backends/hip/generator.py",
"chars": 1601,
"preview": "from math import prod\n\nfrom pyfr.backends.base.generator import BaseGPUKernelGenerator\n\n\nclass HIPKernelGenerator(BaseGP"
},
{
"path": "pyfr/backends/hip/gimmik.py",
"chars": 4070,
"preview": "from weakref import finalize\n\nfrom gimmik import HIPMatMul\nimport numpy as np\n\nfrom pyfr.backends.base import NotSuitabl"
},
{
"path": "pyfr/backends/hip/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/backends/hip/kernels/axnpby.mako",
"chars": 1452,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n__global__ __launch_bounds__(${b"
},
{
"path": "pyfr/backends/hip/kernels/base.mako",
"chars": 1303,
"preview": "<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n// AoSoA macros\n#define SOA_SZ ${soasz}\n#define SOA_IX(a"
},
{
"path": "pyfr/backends/hip/kernels/packing.mako",
"chars": 843,
"preview": "<%inherit file='base'/>\n<%namespace file='pyfr.backends.base.kernels.packing' name='pkg'/>\n\n__global__ __launch_bounds__"
},
{
"path": "pyfr/backends/hip/kernels/reduction.mako",
"chars": 2719,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n__global__ __launch_bounds__(${b"
},
{
"path": "pyfr/backends/hip/packing.py",
"chars": 4022,
"preview": "import numpy as np\n\nfrom pyfr.backends.base import NullKernel\nfrom pyfr.backends.hip.provider import (HIPKernel, HIPKern"
},
{
"path": "pyfr/backends/hip/provider.py",
"chars": 4001,
"preview": "from weakref import WeakKeyDictionary\n\nfrom pyfr.backends.base import (BaseKernelProvider, BaseOrderedMetaKernel,\n "
},
{
"path": "pyfr/backends/hip/rocblas.py",
"chars": 7108,
"preview": "from ctypes import (POINTER, byref, c_int, c_int64, c_double, c_float,\n c_uint32, c_void_p)\nimport os"
},
{
"path": "pyfr/backends/hip/roctx.py",
"chars": 472,
"preview": "from ctypes import c_char_p, c_int\n\nfrom pyfr.ctypesutil import LibWrapper\n\n\nclass ROCTXWrappers(LibWrapper):\n _libna"
},
{
"path": "pyfr/backends/hip/types.py",
"chars": 3668,
"preview": "from functools import cached_property\n\nimport numpy as np\n\nimport pyfr.backends.base as base\n\n\nclass _HIPMatrixCommon:\n "
},
{
"path": "pyfr/backends/metal/__init__.py",
"chars": 50,
"preview": "from pyfr.backends.metal.base import MetalBackend\n"
},
{
"path": "pyfr/backends/metal/base.py",
"chars": 4067,
"preview": "import numpy as np\n\nfrom pyfr.backends.base import BaseBackend\nfrom pyfr.backends.metal.util import call_\n\n\nclass MetalB"
},
{
"path": "pyfr/backends/metal/blasext.py",
"chars": 4642,
"preview": "import numpy as np\n\nfrom pyfr.backends.base.blasext import BaseBlasExtKernels\nfrom pyfr.backends.metal.provider import M"
},
{
"path": "pyfr/backends/metal/compiler.py",
"chars": 1387,
"preview": "from pyfr.backends.metal.util import call_\n\n\nclass MetalCompiler:\n def __init__(self, backend):\n self.backend "
},
{
"path": "pyfr/backends/metal/generator.py",
"chars": 1631,
"preview": "import re\n\nfrom pyfr.backends.base.generator import BaseGPUKernelGenerator\n\n\nclass MetalKernelGenerator(BaseGPUKernelGen"
},
{
"path": "pyfr/backends/metal/gimmik.py",
"chars": 3434,
"preview": "from weakref import finalize\n\nfrom gimmik import MetalMatMul\nimport numpy as np\n\nfrom pyfr.backends.base import NotSuita"
},
{
"path": "pyfr/backends/metal/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/backends/metal/kernels/axnpby.mako",
"chars": 1367,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\nkernel void\naxnpby(constant ixdt"
},
{
"path": "pyfr/backends/metal/kernels/base.mako",
"chars": 1492,
"preview": "<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n#include <metal_stdlib>\n\nusing namespace metal;\n\n// AoSo"
},
{
"path": "pyfr/backends/metal/kernels/packing.mako",
"chars": 771,
"preview": "<%inherit file='base'/>\n<%namespace file='pyfr.backends.base.kernels.packing' name='pkg'/>\n\nkernel void\npack_view(consta"
},
{
"path": "pyfr/backends/metal/kernels/reduction.mako",
"chars": 2707,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\nkernel void\nreduction(constant i"
},
{
"path": "pyfr/backends/metal/mps.py",
"chars": 2458,
"preview": "from pyfr.backends.metal.provider import MetalKernel, MetalKernelProvider\nfrom pyfr.backends.metal.util import call_, in"
},
{
"path": "pyfr/backends/metal/packing.py",
"chars": 1800,
"preview": "import numpy as np\n\nfrom pyfr.backends.metal.provider import MetalKernel, MetalKernelProvider\n\n\nclass MetalPackingKernel"
},
{
"path": "pyfr/backends/metal/provider.py",
"chars": 4204,
"preview": "from ctypes import sizeof\n\nimport numpy as np\n\nfrom pyfr.backends.base import (BaseKernelProvider, BaseOrderedMetaKernel"
},
{
"path": "pyfr/backends/metal/types.py",
"chars": 2847,
"preview": "from collections import defaultdict\nfrom functools import cached_property\n\nimport numpy as np\n\nimport pyfr.backends.base"
},
{
"path": "pyfr/backends/metal/util.py",
"chars": 273,
"preview": "def call_(obj, name_, **kwargs):\n keys = list(kwargs)\n keys[0] = keys[0][0].upper() + keys[0][1:]\n meth = name_"
},
{
"path": "pyfr/backends/opencl/__init__.py",
"chars": 52,
"preview": "from pyfr.backends.opencl.base import OpenCLBackend\n"
},
{
"path": "pyfr/backends/opencl/base.py",
"chars": 5185,
"preview": "import numpy as np\n\nfrom pyfr.backends.base import BaseBackend\nfrom pyfr.mpiutil import get_local_rank\n\n\nclass OpenCLBac"
},
{
"path": "pyfr/backends/opencl/blasext.py",
"chars": 4052,
"preview": "import numpy as np\n\nfrom pyfr.backends.base.blasext import BaseBlasExtKernels\nfrom pyfr.backends.opencl.provider import "
},
{
"path": "pyfr/backends/opencl/clblast.py",
"chars": 3472,
"preview": "from ctypes import POINTER, c_int, c_double, c_float, c_size_t, c_void_p\n\nimport numpy as np\n\nfrom pyfr.backends.opencl."
},
{
"path": "pyfr/backends/opencl/compiler.py",
"chars": 583,
"preview": "from pyfr.cache import ObjectCache\nfrom pyfr.util import digest\n\n\nclass OpenCLCompiler:\n def __init__(self, cl):\n "
},
{
"path": "pyfr/backends/opencl/driver.py",
"chars": 21254,
"preview": "from ctypes import (POINTER, byref, cast, create_string_buffer, c_char,\n c_char_p, c_double, c_float,"
},
{
"path": "pyfr/backends/opencl/generator.py",
"chars": 1672,
"preview": "from pyfr.backends.base.generator import BaseGPUKernelGenerator\n\n\nclass OpenCLKernelGenerator(BaseGPUKernelGenerator):\n "
},
{
"path": "pyfr/backends/opencl/gimmik.py",
"chars": 3957,
"preview": "from weakref import finalize\n\nfrom gimmik import OpenCLMatMul\nimport numpy as np\n\nfrom pyfr.backends.base import NotSuit"
},
{
"path": "pyfr/backends/opencl/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/backends/opencl/kernels/axnpby.mako",
"chars": 1408,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n__kernel __attribute__((reqd_wor"
},
{
"path": "pyfr/backends/opencl/kernels/base.mako",
"chars": 1947,
"preview": "<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n// AoSoA macros\n#define SOA_SZ ${soasz}\n#define SOA_IX(a"
},
{
"path": "pyfr/backends/opencl/kernels/packing.mako",
"chars": 759,
"preview": "<%inherit file='base'/>\n<%namespace file='pyfr.backends.base.kernels.packing' name='pkg'/>\n\n__kernel void\npack_view(ixdt"
},
{
"path": "pyfr/backends/opencl/kernels/reduction.mako",
"chars": 1371,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n__kernel void\nreduction(ixdtype_"
},
{
"path": "pyfr/backends/opencl/packing.py",
"chars": 2483,
"preview": "import numpy as np\n\nfrom pyfr.backends.opencl.provider import OpenCLKernel, OpenCLKernelProvider\n\n\nclass OpenCLPackingKe"
},
{
"path": "pyfr/backends/opencl/provider.py",
"chars": 3638,
"preview": "from pyfr.backends.base import (BaseKernelProvider, BaseOrderedMetaKernel,\n BasePointwise"
},
{
"path": "pyfr/backends/opencl/tinytc.py",
"chars": 5701,
"preview": "from ctypes import (POINTER, byref, c_double, c_int, c_int32, c_int64, c_float,\n c_size_t, c_uint, c_"
},
{
"path": "pyfr/backends/opencl/types.py",
"chars": 4008,
"preview": "from functools import cached_property\n\nimport numpy as np\n\nimport pyfr.backends.base as base\n\n\nclass _OpenCLMatrixCommon"
},
{
"path": "pyfr/backends/openmp/__init__.py",
"chars": 52,
"preview": "from pyfr.backends.openmp.base import OpenMPBackend\n"
},
{
"path": "pyfr/backends/openmp/base.py",
"chars": 3221,
"preview": "from ctypes import c_int, c_void_p\nfrom functools import cached_property\nimport platform\nimport re\n\nimport numpy as np\n\n"
},
{
"path": "pyfr/backends/openmp/blasext.py",
"chars": 4089,
"preview": "import numpy as np\n\nfrom pyfr.backends.base.blasext import BaseBlasExtKernels\nfrom pyfr.backends.openmp.provider import "
},
{
"path": "pyfr/backends/openmp/compiler.py",
"chars": 4930,
"preview": "from ctypes import CDLL\nimport itertools as it\nimport os\nfrom pathlib import Path\nimport platform\nimport shlex\nimport te"
},
{
"path": "pyfr/backends/openmp/generator.py",
"chars": 8924,
"preview": "import re\nfrom math import prod\n\nfrom pyfr.backends.base.generator import BaseKernelGenerator\n\n\nclass OpenMPKernelGenera"
},
{
"path": "pyfr/backends/openmp/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/backends/openmp/kernels/axnpby.mako",
"chars": 1456,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\nstruct kargs\n{\n ixdtype_t nro"
},
{
"path": "pyfr/backends/openmp/kernels/base.mako",
"chars": 786,
"preview": "<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n#include <omp.h>\n#include <stdint.h>\n#include <stdlib.h>"
},
{
"path": "pyfr/backends/openmp/kernels/batch-gemm.mako",
"chars": 514,
"preview": "<%inherit file='base'/>\n\nstruct kargs\n{\n void (*exec)(void *, const fpdtype_t *, fpdtype_t *);\n void *blockk;\n "
},
{
"path": "pyfr/backends/openmp/kernels/packing.mako",
"chars": 1243,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\nstruct kargs\n{\n ixdtype_t n;\n"
},
{
"path": "pyfr/backends/openmp/kernels/par-memcpy.mako",
"chars": 491,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n#include <string.h>\n\nstruct karg"
},
{
"path": "pyfr/backends/openmp/kernels/par-memop.mako",
"chars": 676,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n#include <string.h>\n\nstruct karg"
},
{
"path": "pyfr/backends/openmp/kernels/reduction.mako",
"chars": 3159,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\nstruct kargs\n{\n ixdtype_t nro"
},
{
"path": "pyfr/backends/openmp/kernels/run-kernels.mako",
"chars": 1994,
"preview": "<%inherit file='base'/>\n\n#include <alloca.h>\n#include <string.h>\n\ntypedef struct\n{\n void (*fun)(void *);\n void *ar"
},
{
"path": "pyfr/backends/openmp/packing.py",
"chars": 1181,
"preview": "import numpy as np\n\nfrom pyfr.backends.base import NullKernel\nfrom pyfr.backends.openmp.provider import OpenMPKernel, Op"
},
{
"path": "pyfr/backends/openmp/provider.py",
"chars": 6093,
"preview": "from ctypes import (POINTER, Structure, Union, addressof, byref, c_int,\n c_void_p, cast, pointer, siz"
},
{
"path": "pyfr/backends/openmp/types.py",
"chars": 6917,
"preview": "from collections import defaultdict\nfrom ctypes import c_int\nfrom functools import cached_property\n\nimport pyfr.backends"
},
{
"path": "pyfr/backends/openmp/xsmm.py",
"chars": 4658,
"preview": "from ctypes import byref, cast, c_int, c_double, c_float, c_ulonglong, c_void_p\nfrom weakref import finalize\n\nimport num"
},
{
"path": "pyfr/cache.py",
"chars": 3211,
"preview": "import functools as ft\nimport itertools as it\nimport os\nfrom pathlib import Path\nimport pickle\nimport random\nimport uuid"
},
{
"path": "pyfr/ctypesutil.py",
"chars": 2574,
"preview": "import ctypes\nimport ctypes.util\nimport os\nfrom pathlib import Path\nimport sys\n\n\nclass LibWrapper:\n _libname = None\n "
},
{
"path": "pyfr/inifile.py",
"chars": 4679,
"preview": "from ast import literal_eval\nfrom configparser import ConfigParser, NoSectionError, NoOptionError\nimport io\nimport os\nfr"
},
{
"path": "pyfr/integrators/__init__.py",
"chars": 1594,
"preview": "import re\n\nfrom pyfr.integrators.explicit import (BaseExplicitController,\n BaseExp"
},
{
"path": "pyfr/integrators/base.py",
"chars": 15266,
"preview": "from collections import defaultdict, deque, namedtuple\nimport itertools as it\nimport re\nimport sys\nimport time\n\nimport n"
},
{
"path": "pyfr/integrators/controllers.py",
"chars": 4078,
"preview": "import math\n\nfrom pyfr.integrators.base import kernel_getter\nfrom pyfr.mpiutil import get_comm_rank_root, mpi, scal_coll"
},
{
"path": "pyfr/integrators/explicit/__init__.py",
"chars": 140,
"preview": "from pyfr.integrators.explicit.controllers import BaseExplicitController\nfrom pyfr.integrators.explicit.steppers import "
},
{
"path": "pyfr/integrators/explicit/base.py",
"chars": 2253,
"preview": "import numpy as np\n\nfrom pyfr.integrators.base import BaseIntegrator, _common_plugin_prop\n\n\nclass BaseExplicitIntegrator"
},
{
"path": "pyfr/integrators/explicit/controllers.py",
"chars": 3923,
"preview": "from pyfr.integrators.base import StepInfo\nfrom pyfr.integrators.controllers import CFLControllerMixin, PIControllerMixi"
},
{
"path": "pyfr/integrators/explicit/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/integrators/explicit/kernels/rkvdh2.mako",
"chars": 1032,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:kernel name='rkvdh2' ndim"
},
{
"path": "pyfr/integrators/explicit/steppers.py",
"chars": 6641,
"preview": "from pyfr.cache import memoize\nfrom pyfr.integrators.explicit.base import BaseExplicitIntegrator\nfrom pyfr.integrators.r"
},
{
"path": "pyfr/integrators/implicit/__init__.py",
"chars": 195,
"preview": "from pyfr.integrators.implicit.controllers import BaseImplicitController\nfrom pyfr.integrators.implicit.gmres import GMR"
},
{
"path": "pyfr/integrators/implicit/base.py",
"chars": 4178,
"preview": "from pyfr.integrators.base import (BaseIntegrator, _common_plugin_prop,\n kernel_getter"
},
{
"path": "pyfr/integrators/implicit/controllers.py",
"chars": 12211,
"preview": "import numpy as np\n\nfrom pyfr.integrators.base import StepInfo\nfrom pyfr.integrators.controllers import CFLControllerMix"
},
{
"path": "pyfr/integrators/implicit/gmres.py",
"chars": 6090,
"preview": "import numpy as np\n\nfrom pyfr.integrators.implicit.krylov import BaseKrylovSolver\nfrom pyfr.integrators.implicit.toleran"
},
{
"path": "pyfr/integrators/implicit/kernels/__init__.py",
"chars": 832,
"preview": "import re\n\nfrom pyfr.integrators.explicit import BaseExplicitController, BaseExplicitStepper\nfrom pyfr.util import subcl"
},
{
"path": "pyfr/integrators/implicit/kernels/applyprecond.mako",
"chars": 1042,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:kernel name='applyprecond"
},
{
"path": "pyfr/integrators/implicit/kernels/precondextract.mako",
"chars": 896,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:kernel name='precondextra"
},
{
"path": "pyfr/integrators/implicit/kernels/precondperturb.mako",
"chars": 978,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:kernel name='precondpertu"
},
{
"path": "pyfr/integrators/implicit/kernels/precondscale.mako",
"chars": 426,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:kernel name='precondscale"
},
{
"path": "pyfr/integrators/implicit/krylov.py",
"chars": 7409,
"preview": "from pyfr.cache import memoize\nfrom pyfr.integrators.base import kernel_getter\nfrom pyfr.integrators.implicit.base impor"
},
{
"path": "pyfr/integrators/implicit/newton.py",
"chars": 8079,
"preview": "from collections import namedtuple\nimport math\nimport time\n\nfrom pyfr.integrators.implicit.krylov import BaseKrylovSolve"
},
{
"path": "pyfr/integrators/implicit/steppers.py",
"chars": 6106,
"preview": "import numpy as np\n\nfrom pyfr.integrators.implicit.base import BaseImplicitIntegrator\nfrom pyfr.integrators.implicit.new"
},
{
"path": "pyfr/integrators/implicit/tolerance.py",
"chars": 9089,
"preview": "import numpy as np\n\nfrom pyfr.nputil import LogGPOptimiser\nfrom pyfr.util import subclass_where\n\n\ndef get_krylov_tol_con"
},
{
"path": "pyfr/integrators/registers.py",
"chars": 1275,
"preview": "class BaseRegister:\n extent = None\n\n\nclass ScalarRegister(BaseRegister):\n vector = False\n dynamic = False\n\n "
},
{
"path": "pyfr/mpiutil.py",
"chars": 16147,
"preview": "import atexit\nimport ctypes\nimport math\nimport os\nimport sys\nimport weakref\n\nimport numpy as np\n\nfrom pyfr.cache import "
},
{
"path": "pyfr/nputil.py",
"chars": 9584,
"preview": "import ctypes as ct\nimport functools as ft\nimport itertools as it\nfrom math import erf\nimport re\n\nimport numpy as np\n\n\nd"
},
{
"path": "pyfr/partitioners/__init__.py",
"chars": 512,
"preview": "from pyfr.partitioners.base import BasePartitioner, write_partitioning\nfrom pyfr.partitioners.baseline import BaselinePa"
},
{
"path": "pyfr/partitioners/base.py",
"chars": 14904,
"preview": "from collections import namedtuple\n\nimport numpy as np\n\nfrom pyfr.nputil import iter_struct\nfrom pyfr.progress import Nu"
},
{
"path": "pyfr/partitioners/baseline.py",
"chars": 37093,
"preview": "import numpy as np\n\nfrom pyfr.nputil import iter_struct\nfrom pyfr.partitioners.base import BasePartitioner\n\n\nclass Basel"
},
{
"path": "pyfr/partitioners/kahip.py",
"chars": 2521,
"preview": "from ctypes import POINTER, c_bool, c_double, c_int, c_int32, c_int64, c_void_p\n\nimport numpy as np\n\nfrom pyfr.ctypesuti"
},
{
"path": "pyfr/partitioners/metis.py",
"chars": 5874,
"preview": "from ctypes import (POINTER, byref, c_double, c_int, c_int32, c_int64, c_float,\n c_void_p)\n\nimport nu"
},
{
"path": "pyfr/partitioners/reconstruct.py",
"chars": 1743,
"preview": "from collections import defaultdict\nimport re\n\nimport numpy as np\n\nfrom pyfr.inifile import Inifile\nfrom pyfr.partitione"
},
{
"path": "pyfr/partitioners/scotch.py",
"chars": 5456,
"preview": "from ctypes import POINTER, c_int, c_int32, c_int64, c_double, c_void_p\n\nimport numpy as np\n\nfrom pyfr.ctypesutil import"
},
{
"path": "pyfr/plugins/__init__.py",
"chars": 945,
"preview": "from pyfr.plugins.ascent import AscentPlugin\nfrom pyfr.plugins.base import (BaseCLIPlugin, BasePlugin, BaseSolnPlugin,\n "
},
{
"path": "pyfr/plugins/ascent.py",
"chars": 20657,
"preview": "from argparse import FileType\nfrom ctypes import (RTLD_GLOBAL, c_char_p, c_double, c_int, c_int32, c_int64,\n "
},
{
"path": "pyfr/plugins/base.py",
"chars": 11622,
"preview": "from collections import defaultdict\nimport functools as ft\nfrom pathlib import Path\nimport shlex\nfrom weakref import Wea"
},
{
"path": "pyfr/plugins/dtstats.py",
"chars": 1686,
"preview": "from pyfr.mpiutil import get_comm_rank_root\nfrom pyfr.plugins.base import BaseSolnPlugin, init_csv\n\n\nclass DtStatsPlugin"
},
{
"path": "pyfr/plugins/fieldeval.py",
"chars": 8505,
"preview": "import re\n\nimport numpy as np\n\nfrom pyfr.cache import memoize\nfrom pyfr.inifile import NoOptionError\nfrom pyfr.quadrules"
},
{
"path": "pyfr/plugins/fluidforce.py",
"chars": 7691,
"preview": "import numpy as np\n\nfrom pyfr.cache import memoize\nfrom pyfr.mpiutil import get_comm_rank_root, mpi\nfrom pyfr.plugins.ba"
},
{
"path": "pyfr/plugins/fwh.py",
"chars": 7102,
"preview": "from collections import namedtuple\n\nimport numpy as np\n\nfrom pyfr.mpiutil import get_comm_rank_root, mpi\nfrom pyfr.nputi"
},
{
"path": "pyfr/plugins/integrate.py",
"chars": 2758,
"preview": "from pyfr.mpiutil import get_comm_rank_root, mpi\nfrom pyfr.plugins.base import (BackendMixin, BaseSolnPlugin, PublishMix"
},
{
"path": "pyfr/plugins/kernels/__init__.py",
"chars": 0,
"preview": ""
},
{
"path": "pyfr/plugins/kernels/fieldeval.mako",
"chars": 1004,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n<%include file='${eos_mod}'/>\n\n<%"
},
{
"path": "pyfr/plugins/kernels/fluidforce.mako",
"chars": 4091,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:kernel name='fluidforce' "
},
{
"path": "pyfr/plugins/kernels/sample.mako",
"chars": 1718,
"preview": "<%inherit file='base'/>\n<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n<%include file='${eos_mod}'/>\n\n<%"
},
{
"path": "pyfr/plugins/kernels/source.mako",
"chars": 202,
"preview": "<%namespace module='pyfr.backends.base.makoutil' name='pyfr'/>\n\n<%pyfr:macro name='source' params='t, u, ploc, src'>\n% f"
}
]
// ... and 398 more files (download for full content)
About this extraction
This page contains the full source code of the PyFR/PyFR GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 598 files (4.3 MB), approximately 1.2M tokens, and a symbol index with 2186 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.