Skip to content

Commit

Permalink
Fix bugs in ANCF nodes where the actual number of DOFs was not correc…
Browse files Browse the repository at this point in the history
…t (when some are fixed)

(cherry picked from commit 83c3d24)
  • Loading branch information
rserban committed Jan 6, 2023
1 parent 3870c79 commit 30cd3f2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/chrono/fea/ChNodeFEAxyzD.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,15 @@ class ChApi ChNodeFEAxyzD : public ChNodeFEAxyz {
/// Get the number of degrees of freedom.
virtual int GetNdofX() const override { return 6; }

/// Get the number of degrees of freedom, derivative.
virtual int GetNdofW() const override { return 6; }

/// Get the actual number of active degrees of freedom.
virtual int GetNdofX_active() const override { return m_dof_actual; }

/// Get the actual number of active degrees of freedom, derivative.
virtual int GetNdofW_active() const override { return m_dof_actual; }

// Functions for interfacing to the state bookkeeping

virtual void NodeIntStateGather(const unsigned int off_x,
Expand Down
6 changes: 6 additions & 0 deletions src/chrono/fea/ChNodeFEAxyzDD.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,15 @@ class ChApi ChNodeFEAxyzDD : public ChNodeFEAxyzD {
/// Get the number of degrees of freedom.
virtual int GetNdofX() const override { return 9; }

/// Get the number of degrees of freedom, derivative.
virtual int GetNdofW() const override { return 9; }

/// Get the actual number of active degrees of freedom.
virtual int GetNdofX_active() const override { return m_dof_actual; }

/// Get the actual number of active degrees of freedom, derivative.
virtual int GetNdofW_active() const override { return m_dof_actual; }

// Functions for interfacing to the state bookkeeping

virtual void NodeIntStateGather(const unsigned int off_x,
Expand Down
6 changes: 6 additions & 0 deletions src/chrono/fea/ChNodeFEAxyzDDD.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,15 @@ class ChApi ChNodeFEAxyzDDD : public ChNodeFEAxyzDD {
/// Get the number of degrees of freedom.
virtual int GetNdofX() const override { return 12; }

/// Get the number of degrees of freedom, derivative.
virtual int GetNdofW() const override { return 12; }

/// Get the actual number of active degrees of freedom.
virtual int GetNdofX_active() const override { return m_dof_actual; }

/// Get the actual number of active degrees of freedom, derivative.
virtual int GetNdofW_active() const override { return m_dof_actual; }

// Functions for interfacing to the state bookkeeping

virtual void NodeIntStateGather(const unsigned int off_x,
Expand Down

0 comments on commit 30cd3f2

Please sign in to comment.