Skip to content

Commit

Permalink
Merge pull request #243 from bhosale2/194_remove_internal_damping
Browse files Browse the repository at this point in the history
(#194) remove internal damping option for Cosserat rod
  • Loading branch information
bhosale2 committed May 3, 2023
2 parents e995c98 + adb1114 commit 24f301a
Show file tree
Hide file tree
Showing 52 changed files with 1,287 additions and 2,422 deletions.
14 changes: 2 additions & 12 deletions elastica/memory_block/memory_block_rod.py
Expand Up @@ -232,10 +232,7 @@ def allocate_block_variables_in_nodes(self, systems: Sequence):

# Things in nodes that are scalars
# 0 ("mass", float64[:]),
map_scalar_dofs_in_rod_nodes = {
"mass": 0,
"dissipation_constant_for_forces": 1,
}
map_scalar_dofs_in_rod_nodes = {"mass": 0}
self.scalar_dofs_in_rod_nodes = np.zeros(
(len(map_scalar_dofs_in_rod_nodes), self.n_nodes)
)
Expand All @@ -261,13 +258,11 @@ def allocate_block_variables_in_nodes(self, systems: Sequence):
# 0 ("position_collection", float64[:, :]),
# 1 ("internal_forces", float64[:, :]),
# 2 ("external_forces", float64[:, :]),
# 3 ("damping_forces", float64[:, :]),
# 6 in total
map_vector_dofs_in_rod_nodes = {
"position_collection": 0,
"internal_forces": 1,
"external_forces": 2,
"damping_forces": 3,
}
self.vector_dofs_in_rod_nodes = np.zeros(
(len(map_vector_dofs_in_rod_nodes), 3 * self.n_nodes)
Expand Down Expand Up @@ -316,8 +311,6 @@ def allocate_block_variables_in_elements(self, systems: Sequence):
# 4 ("rest_lengths", float64[:]),
# 5 ("dilatation", float64[:]),
# 6 ("dilatation_rate", float64[:]),
# 7 ("dissipation_constant_for_forces", float64[:]),
# 8 ("dissipation_constant_for_torques", float64[:])
map_scalar_dofs_in_rod_elems = {
"radius": 0,
"volume": 1,
Expand All @@ -326,7 +319,6 @@ def allocate_block_variables_in_elements(self, systems: Sequence):
"rest_lengths": 4,
"dilatation": 5,
"dilatation_rate": 6,
"dissipation_constant_for_torques": 7,
}
self.scalar_dofs_in_rod_elems = np.zeros(
(len(map_scalar_dofs_in_rod_elems), self.n_elems)
Expand Down Expand Up @@ -355,16 +347,14 @@ def allocate_block_variables_in_elements(self, systems: Sequence):
# 2 ("rest_sigma", float64[:, :]),
# 3 ("internal_torques", float64[:, :]),
# 4 ("external_torques", float64[:, :]),
# 5 ("damping_torques", float64[:, :]),
# 6 ("internal_stress", float64[:, :]),
map_vector_dofs_in_rod_elems = {
"tangents": 0,
"sigma": 1,
"rest_sigma": 2,
"internal_torques": 3,
"external_torques": 4,
"damping_torques": 5,
"internal_stress": 6,
"internal_stress": 5,
}
self.vector_dofs_in_rod_elems = np.zeros(
(len(map_vector_dofs_in_rod_elems), 3 * self.n_elems)
Expand Down

0 comments on commit 24f301a

Please sign in to comment.