| /libCEED/python/tests/ |
| H A D | README.md | 4 operators can be found in the file `test-5-operator.py`. 8 To run the tests, first build the user QFunctions file by running 10 python setup-qfunctions.py build 14 pytest test-*.py --ceed /cpu/self/ref/serial 16 ## Building QFunctions 18 To build user defined QFunctions, modify `libceed-qfunctions.c` to include 20 `python setup-qfunctions.py build`. The files `test-4-qfunction.py` and 21 `test-5-operator.py` both contain the example function `load_qfs_so()` for 22 loading the user defined QFunctions so the QFunction pointers can be passed to
|
| H A D | Makefile | 1 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 2 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 4 # SPDX-License-Identifier: BSD-2-Clause 11 rm -rf build __pycache__ .pytest_cache *.so 13 setup: target 14 $(PYTHON) setup-qfunctions.py build 16 TEST_OPTS ?= --ceed /cpu/self/ref/serial 17 test: setup 18 $(PYTHON) -m pytest test-*.py $(TEST_OPTS) 20 .PHONY: clean setup test
|
| H A D | test-5-operator.py | 1 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors 2 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 4 # SPDX-License-Identifier: BSD-2-Clause 19 # ------------------------------------------------------------------------------- 21 # ------------------------------------------------------------------------------- 36 # ------------------------------------------------------------------------------- 38 # ------------------------------------------------------------------------------- 48 nu = nelem * (p - 1) + 1 54 x_array[i] = i / (nx - 1.0) 72 indu[p * i + j] = i * (p - 1) + j [all …]
|
| H A D | setup-qfunctions.py | 1 # Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 2 # All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 4 # SPDX-License-Identifier: BSD-2-Clause 9 from setuptools import setup, Extension 13 # ------------------------------------------------------------------------------ 14 # Setup 15 # ------------------------------------------------------------------------------ 18 sources=["libceed-qfunctions.c"], 19 extra_compile_args=["-O3", "-std=c11", 20 "-Wno-unused-variable", [all …]
|
| /libCEED/examples/python/ |
| H A D | setup_qfunctions.py | 1 from setuptools import setup, Extension 15 sources = ["qfunctions/qfunctions.c"] 20 extra_compile_args = ["-O3", "-march=native", "-std=c11"] 23 qfunctions = Extension("libceed_c_qfunctions", variable 30 # Setup 31 setup(name="libceed_c_qfunctions", 32 ext_modules=[qfunctions])
|
| H A D | README.md | 13 To build the QFunctions into a shared library that the Python examples use, run 16 make setup 25 A full list of command-line arguments are shown by adding the command-line argument "--help".
|
| H A D | tutorial-4-qfunction.ipynb | 9 …ithub.com/CEED/libCEED/), the low-level API library for efficient high-order discretization method… 11 …"While libCEED's focus is on high-order finite/spectral element method implementations, the approa… 29 "! python -m pip install libceed" 38 …QFunctions represent the spatial terms of the point-wise functions describing the physics at the q… 42 …"[QFunctionSchematic]: ./img/QFunctionSketch.svg \"Schematic of point-wise QFunctions, defined at … 49 …nd view two QFunctions (for the setup and apply, respectively, of the mass operator in 1D) from th… 74 "* In the following example, we create and evaluate a built-in identity QFunction." 107 …nction (for the mass operator in 1D) from the gallery of available built-in QFunctions in libCEED." 126 " x = 2.*i/(q-1) - 1\n", 128 " w_array[i] = 1 - x*x\n", [all …]
|
| H A D | tutorial-5-operator.ipynb | 9 …ithub.com/CEED/libCEED/), the low-level API library for efficient high-order discretization method… 11 …"While libCEED's focus is on high-order finite/spectral element method implementations, the approa… 29 "! python -m pip install libceed" 38 …documentation](https://libceed.org/en/latest/libCEEDapi.html#finite-element-operator-decomposition… 45 …ute the length of this 1D domain, similar to Ex1-Volume in the [tutorial-6-shell tutorial](./tutor… 63 "num_u = num_elem*(p-1) + 1\n", 69 " x_array[i] = i / (num_x - 1.0)\n", 86 " indices_u[p*i+j] = i*(p-1) + j\n", 95 "# QFunctions\n", 99 "# Setup operator\n", [all …]
|
| /libCEED/tests/ |
| H A D | t523-operator-f.f90 | 1 !----------------------------------------------------------------------- 5 include 't320-basis-f.h' 7 ! Header with QFunctions 9 include 't510-operator-f.h' 10 !----------------------------------------------------------------------- 52 external setup,mass 87 ! -- Restrictions 97 ! -- Bases 105 ! -- QFunctions 106 call ceedqfunctioncreateinterior(ceed,1,setup,& [all …]
|
| H A D | t533-operator-f.f90 | 1 !----------------------------------------------------------------------- 3 ! Header with QFunctions 5 include 't510-operator-f.h' 6 !----------------------------------------------------------------------- 35 external setup,mass 55 ! Element Setup 56 do i=0,nelem-1 59 offset=col*(p-1)+row*(nx*2+1)*(p-1) 60 do j=0,p-1 61 do k=0,p-1 [all …]
|
| H A D | t524-operator-f.f90 | 1 !----------------------------------------------------------------------- 5 include 't320-basis-f.h' 7 ! Header with QFunctions 9 include 't510-operator-f.h' 10 !----------------------------------------------------------------------- 56 external setup,mass 99 ! -- Restrictions 109 ! -- Bases 117 ! -- QFunctions 118 call ceedqfunctioncreateinterior(ceed,1,setup,& [all …]
|
| H A D | t521-operator-f.f90 | 1 !----------------------------------------------------------------------- 5 include 't320-basis-f.h' 7 ! Header with QFunctions 9 include 't510-operator-f.h' 10 !----------------------------------------------------------------------- 56 external setup,mass 99 ! -- Restrictions 109 ! -- Bases 117 ! -- QFunctions 118 call ceedqfunctioncreateinterior(ceed,1,setup,& [all …]
|
| H A D | t520-operator-f.f90 | 1 !----------------------------------------------------------------------- 5 include 't320-basis-f.h' 7 ! Header with QFunctions 9 include 't510-operator-f.h' 10 !----------------------------------------------------------------------- 55 external setup,mass 98 ! -- Restrictions 107 ! -- Bases 115 ! -- QFunctions 116 call ceedqfunctioncreateinterior(ceed,1,setup,& [all …]
|
| H A D | t522-operator-f.f90 | 1 !----------------------------------------------------------------------- 5 include 't320-basis-f.h' 7 ! Header with QFunctions 9 include 't522-operator-f.h' 10 !----------------------------------------------------------------------- 56 external setup,diff 99 ! -- Restrictions 109 ! -- Bases 117 ! -- QFunctions 118 call ceedqfunctioncreateinterior(ceed,1,setup,& [all …]
|
| H A D | t530-operator-f.f90 | 1 !----------------------------------------------------------------------- 3 ! Header with QFunctions 5 include 't530-operator-f.h' 6 !----------------------------------------------------------------------- 36 external setup,mass 56 ! Element Setup 57 do i=0,nelem-1 60 offset=col*(p-1)+row*(nx*2+1)*(p-1) 61 do j=0,p-1 62 do k=0,p-1 [all …]
|
| H A D | t402-qfunction-f.f90 | 1 !----------------------------------------------------------------------- 3 ! Header with QFunctions 5 include 't401-qfunction-f.h' 6 !----------------------------------------------------------------------- 22 external setup,mass 30 call ceedqfunctioncreateinterior(ceed,1,setup,& 32 &//'t400-qfunction.h:setup'//char(0),qf_setup,err) 38 &//'t400-qfunction.h:mass'//char(0),qf_mass,err) 61 !-----------------------------------------------------------------------
|
| H A D | t506-operator-f.f90 | 1 !----------------------------------------------------------------------- 3 ! Header with QFunctions 5 include 't502-operator-f.h' 6 !----------------------------------------------------------------------- 26 parameter(nu=nelem*(p-1)+1) 37 external setup,mass 42 do i=0,nx-1 43 arrx(i+1)=i/(nx-1.d0) 45 do i=0,nelem-1 53 do i=0,nelem-1 [all …]
|
| H A D | t523-operator.c | 9 #include "t320-basis.h" 10 #include "t510-operator.h" 47 // -- Restrictions in main() 74 // -- Bases in main() 81 // -- QFunctions in main() 82 CeedQFunctionCreateInterior(ceed, 1, setup, setup_loc, &qf_setup_tet); in main() 92 // -- Operators in main() 93 // ---- Setup _tet in main() 99 // ---- Mass _tet in main() 107 // -- Restrictions in main() [all …]
|
| H A D | t520-operator.c | 9 #include "t320-basis.h" 10 #include "t510-operator.h" 58 // -- Restrictions in main() 85 // -- Bases in main() 92 // -- QFunctions in main() 93 CeedQFunctionCreateInterior(ceed, 1, setup, setup_loc, &qf_setup_tet); in main() 103 // -- Operators in main() 104 // ---- Setup Tet in main() 109 // ---- Mass Tet in main() 117 // -- Restrictions in main() [all …]
|
| H A D | t524-operator.c | 9 #include "t320-basis.h" 10 #include "t510-operator.h" 57 // -- Restrictions in main() 84 // -- Bases in main() 91 // -- QFunctions in main() 92 CeedQFunctionCreateInterior(ceed, 1, setup, setup_loc, &qf_setup_tet); in main() 102 // -- Operators in main() 103 // ---- Setup _tet in main() 108 // ---- Mass _tet in main() 115 // -- Restrictions in main() [all …]
|
| H A D | t521-operator.c | 9 #include "t320-basis.h" 10 #include "t510-operator.h" 58 // -- Restrictions in main() 85 // -- Bases in main() 92 // -- QFunctions in main() 93 CeedQFunctionCreateInterior(ceed, 1, setup, setup_loc, &qf_setup_tet); in main() 103 // -- Operators in main() 104 // ---- Setup Tet in main() 109 // ---- Mass Tet in main() 116 // -- Restrictions in main() [all …]
|
| /libCEED/examples/solids/problems/ |
| H A D | linear.c | 1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 4 // SPDX-License-Identifier: BSD-2-Clause 8 #include "../qfunctions/linear.h" 13 #include "../include/setup-libceed.h" 15 #include "../problems/neo-hookean.h" 17 #include "../qfunctions/common.h" 18 #include "../qfunctions/manufactured-true.h"
|
| H A D | finite-strain-mooney-rivlin.c | 1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 4 // SPDX-License-Identifier: BSD-2-Clause 8 #include "../qfunctions/finite-strain-mooney-rivlin.h" 13 #include "../include/setup-libceed.h" 15 #include "../problems/mooney-rivlin.h" 17 #include "../qfunctions/common.h"
|
| H A D | finite-strain-neo-hookean.c | 1 // Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors. 2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 4 // SPDX-License-Identifier: BSD-2-Clause 8 #include "../qfunctions/finite-strain-neo-hookean.h" 13 #include "../include/setup-libceed.h" 15 #include "../problems/neo-hookean.h" 17 #include "../qfunctions/common.h"
|
| /libCEED/python/ |
| H A D | test-wheel.sh | 1 #!/bin/bash -ex 3 ceed_dir=${1:-.} 6 #$PYBIN/pip install --upgrade -r requirements-test.txt 7 #$PYBIN/pip install libceed --no-index --find-links wheelhouse/ 9 python setup-qfunctions.py build 10 python -m pytest test-*.py --ceed /cpu/self/opt/blocked -vv
|