Home
last modified time | relevance | path

Searched +full:- +full:f (Results 1 – 25 of 34) sorted by relevance

12

/honee/qfunctions/
H A Dnumerics.h1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
11 @f[
13 @f]
15 …where \f$ \Delta t \f$ is the `timestep`, \f$ \overline{g}_{jk} \f$ is the element metric tensor `…
16 …For best results, `gij` should be scaled to account for the reference element domain (often [-1,1]…
34 @f[
36 @f]
38 …where \f$ \Delta t \f$ is the `timestep`, \f$ \overline{g}_{jk} \f$ is the element metric tensor `…
39 …For best results, `gij` should be scaled to account for the reference element domain (often [-1,1]…
[all …]
H A Ddiff_flux_projection.h1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
26 for (CeedInt f = 0; f < dim; f++) { in ComputeDivDiffusiveFluxGeneric() local
27 grad_qn[f * dim + g] = grad_q[offset + (Q * num_comps * dim) * g + Q * f + i]; in ComputeDivDiffusiveFluxGeneric()
H A Dblasius.h1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
25 …alar Tf_cheb[BLASIUS_MAX_N_CHEBYSHEV]; // !< Chebyshev coefficient for f
26 …CeedScalar Th_cheb[BLASIUS_MAX_N_CHEBYSHEV - 1]; // !< Chebyshev coefficien…
33 …QFUNCTION_HELPER void ChebyshevEval(int N, const double *Tf, double x, double eta_max, double *f) { in ChebyshevEval() argument
35 // Chebyshev polynomials T_0, T_1, T_2 of the first kind in (-1,1) in ChebyshevEval()
37 {1, x, 2 * x * x - 1}, in ChebyshevEval()
43 // i-th derivative of f in ChebyshevEval()
44 f[i] = table[i][0] * Tf[0] + table[i][1] * Tf[1] + table[i][2] * Tf[2]; in ChebyshevEval()
47 // T_n(x) = 2xT_{n-1}(x) - T_{n-2}(x) in ChebyshevEval()
[all …]
H A Dadvection.h1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
18 // -- ROTATION (default)
26 // increases to (1.-r/rc), then 0. everywhere else
36 // -- TRANSLATION
44 // increases to (1.-r/rc), then 0. everywhere else
62 // This helper function provides the exact, time-dependent solution and IC formulation for 2D advec…
66 const CeedScalar rc = context->rc; in Exact_AdvectionGeneric()
67 const CeedScalar lx = context->lx; in Exact_AdvectionGeneric()
68 const CeedScalar ly = context->ly; in Exact_AdvectionGeneric()
[all …]
H A Driemann_solver.h1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
6 // The left and right states are specified from the perspective of an outward-facing normal vector …
10 // |------------| /
12 // | Left |----> Right
14 // |------------|
17 // Much of the work references Eleuterio F. Toro's "Riemann Solvers and Numerical Methods for Fluid…
37 …CeedScalar r_right = (sqrt_left / (2 * sqrt_right * square_sum_root)) * drho_right - (sqrt_right /… in RoeSetup_fwd()
38 …CeedScalar r_left = (sqrt_right / (2 * sqrt_left * square_sum_root)) * drho_left - (sqrt_left / (… in RoeSetup_fwd()
58 …F_hll[i] = (s_right * F_left[i] - s_left * F_right[i] + s_left * s_right * (U_right[i] - U_left[i]… in Flux_HLL()
[all …]
/honee/tests/
H A Djunit_common.py19 sys.path.insert(0, str(Path(__file__).parent / "junit-xml"))
35 raise ValueError(f"{type} must be an Enum")
65 csv_rtol: float = -1
66 csv_ztol: float = -1
67 cgns_tol: float = -1
88 def get_source_path(self, test: str) -> Path:
100 def get_run_path(self, test: str) -> Path:
112 def get_output_path(self, test: str, output_file: str) -> Path:
125 def test_failure_artifacts_path(self) -> Path:
132 return getattr(self, '_cgns_tol', 1.0e-12)
[all …]
H A Djunit.py5 def create_argparser() -> argparse.ArgumentParser:
13 '-c',
14 '--ceed-backends',
20 '-m',
21 '--mode',
26 parser.add_argument('-n', '--nproc', type=int, default=1, help='number of MPI processes')
27 …parser.add_argument('-b', '--junit-batch', type=str, default='', help='Name of JUnit batch for out…
28 …parser.add_argument('-np', '--pool-size', type=int, default=1, help='Number of test cases to run i…
29 …parser.add_argument('--smartredis-dir', type=str, default='', help='path to SmartSim library, if p…
30 parser.add_argument('--has-torch', type=bool, default=False, help='Whether to build with torch')
[all …]
H A Dsmartsim_regression_framework.py19 sys.path.insert(0, (Path(__file__).parents[3] / "tests/junit-xml").as_posix())
45 raise Exception(f"Expected {truth}, but got {test}") from e
53 raise Exception(f"Expected {truth}, but got {test}") from e
56 def verify_training_data(database_array, correct_array, ceed_resource, atol=1e-8, rtol=1e-8):
60 Check whether the S-frame-oriented vorticity vector's second component is just flipped.
68 idx_notclose = np.where(np.abs(database_array - correct_array) > total_tolerances)
75 test_fail = False if np.allclose(-database_vorticity, correct_vorticity,
80 f"./y0_database_values_{ceed_resource.replace('/', '_')}.npy").absolute()
82 …raise AssertionError(f"Array values in database max difference: {np.max(np.abs(correct_array - dat…
83 f"Array saved to {database_output_path.as_posix()}")
[all …]
/honee/
H A Dpytorch_pkgconfig.py1 # SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 # SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
20 file.write(f"{variable}={value}\n")
24 file.write(f"{key}: {value}\n")
35 keywords['Cflags'] += f'-I{include_path} '
41 with torchCMakePath.open('r') as f:
42 for line in f:
51 keywords['Libs'] += f'-L{lib_path} '
52 keywords['Libs'] += '-lc10 -ltorch_cpu '
54 keywords['Libs'] += '-lc10_cuda -ltorch_cuda '
[all …]
H A D.gitlab-ci.yml1 # ----------------------------------------------------------------------------------------
3 # ----------------------------------------------------------------------------------------
5 - test:stage-lint
6 - test:stage-full
7 - test:post
8 - test:docs
9 - deploy
15 .test-basic:
19 - web
20 - merge_requests
[all …]
H A Dconf.py2 # -*- coding: utf-8 -*-
31 # -- General configuration ------------------------------------------------
60 # The following, if true, allows figures, tables and code-blocks to be
73 with open(Path('AUTHORS')) as f:
74 authorlist = f.readlines()
82 # with open(Path('ratel.pc.template')) as f:
84 # for line in f:
105 'tests/junit-xml/*',
117 # sphinxcontrib-bibtex 2.0 requires listing all bibtex files here
132 # -- Options for HTML output ----------------------------------------------
[all …]
/honee/problems/
H A Dblasius.c1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
20 PetscScalar *r, f[4], h[4]; in CompressibleBlasiusResidual() local
21 PetscInt N = blasius->n_cheb; in CompressibleBlasiusResidual()
22 State S_infty = blasius->S_infty; in CompressibleBlasiusResidual()
24 NewtonianIGProperties gas = blasius->newt_ctx.gas; in CompressibleBlasiusResidual()
33 // Left boundary conditions f = f' = 0 in CompressibleBlasiusResidual()
34 ChebyshevEval(N, Tf, -1., blasius->eta_max, f); in CompressibleBlasiusResidual()
35 r[0] = f[0]; in CompressibleBlasiusResidual()
36 r[1] = f[1]; in CompressibleBlasiusResidual()
[all …]
H A Dadvection.c1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
22 MPI_Comm comm = honee->comm; in PRINT_ADVECTION()
23 Ceed ceed = honee->ceed; in PRINT_ADVECTION()
29 PetscCall(DMGetDimension(honee->dm, &dim)); in PRINT_ADVECTION()
30 PetscCallCeed(ceed, CeedQFunctionContextGetData(problem->ics.qfctx, CEED_MEM_HOST, &setup_ctx)); in PRINT_ADVECTION()
31 …PetscCallCeed(ceed, CeedQFunctionContextGetData(problem->apply_vol_rhs.qfctx, CEED_MEM_HOST, &adve… in PRINT_ADVECTION()
38 app_ctx->problem_name, StabilizationTypes[advection_ctx->stabilization], in PRINT_ADVECTION()
39 … StabilizationTauTypes[advection_ctx->stabilization_tau], AdvDifWindTypes[setup_ctx->wind_type])); in PRINT_ADVECTION()
41 if (setup_ctx->wind_type == ADVDIF_WIND_TRANSLATION) { in PRINT_ADVECTION()
[all …]
H A Deulervortex.c1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
15 MPI_Comm comm = honee->comm; in PRINT_EULER_VORTEX()
16 Ceed ceed = honee->ceed; in PRINT_EULER_VORTEX()
20 PetscCallCeed(ceed, CeedQFunctionContextGetData(problem->ics.qfctx, CEED_MEM_HOST, &euler_ctx)); in PRINT_EULER_VORTEX()
25 " Background Velocity : %f,%f,%f\n" in PRINT_EULER_VORTEX()
27 …app_ctx->problem_name, EulerTestTypes[euler_ctx->euler_test], euler_ctx->mean_velocity[0], euler_c… in PRINT_EULER_VORTEX()
28 euler_ctx->mean_velocity[2], StabilizationTypes[euler_ctx->stabilization])); in PRINT_EULER_VORTEX()
30 PetscCallCeed(ceed, CeedQFunctionContextRestoreData(problem->ics.qfctx, &euler_ctx)); in PRINT_EULER_VORTEX()
39 …PetscCall(HoneeBCCreateIFunctionQF(bc_def, Euler_Outflow, Euler_Outflow_loc, honee_bc->qfctx, qf)); in EulerVortexOutflowBCSetup_CreateIFunctionQF()
[all …]
/honee/doc/
H A Dtheory.md3-dependent Navier-Stokes equations of compressible gas dynamics in a static Eulerian three-dimensi…
4 Moreover, the Navier-Stokes example has been developed using PETSc, so that the pointwise physics (…
6 ## The Navier-Stokes Equations
9 The compressible Navier-Stokes equations in conservative form are
14 …abla \cdot \left( \frac{\bm{U} \otimes \bm{U}}{\rho} + P \bm{I}_3 -\bm\sigma \right) - \rho \bm{b}…
15 …t} + \nabla \cdot \left( \frac{(E + P)\bm{U}}{\rho} -\bm{u} \cdot \bm{\sigma} - k \nabla T \right)…
17 $$ (eq-ns)
19 …stress tensor, with $\mu$ the dynamic viscosity coefficient, and $\lambda = - 2/3$ the Stokes hypo…
20 In equations {eq}`eq-ns`, $\rho$ represents the volume mass density, $U$ the momentum density (defi…
23 P = \left( {c_p}/{c_v} -1\right) \left( E - {\bm{U}\cdot\bm{U}}/{(2 \rho)} \right) \, ,
[all …]
H A Dreferences.bib2 adsurl = {https://doi.org/10.1007/s10915-010-9396-8},
7 title = {{Efficient Nonlinear Solvers for Nodal High-Order Finite Elements in 3D}},
9 doi = {10.1007/s10915-010-9396-8}
13 author = {Giraldo, F. X. and Restelli, M. and Läuter, M.},
14 …title = {Semi-Implicit Formulations of the Navier–Stokes Equations: Application to Nonhydrostati…
18 pages = {3394--3425},
28 pages = {343--368},
30 doi = {10.1007/s10915-008-9233-5}
40 @article{libceed-joss-paper,
42 title = {{libCEED}: Fast algebra for high-order element-based discretizations},
[all …]
/honee/tests/junit-xml/
H A DREADME.rst1 python-junit-xml
3 .. image:: https://travis-ci.org/kyrus/python-junit-xml.png?branch=master
6 -----
21 ------------
27 pip install junit-xml
29 easy_install junit-xml
35 git clone https://github.com/kyrus/python-junit-xml.git
39 -----
43 .. code-block:: python
54 .. code-block:: xml
[all …]
/honee/src/
H A Dmisc.c1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
15 Ceed ceed = honee->ceed; in ICs_FixMultiplicity()
22 …if (honee->phys->ics_time_label) PetscCallCeed(ceed, CeedOperatorSetContextDouble(honee->op_ics_ct… in ICs_FixMultiplicity()
23 PetscCall(ApplyCeedOperatorLocalToGlobal(NULL, Q, honee->op_ics_ctx)); in ICs_FixMultiplicity()
25 // -- Get multiplicity in ICs_FixMultiplicity()
26 …PetscCall(DMPlexCeedElemRestrictionCreate(ceed, honee->dm, DMLABEL_DEFAULT, DMLABEL_DEFAULT_VALUE,… in ICs_FixMultiplicity()
37 // -- Fix multiplicity in ICs_FixMultiplicity()
58 PetscCall(VecAXPY(Qbc, -1., Q_loc)); in SetBCsFromICs()
103 …PetscCheck(strcmp(app_ctx->test_file_path, "") != 0, comm, PETSC_ERR_FILE_READ, "File for regressi… in RegressionTest()
[all …]
H A Dbc_definition.c1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
5 #include <dm-utils.h>
6 #include <petsc-ceed.h>
16 @return An error code: 0 - success, otherwise - failure
45 PetscCall(PetscStrallocpy(name, &bc_def_->name)); in BCDefinitionCreate()
47 bc_def_->num_label_values = num_label_values; in BCDefinitionCreate()
48 PetscCall(PetscMalloc1(num_label_values, &bc_def_->label_values)); in BCDefinitionCreate()
49 for (PetscInt i = 0; i < num_label_values; i++) bc_def_->label_values[i] = label_values[i]; in BCDefinitionCreate()
65 if (bc_def_->name) PetscCall(PetscFree(bc_def_->name)); in BCDefinitionDestroy()
[all …]
H A Ddiff_flux_projection.c1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
19 …comps Number of components that makes up the diffusive flux (e.g. 1 for scalar advection-diffusion)
24 … height = 0, dm_field = 0, dim, degree = honee->app_ctx->degree, q_extra = honee->app_ctx- in DivDiffFluxProjectionCreate()
41 PetscCall(DMClone(honee->dm, &projection->dm)); in DivDiffFluxProjectionCreate()
42 PetscCall(DMSetMatrixPreallocateSkip(projection->dm, PETSC_TRUE)); in DivDiffFluxProjectionCreate()
43 PetscCall(DMGetDimension(projection->dm, &dim)); in DivDiffFluxProjectionCreate()
44 switch (diff_flux_proj_->method) { in DivDiffFluxProjectionCreate()
46 projection->num_comp = diff_flux_proj_->num_diff_flux_comps; in DivDiffFluxProjectionCreate()
47 PetscCall(PetscObjectSetName((PetscObject)projection->dm, "DivDiffFluxProj")); in DivDiffFluxProjectionCreate()
[all …]
/honee/problems/torch/
H A Dsgs_model_torch.cpp1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
86 if (dd_input_device == torch::kXPU) { // XPU requires device-to-host-to-device transfer in ModelInference_Torch()
100 printf("%f\n", input_tensor_ptr[i]); in ModelInference_Torch()
128 if (dd_output_device == torch::kXPU) { // XPU requires device-to-host-to-device transfer in ModelInference_Torch()
137 printf("%f\n", output_tensor_ptr[i]); in ModelInference_Torch()
/honee/tests/junit-xml/junit_xml/
H A D__init__.py2 # -*- coding: UTF-8 -*-
22 <?xml version="1.0" encoding="utf-8"?>
25 package="testdb" tests="4" timestamp="2012-11-15T01:02:29">
27 <property name="assert-passed" value="1"/>
29 <testcase classname="testdb.directory" name="1-passed-test" time="10"/>
30 <testcase classname="testdb.directory" name="2-failed-test" time="20">
35 <testcase classname="package.directory" name="3-errord-test" time="15">
40 <testcase classname="package.directory" name="3-skipped-test" time="0">
45 <testcase classname="testdb.directory" name="3-passed-test" time="10">
46 <system-out>
[all …]
/honee/examples/
H A Dconv_test.sh2 # SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
3 # SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
5 declare -A run_flags
14 run_flags[ts_rtol]=1e-10
15 run_flags[ts_atol]=1e-10
17 declare -A test_flags
36 if ! [[ -z ${run_flags[$arg]} ]]; then
37 args="$args -$arg ${run_flags[$arg]}"
40 …ierstokes $args | grep "Relative Error:" | awk -v i="$i" -v res="$res" -v d="$d" '{ printf "%d,%d,…
46 count=$(diff conv_test_result.csv tests-output/fluids-navierstokes-conv-euler.csv | grep "^>" | wc
[all …]
H A Dconv_plot.py4 # Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
8 # libraries and APIs for efficient high-order finite element and spectral
12 # The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
28 parser.add_argument('-f',
52 ax.loglog(h, H, '--', color=colors[i], label='O(h$^' + str(p) + '$)')
/honee/include/
H A Dmat-ceed.h1 // SPDX-FileCopyrightText: Copyright (c) 2017-2024, HONEE contributors.
2 // SPDX-License-Identifier: Apache-2.0 OR BSD-2-Clause
6 #include <petsc-ceed.h>
30 PETSC_CEED_EXTERN PetscErrorCode MatCeedSetContext(Mat mat, PetscCtxDestroyFn f, void *ctx);

12