190 Ceed ceed(internal::ceed);
193 "Use ceed::MixedIntegrator on mixed meshes.");
196 std::string build_func = const_coeff ? info.build_func_const
197 : info.build_func_quad;
198 CeedQFunctionUser build_qf = const_coeff ? info.build_qf_const
199 : info.build_qf_quad;
200 PAOperator op {info.qdatasize, info.header,
201 build_func, build_qf,
202 info.apply_func, info.apply_qf,
207 CeedInt trial_vdim = trial_fes.
GetVDim();
208 CeedInt test_vdim = test_fes.
GetVDim();
211 if ( &trial_fes == &test_fes )
227 MFEM_VERIFY(mesh_fes,
"the Mesh has no nodal FE space");
231 CeedInt trial_nqpts, test_nqpts;
232 CeedBasisGetNumQuadraturePoints(
trial_basis, &trial_nqpts);
233 CeedBasisGetNumQuadraturePoints(
test_basis, &test_nqpts);
234 MFEM_VERIFY(trial_nqpts == test_nqpts,
235 "Trial and test basis must have the same number of quadrature"
237 CeedInt nqpts = trial_nqpts;
239 const int qdatasize = op.qdatasize;
241 CEED_STRIDES_BACKEND,
246 CeedVectorCreate(ceed, nelem * nqpts * qdatasize, &
qdata);
251 info.ctx.vdim = trial_fes.
GetVDim();
254 std::string qf = qf_file + op.build_func;
255 CeedQFunctionCreateInterior(ceed, 1, op.build_qf, qf.c_str(),
267 CeedQFunctionAddInput(
build_qfunc,
"weights", 1, CEED_EVAL_WEIGHT);
268 CeedQFunctionAddOutput(
build_qfunc,
"qdata", qdatasize, CEED_EVAL_NONE);
270 CeedQFunctionContextCreate(ceed, &
build_ctx);
271 CeedQFunctionContextSetData(
build_ctx, CEED_MEM_HOST,
282 nelem, indices, ceed,
285 CeedOperatorSetField(
build_oper,
"coeff", gridCoeff->restr,
286 gridCoeff->basis, gridCoeff->coeffVector);
291 const int ncomp = quadCoeff->ncomp;
292 CeedInt strides[3] = {ncomp, 1, ncomp*nqpts};
294 nelem, nqpts, ncomp, strides,
296 CeedOperatorSetField(
build_oper,
"coeff", quadCoeff->restr,
297 CEED_BASIS_NONE, quadCoeff->coeffVector);
301 CeedOperatorSetField(
build_oper,
"weights", CEED_ELEMRESTRICTION_NONE,
304 CEED_BASIS_NONE, CEED_VECTOR_ACTIVE);
310 qf = qf_file + op.apply_func;
311 CeedQFunctionCreateInterior(ceed, 1, op.apply_qf, qf.c_str(),
317 CeedQFunctionAddInput(
apply_qfunc,
"u", trial_vdim, CEED_EVAL_NONE);
320 CeedQFunctionAddInput(
apply_qfunc,
"u", trial_vdim, CEED_EVAL_INTERP);
323 CeedQFunctionAddInput(
apply_qfunc,
"gu", trial_vdim*
dim, CEED_EVAL_GRAD);
326 CeedQFunctionAddInput(
apply_qfunc,
"u", trial_vdim, CEED_EVAL_INTERP);
327 CeedQFunctionAddInput(
apply_qfunc,
"gu", trial_vdim*
dim, CEED_EVAL_GRAD);
331 CeedQFunctionAddInput(
apply_qfunc,
"qdata", qdatasize, CEED_EVAL_NONE);
336 CeedQFunctionAddOutput(
apply_qfunc,
"v", test_vdim, CEED_EVAL_NONE);
339 CeedQFunctionAddOutput(
apply_qfunc,
"v", test_vdim, CEED_EVAL_INTERP);
342 CeedQFunctionAddOutput(
apply_qfunc,
"gv", test_vdim*
dim, CEED_EVAL_GRAD);
345 CeedQFunctionAddOutput(
apply_qfunc,
"v", test_vdim, CEED_EVAL_INTERP);
346 CeedQFunctionAddOutput(
apply_qfunc,
"gv", test_vdim*
dim, CEED_EVAL_GRAD);
358 CEED_BASIS_NONE, CEED_VECTOR_ACTIVE);
372 CeedOperatorSetField(
oper,
"qdata",
restr_i, CEED_BASIS_NONE,
379 CEED_BASIS_NONE, CEED_VECTOR_ACTIVE);
393 CeedVectorCreate(ceed, trial_vdim*trial_fes.
GetNDofs(), &
u);
394 CeedVectorCreate(ceed, test_vdim*test_fes.
GetNDofs(), &
v);