https://mooseframework.inl.gov
DisplacedSystem.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 #include "DisplacedSystem.h"
11 #include "DisplacedProblem.h"
12 
13 #include "libmesh/transient_system.h"
14 #include "libmesh/explicit_system.h"
15 #include "libmesh/default_coupling.h"
16 #include "libmesh/dof_map.h"
17 
19  FEProblemBase & fe_problem,
20  SystemBase & undisplaced_system,
21  const std::string & name,
22  Moose::VarKindType var_kind)
23  : SystemBase(problem, fe_problem, name, var_kind),
24  _undisplaced_system(undisplaced_system),
25  _sys(problem.es().add_system<libMesh::System>(name))
26 {
27  if (!problem.defaultGhosting())
28  {
29  auto & dof_map = _sys.get_dof_map();
30  dof_map.remove_algebraic_ghosting_functor(dof_map.default_algebraic_ghosting());
31  dof_map.set_implicit_neighbor_dofs(false);
32  }
33 }
34 
36 
38 DisplacedSystem::getVector(const std::string & name)
39 {
40  if (_sys.have_vector(name))
41  return _sys.get_vector(name);
42  else
44 }
45 
47 DisplacedSystem::getVector(const std::string & name) const
48 {
49  if (_sys.have_vector(name))
50  return _sys.get_vector(name);
51  else
53 }
54 
55 System &
57 {
58  return _sys;
59 }
60 
61 const System &
63 {
64  return _sys;
65 }
std::string name(const ElemQuality q)
DisplacedSystem(DisplacedSystem &&)=delete
libMesh::System & _sys
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
Base class for a system (of equations)
Definition: SystemBase.h:84
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const std::string & name() const
Definition: SystemBase.C:1330
SystemBase & _undisplaced_system
VarKindType
Framework-wide stuff.
Definition: MooseTypes.h:714
bool have_vector(std::string_view vec_name) const
virtual System & system() override
Get the reference to the libMesh system.
virtual ~DisplacedSystem()
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
bool defaultGhosting()
Whether or not the user has requested default ghosting ot be on.
Definition: SubProblem.h:144
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition: SystemBase.C:916
const DofMap & get_dof_map() const
virtual NumericVector< Number > & getVector(TagID tag_id) override
Get a raw NumericVector by tag.
const NumericVector< Number > & get_vector(std::string_view vec_name) const