setupts.c (be34b3b7b512ffc7588bbfaa6d42a4468a230000) setupts.c (19ffbc25bac2f81115a73dc6b68f2a6fbd6a795e)
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

--- 219 unchanged lines hidden (view full) ---

228 // Apply CEED operator
229 CeedOperatorApply(user->op_ifunction, user->q_ceed, user->g_ceed, CEED_REQUEST_IMMEDIATE);
230
231 // Restore vectors
232 PetscCall(VecReadC2P(user->q_ceed, q_mem_type, Q_loc));
233 PetscCall(VecReadC2P(user->q_dot_ceed, q_dot_mem_type, Q_dot_loc));
234 PetscCall(VecC2P(user->g_ceed, g_mem_type, G_loc));
235
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

--- 219 unchanged lines hidden (view full) ---

228 // Apply CEED operator
229 CeedOperatorApply(user->op_ifunction, user->q_ceed, user->g_ceed, CEED_REQUEST_IMMEDIATE);
230
231 // Restore vectors
232 PetscCall(VecReadC2P(user->q_ceed, q_mem_type, Q_loc));
233 PetscCall(VecReadC2P(user->q_dot_ceed, q_dot_mem_type, Q_dot_loc));
234 PetscCall(VecC2P(user->g_ceed, g_mem_type, G_loc));
235
236 // PetscCall(SGS_DD_ModelApplyIFunction(user, Q_loc, G_loc));
236 if (user->app_ctx->sgs_model_type == SGS_MODEL_DATA_DRIVEN) {
237 PetscCall(SGS_DD_ModelApplyIFunction(user, Q_loc, G_loc));
238 }
237
238 // Local-to-Global
239 PetscCall(VecZeroEntries(G));
240 PetscCall(DMLocalToGlobal(user->dm, G_loc, ADD_VALUES, G));
241
242 // Restore vectors
243 PetscCall(DMRestoreNamedLocalVector(user->dm, "ResidualLocal", &G_loc));
244

--- 390 unchanged lines hidden ---
239
240 // Local-to-Global
241 PetscCall(VecZeroEntries(G));
242 PetscCall(DMLocalToGlobal(user->dm, G_loc, ADD_VALUES, G));
243
244 // Restore vectors
245 PetscCall(DMRestoreNamedLocalVector(user->dm, "ResidualLocal", &G_loc));
246

--- 390 unchanged lines hidden ---