| blasius.c (b77c53c9d62000ebcd90e5398f619bc6160b10f9) | blasius.c (fc02c2811c37db20706f604ffdecac3929e56d4d) |
|---|---|
| 1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8/// @file --- 141 unchanged lines hidden (view full) --- 150 ierr = NS_NEWTONIAN_IG(problem, dm, ctx); CHKERRQ(ierr); 151 ierr = PetscCalloc1(1, &blasius_ctx); CHKERRQ(ierr); 152 153 // ------------------------------------------------------ 154 // SET UP Blasius 155 // ------------------------------------------------------ 156 problem->ics.qfunction = ICsBlasius; 157 problem->ics.qfunction_loc = ICsBlasius_loc; | 1// Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2// All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3// 4// SPDX-License-Identifier: BSD-2-Clause 5// 6// This file is part of CEED: http://github.com/ceed 7 8/// @file --- 141 unchanged lines hidden (view full) --- 150 ierr = NS_NEWTONIAN_IG(problem, dm, ctx); CHKERRQ(ierr); 151 ierr = PetscCalloc1(1, &blasius_ctx); CHKERRQ(ierr); 152 153 // ------------------------------------------------------ 154 // SET UP Blasius 155 // ------------------------------------------------------ 156 problem->ics.qfunction = ICsBlasius; 157 problem->ics.qfunction_loc = ICsBlasius_loc; |
| 158 problem->apply_inflow_jacobian.qfunction = Blasius_Inflow_Jacobian; 159 problem->apply_inflow_jacobian.qfunction_loc = Blasius_Inflow_Jacobian_loc; | |
| 160 161 CeedScalar Uinf = 40; // m/s 162 CeedScalar delta0 = 4.2e-4; // m 163 CeedScalar theta0 = 288.; // K 164 CeedScalar P0 = 1.01e5; // Pa 165 PetscBool weakT = PETSC_FALSE; // weak density or temperature 166 PetscReal mesh_refine_height = 5.9e-4; // m 167 PetscReal mesh_growth = 1.08; // [-] --- 79 unchanged lines hidden (view full) --- 247 CeedQFunctionContextSetData(blasius_context, CEED_MEM_HOST, 248 CEED_USE_POINTER, 249 sizeof(*blasius_ctx), blasius_ctx); 250 CeedQFunctionContextSetDataDestroy(blasius_context, CEED_MEM_HOST, 251 FreeContextPetsc); 252 253 CeedQFunctionContextDestroy(&problem->ics.qfunction_context); 254 problem->ics.qfunction_context = blasius_context; | 158 159 CeedScalar Uinf = 40; // m/s 160 CeedScalar delta0 = 4.2e-4; // m 161 CeedScalar theta0 = 288.; // K 162 CeedScalar P0 = 1.01e5; // Pa 163 PetscBool weakT = PETSC_FALSE; // weak density or temperature 164 PetscReal mesh_refine_height = 5.9e-4; // m 165 PetscReal mesh_growth = 1.08; // [-] --- 79 unchanged lines hidden (view full) --- 245 CeedQFunctionContextSetData(blasius_context, CEED_MEM_HOST, 246 CEED_USE_POINTER, 247 sizeof(*blasius_ctx), blasius_ctx); 248 CeedQFunctionContextSetDataDestroy(blasius_context, CEED_MEM_HOST, 249 FreeContextPetsc); 250 251 CeedQFunctionContextDestroy(&problem->ics.qfunction_context); 252 problem->ics.qfunction_context = blasius_context; |
| 255 CeedQFunctionContextReferenceCopy(blasius_context, 256 &problem->apply_inflow_jacobian.qfunction_context); | |
| 257 if (use_stg) { 258 ierr = SetupSTG(comm, dm, problem, user, weakT, theta0, P0, mesh_ynodes, 259 mesh_nynodes); CHKERRQ(ierr); 260 } else { | 253 if (use_stg) { 254 ierr = SetupSTG(comm, dm, problem, user, weakT, theta0, P0, mesh_ynodes, 255 mesh_nynodes); CHKERRQ(ierr); 256 } else { |
| 261 problem->apply_inflow.qfunction = Blasius_Inflow; 262 problem->apply_inflow.qfunction_loc = Blasius_Inflow_loc; | 257 CeedQFunctionContextDestroy(&problem->apply_inflow.qfunction_context); 258 problem->apply_inflow.qfunction = Blasius_Inflow; 259 problem->apply_inflow.qfunction_loc = Blasius_Inflow_loc; 260 problem->apply_inflow_jacobian.qfunction = Blasius_Inflow_Jacobian; 261 problem->apply_inflow_jacobian.qfunction_loc = Blasius_Inflow_Jacobian_loc; |
| 263 CeedQFunctionContextReferenceCopy(blasius_context, 264 &problem->apply_inflow.qfunction_context); | 262 CeedQFunctionContextReferenceCopy(blasius_context, 263 &problem->apply_inflow.qfunction_context); |
| 264 CeedQFunctionContextReferenceCopy(blasius_context, 265 &problem->apply_inflow_jacobian.qfunction_context); |
|
| 265 } 266 ierr = PetscFree(mesh_ynodes); CHKERRQ(ierr); 267 PetscFunctionReturn(0); 268} | 266 } 267 ierr = PetscFree(mesh_ynodes); CHKERRQ(ierr); 268 PetscFunctionReturn(0); 269} |