Hi Artur -
Unfortunately I don't have any hanging node constraints in the model. I do
have constraints but there aren't any along the mesh partition. I still
can't figure out why my output looks the way it does. The solve function
looks like this:
unsigned int EigenvalueProblem<dim>::solve ()
{
TimerOutput::Scope t(computing_timer, "solve");
pcout << " Number of eigenvectors requested: "
<< eigenvectors.size() << std::endl;
PETScWrappers::PreconditionBoomerAMG::AdditionalData data;
data.symmetric_operator = true;
PETScWrappers::PreconditionBoomerAMG preconditioner(mpi_communicator,
data);
SolverControl linear_solver_control(dof_handler.n_dofs(),1.0e-16,false,
false);
PETScWrappers::SolverCG linear_solver(linear_solver_control,
mpi_communicator);
linear_solver.initialize(preconditioner);
SolverControl solver_control (2000, 1e-14, false, false);
SLEPcWrappers::SolverKrylovSchur eigensolver(solver_control,
mpi_communicator);
double shift_freq = parameters.get_double ("Shift frequency");
double eigen_shift = std::pow( 2.0 * PI * shift_freq, 2.0);
SLEPcWrappers::TransformationShiftInvert::AdditionalData additional_data
(eigen_shift);
SLEPcWrappers::TransformationShiftInvert shift (mpi_communicator,
additional_data);
shift.set_solver(linear_solver);
eigensolver.set_transformation (shift);
eigensolver.set_which_eigenpairs (EPS_SMALLEST_REAL);
eigensolver.set_problem_type (EPS_GHEP);
eigensolver.solve (stiffness_matrix,mass_matrix,eigenvalues,eigenvectors
,
eigenvectors.size());
// Normalize the vectors
for (unsigned int i=0; i<eigenvectors.size(); ++i)
eigenvectors[i] /= eigenvectors[i].linfty_norm ();
// Finally return the number of iterations it took to converge:
return solver_control.last_step ();
}
Is the call to distribute necessary after a parallel solution even if there
aren't any hanging node constraints? I have constraints on the
circumference so that there is zero displacement there but I do not have
any constraints along the partition.
Thanks again for your help,
Jonathan
On Tuesday, June 7, 2016 at 1:25:26 PM UTC-6, Artur Safin wrote:
>
> Jonathan,
>
> You may have figured this out already -- you might have forgotten to add
>
> hanging_node_constraints.distribute (localized_solution);
>
> after you solve your system (see step-17 for example).
>
> Artur
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.