www.mooseframework.org
DisplacedProblem.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 // MOOSE includes
11 
12 #include "AuxiliarySystem.h"
13 #include "FEProblem.h"
14 #include "MooseApp.h"
15 #include "MooseMesh.h"
16 #include "NonlinearSystem.h"
17 #include "Problem.h"
19 #include "SubProblem.h"
21 #include "Assembly.h"
22 #include "DisplacedProblem.h"
23 #include "TimedPrint.h"
24 #include "libmesh/numeric_vector.h"
25 
27 
29 
32 {
34  params.addPrivateParam<MooseMesh *>("mesh");
35  params.addPrivateParam<std::vector<std::string>>("displacements");
36  return params;
37 }
38 
40  : SubProblem(parameters),
41  _mproblem(parameters.have_parameter<FEProblemBase *>("_fe_problem_base")
42  ? *getParam<FEProblemBase *>("_fe_problem_base")
43  : *getParam<FEProblem *>("_fe_problem")),
44  _mesh(*getParam<MooseMesh *>("mesh")),
45  _eq(_mesh),
46  _ref_mesh(_mproblem.mesh()),
47  _displacements(getParam<std::vector<std::string>>("displacements")),
48  _displaced_nl(*this,
49  _mproblem.getNonlinearSystemBase(),
50  _mproblem.getNonlinearSystemBase().name(),
52  _displaced_aux(*this,
53  _mproblem.getAuxiliarySystem(),
54  _mproblem.getAuxiliarySystem().name(),
56  _geometric_search_data(*this, _mesh),
57  _eq_init_timer(registerTimedSection("eq::init", 2)),
58  _update_mesh_timer(registerTimedSection("updateMesh", 3)),
59  _sync_solutions_timer(registerTimedSection("syncSolutions", 5)),
60  _update_geometric_search_timer(registerTimedSection("updateGeometricSearch", 3))
61 {
62  // TODO: Move newAssemblyArray further up to SubProblem so that we can use it here
63  unsigned int n_threads = libMesh::n_threads();
64 
65  _assembly.reserve(n_threads);
66  for (unsigned int i = 0; i < n_threads; ++i)
67  _assembly.emplace_back(libmesh_make_unique<Assembly>(_displaced_nl, i));
68 
70 
71  if (!_default_ghosting)
72  _mesh.getMesh().remove_ghosting_functor(_mesh.getMesh().default_ghosting());
73 }
74 
75 bool
77 {
78  return _mproblem.isTransient();
79 }
80 
83 {
84  return _mproblem.getCoordSystem(sid);
85 }
86 
87 std::set<dof_id_type> &
89 {
90  return _mproblem.ghostedElems();
91 }
92 
93 void
95  Order order,
96  Order volume_order,
97  Order face_order)
98 {
99  for (unsigned int tid = 0; tid < libMesh::n_threads(); ++tid)
100  _assembly[tid]->createQRules(type, order, volume_order, face_order);
101 }
102 
103 void
105 {
106  for (THREAD_ID tid = 0; tid < libMesh::n_threads(); ++tid)
107  {
108  _assembly[tid]->init(_mproblem.couplingMatrix());
109  std::vector<unsigned> disp_numbers;
110  for (const auto & disp_string : _displacements)
111  {
112  const auto & disp_variable = getVariable(tid, disp_string);
113  if (disp_variable.kind() == Moose::VarKindType::VAR_NONLINEAR)
114  disp_numbers.push_back(disp_variable.number());
115  }
116  _assembly[tid]->assignDisplacements(std::move(disp_numbers));
117  }
118 
119  _displaced_nl.dofMap().attach_extra_send_list_function(&extraSendList, &_displaced_nl);
120  _displaced_aux.dofMap().attach_extra_send_list_function(&extraSendList, &_displaced_aux);
121 
123 
125 
126  {
127  TIME_SECTION(_eq_init_timer);
128  _eq.init();
129  }
130 
131  _mesh.meshChanged();
132 }
133 
134 void
136 {
137 }
138 
139 void
141 {
144 }
145 
146 void
148 {
151 }
152 
153 void
155 {
156  TIME_SECTION(_sync_solutions_timer);
157 
162 }
163 
164 void
165 DisplacedProblem::syncSolutions(const NumericVector<Number> & soln,
166  const NumericVector<Number> & aux_soln)
167 {
168  TIME_SECTION(_sync_solutions_timer);
169 
170  (*_displaced_nl.sys().solution) = soln;
171  (*_displaced_aux.sys().solution) = aux_soln;
174 }
175 
176 void
177 DisplacedProblem::updateMesh(bool mesh_changing)
178 {
179  TIME_SECTION(_update_mesh_timer);
180  CONSOLE_TIMED_PRINT("Updating displaced mesh");
181 
182  if (mesh_changing)
183  {
184  // We are probably performing adaptivity. We do not want to use the undisplaced
185  // mesh solution because it may be out-of-sync, whereas our displaced mesh solution should be in
186  // the correct state after getting restricted/prolonged in EquationSystems::reinit (must have
187  // been called before this method)
188  _nl_solution = _displaced_nl.sys().solution.get();
189  _aux_solution = _displaced_aux.sys().solution.get();
190  }
191  else
192  {
193  syncSolutions();
194 
197  }
198 
199  // If the displaced mesh has been serialized to one processor (as
200  // may have occurred if it was used for Exodus output), then we need
201  // the reference mesh to be also. For that matter, did anyone
202  // somehow serialize the whole mesh? Hopefully not but let's avoid
203  // causing errors if so.
204  if (_mesh.getMesh().is_serial() && !this->refMesh().getMesh().is_serial())
205  this->refMesh().getMesh().allgather();
206 
207  if (_mesh.getMesh().is_serial_on_zero() && !this->refMesh().getMesh().is_serial_on_zero())
208  this->refMesh().getMesh().gather_to_zero();
209 
211 
212  // We displace all nodes, not just semilocal nodes, because
213  // parallel-inconsistent mesh geometry makes libMesh cry.
214  NodeRange node_range(_mesh.getMesh().nodes_begin(),
215  _mesh.getMesh().nodes_end(),
216  /*grainsize=*/1);
217 
218  Threads::parallel_reduce(node_range, udmt);
219 
220  // Update the geometric searches that depend on the displaced mesh. This call can end up running
221  // NearestNodeThread::operator() which has a throw inside of it. We need to catch it and make sure
222  // it's propagated to all processes before updating the point locator because the latter requires
223  // communication
224  try
225  {
226  // We may need to re-run geometric operations like SlaveNeighborhoodTread if, for instance, we
227  // have performed mesh adaptivity
228  if (mesh_changing)
230  else
232  }
233  catch (MooseException & e)
234  {
236  }
237 
238  // The below call will throw an exception on all processes if any of our processes had an
239  // exception above. This exception will be caught higher up the call stack and the error message
240  // will be printed there
241  _mproblem.checkExceptionAndStopSolve(/*print_message=*/false);
242 
243  // Since the Mesh changed, update the PointLocator object used by DiracKernels.
245 }
246 
247 void
248 DisplacedProblem::updateMesh(const NumericVector<Number> & soln,
249  const NumericVector<Number> & aux_soln)
250 {
251  TIME_SECTION(_update_mesh_timer);
252  CONSOLE_TIMED_PRINT("Updating displaced mesh");
253 
254  syncSolutions(soln, aux_soln);
255 
256  _nl_solution = &soln;
257  _aux_solution = &aux_soln;
258 
260 
261  // We displace all nodes, not just semilocal nodes, because
262  // parallel-inconsistent mesh geometry makes libMesh cry.
263  NodeRange node_range(_mesh.getMesh().nodes_begin(),
264  _mesh.getMesh().nodes_end(),
265  /*grainsize=*/1);
266 
267  Threads::parallel_reduce(node_range, udmt);
268 
269  // Update the geometric searches that depend on the displaced mesh. This call can end up running
270  // NearestNodeThread::operator() which has a throw inside of it. We need to catch it and make sure
271  // it's propagated to all processes before updating the point locator because the latter requires
272  // communication
273  try
274  {
276  }
277  catch (MooseException & e)
278  {
280  }
281 
282  // The below call will throw an exception on all processes if any of our processes had an
283  // exception above. This exception will be caught higher up the call stack and the error message
284  // will be printed there
285  _mproblem.checkExceptionAndStopSolve(/*print_message=*/false);
286 
287  // Since the Mesh changed, update the PointLocator object used by DiracKernels.
289 }
290 
291 TagID
293 {
294  return _mproblem.addVectorTag(tag_name);
295 }
296 
297 TagID
298 DisplacedProblem::getVectorTagID(const TagName & tag_name)
299 {
300  return _mproblem.getVectorTagID(tag_name);
301 }
302 
303 TagName
305 {
306  return _mproblem.vectorTagName(tag);
307 }
308 
309 bool
311 {
312  return _mproblem.vectorTagExists(tag);
313 }
314 
315 unsigned int
317 {
318  return _mproblem.numVectorTags();
319 }
320 
321 std::map<TagName, TagID> &
323 {
324  return _mproblem.getVectorTags();
325 }
326 
327 TagID
329 {
330  return _mproblem.addMatrixTag(tag_name);
331 }
332 
333 TagID
334 DisplacedProblem::getMatrixTagID(const TagName & tag_name)
335 {
336  return _mproblem.getMatrixTagID(tag_name);
337 }
338 
339 TagName
341 {
342  return _mproblem.matrixTagName(tag);
343 }
344 
345 bool
346 DisplacedProblem::matrixTagExists(const TagName & tag_name)
347 {
348  return _mproblem.matrixTagExists(tag_name);
349 }
350 
351 bool
353 {
354  return _mproblem.matrixTagExists(tag_id);
355 }
356 
357 unsigned int
359 {
360  return _mproblem.numMatrixTags();
361 }
362 
363 bool
364 DisplacedProblem::hasVariable(const std::string & var_name) const
365 {
366  if (_displaced_nl.hasVariable(var_name))
367  return true;
368  else if (_displaced_aux.hasVariable(var_name))
369  return true;
370  else
371  return false;
372 }
373 
376  const std::string & var_name,
377  Moose::VarKindType expected_var_type,
378  Moose::VarFieldType expected_var_field_type)
379 {
380  return getVariableHelper(
381  tid, var_name, expected_var_type, expected_var_field_type, _displaced_nl, _displaced_aux);
382 }
383 
385 DisplacedProblem::getStandardVariable(THREAD_ID tid, const std::string & var_name)
386 {
387  if (_displaced_nl.hasVariable(var_name))
388  return _displaced_nl.getFieldVariable<Real>(tid, var_name);
389  else if (!_displaced_aux.hasVariable(var_name))
390  mooseError("No variable with name '" + var_name + "'");
391 
392  return _displaced_aux.getFieldVariable<Real>(tid, var_name);
393 }
394 
396 DisplacedProblem::getVectorVariable(THREAD_ID tid, const std::string & var_name)
397 {
398  if (_displaced_nl.hasVariable(var_name))
399  return _displaced_nl.getFieldVariable<RealVectorValue>(tid, var_name);
400  else if (!_displaced_aux.hasVariable(var_name))
401  mooseError("No variable with name '" + var_name + "'");
402 
403  return _displaced_aux.getFieldVariable<RealVectorValue>(tid, var_name);
404 }
405 
407 DisplacedProblem::getArrayVariable(THREAD_ID tid, const std::string & var_name)
408 {
409  if (!_displaced_nl.hasVariable(var_name))
410  mooseError("No variable with name '" + var_name + "'");
411 
412  return _displaced_nl.getFieldVariable<RealEigenVector>(tid, var_name);
413 }
414 
415 bool
416 DisplacedProblem::hasScalarVariable(const std::string & var_name) const
417 {
418  if (_displaced_nl.hasScalarVariable(var_name))
419  return true;
420  else if (_displaced_aux.hasScalarVariable(var_name))
421  return true;
422  else
423  return false;
424 }
425 
427 DisplacedProblem::getScalarVariable(THREAD_ID tid, const std::string & var_name)
428 {
429  if (_displaced_nl.hasScalarVariable(var_name))
430  return _displaced_nl.getScalarVariable(tid, var_name);
431  else if (_displaced_aux.hasScalarVariable(var_name))
432  return _displaced_aux.getScalarVariable(tid, var_name);
433  else
434  mooseError("No variable with name '" + var_name + "'");
435 }
436 
437 System &
438 DisplacedProblem::getSystem(const std::string & var_name)
439 {
440  if (_displaced_nl.hasVariable(var_name))
441  return _displaced_nl.system();
442  else if (_displaced_aux.hasVariable(var_name))
443  return _displaced_aux.system();
444  else
445  mooseError("Unable to find a system containing the variable " + var_name);
446 }
447 
448 void
449 DisplacedProblem::addVariable(const std::string & var_type,
450  const std::string & name,
451  InputParameters & parameters)
452 {
454 }
455 
456 void
457 DisplacedProblem::addAuxVariable(const std::string & var_type,
458  const std::string & name,
459  InputParameters & parameters)
460 {
462 }
463 
464 void
465 DisplacedProblem::prepare(const Elem * elem, THREAD_ID tid)
466 {
467  _assembly[tid]->reinit(elem);
468 
469  _displaced_nl.prepare(tid);
470  _displaced_aux.prepare(tid);
472  _assembly[tid]->prepareJacobianBlock();
473  _assembly[tid]->prepareResidual();
474 }
475 
476 void
478 {
479  _assembly[tid]->prepareNonlocal();
480 }
481 
482 void
483 DisplacedProblem::prepareFace(const Elem * /*elem*/, THREAD_ID tid)
484 {
485  _displaced_nl.prepareFace(tid, true);
486  _displaced_aux.prepareFace(tid, false);
487 }
488 
489 void
490 DisplacedProblem::prepare(const Elem * elem,
491  unsigned int ivar,
492  unsigned int jvar,
493  const std::vector<dof_id_type> & dof_indices,
494  THREAD_ID tid)
495 {
496  _assembly[tid]->reinit(elem);
497 
498  _displaced_nl.prepare(tid);
499  _displaced_aux.prepare(tid);
500  _assembly[tid]->prepareBlock(ivar, jvar, dof_indices);
501 }
502 
503 void
505 {
506  SubdomainID did = elem->subdomain_id();
507  _assembly[tid]->setCurrentSubdomainID(did);
508 }
509 
510 void
511 DisplacedProblem::setNeighborSubdomainID(const Elem * elem, unsigned int side, THREAD_ID tid)
512 {
513  SubdomainID did = elem->neighbor_ptr(side)->subdomain_id();
514  _assembly[tid]->setCurrentNeighborSubdomainID(did);
515 }
516 
517 void
519  unsigned int jvar,
520  const std::vector<dof_id_type> & idof_indices,
521  const std::vector<dof_id_type> & jdof_indices,
522  THREAD_ID tid)
523 {
524  _assembly[tid]->prepareBlockNonlocal(ivar, jvar, idof_indices, jdof_indices);
525 }
526 
527 void
529 {
530  _assembly[tid]->prepare();
531 }
532 
533 void
535 {
536  _assembly[tid]->prepareNeighbor();
537 }
538 
539 bool
541 {
542  std::vector<Point> & points = _dirac_kernel_info.getPoints()[elem].first;
543 
544  unsigned int n_points = points.size();
545 
546  if (n_points)
547  {
548  _assembly[tid]->reinitAtPhysical(elem, points);
549 
550  _displaced_nl.prepare(tid);
551  _displaced_aux.prepare(tid);
552 
553  reinitElem(elem, tid);
554  }
555 
556  _assembly[tid]->prepare();
557 
558  return n_points > 0;
559 }
560 
561 void
563 {
564  _displaced_nl.reinitElem(elem, tid);
565  _displaced_aux.reinitElem(elem, tid);
566 }
567 
568 void
570  const std::vector<Point> & phys_points_in_elem,
571  THREAD_ID tid,
572  bool)
573 {
574  _assembly[tid]->reinitAtPhysical(elem, phys_points_in_elem);
575 
576  _displaced_nl.prepare(tid);
577  _displaced_aux.prepare(tid);
578  _assembly[tid]->prepare();
579 
580  reinitElem(elem, tid);
581 }
582 
583 void
585  unsigned int side,
586  BoundaryID bnd_id,
587  THREAD_ID tid)
588 {
589  _assembly[tid]->reinit(elem, side);
590  _displaced_nl.reinitElemFace(elem, side, bnd_id, tid);
591  _displaced_aux.reinitElemFace(elem, side, bnd_id, tid);
592 }
593 
594 void
596 {
597  _assembly[tid]->reinit(node);
598  _displaced_nl.reinitNode(node, tid);
599  _displaced_aux.reinitNode(node, tid);
600 }
601 
602 void
604 {
605  _assembly[tid]->reinit(node);
606  _displaced_nl.reinitNodeFace(node, bnd_id, tid);
607  _displaced_aux.reinitNodeFace(node, bnd_id, tid);
608 }
609 
610 void
611 DisplacedProblem::reinitNodes(const std::vector<dof_id_type> & nodes, THREAD_ID tid)
612 {
613  _displaced_nl.reinitNodes(nodes, tid);
614  _displaced_aux.reinitNodes(nodes, tid);
615 }
616 
617 void
618 DisplacedProblem::reinitNodesNeighbor(const std::vector<dof_id_type> & nodes, THREAD_ID tid)
619 {
622 }
623 
624 void
625 DisplacedProblem::reinitNeighbor(const Elem * elem, unsigned int side, THREAD_ID tid)
626 {
627  setNeighborSubdomainID(elem, side, tid);
628 
629  const Elem * neighbor = elem->neighbor_ptr(side);
630  unsigned int neighbor_side = neighbor->which_neighbor_am_i(elem);
631 
632  _assembly[tid]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
633 
636 
637  _assembly[tid]->prepareNeighbor();
638 
639  BoundaryID bnd_id = 0; // some dummy number (it is not really used for anything, right now)
640  _displaced_nl.reinitElemFace(elem, side, bnd_id, tid);
641  _displaced_aux.reinitElemFace(elem, side, bnd_id, tid);
642 
643  _displaced_nl.reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
644  _displaced_aux.reinitNeighborFace(neighbor, neighbor_side, bnd_id, tid);
645 }
646 
647 void
649  unsigned int neighbor_side,
650  const std::vector<Point> & physical_points,
651  THREAD_ID tid)
652 {
653  // Reinit shape functions
654  _assembly[tid]->reinitNeighborAtPhysical(neighbor, neighbor_side, physical_points);
655 
656  // Set the neighbor dof indices
659 
661 
662  // Compute values at the points
663  _displaced_nl.reinitNeighborFace(neighbor, neighbor_side, 0, tid);
664  _displaced_aux.reinitNeighborFace(neighbor, neighbor_side, 0, tid);
665 }
666 
667 void
669  const std::vector<Point> & physical_points,
670  THREAD_ID tid)
671 {
672  // Reinit shape functions
673  _assembly[tid]->reinitNeighborAtPhysical(neighbor, physical_points);
674 
675  // Set the neighbor dof indices
678 
680 
681  // Compute values at the points
682  _displaced_nl.reinitNeighbor(neighbor, tid);
683  _displaced_aux.reinitNeighbor(neighbor, tid);
684 }
685 
686 void
687 DisplacedProblem::reinitScalars(THREAD_ID tid, bool reinit_for_derivative_reordering /*=false*/)
688 {
689  _displaced_nl.reinitScalars(tid, reinit_for_derivative_reordering);
690  _displaced_aux.reinitScalars(tid, reinit_for_derivative_reordering);
691 }
692 
693 void
695 {
696  _assembly[tid]->prepareOffDiagScalar();
697 }
698 
699 void
700 DisplacedProblem::getDiracElements(std::set<const Elem *> & elems)
701 {
703 }
704 
705 void
707 {
709 }
710 
711 void
713 {
714  _assembly[tid]->addResidual(getVectorTags());
715 }
716 
717 void
719 {
720  _assembly[tid]->addResidualNeighbor(getVectorTags());
721 }
722 
723 void
725 {
726  _assembly[tid]->cacheResidual();
727 }
728 
729 void
731 {
732  _assembly[tid]->cacheResidualNeighbor();
733 }
734 
735 void
737 {
738  _assembly[tid]->addCachedResiduals();
739 }
740 
741 void
742 DisplacedProblem::addCachedResidualDirectly(NumericVector<Number> & residual, THREAD_ID tid)
743 {
744  _assembly[tid]->addCachedResidual(residual, _displaced_nl.timeVectorTag());
745  _assembly[tid]->addCachedResidual(residual, _displaced_nl.nonTimeVectorTag());
746 }
747 
748 void
749 DisplacedProblem::setResidual(NumericVector<Number> & residual, THREAD_ID tid)
750 {
751  _assembly[tid]->setResidual(residual);
752 }
753 
754 void
755 DisplacedProblem::setResidualNeighbor(NumericVector<Number> & residual, THREAD_ID tid)
756 {
757  _assembly[tid]->setResidualNeighbor(residual);
758 }
759 
760 void
762 {
763  _assembly[tid]->addJacobian();
764 }
765 
766 void
768 {
769  _assembly[tid]->addJacobianNonlocal();
770 }
771 
772 void
774 {
775  _assembly[tid]->addJacobianNeighbor();
776 }
777 
778 void
780 {
781  _assembly[tid]->cacheJacobian();
782 }
783 
784 void
786 {
787  _assembly[tid]->cacheJacobianNonlocal();
788 }
789 
790 void
792 {
793  _assembly[tid]->cacheJacobianNeighbor();
794 }
795 
796 void
798 {
799  _assembly[tid]->addCachedJacobian();
800 }
801 
802 void
803 DisplacedProblem::addJacobianBlock(SparseMatrix<Number> & jacobian,
804  unsigned int ivar,
805  unsigned int jvar,
806  const DofMap & dof_map,
807  std::vector<dof_id_type> & dof_indices,
808  THREAD_ID tid)
809 {
810  _assembly[tid]->addJacobianBlock(jacobian, ivar, jvar, dof_map, dof_indices);
811 }
812 
813 void
814 DisplacedProblem::addJacobianBlockNonlocal(SparseMatrix<Number> & jacobian,
815  unsigned int ivar,
816  unsigned int jvar,
817  const DofMap & dof_map,
818  const std::vector<dof_id_type> & idof_indices,
819  const std::vector<dof_id_type> & jdof_indices,
820  THREAD_ID tid)
821 {
822  _assembly[tid]->addJacobianBlockNonlocal(
823  jacobian, ivar, jvar, dof_map, idof_indices, jdof_indices);
824 }
825 
826 void
827 DisplacedProblem::addJacobianNeighbor(SparseMatrix<Number> & jacobian,
828  unsigned int ivar,
829  unsigned int jvar,
830  const DofMap & dof_map,
831  std::vector<dof_id_type> & dof_indices,
832  std::vector<dof_id_type> & neighbor_dof_indices,
833  THREAD_ID tid)
834 {
835  _assembly[tid]->addJacobianNeighbor(
836  jacobian, ivar, jvar, dof_map, dof_indices, neighbor_dof_indices);
837 }
838 
839 void
841 {
842  _assembly[tid]->copyShapes(var);
843 }
844 
845 void
847 {
848  _assembly[tid]->copyFaceShapes(var);
849 }
850 
851 void
853 {
854  _assembly[tid]->copyNeighborShapes(var);
855 }
856 
857 void
859 {
860  TIME_SECTION(_update_geometric_search_timer);
861 
863 }
864 
865 void
867 {
868  // The mesh changed. The displaced equations system object only holds ExplicitSystems, so calling
869  // EquationSystems::reinit only prolongs/restricts the solution vectors, which is something that
870  // needs to happen for every step of mesh adaptivity.
871  _eq.reinit();
872 
873  // We've performed some mesh adaptivity. We need to
874  // clear any quadrature nodes such that when we build the boundary node lists in
875  // MooseMesh::meshChanged we don't have any extraneous extra boundary nodes lying around
877 
878  _mesh.meshChanged();
879 
880  // Before performing mesh adaptivity we un-displaced the mesh. We need to re-displace the mesh and
881  // then reinitialize GeometricSearchData such that we have all the correct geometric information
882  // for the changed mesh
883  updateMesh(/*mesh_changing=*/true);
884 }
885 
886 void
888 {
889  _mproblem.addGhostedElem(elem_id);
890 }
891 
892 void
894 {
895  _mproblem.addGhostedBoundary(boundary_id);
896 }
897 
898 void
900 {
902 }
903 
904 MooseMesh &
906 {
907  return _ref_mesh;
908 }
909 
910 void
912 {
913 }
914 
915 bool
917 {
918  return _mproblem.converged();
919 }
920 
921 bool
923 {
925 }
926 
927 void
929 {
930 }
931 
932 void
934 {
935 }
936 
937 void
939 {
940  // If undisplaceMesh() is called during initial adaptivity, it is
941  // not valid to call _mesh.getActiveSemiLocalNodeRange() since it is
942  // not set up yet. So we are creating the Range by hand.
943  //
944  // We must undisplace *all* our nodes to the _ref_mesh
945  // configuration, not just the local ones, since the partitioners
946  // require this. We are using the GRAIN_SIZE=1 from MooseMesh.C,
947  // not sure how this value was decided upon.
948  //
949  // (DRG: The grainsize parameter is ultimately passed to TBB to help
950  // it choose how to split up the range. A grainsize of 1 says "split
951  // it as much as you want". Years ago I experimentally found that it
952  // didn't matter much and that using 1 was fine.)
953  //
954  // Note: we don't have to invalidate/update as much stuff as
955  // DisplacedProblem::updateMesh() does, since this will be handled
956  // by a later call to updateMesh().
957  NodeRange node_range(_mesh.getMesh().nodes_begin(),
958  _mesh.getMesh().nodes_end(),
959  /*grainsize=*/1);
960 
961  ResetDisplacedMeshThread rdmt(_mproblem, *this);
962 
963  // Undisplace the mesh using threads.
964  Threads::parallel_reduce(node_range, rdmt);
965 }
966 
967 LineSearch *
969 {
970  return _mproblem.getLineSearch();
971 }
972 
973 const CouplingMatrix *
975 {
976  return _mproblem.couplingMatrix();
977 }
DisplacedProblem::onTimestepEnd
virtual void onTimestepEnd() override
Definition: DisplacedProblem.C:933
Moose::VarFieldType
VarFieldType
Definition: MooseTypes.h:613
SubProblem::getVectorTagID
virtual TagID getVectorTagID(const TagName &tag_name)
Get a TagID from a TagName.
Definition: SubProblem.C:95
MooseVariableFEBase
Definition: MooseVariableFEBase.h:27
Moose
Definition: Moose.h:116
DisplacedProblem::getVectorVariable
virtual VectorMooseVariable & getVectorVariable(THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested VectorMooseVariable which may be in any system.
Definition: DisplacedProblem.C:396
DisplacedProblem::solve
virtual void solve() override
Definition: DisplacedProblem.C:911
DisplacedProblem::addJacobian
virtual void addJacobian(THREAD_ID tid) override
Definition: DisplacedProblem.C:761
DisplacedProblem::_ref_mesh
MooseMesh & _ref_mesh
reference mesh
Definition: DisplacedProblem.h:295
DisplacedProblem::_displacements
std::vector< std::string > _displacements
Definition: DisplacedProblem.h:296
SubProblem::vectorTagName
virtual TagName vectorTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition: SubProblem.C:110
FEProblemBase::checkExceptionAndStopSolve
virtual void checkExceptionAndStopSolve(bool print_message=true)
Check to see if an exception has occurred on any processor and stop the solve.
Definition: FEProblemBase.C:4662
DisplacedProblem::addCachedJacobian
virtual void addCachedJacobian(THREAD_ID tid) override
Definition: DisplacedProblem.C:797
type
MatType type
Definition: PetscDMMoose.C:1477
THREAD_ID
unsigned int THREAD_ID
Definition: MooseTypes.h:196
SystemBase::reinitNode
virtual void reinitNode(const Node *node, THREAD_ID tid)
Reinit nodal assembly info.
Definition: SystemBase.C:377
DisplacedProblem::addJacobianBlock
virtual void addJacobianBlock(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, std::vector< dof_id_type > &dof_indices, THREAD_ID tid) override
Definition: DisplacedProblem.C:803
defineLegacyParams
defineLegacyParams(DisplacedProblem)
DisplacedProblem::vectorTagExists
virtual bool vectorTagExists(TagID tag) override
Check to see if a particular Tag exists.
Definition: DisplacedProblem.C:310
MooseMesh.h
FEProblem.h
MooseVariableScalar
Class for scalar variables (they are different).
Definition: MooseVariableScalar.h:30
FEProblem
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblem.h:24
DisplacedProblem::setCurrentSubdomainID
virtual void setCurrentSubdomainID(const Elem *elem, THREAD_ID tid) override
Definition: DisplacedProblem.C:504
AuxiliarySystem.h
MooseObject::mooseError
void mooseError(Args &&... args) const
Definition: MooseObject.h:141
DisplacedProblem::hasVariable
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
Definition: DisplacedProblem.C:364
GeometricSearchData::update
void update(GeometricSearchType type=ALL)
Update all of the search objects.
Definition: GeometricSearchData.C:37
DisplacedProblem::vectorTagName
virtual TagName vectorTagName(TagID tag) override
Retrieve the name associated with a TagID.
Definition: DisplacedProblem.C:304
SystemBase::update
virtual void update()
Update the system (doing libMesh magic)
Definition: SystemBase.C:1067
DisplacedProblem::prepare
virtual void prepare(const Elem *elem, THREAD_ID tid) override
Definition: DisplacedProblem.C:465
DisplacedProblem::_aux_solution
const NumericVector< Number > * _aux_solution
Definition: DisplacedProblem.h:302
DisplacedProblem::getVariable
virtual MooseVariableFEBase & getVariable(THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
Definition: DisplacedProblem.C:375
DisplacedProblem::addResidualNeighbor
virtual void addResidualNeighbor(THREAD_ID tid) override
Definition: DisplacedProblem.C:718
DisplacedProblem::reinitNodes
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, THREAD_ID tid) override
Definition: DisplacedProblem.C:611
DisplacedProblem::prepareShapes
virtual void prepareShapes(unsigned int var, THREAD_ID tid) override
Definition: DisplacedProblem.C:840
MooseObject::type
const std::string & type() const
Get the type of this object.
Definition: MooseObject.h:63
DisplacedProblem::couplingMatrix
const CouplingMatrix * couplingMatrix() const override
The coupling matrix defining what blocks exist in the preconditioning matrix.
Definition: DisplacedProblem.C:974
SystemBase::dofMap
virtual DofMap & dofMap()
Gets writeable reference to the dof map.
Definition: SystemBase.C:979
DisplacedProblem::prepareBlockNonlocal
virtual void prepareBlockNonlocal(unsigned int ivar, unsigned int jvar, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, THREAD_ID tid)
Definition: DisplacedProblem.C:518
SystemBase::reinitNodes
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, THREAD_ID tid)
Reinit variables at a set of nodes.
Definition: SystemBase.C:401
DisplacedProblem::cacheJacobianNeighbor
virtual void cacheJacobianNeighbor(THREAD_ID tid) override
Definition: DisplacedProblem.C:791
DisplacedProblem::getVectorTagID
virtual TagID getVectorTagID(const TagName &tag_name) override
Get a TagID from a TagName.
Definition: DisplacedProblem.C:298
MooseException
Provides a way for users to bail out of the current solve.
Definition: MooseException.h:20
DisplacedProblem::prepareFaceShapes
virtual void prepareFaceShapes(unsigned int var, THREAD_ID tid) override
Definition: DisplacedProblem.C:846
GeometricSearchData::GeometricSearchType
GeometricSearchType
Used to select groups of geometric search objects to update.
Definition: GeometricSearchData.h:32
DisplacedProblem::updateMesh
virtual void updateMesh(bool mesh_changing=false)
Copy the solutions on the undisplaced systems to the displaced systems and reinitialize the geometry ...
Definition: DisplacedProblem.C:177
DisplacedProblem::computingInitialResidual
virtual bool computingInitialResidual() const override
Returns true if the problem is in the process of computing it's initial residual.
Definition: DisplacedProblem.C:922
ResetDisplacedMeshThread.h
TagID
unsigned int TagID
Definition: MooseTypes.h:197
DisplacedProblem::matrixTagName
virtual TagName matrixTagName(TagID tag) override
Retrieve the name associated with a TagID.
Definition: DisplacedProblem.C:340
NonlinearSystemBase::currentSolution
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
Definition: NonlinearSystemBase.h:401
MooseObject::parameters
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:76
SystemBase::reinitElemFace
virtual void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID bnd_id, THREAD_ID tid)
Reinit assembly info for a side of an element.
Definition: SystemBase.C:339
Assembly.h
Problem.h
SystemBase::reinitNeighbor
virtual void reinitNeighbor(const Elem *elem, THREAD_ID tid)
Compute the values of the variables at all the current points.
Definition: SystemBase.C:361
DisplacedProblem::getVectorTags
virtual std::map< TagName, TagID > & getVectorTags() override
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: DisplacedProblem.C:322
FEProblemBase::computingInitialResidual
virtual bool computingInitialResidual() const override
Returns true if the problem is in the process of computing it's initial residual.
Definition: FEProblemBase.C:4731
DisplacedProblem::isTransient
virtual bool isTransient() const override
Definition: DisplacedProblem.C:76
DisplacedProblem::addCachedResidual
virtual void addCachedResidual(THREAD_ID tid) override
Definition: DisplacedProblem.C:736
DisplacedProblem::updateGeomSearch
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
Definition: DisplacedProblem.C:858
DiracKernelInfo::updatePointLocator
void updatePointLocator(const MooseMesh &mesh)
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels...
Definition: DiracKernelInfo.C:71
DisplacedProblem::setNeighborSubdomainID
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, THREAD_ID tid) override
Definition: DisplacedProblem.C:511
Moose::CoordinateSystemType
CoordinateSystemType
Definition: MooseTypes.h:691
SystemBase::getScalarVariable
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a scalar variable with specified number.
Definition: SystemBase.C:142
libMesh::RealVectorValue
VectorValue< Real > RealVectorValue
Definition: Assembly.h:30
UpdateDisplacedMeshThread
Definition: UpdateDisplacedMeshThread.h:27
SubProblem::getVectorTags
virtual std::map< TagName, TagID > & getVectorTags()
Return all vector tags, where a tag is represented by a map from name to ID.
Definition: SubProblem.h:112
DisplacedProblem::addCachedResidualDirectly
virtual void addCachedResidualDirectly(NumericVector< Number > &residual, THREAD_ID tid)
Definition: DisplacedProblem.C:742
SubProblem::numMatrixTags
virtual unsigned int numMatrixTags() const
The total number of tags.
Definition: SubProblem.h:162
DisplacedProblem::reinitElemFace
virtual void reinitElemFace(const Elem *elem, unsigned int side, BoundaryID bnd_id, THREAD_ID tid) override
Definition: DisplacedProblem.C:584
SystemBase::reinitNodesNeighbor
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, THREAD_ID tid)
Reinit variables at a set of neighbor nodes.
Definition: SystemBase.C:412
DisplacedSystem::addTimeIntegrator
void addTimeIntegrator(std::shared_ptr< TimeIntegrator > ti) override
Definition: DisplacedSystem.C:51
DisplacedProblem::matrixTagExists
virtual bool matrixTagExists(const TagName &tag_name) override
Check to see if a particular Tag exists.
Definition: DisplacedProblem.C:346
DisplacedProblem::cacheJacobian
virtual void cacheJacobian(THREAD_ID tid) override
Definition: DisplacedProblem.C:779
SubProblem::addVectorTag
virtual TagID addVectorTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:70
DisplacedProblem::_nl_solution
const NumericVector< Number > * _nl_solution
Definition: DisplacedProblem.h:301
SystemBase::addVariable
virtual void addVariable(const std::string &var_type, const std::string &var_name, InputParameters &parameters)
Canonical method for adding a variable.
Definition: SystemBase.C:614
DisplacedProblem::addMatrixTag
virtual TagID addMatrixTag(TagName tag_name) override
Create a Tag.
Definition: DisplacedProblem.C:328
DisplacedProblem::getDiracElements
virtual void getDiracElements(std::set< const Elem * > &elems) override
Fills "elems" with the elements that should be looped over for Dirac Kernels.
Definition: DisplacedProblem.C:700
DisplacedProblem::getStandardVariable
virtual MooseVariable & getStandardVariable(THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
Definition: DisplacedProblem.C:385
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
DisplacedProblem::reinitNode
virtual void reinitNode(const Node *node, THREAD_ID tid) override
Definition: DisplacedProblem.C:595
MooseMesh::meshChanged
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
Definition: MooseMesh.C:507
DisplacedProblem::init
virtual void init() override
Definition: DisplacedProblem.C:104
DisplacedSystem::sys
virtual TransientExplicitSystem & sys()
Definition: DisplacedSystem.h:212
DisplacedProblem::ghostGhostedBoundaries
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
Definition: DisplacedProblem.C:899
SystemBase::getSharedTimeIntegrator
std::shared_ptr< TimeIntegrator > getSharedTimeIntegrator()
Definition: SystemBase.h:766
DisplacedProblem::reinitDirac
virtual bool reinitDirac(const Elem *elem, THREAD_ID tid) override
Returns true if the Problem has Dirac kernels it needs to compute on elem.
Definition: DisplacedProblem.C:540
NonlinearSystem.h
DisplacedProblem::reinitElem
virtual void reinitElem(const Elem *elem, THREAD_ID tid) override
Definition: DisplacedProblem.C:562
SubProblem
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:62
DisplacedProblem::_geometric_search_data
GeometricSearchData _geometric_search_data
Definition: DisplacedProblem.h:306
DisplacedProblem::getCoordSystem
virtual Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) override
Definition: DisplacedProblem.C:82
FEProblemBase::isTransient
virtual bool isTransient() const override
Definition: FEProblemBase.h:447
DisplacedProblem::numMatrixTags
virtual unsigned int numMatrixTags() const override
The total number of tags.
Definition: DisplacedProblem.C:358
DisplacedProblem::prepareNonlocal
virtual void prepareNonlocal(THREAD_ID tid)
Definition: DisplacedProblem.C:477
DisplacedProblem::cacheResidualNeighbor
virtual void cacheResidualNeighbor(THREAD_ID tid) override
Definition: DisplacedProblem.C:730
FEProblemBase::getCoordSystem
virtual Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) override
Definition: FEProblemBase.C:491
DisplacedProblem::addGhostedElem
virtual void addGhostedElem(dof_id_type elem_id) override
Will make sure that all dofs connected to elem_id are ghosted to this processor.
Definition: DisplacedProblem.C:887
DisplacedSystem::timeVectorTag
virtual TagID timeVectorTag() override
Ideally, we should not need this API.
Definition: DisplacedSystem.h:48
DisplacedProblem::refMesh
MooseMesh & refMesh()
Definition: DisplacedProblem.C:905
FEProblemBase::addGhostedBoundary
virtual void addGhostedBoundary(BoundaryID boundary_id) override
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
Definition: FEProblemBase.C:1541
DiracKernelInfo::clearPoints
void clearPoints()
Remove all of the current points and elements.
Definition: DiracKernelInfo.C:51
DisplacedProblem::prepareFace
virtual void prepareFace(const Elem *elem, THREAD_ID tid) override
Definition: DisplacedProblem.C:483
DisplacedProblem::saveOldSolutions
virtual void saveOldSolutions()
Allocate vectors and save old solutions into them.
Definition: DisplacedProblem.C:140
MooseApp.h
MooseMesh::getMesh
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
Definition: MooseMesh.C:2599
SystemBase::hasScalarVariable
virtual bool hasScalarVariable(const std::string &var_name) const
Definition: SystemBase.C:719
SystemBase::prepareNeighbor
virtual void prepareNeighbor(THREAD_ID tid)
Prepare the system for use.
Definition: SystemBase.C:303
SystemBase::prepareFace
virtual void prepareFace(THREAD_ID tid, bool resize_data)
Prepare the system for use on sides.
Definition: SystemBase.C:270
BoundaryID
boundary_id_type BoundaryID
Definition: AutomaticMortarGeneration.h:47
registerMooseObject
registerMooseObject("MooseApp", DisplacedProblem)
DisplacedProblem::_mesh
MooseMesh & _mesh
Definition: DisplacedProblem.h:292
UpdateDisplacedMeshThread.h
DisplacedProblem::addJacobianNeighbor
virtual void addJacobianNeighbor(THREAD_ID tid) override
Definition: DisplacedProblem.C:773
DisplacedProblem::converged
virtual bool converged() override
Definition: DisplacedProblem.C:916
ResetDisplacedMeshThread
Definition: ResetDisplacedMeshThread.h:23
DisplacedProblem::initAdaptivity
virtual void initAdaptivity()
Definition: DisplacedProblem.C:135
DisplacedProblem::setResidual
virtual void setResidual(NumericVector< Number > &residual, THREAD_ID tid) override
Definition: DisplacedProblem.C:749
SubProblem::getVariableHelper
MooseVariableFEBase & getVariableHelper(THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, SystemBase &nl, SystemBase &aux)
Helper function called by getVariable that handles the logic for checking whether Variables of the re...
Definition: SubProblem.C:624
DisplacedProblem::validParams
static InputParameters validParams()
Definition: DisplacedProblem.C:31
DisplacedProblem::_eq_init_timer
PerfID _eq_init_timer
Timers.
Definition: DisplacedProblem.h:309
DisplacedProblem::getScalarVariable
virtual MooseVariableScalar & getScalarVariable(THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
Definition: DisplacedProblem.C:427
FEProblemBase::setException
virtual void setException(const std::string &message)
Set an exception.
Definition: FEProblemBase.C:4655
AuxiliarySystem::currentSolution
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
Definition: AuxiliarySystem.h:100
DisplacedProblem::reinitNodesNeighbor
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, THREAD_ID tid) override
Definition: DisplacedProblem.C:618
DisplacedProblem::reinitScalars
virtual void reinitScalars(THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
Definition: DisplacedProblem.C:687
DisplacedProblem
Definition: DisplacedProblem.h:39
DisplacedProblem::undisplaceMesh
void undisplaceMesh()
Resets the displaced mesh to the reference mesh.
Definition: DisplacedProblem.C:938
SubdomainID
subdomain_id_type SubdomainID
Definition: AutomaticMortarGeneration.h:48
DisplacedProblem::getLineSearch
LineSearch * getLineSearch() override
Definition: DisplacedProblem.C:968
SubProblem.h
DisplacedProblem::_update_mesh_timer
PerfID _update_mesh_timer
Definition: DisplacedProblem.h:310
FEProblemBase::getLineSearch
LineSearch * getLineSearch() override
getter for the MOOSE line search
Definition: FEProblemBase.h:544
DisplacedProblem::getArrayVariable
virtual ArrayMooseVariable & getArrayVariable(THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested ArrayMooseVariable which may be in any system.
Definition: DisplacedProblem.C:407
Moose::VAR_NONLINEAR
Definition: MooseTypes.h:608
SystemBase::restoreOldSolutions
virtual void restoreOldSolutions()
Restore the old and older solutions when the saved solutions present.
Definition: SystemBase.C:514
DisplacedProblem::addJacobianBlockNonlocal
virtual void addJacobianBlockNonlocal(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const DofMap &dof_map, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, THREAD_ID tid)
Definition: DisplacedProblem.C:814
DisplacedProblem::reinitOffDiagScalars
virtual void reinitOffDiagScalars(THREAD_ID tid) override
Definition: DisplacedProblem.C:694
DisplacedProblem::DisplacedProblem
DisplacedProblem(const InputParameters &parameters)
Definition: DisplacedProblem.C:39
SystemBase::prepare
virtual void prepare(THREAD_ID tid)
Prepare the system for use.
Definition: SystemBase.C:247
Moose::VAR_AUXILIARY
Definition: MooseTypes.h:609
DisplacedProblem::getSystem
virtual System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
Definition: DisplacedProblem.C:438
DisplacedSystem::nonTimeVectorTag
virtual TagID nonTimeVectorTag() override
Definition: DisplacedSystem.h:50
DisplacedProblem::_update_geometric_search_timer
PerfID _update_geometric_search_timer
Definition: DisplacedProblem.h:312
DisplacedProblem::_displaced_aux
DisplacedSystem _displaced_aux
Definition: DisplacedProblem.h:299
DisplacedProblem::_displaced_nl
DisplacedSystem _displaced_nl
Definition: DisplacedProblem.h:298
DisplacedProblem::prepareAssembly
virtual void prepareAssembly(THREAD_ID tid) override
Definition: DisplacedProblem.C:528
MooseException::what
virtual const char * what() const
Get out the error message.
Definition: MooseException.h:60
DisplacedProblem::addJacobianNonlocal
virtual void addJacobianNonlocal(THREAD_ID tid)
Definition: DisplacedProblem.C:767
DisplacedProblem::syncSolutions
virtual void syncSolutions()
Copy the solutions on the undisplaced systems to the displaced systems.
Definition: DisplacedProblem.C:154
SystemBase::saveOldSolutions
virtual void saveOldSolutions()
Save the old and older solutions.
Definition: SystemBase.C:489
DiracKernelInfo::getElements
std::set< const Elem * > & getElements()
Returns a writeable reference to the _elements container.
Definition: DiracKernelInfo.h:61
SystemBase::reinitNodeFace
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, THREAD_ID tid)
Reinit nodal assembly info on a face.
Definition: SystemBase.C:389
GeometricSearchData::reinit
void reinit()
Completely redo all geometric search objects.
Definition: GeometricSearchData.C:90
SubProblem::validParams
static InputParameters validParams()
Definition: SubProblem.C:28
FEProblemBase::converged
virtual bool converged() override
Definition: FEProblemBase.C:4704
DisplacedProblem::reinitNeighbor
virtual void reinitNeighbor(const Elem *elem, unsigned int side, THREAD_ID tid) override
Definition: DisplacedProblem.C:625
DisplacedProblem::ghostedElems
virtual std::set< dof_id_type > & ghostedElems() override
Return the list of elements that should have their DoFs ghosted to this processor.
Definition: DisplacedProblem.C:88
Moose::VarKindType
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:606
DisplacedProblem.h
SubProblem::getMatrixTagID
virtual TagID getMatrixTagID(const TagName &tag_name)
Get a TagID from a TagName.
Definition: SubProblem.C:147
std
Definition: TheWarehouse.h:80
FEProblemBase::hasJacobian
bool hasJacobian() const
Returns _has_jacobian.
Definition: FEProblemBase.C:6389
SubProblem::_dirac_kernel_info
DiracKernelInfo _dirac_kernel_info
Definition: SubProblem.h:691
SubProblem::numVectorTags
virtual unsigned int numVectorTags() const
The total number of tags.
Definition: SubProblem.h:127
DisplacedProblem::addAuxVariable
virtual void addAuxVariable(const std::string &var_type, const std::string &name, InputParameters &parameters)
Definition: DisplacedProblem.C:457
SubProblem::matrixTagExists
virtual bool matrixTagExists(const TagName &tag_name)
Check to see if a particular Tag exists.
Definition: SubProblem.C:133
DisplacedProblem::createQRules
virtual void createQRules(QuadratureType type, Order order, Order volume_order, Order face_order)
Definition: DisplacedProblem.C:94
TimedPrint.h
SystemBase::getFieldVariable
MooseVariableFE< T > & getFieldVariable(THREAD_ID tid, const std::string &var_name)
Gets a reference to a variable of with specified name.
Definition: SystemBase.C:129
DisplacedProblem::_eq
EquationSystems _eq
Definition: DisplacedProblem.h:293
MooseMesh
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:74
FEProblemBase::addGhostedElem
virtual void addGhostedElem(dof_id_type elem_id) override
Will make sure that all dofs connected to elem_id are ghosted to this processor.
Definition: FEProblemBase.C:1534
DisplacedProblem::prepareNeighborShapes
virtual void prepareNeighborShapes(unsigned int var, THREAD_ID tid) override
Definition: DisplacedProblem.C:852
DisplacedProblem::numVectorTags
virtual unsigned int numVectorTags() const override
The total number of tags.
Definition: DisplacedProblem.C:316
DiracKernelInfo::getPoints
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
Definition: DiracKernelInfo.h:69
FEProblemBase::getNonlinearSystemBase
NonlinearSystemBase & getNonlinearSystemBase()
Definition: FEProblemBase.h:560
FEProblemBase::getAuxiliarySystem
AuxiliarySystem & getAuxiliarySystem()
Definition: FEProblemBase.h:648
SubProblem::_default_ghosting
bool _default_ghosting
Whether or not to use default libMesh coupling.
Definition: SubProblem.h:738
FEProblemBase::ghostGhostedBoundaries
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
Definition: FEProblemBase.C:1549
SubProblem::ghostedElems
virtual std::set< dof_id_type > & ghostedElems()
Return the list of elements that should have their DoFs ghosted to this processor.
Definition: SubProblem.h:584
SystemBase::reinitNeighborFace
virtual void reinitNeighborFace(const Elem *elem, unsigned int side, BoundaryID bnd_id, THREAD_ID tid)
Compute the values of the variables at all the current points.
Definition: SystemBase.C:350
SubProblem::matrixTagName
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
Definition: SubProblem.C:162
SubProblem::vectorTagExists
virtual bool vectorTagExists(TagID tag)
Check to see if a particular Tag exists.
Definition: SubProblem.h:117
DisplacedProblem::_mproblem
FEProblemBase & _mproblem
Definition: DisplacedProblem.h:291
DisplacedProblem::reinitNodeFace
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, THREAD_ID tid) override
Definition: DisplacedProblem.C:603
DisplacedProblem::_assembly
std::vector< std::unique_ptr< Assembly > > _assembly
Definition: DisplacedProblem.h:304
DisplacedProblem::addVariable
virtual void addVariable(const std::string &var_type, const std::string &name, InputParameters &parameters)
Definition: DisplacedProblem.C:449
SystemBase::reinitScalars
virtual void reinitScalars(THREAD_ID tid, bool reinit_for_derivative_reordering=false)
Reinit scalar varaibles.
Definition: SystemBase.C:423
DisplacedProblem::hasScalarVariable
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided.
Definition: DisplacedProblem.C:416
DisplacedProblem::restoreOldSolutions
virtual void restoreOldSolutions()
Restore old solutions from the backup vectors and deallocate them.
Definition: DisplacedProblem.C:147
SystemBase::hasVariable
virtual bool hasVariable(const std::string &var_name) const
Query a system for a variable.
Definition: SystemBase.C:694
SubProblem::addMatrixTag
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
Definition: SubProblem.C:116
DisplacedProblem::addResidual
virtual void addResidual(THREAD_ID tid) override
Definition: DisplacedProblem.C:712
DisplacedProblem::onTimestepBegin
virtual void onTimestepBegin() override
Definition: DisplacedProblem.C:928
dof_map
DofMap & dof_map
Definition: PetscDMMoose.C:1503
DisplacedProblem::setResidualNeighbor
virtual void setResidualNeighbor(NumericVector< Number > &residual, THREAD_ID tid) override
Definition: DisplacedProblem.C:755
InputParameters::addPrivateParam
void addPrivateParam(const std::string &name, const T &value)
These method add a parameter to the InputParameters object which can be retrieved like any other para...
Definition: InputParameters.h:1308
libMesh::RealEigenVector
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:133
DisplacedProblem::addGhostedBoundary
virtual void addGhostedBoundary(BoundaryID boundary_id) override
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
Definition: DisplacedProblem.C:893
FEProblemBase
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Definition: FEProblemBase.h:139
DisplacedProblem::getMatrixTagID
virtual TagID getMatrixTagID(const TagName &tag_name) override
Get a TagID from a TagName.
Definition: DisplacedProblem.C:334
DisplacedProblem::cacheResidual
virtual void cacheResidual(THREAD_ID tid) override
Definition: DisplacedProblem.C:724
DisplacedProblem::reinitNeighborPhys
virtual void reinitNeighborPhys(const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, THREAD_ID tid) override
Definition: DisplacedProblem.C:648
DisplacedProblem::addVectorTag
virtual TagID addVectorTag(TagName tag_name) override
Create a Tag.
Definition: DisplacedProblem.C:292
MooseMesh::clearQuadratureNodes
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
Definition: MooseMesh.C:1027
DisplacedSystem::init
virtual void init() override
Initialize the system.
Definition: DisplacedSystem.C:37
FEProblemBase::constJacobian
bool constJacobian() const
Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the pr...
Definition: FEProblemBase.C:6395
DisplacedProblem::meshChanged
virtual void meshChanged() override
Definition: DisplacedProblem.C:866
SystemBase::reinitElem
virtual void reinitElem(const Elem *elem, THREAD_ID tid)
Reinit an element assembly info.
Definition: SystemBase.C:319
DisplacedSystem::system
virtual System & system() override
Get the reference to the libMesh system.
Definition: DisplacedSystem.C:81
MooseVariableFE
Class for stuff related to variables.
Definition: Adaptivity.h:31
DisplacedProblem::prepareAssemblyNeighbor
virtual void prepareAssemblyNeighbor(THREAD_ID tid)
Definition: DisplacedProblem.C:534
extraSendList
void extraSendList(std::vector< dof_id_type > &send_list, void *context)
///< Type of coordinate system
Definition: SystemBase.C:32
DisplacedProblem::clearDiracInfo
virtual void clearDiracInfo() override
Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in.
Definition: DisplacedProblem.C:706
FEProblemBase::couplingMatrix
const CouplingMatrix * couplingMatrix() const override
The coupling matrix defining what blocks exist in the preconditioning matrix.
Definition: FEProblemBase.h:174
MooseObject::name
virtual const std::string & name() const
Get the name of the object.
Definition: MooseObject.h:70
LineSearch
Definition: LineSearch.h:20
DisplacedProblem::reinitElemPhys
virtual void reinitElemPhys(const Elem *elem, const std::vector< Point > &phys_points_in_elem, THREAD_ID tid, bool=false) override
Definition: DisplacedProblem.C:569
DisplacedProblem::cacheJacobianNonlocal
virtual void cacheJacobianNonlocal(THREAD_ID tid)
Definition: DisplacedProblem.C:785
DisplacedProblem::_sync_solutions_timer
PerfID _sync_solutions_timer
Definition: DisplacedProblem.h:311