| bpsraw.c (cb03979f09f11f2f58ca1dff8031348aa48729d3) | bpsraw.c (5dfaedb85d2aa5da89951bb5d8f41d61be09bbf6) |
|---|---|
| 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// libCEED + PETSc Example: CEED BPs --- 79 unchanged lines hidden (view full) --- 88 if (i == i_rank[0] && j == i_rank[1] && k == i_rank[2]) return start; 89 GlobalNodes(p, ijk_rank, degree, mesh_elem, m_nodes); 90 start += m_nodes[0] * m_nodes[1] * m_nodes[2]; 91 } 92 } 93 } 94 return -1; 95} | 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// libCEED + PETSc Example: CEED BPs --- 79 unchanged lines hidden (view full) --- 88 if (i == i_rank[0] && j == i_rank[1] && k == i_rank[2]) return start; 89 GlobalNodes(p, ijk_rank, degree, mesh_elem, m_nodes); 90 start += m_nodes[0] * m_nodes[1] * m_nodes[2]; 91 } 92 } 93 } 94 return -1; 95} |
| 96static int CreateRestriction(Ceed ceed, const CeedInt mesh_elem[3], CeedInt P, 97 CeedInt num_comp, CeedElemRestriction *elem_restr) { | 96static PetscErrorCode CreateRestriction(Ceed ceed, const CeedInt mesh_elem[3], 97 CeedInt P, 98 CeedInt num_comp, CeedElemRestriction *elem_restr) { |
| 98 const PetscInt num_elem = mesh_elem[0]*mesh_elem[1]*mesh_elem[2]; 99 PetscInt m_nodes[3], *idx, *idx_p; 100 | 99 const PetscInt num_elem = mesh_elem[0]*mesh_elem[1]*mesh_elem[2]; 100 PetscInt m_nodes[3], *idx, *idx_p; 101 |
| 102 PetscFunctionBeginUser; |
|
| 101 // Get indicies 102 for (int d=0; d<3; d++) m_nodes[d] = mesh_elem[d]*(P-1) + 1; 103 idx_p = idx = malloc(num_elem*P*P*P*sizeof idx[0]); 104 for (CeedInt i=0; i<mesh_elem[0]; i++) 105 for (CeedInt j=0; j<mesh_elem[1]; j++) 106 for (CeedInt k=0; k<mesh_elem[2]; k++,idx_p += P*P*P) 107 for (CeedInt ii=0; ii<P; ii++) 108 for (CeedInt jj=0; jj<P; jj++) --- 875 unchanged lines hidden --- | 103 // Get indicies 104 for (int d=0; d<3; d++) m_nodes[d] = mesh_elem[d]*(P-1) + 1; 105 idx_p = idx = malloc(num_elem*P*P*P*sizeof idx[0]); 106 for (CeedInt i=0; i<mesh_elem[0]; i++) 107 for (CeedInt j=0; j<mesh_elem[1]; j++) 108 for (CeedInt k=0; k<mesh_elem[2]; k++,idx_p += P*P*P) 109 for (CeedInt ii=0; ii<P; ii++) 110 for (CeedInt jj=0; jj<P; jj++) --- 875 unchanged lines hidden --- |