Skip to content

Commit

Permalink
Saves WIP before rebasing onto upstream libCEED.
Browse files Browse the repository at this point in the history
  • Loading branch information
kris-rowe committed Oct 25, 2022
1 parent 4899775 commit d15d972
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
21 changes: 6 additions & 15 deletions backends/occa/ceed-occa-operator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,25 +113,17 @@ namespace ceed {
CeedOccaRegisterFunction(op, "LinearAssembleQFunctionUpdate", Operator::ceedLinearAssembleQFunction);
CeedOccaRegisterFunction(op, "LinearAssembleAddDiagonal", Operator::ceedLinearAssembleAddDiagonal);
CeedOccaRegisterFunction(op, "LinearAssembleAddPointBlockDiagonal", Operator::ceedLinearAssembleAddPointBlockDiagonal);
CeedOccaRegisterFunction(op, "CreateFDMElementInverse", Operator::ceedCreateFDMElementInverse);
CeedOccaRegisterFunction(op, "LinearAssembleSingle", Operator::ceedLinearAssembleSingle);
CeedOccaRegisterFunction(op, "ApplyAdd", Operator::ceedApplyAdd);
CeedOccaRegisterFunction(op, "Destroy", Operator::ceedDestroy);

return CEED_ERROR_SUCCESS;
}

int Operator::ceedCreateComposite(CeedOperator op) {
int ierr;
Ceed ceed;
ierr = CeedOperatorGetCeed(op, &ceed); CeedChk(ierr);

CeedOccaRegisterFunction(op, "LinearAssembleAddDiagonal", Operator::ceedLinearAssembleAddDiagonal);
CeedOccaRegisterFunction(op, "LinearAssembleAddPointBlockDiagonal", Operator::ceedLinearAssembleAddPointBlockDiagonal);

return CEED_ERROR_SUCCESS;
}

int Operator::ceedLinearAssembleQFunction(CeedOperator op) {
Operator *operator_ = Operator::from(op);

return staticCeedError("(OCCA) Backend does not implement LinearAssembleQFunction");
}

Expand All @@ -143,15 +135,14 @@ namespace ceed {
return staticCeedError("(OCCA) Backend does not implement LinearAssembleDiagonal");
}


int Operator::ceedLinearAssembleAddPointBlockDiagonal(CeedOperator op) {
return staticCeedError("(OCCA) Backend does not implement LinearAssemblePointBlockDiagonal");
}

int Operator::ceedCreateFDMElementInverse(CeedOperator op) {
return staticCeedError("(OCCA) Backend does not implement CreateFDMElementInverse");
int Operator::ceedLinearAssembleSingle(CeedOperator op) {
return staticCeedError("(OCCA) Backend does not implement LinearAssembleSingle");
}

int Operator::ceedApplyAdd(CeedOperator op,
CeedVector invec, CeedVector outvec, CeedRequest *request) {
Operator *operator_ = Operator::from(op);
Expand Down
2 changes: 1 addition & 1 deletion backends/occa/ceed-occa-operator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ namespace ceed {
static int ceedLinearAssembleQFunctionUpdate(CeedOperator op);
static int ceedLinearAssembleAddDiagonal(CeedOperator op);
static int ceedLinearAssembleAddPointBlockDiagonal(CeedOperator op);
static int ceedCreateFDMElementInverse(CeedOperator op);
static int ceedLinearAssembleSingle(CeedOperator op);

static int ceedApplyAdd(CeedOperator op,
CeedVector invec, CeedVector outvec, CeedRequest *request);
Expand Down
1 change: 0 additions & 1 deletion backends/occa/ceed-occa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,6 @@ namespace ceed {
CeedOccaRegisterBaseFunction("QFunctionCreate", ceed::occa::QFunction::ceedCreate);
CeedOccaRegisterBaseFunction("QFunctionContextCreate", ceed::occa::QFunctionContext::ceedCreate);
CeedOccaRegisterBaseFunction("OperatorCreate", ceed::occa::Operator::ceedCreate);
CeedOccaRegisterBaseFunction("CompositeOperatorCreate", ceed::occa::Operator::ceedCreateComposite);

return CEED_ERROR_SUCCESS;
}
Expand Down

0 comments on commit d15d972

Please sign in to comment.