| ceed-basis.c (65e7b5e84b2ea3ca1f657b4d4f5436f51e94c9a5) | ceed-basis.c (b9c05c73848caa4a8e85dca1ee63c2e7e70143c4) |
|---|---|
| 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// 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. --- 309 unchanged lines hidden (view full) --- 318 @ref Utility 319**/ 320int CeedLobattoQuadrature(CeedInt Q, CeedScalar *qref1d, 321 CeedScalar *qweight1d) { 322 // Allocate 323 CeedScalar P0, P1, P2, dP2, d2P2, xi, wi, PI = 4.0*atan(1.0); 324 // Build qref1d, qweight1d 325 // Set endpoints | 1// Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at 2// the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights 3// 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. --- 309 unchanged lines hidden (view full) --- 318 @ref Utility 319**/ 320int CeedLobattoQuadrature(CeedInt Q, CeedScalar *qref1d, 321 CeedScalar *qweight1d) { 322 // Allocate 323 CeedScalar P0, P1, P2, dP2, d2P2, xi, wi, PI = 4.0*atan(1.0); 324 // Build qref1d, qweight1d 325 // Set endpoints |
| 326 if (Q < 2) 327 return CeedError(NULL, 1, "Cannot create Lobatto quadrature with Q=%d < 2 points", Q); |
|
| 326 wi = 2.0/((CeedScalar)(Q*(Q-1))); 327 if (qweight1d) { 328 qweight1d[0] = wi; 329 qweight1d[Q-1] = wi; 330 } 331 qref1d[0] = -1.0; 332 qref1d[Q-1] = 1.0; 333 // Interior --- 987 unchanged lines hidden --- | 328 wi = 2.0/((CeedScalar)(Q*(Q-1))); 329 if (qweight1d) { 330 qweight1d[0] = wi; 331 qweight1d[Q-1] = wi; 332 } 333 qref1d[0] = -1.0; 334 qref1d[Q-1] = 1.0; 335 // Interior --- 987 unchanged lines hidden --- |