Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ namespace Kratos
const double penalty_integration = penalty * integration_points[point_number].Weight() * determinant_jacobian_vector[point_number];

// Rotation coupling
if (Is(IgaFlags::FIX_ROTATION_X))
if (Is(IgaFlags::FIX_ROTATION_X) || Is(IgaFlags::FIX_ROTATION_Y) || Is(IgaFlags::FIX_ROTATION_Z))
{
const double penalty_rotation = GetProperties()[PENALTY_ROTATION_FACTOR];
const double penalty_rotation_integration = penalty_rotation * integration_points[point_number].Weight() * determinant_jacobian_vector[point_number];

Vector phi_r = ZeroVector(mat_size);
Matrix phi_rs = ZeroMatrix(mat_size, mat_size);
array_1d<double, 2> diff_phi;
Expand All @@ -115,15 +118,15 @@ namespace Kratos
{
for (IndexType j = 0; j < mat_size; ++j)
{
rLeftHandSideMatrix(i, j) = (phi_r(i) * phi_r(j) + diff_phi(0) * phi_rs(i, j)) * penalty_integration;
rLeftHandSideMatrix(i, j) = (phi_r(i) * phi_r(j) + diff_phi(0) * phi_rs(i, j)) * penalty_rotation_integration;
}
}
}

if (CalculateResidualVectorFlag) {
for (IndexType i = 0; i < mat_size; ++i)
{
rRightHandSideVector[i] = (diff_phi(0) * phi_r(i)) * penalty_integration;
rRightHandSideVector[i] = (diff_phi(0) * phi_r(i)) * penalty_rotation_integration;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"properties_id": 5,
"Material": {
"Variables": {
"PENALTY_FACTOR": 10000000
"PENALTY_FACTOR": 10000000,
"PENALTY_ROTATION_FACTOR": 10000000
},
"Tables": {}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"properties_id": 5,
"Material": {
"Variables": {
"PENALTY_FACTOR": 10000000
"PENALTY_FACTOR": 10000000,
"PENALTY_ROTATION_FACTOR": 10000000
},
"Tables": {}
}
Expand Down
Loading