| ceed-operator.c (288c044332e33f37503f09b6484fec9d0a55fba1) | ceed-operator.c (8b067b84f843731ea3f7eb73e31f61efee53b5f0) |
|---|---|
| 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. --- 127 unchanged lines hidden (view full) --- 136 @ref Basic 137**/ 138int CeedOperatorSetField(CeedOperator op, const char *fieldname, 139 CeedElemRestriction r, CeedTransposeMode lmode, 140 CeedBasis b, CeedVector v) { 141 int ierr; 142 if (op->composite) 143 return CeedError(op->ceed, 1, "Cannot add field to composite operator."); | 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. --- 127 unchanged lines hidden (view full) --- 136 @ref Basic 137**/ 138int CeedOperatorSetField(CeedOperator op, const char *fieldname, 139 CeedElemRestriction r, CeedTransposeMode lmode, 140 CeedBasis b, CeedVector v) { 141 int ierr; 142 if (op->composite) 143 return CeedError(op->ceed, 1, "Cannot add field to composite operator."); |
| 144 if (!r) 145 return CeedError(op->ceed, 1, "ElemRestriction r for field \"%s\" must be non-NULL.", fieldname); 146 if (!b) 147 return CeedError(op->ceed, 1, "Basis b for field \"%s\" must be non-NULL.", fieldname); 148 if (!v) 149 return CeedError(op->ceed, 1, "Vector v for field \"%s\" must be non-NULL.", fieldname); |
|
| 144 145 CeedInt numelements; 146 ierr = CeedElemRestrictionGetNumElements(r, &numelements); CeedChk(ierr); 147 if (op->numelements && op->numelements != numelements) 148 return CeedError(op->ceed, 1, 149 "ElemRestriction with %d elements incompatible with prior %d elements", 150 numelements, op->numelements); 151 op->numelements = numelements; --- 428 unchanged lines hidden --- | 150 151 CeedInt numelements; 152 ierr = CeedElemRestrictionGetNumElements(r, &numelements); CeedChk(ierr); 153 if (op->numelements && op->numelements != numelements) 154 return CeedError(op->ceed, 1, 155 "ElemRestriction with %d elements incompatible with prior %d elements", 156 numelements, op->numelements); 157 op->numelements = numelements; --- 428 unchanged lines hidden --- |