| ceed-qfunction.c (f643baed4eda0a1f36e3d61f29c6ab9103a63892) | ceed-qfunction.c (1dfeea39f8876cb55d53d6091f649d2e2329df3d) |
|---|---|
| 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. --- 555 unchanged lines hidden (view full) --- 564 565 if (inmode == CEED_EVAL_NONE && outmode == CEED_EVAL_NONE) 566 // LCOV_EXCL_START 567 return CeedError(ceed, 1, "CEED_EVAL_NONE for a both the input and " 568 "output does not make sense with an identity QFunction"); 569 // LCOV_EXCL_STOP 570 571 ierr = CeedQFunctionCreateInteriorByName(ceed, "Identity", qf); CeedChk(ierr); | 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. --- 555 unchanged lines hidden (view full) --- 564 565 if (inmode == CEED_EVAL_NONE && outmode == CEED_EVAL_NONE) 566 // LCOV_EXCL_START 567 return CeedError(ceed, 1, "CEED_EVAL_NONE for a both the input and " 568 "output does not make sense with an identity QFunction"); 569 // LCOV_EXCL_STOP 570 571 ierr = CeedQFunctionCreateInteriorByName(ceed, "Identity", qf); CeedChk(ierr); |
| 572 ierr = CeedQFunctionAddInput(*qf, "input", 1, inmode); CeedChk(ierr); 573 ierr = CeedQFunctionAddOutput(*qf, "output", 1, outmode); CeedChk(ierr); | 572 ierr = CeedQFunctionAddInput(*qf, "input", size, inmode); CeedChk(ierr); 573 ierr = CeedQFunctionAddOutput(*qf, "output", size, outmode); CeedChk(ierr); |
| 574 575 (*qf)->identity = 1; 576 if (size > 1) { 577 CeedInt *ctx; 578 ierr = CeedCalloc(1, &ctx); CeedChk(ierr); 579 ctx[0] = size; | 574 575 (*qf)->identity = 1; 576 if (size > 1) { 577 CeedInt *ctx; 578 ierr = CeedCalloc(1, &ctx); CeedChk(ierr); 579 ctx[0] = size; |
| 580 ierr = CeedQFunctionSetContext(*qf, ctx, sizeof(ctx)); CeedChk(ierr); 581 (*qf)->inputfields[0]->size = size; 582 (*qf)->outputfields[0]->size = size; | 580 ierr = CeedQFunctionSetContext(*qf, ctx, sizeof(*ctx)); CeedChk(ierr); |
| 583 } 584 585 return 0; 586} 587 588/** 589 @brief Add a CeedQFunction input 590 --- 169 unchanged lines hidden --- | 581 } 582 583 return 0; 584} 585 586/** 587 @brief Add a CeedQFunction input 588 --- 169 unchanged lines hidden --- |