13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 33d8e8822SJeremy L Thompson // 43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 53d8e8822SJeremy L Thompson // 63d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 73d8e8822SJeremy L Thompson 8b7c563b6SJeremy L Thompson #ifndef libceed_solids_examples_utils_h 9b7c563b6SJeremy L Thompson #define libceed_solids_examples_utils_h 105754ecacSJeremy L Thompson 115754ecacSJeremy L Thompson #include <ceed.h> 12*49aac155SJeremy L Thompson #include <petscsys.h> 135754ecacSJeremy L Thompson 145754ecacSJeremy L Thompson // Translate PetscMemType to CeedMemType 152b730f8bSJeremy L Thompson static inline CeedMemType MemTypeP2C(PetscMemType mem_type) { return PetscMemTypeDevice(mem_type) ? CEED_MEM_DEVICE : CEED_MEM_HOST; } 165754ecacSJeremy L Thompson 17b7c563b6SJeremy L Thompson #endif // libceed_solids_examples_utils_h 18