| ceed_elemrestriction.py (ce18bed930e8f3bfebcf709a18844aba97fe4630) | ceed_elemrestriction.py (dd8ab4d9aed6d8670d11495d68e790fb4ea5ad64) |
|---|---|
| 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 8from _ceed_cffi import ffi, lib --- 120 unchanged lines hidden (view full) --- 129 Returns: 130 layout: Vector containing layout array, stored as [nodes, components, elements]. 131 The data for node i, component j, element k in the element 132 vector is given by i*layout[0] + j*layout[1] + k*layout[2].""" 133 134 # Create output array 135 layout = np.zeros(3, dtype="int32") 136 array_pointer = ffi.cast( | 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 8from _ceed_cffi import ffi, lib --- 120 unchanged lines hidden (view full) --- 129 Returns: 130 layout: Vector containing layout array, stored as [nodes, components, elements]. 131 The data for node i, component j, element k in the element 132 vector is given by i*layout[0] + j*layout[1] + k*layout[2].""" 133 134 # Create output array 135 layout = np.zeros(3, dtype="int32") 136 array_pointer = ffi.cast( |
| 137 "CeedInt *", | 137 "CeedInt (*)[3]", |
| 138 layout.__array_interface__['data'][0]) 139 140 # libCEED call 141 err_code = lib.CeedElemRestrictionGetELayout( 142 self._pointer[0], array_pointer) 143 self._ceed._check_error(err_code) 144 145 # Return --- 205 unchanged lines hidden --- | 138 layout.__array_interface__['data'][0]) 139 140 # libCEED call 141 err_code = lib.CeedElemRestrictionGetELayout( 142 self._pointer[0], array_pointer) 143 self._ceed._check_error(err_code) 144 145 # Return --- 205 unchanged lines hidden --- |