Skip to content

Commit ef42d97

Browse files
committed
Variable::type() setter->private except to DofMap
1 parent 30b31a1 commit ef42d97

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

include/base/variable.h

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,6 @@ class Variable
144144
const FEType & type() const
145145
{ return _type; }
146146

147-
/**
148-
* \returns The \p FEType for this variable. Altering this while
149-
* this Variable is already in use may be dangerous!
150-
*/
151-
FEType & type()
152-
{ return _type; }
153-
154147
/**
155148
* \returns The number of components of this variable if the \p FEFamily is \p SCALAR or if the
156149
* associated \p FEFieldType is \p TYPE_SCALAR. Otherwise this will error because determination of
@@ -195,6 +188,18 @@ class Variable
195188
unsigned int _number;
196189
unsigned int _first_scalar_number;
197190
FEType _type;
191+
192+
private:
193+
/**
194+
* \returns The \p FEType for this variable. Altering this while
195+
* this Variable is already in use may be dangerous!
196+
*/
197+
FEType & type()
198+
{ return _type; }
199+
200+
// DofMap can change a VariableGroup type() to disable/enable
201+
// p-refinement post-variable-addition.
202+
friend class DofMap;
198203
};
199204

200205

0 commit comments

Comments
 (0)