Skip to content

Commit d13c580

Browse files
committed
Deprecate version of NumericVector::type() that returns a writable reference
1 parent 0ce07d2 commit d13c580

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

include/numerics/numeric_vector.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ class NumericVector : public ReferenceCountedObject<NumericVector<T>>,
153153
*/
154154
ParallelType type() const { return _type; }
155155

156+
/**
157+
* \returns The type (SERIAL, PARALLEL, GHOSTED) of the vector.
158+
*
159+
* \deprecated because it is dangerous to change the ParallelType
160+
* of an already-initialized NumericVector. See NumericVector::set_type()
161+
* for a safer, non-deprecated setter.
162+
*/
163+
#ifdef LIBMESH_ENABLE_DEPRECATED
164+
ParallelType & type() { return _type; }
165+
#endif
166+
156167
/**
157168
* Allow the user to change the ParallelType of the NumericVector
158169
* under some circumstances. If the NumericVector has not been

0 commit comments

Comments
 (0)