From: frohne Date: Tue, 19 Feb 2013 01:38:44 +0000 (+0000) Subject: additional output for the cell constitution (plastic, elastic, ...) X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11364e8db79dec007613294ba130313e73d07d47;p=dealii-svn.git additional output for the cell constitution (plastic, elastic, ...) git-svn-id: https://svn.dealii.org/trunk@28458 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-42/step-42.cc b/deal.II/examples/step-42/step-42.cc index 530f2a57f3..80a285ee3b 100644 --- a/deal.II/examples/step-42/step-42.cc +++ b/deal.II/examples/step-42/step-42.cc @@ -150,6 +150,7 @@ namespace Step42 TrilinosWrappers::MPI::Vector system_rhs_newton; TrilinosWrappers::MPI::Vector resid_vector; TrilinosWrappers::MPI::Vector diag_mass_matrix_vector; + Vector cell_constitution; IndexSet active_set; ConditionalOStream pcout; @@ -703,6 +704,7 @@ namespace Step42 old_solution.reinit (system_rhs_newton); resid_vector.reinit (system_rhs_newton); diag_mass_matrix_vector.reinit (system_rhs_newton); + cell_constitution.reinit (triangulation.n_active_cells ()); active_set.clear (); active_set.set_size (locally_relevant_dofs.size ()); } @@ -914,7 +916,7 @@ namespace Step42 plast_lin_hard->plast_linear_hardening (stress_strain_tensor, strain_tensor[q_point], elast_points, plast_points, yield); - + cell_constitution (cell_number) += yield; for (unsigned int i=0; i(i)); old_solution = tmp_vector; old_solution.sadd(1-a,a, distributed_solution); +// constraints.distribute (old_solution); old_solution.compress (VectorOperation::add); MPI_Barrier (mpi_communicator); @@ -1451,6 +1455,8 @@ namespace Step42 subdomain(i) = triangulation.locally_owned_subdomain(); data_out.add_data_vector (subdomain, "subdomain"); + data_out.add_data_vector (cell_constitution, "CellConstitution"); + data_out.build_patches (); const std::string filename = (title + "-" +