| /libCEED/backends/magma/tuning/ |
| H A D | generate_tuning.py | 24 ceed_magma_h = f"{script_dir}/../ceed-magma.h" 26 with open(ceed_magma_h, "r") as f: 27 data = f.read() 33 with open(ceed_magma_h, "w") as f: 34 f.write(data) 36 ceed_magma_gemm_selector_cpp = f"{script_dir}/../ceed-magma-gemm-selector.cpp" 41 with open(ceed_magma_gemm_selector_cpp, "r") as f: 42 data = f.read() 45 r"\1 " + f"{nb}", 47 with open(ceed_magma_gemm_selector_cpp, "w") as f: [all …]
|
| /libCEED/tests/ |
| H A D | junit_common.py | 35 raise ValueError(f"{type} must be an Enum") 319 field_names = [f.name for f in test_fields] 326 raise ParseError(f"Mismatched parentheses in TESTCASE: {line}") 371 print(f"warning, unknown TESTCASE option for test '{known['name']}': {k}={v}") 397 raise RuntimeError(f'Unrecognized extension for file: {source_file}') 401 …if line.startswith(f'{comment_str}TESTARGS')] or [TestSpec(source_file.stem, args=['{ceed_resource… 423 return f'No lines found in test output {test_csv}' 425 return f'No lines found in test source {true_csv}' 427 return f'Number of lines in {test_csv} and {true_csv} do not match' 438 return f'Commented line found in {test_csv} at line {n} but not in {true_csv}' [all …]
|
| H A D | junit.py | 134 return f'Backend does not implement' 136 return f'Device memory not supported' 138 return f'Device memory not supported' 140 return f'Test not implemented in single precision' 142 return f'SYCL device type not available' 144 return f'Tet mesh generator not installed for {test}, {spec.name}'
|
| /libCEED/examples/fluids/ |
| H A D | pytorch_pkgconfig.py | 17 file.write(f"{variable}={value}\n") 21 file.write(f"{key}: {value}\n") 32 keywords['Cflags'] += f'-I{include_path} ' 38 with torchCMakePath.open('r') as f: 39 for line in f: 48 keywords['Libs'] += f'-L{lib_path} ' 58 keywords['Libs'] += f'-Wl,--no-as-needed,"{torch_cuda_path.as_posix()}" '
|
| /libCEED/examples/python/ |
| H A D | ex2_surface.py | 51 print(f" Ceed specification [-c] : {args.ceed}") 52 print(f" Mesh dimension [-d] : {dim}") 53 print(f" Mesh degree [-m] : {mesh_degree}") 54 print(f" Solution degree [-p] : {sol_degree}") 55 print(f" Num. 1D quadr. pts [-q] : {num_qpts}") 56 print(f" Approx. # unknowns [-s] : {problem_size}") 57 print(f" QFunction source [-g] : {'gallery' if args.gallery else 'user'}") 102 qf_build = ceed.QFunctionByName(f"Poisson{dim}DBuild") 131 qf_diff = ceed.QFunctionByName(f"Poisson{dim}DApply") 172 print(f"Exact mesh surface area : {exact_surface_area:.14g}") [all …]
|
| H A D | ex1_volume.py | 50 print(f" Ceed specification [-c] : {args.ceed}") 51 print(f" Mesh dimension [-d] : {dim}") 52 print(f" Mesh degree [-m] : {mesh_degree}") 53 print(f" Solution degree [-p] : {sol_degree}") 54 print(f" Num. 1D quadr. pts [-q] : {num_qpts}") 55 print(f" Approx. # unknowns [-s] : {problem_size}") 56 print(f" QFunction source [-g] : {'gallery' if args.gallery else 'user'}") 100 qf_build = ceed.QFunctionByName(f"Mass{dim}DBuild") 167 print(f"Exact mesh volume : {exact_volume:.14g}") 168 print(f"Computed mesh volume : {volume:.14g}") [all …]
|
| H A D | ex3_volume.py | 50 print(f" Ceed specification [-c] : {args.ceed}") 51 print(f" Mesh dimension [-d] : {dim}") 52 print(f" Mesh degree [-m] : {mesh_degree}") 53 print(f" Solution degree [-p] : {sol_degree}") 54 print(f" Num. 1D quadr. pts [-q] : {num_qpts}") 55 print(f" Approx. # unknowns [-s] : {problem_size}") 56 print(f" QFunction source [-g] : {'gallery' if args.gallery else 'user'}") 164 print(f"Exact mesh volume : {exact_volume:.14g}") 165 print(f"Computed mesh volume : {volume:.14g}") 166 print(f"Volume error : {volume - exact_volume:.14g}") [all …]
|
| /libCEED/examples/ |
| H A D | bps.md | 17 \langle v,u \rangle = \langle v,f \rangle , 20 …ngle v,f\rangle$ express the continuous bilinear and linear forms, respectively, defined on $V^p$,… 23 …u \rangle &:= \int_{\Omega} \, v \, u \, dV ,\\ \langle v,f \rangle &:= \int_{\Omega} \, v \, f \,… 39 \langle v,u \rangle = \bm v^T M \bm u , \qquad \langle v,f\rangle = \bm v^T \bm b \,. 45 M_{ij} := (\phi_i,\phi_j), \;\; \qquad b_{i} := \langle \phi_i, f \rangle, 57 a(v,u) = \langle v,f \rangle , \, 60 … the continuous bilinear form defined on $V^p$ for sufficiently regular $u$, $v$, and $f$, that is: 63 …{\Omega}\nabla v \, \cdot \, \nabla u \, dV ,\\ \langle v,f \rangle &:= \int_{\Omega} \, v \, f \,…
|
| /libCEED/examples/mfem/ |
| H A D | bp3.cpp | 55 double f[3], l[3], val, lap; in rhs() local 56 f[0] = sin(M_PI * (x[0] + k[0] * pt(0))); in rhs() 57 l[0] = M_PI * M_PI * k[0] * k[0] * f[0]; in rhs() 58 val = f[0]; in rhs() 61 f[d] = sin(M_PI * (x[d] + k[d] * pt(d))); in rhs() 62 l[d] = M_PI * M_PI * k[d] * k[d] * f[d]; in rhs() 63 lap = lap * f[d] + val * l[d]; in rhs() 64 val = val * f[d]; in rhs()
|
| /libCEED/doc/sphinx/source/ |
| H A D | conf.py | 73 with open("../../../AUTHORS") as f: 74 authorlist = f.readlines() 82 with open("../../../ceed.pc.template") as f: 84 for line in f:
|
| /libCEED/examples/fluids/qfunctions/ |
| H A D | blasius.h | 40 …QFUNCTION_HELPER void ChebyshevEval(int N, const double *Tf, double x, double eta_max, double *f) { in ChebyshevEval() argument 51 f[i] = table[i][0] * Tf[0] + table[i][1] * Tf[1] + table[i][2] * Tf[2]; in ChebyshevEval() 62 f[j] += table[j][i % 3] * Tf[i]; in ChebyshevEval() 67 for (int j = 0; j < i; j++) f[i] *= dX_deta; in ChebyshevEval() 85 CeedScalar f[4], h[4]; in BlasiusSolution() local 86 ChebyshevEval(N, blasius->Tf_cheb, X, blasius->eta_max, f); in BlasiusSolution() 89 *t12 = mu * U_infty * f[2] * sqrt(U_infty / (nu * (x0 + x[0] - x_inflow))); in BlasiusSolution() 92 Y[1] = U_infty * f[1]; in BlasiusSolution() 93 Y[2] = 0.5 * sqrt(nu * U_infty / (x0 + x[0] - x_inflow)) * (eta * f[1] - f[0]); in BlasiusSolution()
|
| H A D | advection.h | 307 for (CeedInt f = 0; f < 4; f++) { in IFunction_AdvectionGeneric() local 308 for (CeedInt j = 0; j < dim; j++) grad_v[j][f][i] = 0; // No Change in density or momentum in IFunction_AdvectionGeneric() 309 v[f][i] = wdetJ * q_dot[f][i]; // K Mass/transient term in IFunction_AdvectionGeneric() 383 for (CeedInt f = 0; f < 4; f++) { in MassFunction_AdvectionGeneric() local 384 for (CeedInt j = 0; j < dim; j++) grad_v[j][f][i] = 0; // No Change in density or momentum in MassFunction_AdvectionGeneric() 385 v[f][i] = wdetJ * q_dot[f][i]; // K Mass/transient term in MassFunction_AdvectionGeneric() 443 for (CeedInt f = 0; f < 4; f++) { in RHSFunction_AdvectionGeneric() local 444 for (CeedInt j = 0; j < dim; j++) grad_v[j][f][i] = 0; // No Change in density or momentum in RHSFunction_AdvectionGeneric() 445 v[f][i] = 0.; in RHSFunction_AdvectionGeneric()
|
| /libCEED/interface/ |
| H A D | ceed-cuda.c | 24 int CeedQFunctionSetCUDAUserFunction(CeedQFunction qf, CUfunction f) { in CeedQFunctionSetCUDAUserFunction() argument 28 CeedCall(qf->SetCUDAUserFunction(qf, f)); in CeedQFunctionSetCUDAUserFunction()
|
| H A D | ceed-hip.c | 24 int CeedQFunctionSetHIPUserFunction(CeedQFunction qf, hipFunction_t f) { in CeedQFunctionSetHIPUserFunction() argument 28 CeedCall(qf->SetHIPUserFunction(qf, f)); in CeedQFunctionSetHIPUserFunction()
|
| H A D | ceed-qfunction.c | 37 CeedQFunctionUser f; member 64 …eedQFunctionRegister(const char *name, const char *source, CeedInt vec_length, CeedQFunctionUser f, in CeedQFunctionRegister() argument 78 gallery_qfunctions[num_qfunctions].f = f; in CeedQFunctionRegister() 106 static int CeedQFunctionFieldSet(CeedQFunctionField *f, const char *field_name, CeedInt size, CeedE… in CeedQFunctionFieldSet() argument 107 CeedCall(CeedCalloc(1, f)); in CeedQFunctionFieldSet() 108 CeedCall(CeedStringAllocCopy(field_name, (char **)&(*f)->field_name)); in CeedQFunctionFieldSet() 109 (*f)->size = size; in CeedQFunctionFieldSet() 110 (*f)->eval_mode = eval_mode; in CeedQFunctionFieldSet() 365 int CeedQFunctionGetUserFunction(CeedQFunction qf, CeedQFunctionUser *f) { in CeedQFunctionGetUserFunction() argument 366 *f = qf->function; in CeedQFunctionGetUserFunction() [all …]
|
| /libCEED/examples/fluids/problems/ |
| H A D | blasius.c | 23 PetscScalar *r, f[4], h[4]; in CompressibleBlasiusResidual() local 37 ChebyshevEval(N, Tf, -1., blasius->eta_max, f); in CompressibleBlasiusResidual() 38 r[0] = f[0]; in CompressibleBlasiusResidual() 39 r[1] = f[1]; in CompressibleBlasiusResidual() 42 ChebyshevEval(N, Tf, 1., blasius->eta_max, f); in CompressibleBlasiusResidual() 43 r[2] = f[1] - 1.; in CompressibleBlasiusResidual() 46 ChebyshevEval(N, Tf, blasius->X[i], blasius->eta_max, f); in CompressibleBlasiusResidual() 58 r[3 + i] = 2 * (mu_rho_tilde[0] * f[3] + mu_rho_tilde[1] * f[2]) + f[2] * f[0]; in CompressibleBlasiusResidual() 59 …0] * h[2] + mu_rho_tilde[1] * h[1]) + Pr * f[0] * h[1] + Pr * (gamma - 1) * mu_rho_tilde[0] * Pets… in CompressibleBlasiusResidual()
|
| /libCEED/examples/solids/src/ |
| H A D | matops.c | 110 PetscScalar *c, *f; in Prolong_Ceed() local 124 PetscCall(VecGetArrayAndMemType(user->loc_vec_f, &f, &f_mem_type)); in Prolong_Ceed() 126 CeedVectorSetArray(user->ceed_vec_f, MemTypeP2C(f_mem_type), CEED_USE_POINTER, f); in Prolong_Ceed() 135 PetscCall(VecRestoreArrayAndMemType(user->loc_vec_f, &f)); in Prolong_Ceed() 147 PetscScalar *c, *f; in Restrict_Ceed() local 160 PetscCall(VecGetArrayReadAndMemType(user->loc_vec_f, (const PetscScalar **)&f, &f_mem_type)); in Restrict_Ceed() 162 CeedVectorSetArray(user->ceed_vec_f, MemTypeP2C(f_mem_type), CEED_USE_POINTER, f); in Restrict_Ceed() 171 PetscCall(VecRestoreArrayReadAndMemType(user->loc_vec_f, (const PetscScalar **)&f)); in Restrict_Ceed()
|
| /libCEED/backends/ref/ |
| H A D | ceed-ref-qfunction.c | 20 CeedQFunctionUser f = NULL; in CeedQFunctionApply_Ref() local 25 CeedCallBackend(CeedQFunctionGetUserFunction(qf, &f)); in CeedQFunctionApply_Ref() 35 CeedCallBackend(f(ctx_data, Q, impl->inputs, impl->outputs)); in CeedQFunctionApply_Ref()
|
| /libCEED/backends/sycl/ |
| H A D | ceed-sycl-common.hpp | 27 int CeedSetBackendFunctionCpp(Ceed ceed, const char *type, void *object, const char *fname, R (*f)(… in CeedSetBackendFunctionCpp() 30 auto *bf = reinterpret_cast<CeedBackendFunction>(f); in CeedSetBackendFunctionCpp()
|
| /libCEED/julia/LibCEED.jl/src/ |
| H A D | Cuda.jl | 20 @inline function Cassette.overdub(::CeedCudaContext, ::typeof(Core.kwfunc), f) argument 21 return Core.kwfunc(f) 34 for f in cudafuns 37 ::typeof(Base.$f), argument 40 return CUDA.$f(x)
|
| H A D | Operator.jl | 47 for f ∈ fields 48 set_field!(op, String(f[1]), f[2], f[3], f[4])
|
| /libCEED/ |
| H A D | setup.py | 34 with open('requirements.txt') as f: 35 return f.readlines()
|
| /libCEED/backends/hip-gen/ |
| H A D | ceed-hip-gen-operator-build.cpp | 1583 const CeedInt f = input_field_order[i]; in CeedOperatorBuildKernel_Hip_gen() local 1585 CeedCallBackend(CeedOperatorFieldGetName(op_input_fields[f], &field_name)); in CeedOperatorBuildKernel_Hip_gen() 1586 code << tab << "// ---- Input field " << f << ": " << field_name << "\n"; in CeedOperatorBuildKernel_Hip_gen() 1589 …ldKernelRestriction_Hip_gen(code, data, tab, f, field_rstr_in_buffer, op_input_fields[f], qf_input… in CeedOperatorBuildKernel_Hip_gen() 1593 …d(CeedOperatorBuildKernelBasis_Hip_gen(code, data, tab, f, op_input_fields[f], qf_input_fields[f],… in CeedOperatorBuildKernel_Hip_gen() 1944 const CeedInt f = input_field_order[i]; in CeedOperatorBuildKernelAssemblyAtPoints_Hip_gen() local 1949 CeedCallBackend(CeedOperatorFieldGetVector(op_input_fields[f], &vec)); in CeedOperatorBuildKernelAssemblyAtPoints_Hip_gen() 1954 CeedCallBackend(CeedOperatorFieldGetName(op_input_fields[f], &field_name)); in CeedOperatorBuildKernelAssemblyAtPoints_Hip_gen() 1955 code << tab << "// ---- Input field " << f << ": " << field_name << "\n"; in CeedOperatorBuildKernelAssemblyAtPoints_Hip_gen() 1958 std::string var_suffix = "_in_" + std::to_string(f); in CeedOperatorBuildKernelAssemblyAtPoints_Hip_gen() [all …]
|
| /libCEED/backends/cuda-gen/ |
| H A D | ceed-cuda-gen-operator-build.cpp | 1570 const CeedInt f = input_field_order[i]; in CeedOperatorBuildKernel_Cuda_gen() local 1572 CeedCallBackend(CeedOperatorFieldGetName(op_input_fields[f], &field_name)); in CeedOperatorBuildKernel_Cuda_gen() 1573 code << tab << "// ---- Input field " << f << ": " << field_name << "\n"; in CeedOperatorBuildKernel_Cuda_gen() 1576 …dKernelRestriction_Cuda_gen(code, data, tab, f, field_rstr_in_buffer, op_input_fields[f], qf_input… in CeedOperatorBuildKernel_Cuda_gen() 1580 …(CeedOperatorBuildKernelBasis_Cuda_gen(code, data, tab, f, op_input_fields[f], qf_input_fields[f],… in CeedOperatorBuildKernel_Cuda_gen() 1939 const CeedInt f = input_field_order[i]; in CeedOperatorBuildKernelAssemblyAtPoints_Cuda_gen() local 1944 CeedCallBackend(CeedOperatorFieldGetVector(op_input_fields[f], &vec)); in CeedOperatorBuildKernelAssemblyAtPoints_Cuda_gen() 1949 CeedCallBackend(CeedOperatorFieldGetName(op_input_fields[f], &field_name)); in CeedOperatorBuildKernelAssemblyAtPoints_Cuda_gen() 1950 code << tab << "// ---- Input field " << f << ": " << field_name << "\n"; in CeedOperatorBuildKernelAssemblyAtPoints_Cuda_gen() 1953 std::string var_suffix = "_in_" + std::to_string(f); in CeedOperatorBuildKernelAssemblyAtPoints_Cuda_gen() [all …]
|
| /libCEED/rust/libceed/src/ |
| H A D | vector.rs | 225 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt() 236 cstring.to_string_lossy().fmt(f) in fmt() 830 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt() 831 write!(f, "VectorView({:?})", self.deref()) in fmt() 886 fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { in fmt() 887 write!(f, "VectorViewMut({:?})", self.deref()) in fmt()
|