Skip to content
Permalink
Browse files

Merge pull request #13176 from YaqiWang/array_kernel

Some cleanups in MooseVariableFE for ArrayKernel
  • Loading branch information...
lindsayad committed Apr 13, 2019
2 parents d2d0d48 + a3584c6 commit 4e5648221442e02ded30de2f18072ae93e08a0ed
@@ -89,23 +89,15 @@ class MooseVariableBase
*/
const DofMap & dofMap() const { return _dof_map; }

/// Get a writable reference of local DoF indices
std::vector<dof_id_type> & dofIndices() { return _dof_indices; }

/// Get local DoF indices
const std::vector<dof_id_type> & dofIndices() const { return _dof_indices; }

/// Get the number of local DoFs
unsigned int numberOfDofs() { return _dof_indices.size(); }

/**
* Is this variable nodal
* @return true if it nodal, otherwise false
*/
virtual bool isNodal() const = 0;

/**
* @returns true if this is a vector-valued element, false otherwise.
*/
virtual bool isVector() const = 0;

protected:
/// variable number (from libMesh)
unsigned int _var_num;
@@ -760,19 +760,15 @@ class MooseVariableFE : public MooseVariableFEBase
* as they're referred to here in this class). These methods are only truly meaningful for nodal
* basis families
*/
void assignNodalValue(const Real & value, const unsigned int & component);
void assignADNodalValue(const DualReal & value, const unsigned int & component);
void assignNodalValueOld(const Real & value, const unsigned int & component);
void assignNodalValueOlder(const Real & value, const unsigned int & component);
void assignNodalValuePreviousNL(const Real & value, const unsigned int & component);
void assignNodalValueDot(const Real & value, const unsigned int & component);
void assignNodalValueDotOld(const Real & value, const unsigned int & component);
void assignNodalValueDotDot(const Real & value, const unsigned int & component);
void assignNodalValueDotDotOld(const Real & value, const unsigned int & component);
void assignNeighborNodalValue(const Real & value, const unsigned int & component);
void assignNeighborNodalValueOld(const Real & value, const unsigned int & component);
void assignNeighborNodalValueOlder(const Real & value, const unsigned int & component);
void assignNeighborNodalValuePreviousNL(const Real & value, const unsigned int & component);
void assignNodalValue();
void fetchDoFValues();
void fetchADDoFValues();
void zeroSizeDofValues();

void assignNodalValueNeighbor();
void fetchDoFValuesNeighbor();
void zeroSizeDofValuesNeighbor();

protected:
/// Whether this variable is on the displaced system
@@ -55,6 +55,12 @@ class MooseVariableFEBase : public MooseVariableBase
* @return true if it nodal, otherwise false
*/
virtual bool isNodal() const = 0;

/**
* @returns true if this is a vector-valued element, false otherwise.
*/
virtual bool isVector() const = 0;

virtual dof_id_type & nodalDofIndex() = 0;
virtual dof_id_type & nodalDofIndexNeighbor() = 0;

@@ -38,9 +38,6 @@ class MooseVariableScalar : public MooseVariableBase

void reinit();

virtual bool isNodal() const override;
virtual bool isVector() const override;

//
VariableValue & sln() { return _u; }
VariableValue & slnOld() { return _u_old; }
Oops, something went wrong.

0 comments on commit 4e56482

Please sign in to comment.
You can’t perform that action at this time.