Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ContactStructuralMechanicsApplication] Minor optimization in mesh_tying_mortar_condition.cpp #11508

Merged
Merged
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 @@ -550,10 +550,10 @@ void MeshTyingMortarCondition<TDim,TNumNodes, TNumNodesMaster>::CalculateLocalLH
const IndexType initial_column_index = dof_size * (TNumNodes + TNumNodesMaster);

// Iterate over the number of dofs on master side
for (IndexType i = 0; i < dof_size; ++i) {
for (IndexType j = 0; j < TNumNodesMaster; ++j) {
for (IndexType k = 0; k < TNumNodes; ++k) {
const double value = - scale_factor * r_MOperator(k, j);
for (IndexType j = 0; j < TNumNodesMaster; ++j) {
for (IndexType k = 0; k < TNumNodes; ++k) {
const double value = - scale_factor * r_MOperator(k, j);
for (IndexType i = 0; i < dof_size; ++i) {
rLocalLHS(initial_row_index + j * dof_size + i, initial_column_index + k * dof_size + i) = value;
rLocalLHS(initial_column_index + k * dof_size + i, initial_row_index + j * dof_size + i) = value;
}
Expand All @@ -564,10 +564,10 @@ void MeshTyingMortarCondition<TDim,TNumNodes, TNumNodesMaster>::CalculateLocalLH
initial_row_index = dof_size * TNumNodesMaster;

// Iterate over the number of dofs on slave side
for (IndexType i = 0; i < dof_size; ++i) {
for (IndexType j = 0; j < TNumNodes; ++j) {
for (IndexType k = 0; k < TNumNodes; ++k) {
const double value = scale_factor * r_DOperator(k, j);
for (IndexType j = 0; j < TNumNodes; ++j) {
for (IndexType k = 0; k < TNumNodes; ++k) {
const double value = scale_factor * r_DOperator(k, j);
for (IndexType i = 0; i < dof_size; ++i) {
rLocalLHS(initial_row_index + j * dof_size + i, initial_column_index + k * dof_size + i) = value;
rLocalLHS(initial_column_index + k * dof_size + i, initial_row_index + j * dof_size + i) = value;
}
Expand Down