https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
37NumericVector<Number> &
38DisplacedSystem::getVector(const std::string & name)
39{
41 return _sys.get_vector(name);
42 else
44}
45
46const NumericVector<Number> &
47DisplacedSystem::getVector(const std::string & name) const
48{
50 return _sys.get_vector(name);
51 else
53}
54
55System &
57{
58 return _sys;
59}
60
61const System &
63{
64 return _sys;
65}
SystemBase & _undisplaced_system
libMesh::System & _sys
virtual System & system() override
Get the reference to the libMesh system.
virtual ~DisplacedSystem()
virtual NumericVector< Number > & getVector(TagID tag_id) override
Get a raw NumericVector by tag.
DisplacedSystem(DisplacedSystem &&)=delete
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
bool defaultGhosting()
Whether or not the user has requested default ghosting ot be on.
Definition SubProblem.h:144
Base class for a system (of equations)
Definition SystemBase.h:87
virtual NumericVector< Number > & getVector(const std::string &name)
Get a raw NumericVector by name.
Definition SystemBase.C:932
virtual const std::string & name() const
void remove_algebraic_ghosting_functor(GhostingFunctor &evaluable_functor)
const DofMap & get_dof_map() const
const NumericVector< Number > & get_vector(std::string_view vec_name) const
bool have_vector(std::string_view vec_name) const
VarKindType
Framework-wide stuff.
Definition MooseTypes.h:769
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...