Skip to content

Commit c4eae98

Browse files
committed
revert some changes.
1 parent 2513e7f commit c4eae98

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

source/simulator/assemblers/newton_stokes.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,7 +466,7 @@ namespace aspect
466466
if (introspection.is_stokes_component(index_direction+1))
467467
data.local_rhs(i) += (
468468
- pressure_scaling
469-
* (prescribed_dilation->dilation_rhs_term[q][index_direction] -
469+
* (prescribed_dilation->dilation_rhs_term[index_direction][q] -
470470
prescribed_dilation->dilation_lhs_term[q] *
471471
scratch.material_model_inputs.pressure[q])
472472
* scratch.phi_p[i]
@@ -669,8 +669,10 @@ namespace aspect
669669
Assert(!this->get_parameters().enable_prescribed_dilation
670670
||
671671
(outputs.template get_additional_output_object<MaterialModel::PrescribedPlasticDilation<dim>>()->dilation_lhs_term.size() == n_points &&
672-
outputs.template get_additional_output_object<MaterialModel::PrescribedPlasticDilation<dim>>()->dilation_rhs_term.size() == n_points
673-
),
672+
outputs.template get_additional_output_object<MaterialModel::PrescribedPlasticDilation<dim>>()->dilation_rhs_term.size() == dim &&
673+
outputs.template get_additional_output_object<MaterialModel::PrescribedPlasticDilation<dim>>()->dilation_rhs_term[0].size() == n_points &&
674+
outputs.template get_additional_output_object<MaterialModel::PrescribedPlasticDilation<dim>>()->dilation_rhs_term[1].size() == n_points &&
675+
(dim == 2 || (dim == 3 && outputs.template get_additional_output_object<MaterialModel::PrescribedPlasticDilation<dim>>()->dilation_rhs_term[2].size() == n_points))),
674676
ExcInternalError());
675677

676678
if (this->get_newton_handler().parameters.newton_derivative_scaling_factor != 0)

tests/prescribed_dilation.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,11 +207,11 @@ namespace aspect
207207
}
208208
if (prescribed_dilation)
209209
{
210-
prescribed_dilation->dilation_lhs_term[i] = 0;
211210
prescribed_dilation->dilation_rhs_term[0][i] = x;
212211
prescribed_dilation->dilation_rhs_term[1][i] = x;
213212
if (dim == 3)
214213
prescribed_dilation->dilation_rhs_term[2][i] = x;
214+
prescribed_dilation->dilation_lhs_term[i] = 0;
215215
}
216216

217217
}

0 commit comments

Comments
 (0)