| /libCEED/examples/python/ |
| H A D | ex_common.py | 13 import numpy as np namespace 123 elem_nodes = np.zeros(num_elem * num_nodes, dtype=np.int32) 149 strides = np.array([1, elem_qpts, elem_qpts * num_q_comp], dtype=np.int32) 181 coords = np.zeros(scalar_size * dim) 207 exact_volume = {1: 1.0, 2: 3. / 4. * np.pi, 3: 3. / 4. * np.pi}[dim] 216 coords[i] = 0.5 + (1.0 / np.sqrt(3.0)) * np.sin((2.0 / 3.0) * np.pi * x) 221 v = np.pi / 2. * coords[i + num_nodes] 222 coords[i] = u * np.cos(v) 223 coords[i + num_nodes] = u * np.sin(v) 227 coords[i] = 0.5 + (1.0 / np.sqrt(3.0)) * np.sin((2.0 / 3.0) * np.pi * x)
|
| H A D | ex1_volume.py | 19 import numpy as np namespace 103 ctx_data = np.array([dim, dim], dtype=np.int32) 132 ctx_data = np.array([dim, dim], dtype=np.int32) 163 volume = np.sum(v_array)
|
| H A D | ex2_surface.py | 19 import numpy as np namespace 105 ctx_data = np.array([dim, dim], dtype=np.int32) 134 ctx_data = np.array([dim, dim], dtype=np.int32) 168 surface_area = np.sum(abs(v_array))
|
| H A D | tutorial-5-operator.ipynb | 55 "import numpy as np\n", 67 "x_array = np.zeros(num_x)\n", 77 "indices_x = np.zeros(num_x*2, dtype=\"int32\")\n", 83 "indices_u = np.zeros(num_elem*p, dtype=\"int32\")\n", 88 "strides = np.array([1, q, q], dtype=\"int32\")\n", 126 " print('The length of the domain is l = %4.2f'%np.sum(v_array))" 143 "import numpy as np\n", 155 "x_array = np.zeros(num_x)\n", 165 "indices_x = np.zeros(num_x*2, dtype=\"int32\")\n", 171 "indices_u = np.zeros(num_elem*p, dtype=\"int32\")\n", [all …]
|
| H A D | ex3_volume.py | 19 import numpy as np namespace 104 ctx_data = np.array([dim, dim], dtype=np.int32) 160 volume = np.sum(v_array)
|
| H A D | tutorial-3-basis.ipynb | 55 "import numpy as np\n", 62 " result *= np.tanh(x[d] - center)\n", 121 " x[...] = np.eye(P)\n", 198 " x = np.empty(X_dim*dim, dtype=\"float64\")\n", 199 " u_array = np.empty(Q_dim, dtype=\"float64\")\n", 220 " x = np.empty(dim, dtype=\"float64\")\n", 241 " plt.scatter(x, y, c=np.array(u_array).reshape(Q, Q))\n", 266 " x_array = np.empty(X_dim*dim, dtype=\"float64\")\n", 267 " u_array = np.empty(P_dim, dtype=\"float64\")\n", 291 " x = np.empty(dim, dtype=\"float64\")\n", [all …]
|
| H A D | tutorial-4-qfunction.ipynb | 59 "import numpy as np\n", 87 "u_array = np.zeros(q, dtype=\"float64\")\n", 121 "j_array = np.zeros(q, dtype=\"float64\")\n", 122 "w_array = np.zeros(q, dtype=\"float64\")\n", 123 "u_array = np.zeros(q, dtype=\"float64\")\n", 124 "v_true = np.zeros(q, dtype=\"float64\")\n", 173 "u_array = np.zeros(q*fields, dtype=\"float64\")\n",
|
| H A D | tutorial-2-elemrestriction.ipynb | 50 "import numpy as np\n", 67 "a = np.arange(10, 10 + num_elem+1, dtype=\"float64\")\n", 70 "indices = np.zeros(2*num_elem, dtype=\"int32\")\n", 105 "indices = np.zeros(4*num_elem, dtype=\"int32\")\n", 147 "a = np.arange(10, 10 + 2*num_elem, dtype=\"float64\")\n", 150 "strides = np.array([1, 2, 2], dtype=\"int32\")\n", 182 "strides = np.array([1, 2, 2], dtype=\"int32\")\n", 240 "a = np.arange(10, 10 + num_elem+1, dtype=\"float64\")\n", 243 "indices = np.zeros(2*num_elem, dtype=\"int32\")\n", 310 "a = np.arange(10, 10 + num_elem+1, dtype=\"float64\")\n", [all …]
|
| H A D | tutorial-1-vector.ipynb | 86 "import numpy as np\n", 91 "a = np.arange(1, 4, dtype=\"float64\")\n", 138 "a = np.arange(1, 1 + n, dtype=\"float64\")\n", 164 "a = np.zeros(n, dtype=\"float64\")\n", 188 "a = np.arange(0, n, dtype=\"float64\")\n", 222 "a = np.arange(1, 1 + n, dtype=\"float64\")\n",
|
| /libCEED/python/tests/ |
| H A D | test-1-vector.py | 13 import numpy as np namespace 39 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 56 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 104 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 125 a = np.zeros(n, dtype=ceed.scalar_type()) 132 assert a[3] == np.float32(-3.14) 151 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 173 a = np.arange(10, 10 + n, dtype=ceed.scalar_type()) 193 a = np.arange(0, n, dtype=ceed.scalar_type()) 205 assert abs(norm - np.sqrt(285.)) < TOL [all …]
|
| H A D | test-2-elemrestriction.py | 13 import numpy as np namespace 27 a = np.arange(10, 10 + num_elem + 1, dtype=ceed.scalar_type()) 30 ind = np.zeros(2 * num_elem, dtype="int32") 57 a = np.arange(10, 10 + 2 * num_elem, dtype=ceed.scalar_type()) 60 strides = np.array([1, 2, 2], dtype="int32") 86 a = np.arange(10, 10 + num_elem + 1, dtype=ceed.scalar_type()) 89 ind = np.zeros(2 * num_elem, dtype="int32") 134 a = np.arange(10, 10 + num_elem + 1, dtype=ceed.scalar_type()) 137 ind = np.zeros(2 * num_elem, dtype="int32") 178 ind = np.zeros(4 * num_elem, dtype="int32") [all …]
|
| H A D | test-3-basis.py | 14 import numpy as np namespace 90 x = np.empty(Xdim * dim, dtype=ceed.scalar_type()) 91 uq = np.empty(Qdim, dtype=ceed.scalar_type()) 113 xx = np.empty(dim, dtype=ceed.scalar_type()) 131 xx = np.empty(dim, dtype=ceed.scalar_type()) 151 x = np.empty(Xdim * dim, dtype=ceed.scalar_type()) 152 u = np.empty(Pdim, dtype=ceed.scalar_type()) 177 xx = np.empty(dim, dtype=ceed.scalar_type()) 208 in_array = np.empty(P, dtype=ceed.scalar_type()) 209 qref = np.empty(dim * Q, dtype=ceed.scalar_type()) [all …]
|
| H A D | test-4-qfunction.py | 13 import numpy as np namespace 60 w_array = np.zeros(q, dtype=ceed.scalar_type()) 61 u_array = np.zeros(q, dtype=ceed.scalar_type()) 62 v_true = np.zeros(q, dtype=ceed.scalar_type()) 115 ctx_data = np.array([1., 2., 3., 4., 5.], dtype=ceed.scalar_type()) 122 w_array = np.zeros(q, dtype=ceed.scalar_type()) 123 u_array = np.zeros(q, dtype=ceed.scalar_type()) 124 v_true = np.zeros(q, dtype=ceed.scalar_type()) 181 ctx_data = np.array([1., 2., 3., 4., 5.], dtype="float64") 184 ctx_data = np.array([1., 2., 3., 4., 5., 1., 2., 3., 4., 5.], [all …]
|
| H A D | buildmats.py | 1 import numpy as np namespace 6 interp = np.empty(P * Q, dtype=mat_dtype) 7 grad = np.empty(dim * P * Q, dtype=mat_dtype) 54 interp = np.empty(dim * P * Q, dtype=mat_dtype) 55 div = np.empty(P * Q, dtype=mat_dtype) 57 qref[0] = -1. / np.sqrt(3.) 94 interp = np.empty(dim * P * Q, dtype=mat_dtype) 95 curl = np.empty(P * Q, dtype=mat_dtype)
|
| H A D | test-5-operator.py | 13 import numpy as np namespace 52 x_array = np.zeros(nx) 62 indx = np.zeros(nx * 2, dtype="int32") 69 indu = np.zeros(nelem * p, dtype="int32") 75 strides = np.array([1, q, q], dtype="int32") 141 x_array = np.zeros(nx, dtype=ceed.scalar_type()) 151 indx = np.zeros(nx * 2, dtype="int32") 158 indu = np.zeros(nelem * p, dtype="int32") 164 strides = np.array([1, q, q], dtype="int32") 231 x_array = np.zeros(nx, dtype=ceed.scalar_type()) [all …]
|
| /libCEED/examples/fluids/postprocess/ |
| H A D | vortexshedding.py | 4 import numpy as np namespace 9 S = np.pi * D * zspan # surface area 16 period = np.diff(sample["Time"].iloc[peaks])
|
| /libCEED/python/ |
| H A D | ceed_basis.py | 10 import numpy as np namespace 184 ret = np.frombuffer(buff, dtype=scalar_types[lib.CEED_SCALAR_TYPE]) 215 ret = np.frombuffer(buff, dtype="float64") 244 ret = np.frombuffer(buff, dtype="float64") 273 ret = np.frombuffer(buff, dtype="float64")
|
| H A D | ceed.py | 12 import numpy as np namespace 130 qref1d = np.empty(q, dtype=scalar_types[lib.CEED_SCALAR_TYPE]) 131 qweight1d = np.empty(q, dtype=scalar_types[lib.CEED_SCALAR_TYPE]) 162 qref1d = np.empty(q, dtype=scalar_types[lib.CEED_SCALAR_TYPE]) 168 qweight1d = np.empty(q, dtype=scalar_types[lib.CEED_SCALAR_TYPE])
|
| H A D | ceed_qfunctioncontext.py | 10 import numpy as np namespace 129 return np.frombuffer(buff, dtype=scalar_types[lib.CEED_SCALAR_TYPE])
|
| H A D | ceed_vector.py | 10 import numpy as np namespace 135 return np.frombuffer(buff, dtype=scalar_types[lib.CEED_SCALAR_TYPE]) 180 ret = np.frombuffer(buff, dtype=scalar_types[lib.CEED_SCALAR_TYPE]) 228 return np.frombuffer(buff, dtype=scalar_types[lib.CEED_SCALAR_TYPE])
|
| H A D | ceed_elemrestriction.py | 10 import numpy as np namespace 135 layout = np.zeros(3, dtype="int32") 157 layout = np.zeros(3, dtype="int32")
|
| /libCEED/examples/nek/ |
| H A D | nek-examples.sh | 107 -n|-np) 331 ${MPIEXEC:-mpiexec} -np ${nek_np} ./build/bps ${nek_ex} ${nek_spec} ${nek_test} > \
|
| H A D | README.md | 50 -n|-np Specify number of MPI ranks for the run (optional, default: 1)
|
| /libCEED/examples/nek/bps/ |
| H A D | bps.usr | 903 nppp = nnode/np ! nnodes/proc 910 $ ,np,nx,nelt,nelgt,nnode,nppp,maxits,telaps,dofps,titers,tppp_s 938 nppp = nnode/np ! nnodes/proc 945 $ ,np,nx,nelt,nelgt,nnode,nppp,maxits,telaps,dofps,titers,tppp_s 973 nppp = nnode/np ! nnodes/proc 980 $ ,np,nx,nelt,nelgt,nnode,nppp,maxits,telaps,dofps,titers,tppp_s 1225 nppp = nnode/np ! nnodes/proc 1232 $ ,np,nx,nelt,nelgt,nnode,nppp,maxits,telaps,dofps,titers,tppp_s 1260 nppp = nnode/np ! nnodes/proc 1267 $ ,np,nx,nelt,nelgt,nnode,nppp,maxits,telaps,dofps,titers,tppp_s [all …]
|