| ceed-ref-basis.c (8d94b0593ef54c33797e8bc6482f658a5be1664c) | ceed-ref-basis.c (d7b241e67f6e33d9b297db3da3be4f167f32bbee) |
|---|---|
| 1// Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC. 2// Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707. 3// All Rights reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 73 unchanged lines hidden (view full) --- 82 pre /= P; 83 post *= Q; 84 } 85 } break; 86 // Evaluate the gradient to/from quadrature points 87 case CEED_EVAL_GRAD: { 88 CeedInt P = basis->P1d, Q = basis->Q1d; 89 // In CEED_NOTRANSPOSE mode: | 1// Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC. 2// Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707. 3// All Rights reserved. See files LICENSE and NOTICE for details. 4// 5// This file is part of CEED, a collection of benchmarks, miniapps, software 6// libraries and APIs for efficient high-order finite element and spectral 7// element discretizations for exascale applications. For more information and 8// source code availability see http://github.com/ceed. --- 73 unchanged lines hidden (view full) --- 82 pre /= P; 83 post *= Q; 84 } 85 } break; 86 // Evaluate the gradient to/from quadrature points 87 case CEED_EVAL_GRAD: { 88 CeedInt P = basis->P1d, Q = basis->Q1d; 89 // In CEED_NOTRANSPOSE mode: |
| 90 // u is [dim, ncomp, P^dim, nelem], column-major layout 91 // v is [dim, ncomp, Q^dim, nelem], column-major layout | 90 // u is [dim, ncomp, P^dim, nelem], row-major layout 91 // v is [dim, ncomp, Q^dim, nelem], row-major layout |
| 92 // In CEED_TRANSPOSE mode, the sizes of u and v are switched. 93 if (tmode == CEED_TRANSPOSE) { 94 P = basis->Q1d, Q = basis->P1d; 95 } 96 CeedScalar tmp[2][ncomp*Q*CeedPowInt(P>Q?P:Q, dim-1)]; 97 for (CeedInt p = 0; p < dim; p++) { 98 CeedInt pre = ncomp*CeedPowInt(P, dim-1), post = 1; 99 for (CeedInt d=0; d<dim; d++) { --- 57 unchanged lines hidden --- | 92 // In CEED_TRANSPOSE mode, the sizes of u and v are switched. 93 if (tmode == CEED_TRANSPOSE) { 94 P = basis->Q1d, Q = basis->P1d; 95 } 96 CeedScalar tmp[2][ncomp*Q*CeedPowInt(P>Q?P:Q, dim-1)]; 97 for (CeedInt p = 0; p < dim; p++) { 98 CeedInt pre = ncomp*CeedPowInt(P, dim-1), post = 1; 99 for (CeedInt d=0; d<dim; d++) { --- 57 unchanged lines hidden --- |