You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (vec!=CEED_VECTOR_NONE) CeedCall(CeedVectorSetValue(vec, 0.0));
2211
-
if (!is_active) CeedCall(CeedVectorDestroy(&vec));
2212
-
}
2213
-
// Apply
2214
-
if (op->num_elem>0) CeedCall(op->ApplyAdd(op, in, out, request));
2215
-
}
2173
+
// ApplyAddActive
2174
+
CeedCall(CeedOperatorApplyAddActive(op, in, out, request));
2216
2175
}
2217
2176
returnCEED_ERROR_SUCCESS;
2218
2177
}
@@ -2223,6 +2182,10 @@ int CeedOperatorApply(CeedOperator op, CeedVector in, CeedVector out, CeedReques
2223
2182
This computes the action of the operator on the specified (active) input, yielding its (active) output.
2224
2183
All inputs and outputs must be specified using @ref CeedOperatorSetField().
2225
2184
2185
+
@note Calling this function asserts that setup is complete and sets the `CeedOperator` as immutable.
2186
+
@warning This function adds into ALL outputs, including passive outputs. To only add into the active output, use `CeedOperatorApplyAddActive()`.
2187
+
@see `CeedOperatorApplyAddActive()`
2188
+
2226
2189
@param[in] op `CeedOperator` to apply
2227
2190
@param[in] in `CeedVector` containing input state or @ref CEED_VECTOR_NONE if there are no active inputs
2228
2191
@param[out] out `CeedVector` to sum in result of applying operator (must be distinct from `in`) or @ref CEED_VECTOR_NONE if there are no active outputs
@@ -2259,6 +2222,73 @@ int CeedOperatorApplyAdd(CeedOperator op, CeedVector in, CeedVector out, CeedReq
2259
2222
returnCEED_ERROR_SUCCESS;
2260
2223
}
2261
2224
2225
+
/**
2226
+
@brief Apply `CeedOperator` to a `CeedVector` and add result to output `CeedVector`. Only sums into active outputs, overwrites passive outputs.
2227
+
2228
+
This computes the action of the operator on the specified (active) input, yielding its (active) output.
2229
+
All inputs and outputs must be specified using @ref CeedOperatorSetField().
2230
+
2231
+
@note Calling this function asserts that setup is complete and sets the `CeedOperator` as immutable.
2232
+
2233
+
@param[in] op `CeedOperator` to apply
2234
+
@param[in] in `CeedVector` containing input state or @ref CEED_VECTOR_NONE if there are no active inputs
2235
+
@param[out] out `CeedVector` to sum in result of applying operator (must be distinct from `in`) or @ref CEED_VECTOR_NONE if there are no active outputs
2236
+
@param[in] request Address of @ref CeedRequest for non-blocking completion, else @ref CEED_REQUEST_IMMEDIATE
2237
+
2238
+
@return An error code: 0 - success, otherwise - failure
0 commit comments