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 #ifndef libceed_solids_examples_utils_h 9 #define libceed_solids_examples_utils_h 10 11 #include <ceed.h> 12 #include <petscsys.h> 13 14 // Translate PetscMemType to CeedMemType 15 static inline CeedMemType MemTypeP2C(PetscMemType mem_type) { return PetscMemTypeDevice(mem_type) ? CEED_MEM_DEVICE : CEED_MEM_HOST; } 16 17 #endif // libceed_solids_examples_utils_h 18