23 #include "libmesh/numeric_vector.h" 24 #include "libmesh/fe_interface.h" 25 #include "libmesh/mesh_base.h" 26 #include "libmesh/transient_system.h" 27 #include "libmesh/explicit_system.h" 38 "A Problem object for providing access to the displaced finite element " 39 "mesh and associated variables.");
47 _mproblem(parameters.have_parameter<
FEProblemBase *>(
"_fe_problem_base")
52 _ref_mesh(_mproblem.
mesh()),
53 _displacements(getParam<
std::vector<
std::string>>(
"displacements")),
54 _geometric_search_data(*this, _mesh)
71 std::to_string(nl_sys_num),
75 for (
unsigned int i = 0; i <
n_threads; ++i)
76 _assembly[i].emplace_back(std::make_unique<Assembly>(*displaced_nl, i));
82 std::make_unique<DisplacedSystem>(*
this,
112 std::set<dof_id_type> &
124 const bool allow_negative_qweights)
129 type, order, volume_order, face_order, block, allow_negative_qweights);
158 std::vector<std::pair<unsigned int, unsigned short>> disp_numbers_and_directions;
162 const auto & disp_variable =
getVariable(tid, disp_string);
163 if (disp_variable.sys().number() == nl_sys_num)
164 disp_numbers_and_directions.push_back(
165 std::make_pair(disp_variable.number(), cast_int<unsigned short>(direction)));
167 _assembly[tid][nl_sys_num]->assignDisplacements(std::move(disp_numbers_and_directions));
173 nl->dofMap().attach_extra_send_list_function(&
extraSendList, nl.get());
181 TIME_SECTION(
"eq::init", 2,
"Initializing Displaced Equation System");
213 displaced_nl->saveOldSolutions();
221 displaced_nl->restoreOldSolutions();
235 TIME_SECTION(
"syncSolutions", 5,
"Syncing Displaced Solutions");
240 mooseAssert(nl_sys_num == displaced_nl->number(),
241 "We should have designed things such that the nl system numbers make their system " 242 "numbering in the EquationSystems object");
243 (*displaced_nl->sys().solution) =
255 TIME_SECTION(
"syncSolutions", 5,
"Syncing Displaced Solutions");
257 for (
const auto [nl_sys_num, nl_soln] : nl_solns)
268 TIME_SECTION(
"updateMesh", 3,
"Updating Displaced Mesh");
300 Threads::parallel_reduce(node_range, udmt);
342 TIME_SECTION(
"updateMesh", 3,
"Updating Displaced Mesh");
358 Threads::parallel_reduce(node_range, udmt);
373 if (udmt.hasDisplacement())
428 const std::vector<VectorTag> &
480 if (nl->hasVariable(var_name))
490 const std::string & var_name,
497 expected_var_field_type,
506 if (nl->hasVariable(var_name))
507 return nl->getFieldVariable<
Real>(tid, var_name);
511 mooseError(
"No variable with name '" + var_name +
"'");
518 if (nl->hasVariable(var_name))
519 return nl->getActualFieldVariable<
Real>(tid, var_name);
523 mooseError(
"No variable with name '" + var_name +
"'");
530 if (nl->hasVariable(var_name))
535 mooseError(
"No variable with name '" + var_name +
"'");
542 if (nl->hasVariable(var_name))
547 mooseError(
"No variable with name '" + var_name +
"'");
554 if (nl->hasScalarVariable(var_name))
566 if (nl->hasScalarVariable(var_name))
567 return nl->getScalarVariable(tid, var_name);
571 mooseError(
"No variable with name '" + var_name +
"'");
580 if (sys.has_variable(var_name))
584 mooseError(
"Unable to find a system containing the variable " + var_name);
589 const std::string & name,
591 const unsigned int nl_system_number)
598 const std::string & name,
621 _assembly[tid][nl_sys_num]->reinit(elem);
626 _assembly[tid][nl_sys_num]->prepareJacobianBlock();
627 _assembly[tid][nl_sys_num]->prepareResidual();
643 nl->prepareFace(tid,
true);
651 const std::vector<dof_id_type> & dof_indices,
656 _assembly[tid][nl_sys_num]->reinit(elem);
682 const std::vector<dof_id_type> & idof_indices,
683 const std::vector<dof_id_type> & jdof_indices,
706 unsigned int n_points = points.size();
712 _assembly[tid][nl_sys_num]->reinitAtPhysical(elem, points);
729 nl->reinitElem(elem, tid);
735 const std::vector<Point> & phys_points_in_elem,
739 "Are you calling this method with a undisplaced mesh element?");
743 _assembly[tid][nl_sys_num]->reinitAtPhysical(elem, phys_points_in_elem);
757 _assembly[tid][nl_sys_num]->reinit(elem, side);
768 _assembly[tid][nl_sys_num]->reinit(node);
779 _assembly[tid][nl_sys_num]->reinit(node);
789 nl->reinitNodes(nodes, tid);
797 nl->reinitNodesNeighbor(nodes, tid);
811 const std::vector<Point> * neighbor_reference_points)
820 _assembly[tid][nl_sys_num]->reinitElemAndNeighbor(
821 elem, side, neighbor, neighbor_side, neighbor_reference_points);
824 _assembly[tid][nl_sys_num]->prepareNeighbor();
830 nl->reinitElemFace(elem, side, tid);
831 nl->reinitNeighborFace(neighbor, neighbor_side, tid);
839 unsigned int neighbor_side,
840 const std::vector<Point> & physical_points,
844 "Are you calling this method with a undisplaced mesh element?");
849 _assembly[tid][nl_sys_num]->reinitNeighborAtPhysical(neighbor, neighbor_side, physical_points);
860 nl->reinitNeighborFace(neighbor, neighbor_side, tid);
866 const std::vector<Point> & physical_points,
870 "Are you calling this method with a undisplaced mesh element?");
875 _assembly[tid][nl_sys_num]->reinitNeighborAtPhysical(neighbor, physical_points);
886 nl->reinitNeighbor(neighbor, tid);
906 if (lower_d_elem_neighbor &&
910 std::vector<Point> reference_points;
912 lower_d_elem_neighbor->
dim(), lower_d_elem_neighbor, qps, reference_points);
920 bool reinit_for_derivative_reordering )
923 nl->reinitScalars(tid, reinit_for_derivative_reordering);
924 _displaced_aux->reinitScalars(tid, reinit_for_derivative_reordering);
1047 std::vector<dof_id_type> & dof_indices,
1048 const std::set<TagID> & tags,
1060 const std::vector<dof_id_type> & idof_indices,
1061 const std::vector<dof_id_type> & jdof_indices,
1062 const std::set<TagID> & tags,
1074 std::vector<dof_id_type> & dof_indices,
1075 std::vector<dof_id_type> & neighbor_dof_indices,
1076 const std::set<TagID> & tags,
1084 neighbor_dof_indices,
1110 TIME_SECTION(
"updateGeometricSearch", 3,
"Updating Displaced GeometricSearch");
1125 if (clean_refinement_flags)
1225 Threads::parallel_reduce(node_range, rdmt);
1268 nl->timestepSetup();
1278 nl->customSetup(exec_type);
1288 nl->residualSetup();
1298 nl->jacobianSetup();
1306 _mproblem.SubProblem::haveADObjects(have_ad_objects);
1309 std::pair<bool, unsigned int>
1311 const bool error_if_not_found)
const 1319 mooseAssert(tid <
_assembly.size(),
"Assembly objects not initialized");
1320 mooseAssert(sys_num <
_assembly[tid].size(),
1321 "System number larger than the assembly container size");
1328 mooseAssert(tid <
_assembly.size(),
"Assembly objects not initialized");
1329 mooseAssert(sys_num <
_assembly[tid].size(),
1330 "System number larger than the assembly container size");
1352 const std::vector<VectorTag> &
1422 _ref_mesh(_displaced_problem.refMesh()),
1423 _nl_soln(_displaced_problem._nl_solution),
1424 _aux_soln(*_displaced_problem._aux_solution),
1425 _has_displacement(false)
1433 _displaced_problem(x._displaced_problem),
1435 _nl_soln(x._nl_soln),
1436 _aux_soln(x._aux_soln),
1437 _sys_to_nonghost_and_ghost_soln(x._sys_to_nonghost_and_ghost_soln),
1438 _sys_to_var_num_and_direction(x._sys_to_var_num_and_direction),
1439 _has_displacement(x._has_displacement)
1446 std::vector<std::string> & displacement_variables = _displaced_problem._displacements;
1447 unsigned int num_displacements = displacement_variables.size();
1448 auto &
es = _displaced_problem.es();
1450 _sys_to_var_num_and_direction.
clear();
1451 _sys_to_nonghost_and_ghost_soln.clear();
1453 for (
unsigned int i = 0; i < num_displacements; i++)
1455 std::string displacement_name = displacement_variables[i];
1460 if (sys.has_variable(displacement_name))
1462 auto & val = _sys_to_var_num_and_direction[sys.number()];
1463 val.first.push_back(sys.variable_number(displacement_name));
1464 val.second.push_back(i);
1470 for (
const auto & pr : _sys_to_var_num_and_direction)
1473 mooseAssert(sys.number() <= _nl_soln.size(),
1474 "The system number should always be less than or equal to the number of nonlinear " 1475 "systems. If it is equal, then this system is the auxiliary system");
1477 sys.number() < _nl_soln.
size() ? _nl_soln[sys.number()] : &_aux_soln;
1478 _sys_to_nonghost_and_ghost_soln.emplace(
1480 std::make_pair(nonghost_soln,
1486 for (
auto & [sys_num, var_num_and_direction] : _sys_to_var_num_and_direction)
1490 this->_fe_problem,
_ref_mesh, var_num_and_direction.first, sys);
1491 Threads::parallel_reduce(node_range, send_list);
1493 auto & [soln, ghost_soln] = libmesh_map_find(_sys_to_nonghost_and_ghost_soln, sys_num);
1496 soln->localize(*ghost_soln, send_list.
send_list());
1499 _has_displacement =
false;
1505 Node & displaced_node = *(*nd);
1509 for (
auto & [sys_num, var_num_and_direction] : _sys_to_var_num_and_direction)
1511 auto & var_numbers = var_num_and_direction.first;
1512 auto & directions = var_num_and_direction.second;
1515 const auto direction = directions[i];
1516 if (reference_node.
n_dofs(sys_num, var_numbers[i]) > 0)
1518 Real coord = reference_node(direction) +
1519 (*libmesh_map_find(_sys_to_nonghost_and_ghost_soln, sys_num).second)(
1520 reference_node.
dof_number(sys_num, var_numbers[i], 0));
1521 if (displaced_node(direction) != coord)
1523 displaced_node(direction) = coord;
1524 _has_displacement =
true;
virtual LineSearch * getLineSearch() override
GeometricSearchData _geometric_search_data
virtual TagID getVectorTagID(const TagName &tag_name) const
Get a TagID from a TagName.
virtual void reinitNodesNeighbor(const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
virtual void addGhostedElem(dof_id_type elem_id) override
Will make sure that all dofs connected to elem_id are ghosted to this processor.
friend class UpdateDisplacedMeshThread
bool _have_ad_objects
AD flag indicating whether any AD objects have been added.
dof_id_type dof_number(const unsigned int s, const unsigned int var, const unsigned int comp) const
virtual System & getSystem(const std::string &var_name) override
Returns the equation system containing the variable provided.
virtual void reinitNode(const Node *node, const THREAD_ID tid) override
MooseVariableFieldBase & getVariableHelper(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type, Moose::VarFieldType expected_var_field_type, const std::vector< T > &nls, const SystemBase &aux) const
Helper function called by getVariable that handles the logic for checking whether Variables of the re...
virtual void addGhostedElem(dof_id_type elem_id) override
Will make sure that all dofs connected to elem_id are ghosted to this processor.
virtual void saveOldSolutions()
Allocate vectors and save old solutions into them.
unsigned int n_systems() const
virtual const char * what() const
Get out the error message.
void undisplaceMesh()
Resets the displaced mesh to the reference mesh.
const std::set< SubdomainID > & interiorLowerDBlocks() const
std::shared_ptr< DisplacedProblem > displaced_problem
virtual void reinitLowerDElem(const Elem *lower_d_elem, const THREAD_ID tid, const std::vector< Point > *const pts=nullptr, const std::vector< Real > *const weights=nullptr)
virtual bool hasNonlocalCoupling() const override
Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian...
virtual void checkExceptionAndStopSolve(bool print_message=true)
Check to see if an exception has occurred on any processor and, if possible, force the solve to fail...
virtual void meshDisplaced()
Update data after a mesh displaced.
Keeps track of stuff related to assembling.
void setCoordData(const MooseMesh &other_mesh)
Set the coordinate system data to that of other_mesh.
virtual void addAuxVariable(const std::string &var_type, const std::string &name, InputParameters ¶meters)
virtual std::size_t numNonlinearSystems() const override
virtual MooseVariableFieldBase & getActualFieldVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariableField which may be in any system...
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
virtual void residualSetup() override
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void initAdaptivity()
void bumpAllQRuleOrder(Order order, SubdomainID block)
virtual bool safeAccessTaggedVectors() const
Is it safe to access the tagged vectors.
virtual void initialSetup() override
virtual bool computingPreSMOResidual(const unsigned int nl_sys_num) const override
Returns true if the problem is in the process of computing it's initial residual. ...
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
Determine what solver system the provided variable name lies in.
virtual void addJacobianNeighborLowerD(const THREAD_ID tid) override
virtual void needFV() override
marks this problem as including/needing finite volume functionality.
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL) override
Create a Tag.
const Elem * getLowerDElem(const Elem *, unsigned short int) const
Returns a const pointer to a lower dimensional element that corresponds to a side of a higher dimensi...
virtual bool checkNonlocalCouplingRequirement() const override
virtual void prepareShapes(unsigned int var, const THREAD_ID tid) override
FEProblemBase & _mproblem
virtual numeric_index_type size() const=0
virtual TagID addVectorTag(const TagName &tag_name, const Moose::VectorTagType type=Moose::VECTOR_TAG_RESIDUAL)
Create a Tag.
virtual unsigned int currentLinearSysNum() const override
virtual void prepareNeighborShapes(unsigned int var, const THREAD_ID tid) override
virtual void createQRules(QuadratureType type, Order order, Order volume_order, Order face_order, SubdomainID block, bool allow_negative_qweights=true)
virtual void reinitNodes(const std::vector< dof_id_type > &nodes, const THREAD_ID tid) override
virtual void residualSetup()
virtual EquationSystems & es() override
virtual void setException(const std::string &message)
Set an exception, which is stored at this point by toggling a member variable in this class...
virtual bool haveFV() const override
returns true if this problem includes/needs finite volume functionality.
virtual bool safeAccessTaggedMatrices() const override
Is it safe to access the tagged matrices.
virtual bool hasScalarVariable(const std::string &var_name) const override
Returns a Boolean indicating whether any system contains a variable with the name provided...
const NumericVector< Number > *const & currentSolution() const override
The solution vector that is currently being operated on.
virtual void prepareAssemblyNeighbor(const THREAD_ID tid)
void disable_refine_in_reinit()
virtual void gather_to_zero()
virtual void addGhostedBoundary(BoundaryID boundary_id) override
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
void clean_refinement_flags()
UpdateDisplacedMeshThread(FEProblemBase &fe_problem, DisplacedProblem &displaced_problem)
bool hasDisplacement()
Whether the displaced mesh is modified by the latest call to operator()
virtual TagName vectorTagName(const TagID tag_id) const override
Retrieve the name associated with a TagID.
This class provides an interface for common operations on field variables of both FE and FV types wit...
virtual void addJacobianLowerD(const THREAD_ID tid) override
virtual TagID getMatrixTagID(const TagName &tag_name) const override
Get a TagID from a TagName.
virtual void jacobianSetup()
virtual void timestepSetup() override
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
void computingScalingJacobian(bool computing_scaling_jacobian)
Setter for whether we're computing the scaling jacobian.
const T_sys & get_system(std::string_view name) const
virtual unsigned int numVectorTags(const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const override
The total number of tags, which can be limited to the tag type.
virtual unsigned int nlSysNum(const NonlinearSystemName &nl_sys_name) const override
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual std::size_t numSolverSystems() const override
registerMooseObject("MooseApp", DisplacedProblem)
virtual const Node & nodeRef(const dof_id_type i) const
virtual void onTimestepBegin() override
virtual const std::string & name() const
Get the name of the class.
virtual Assembly & assembly(const THREAD_ID tid, const unsigned int sys_num) override
std::vector< std::unique_ptr< DisplacedSystem > > _displaced_solver_systems
void syncSolutions()
Copy the solutions on the undisplaced systems to the displaced systems.
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, const THREAD_ID tid)
virtual Elem * queryElemPtr(const dof_id_type i)
virtual std::set< dof_id_type > & ghostedElems() override
Return the list of elements that should have their DoFs ghosted to this processor.
virtual void reinitElemPhys(const Elem *elem, const std::vector< Point > &phys_points_in_elem, const THREAD_ID tid) override
virtual void reinitNeighbor(const Elem *elem, unsigned int side, const THREAD_ID tid) override
virtual bool is_serial_on_zero() const
virtual MooseVariable & getStandardVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested MooseVariable which may be in any system.
const libMesh::CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override
The coupling matrix defining what blocks exist in the preconditioning matrix.
virtual MooseVariableScalar & getScalarVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the scalar variable reference from whichever system contains it.
virtual bool computingPreSMOResidual(const unsigned int nl_sys_num) const override
Returns true if the problem is in the process of computing it's initial residual. ...
void update()
Update the system (doing libMesh magic)
std::vector< std::vector< std::unique_ptr< Assembly > > > _assembly
DisplacedProblem(DisplacedProblem &&)=delete
virtual bool solverSystemConverged(const unsigned int solver_sys_num) override
virtual const std::string & name() const
virtual void customSetup(const ExecFlagType &exec_type)
unsigned int n_dofs(const unsigned int s, const unsigned int var=libMesh::invalid_uint) const
bool automaticScaling() const
Automatic scaling getter.
bool hasJacobian() const
Returns _has_jacobian.
virtual bool is_serial() const
virtual unsigned int currentNlSysNum() const override
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const override
MultiPointMap & getPoints()
Returns a writeable reference to the _points container.
void clearQuadratureNodes()
Clear out any existing quadrature nodes.
MeshBase & getMesh()
Accessor for the underlying libMesh Mesh object.
std::vector< const NumericVector< Number > * > _nl_solution
The nonlinear system solutions.
virtual std::pair< bool, unsigned int > determineSolverSystem(const std::string &var_name, bool error_if_not_found=false) const override
MooseMesh & _ref_mesh
reference mesh
virtual bool computingScalingResidual() const override final
Getter for whether we're computing the scaling residual.
virtual TagID getMatrixTagID(const TagName &tag_name) const
Get a TagID from a TagName.
void extraSendList(std::vector< dof_id_type > &send_list, void *context)
///< Type of coordinate system
unsigned int which_neighbor_am_i(const Elem *e) const
virtual void reinitElemFace(const Elem *elem, unsigned int side, const THREAD_ID tid) override
std::unique_ptr< DisplacedSystem > _displaced_aux
virtual void addJacobian(const THREAD_ID tid) override
virtual void setResidual(NumericVector< Number > &residual, const THREAD_ID tid) override
boundary_id_type BoundaryID
virtual void clearDiracInfo() override
Gets called before Dirac Kernels are asked to add the points they are supposed to be evaluated in...
bool constJacobian() const
Returns _const_jacobian (whether a MOOSE object has specified that the Jacobian is the same as the pr...
VarKindType
Framework-wide stuff.
void computingScalingResidual(bool computing_scaling_residual)
Setter for whether we're computing the scaling residual.
virtual void restoreOldSolutions()
Restore old solutions from the backup vectors and deallocate them.
virtual const std::vector< VectorTag > & getVectorTags(const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const override
Return all vector tags, where a tag is represented by a map from name to ID.
virtual TagID addMatrixTag(TagName tag_name)
Create a Tag.
virtual void setResidualNeighbor(NumericVector< Number > &residual, const THREAD_ID tid) override
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
virtual bool converged(const unsigned int sys_num)
Eventually we want to convert this virtual over to taking a solver system number argument.
void clear_point_locator()
virtual unsigned int currentNlSysNum() const override
virtual unsigned int solverSysNum(const SolverSystemName &sys_name) const override
virtual void reinitNeighborPhys(const Elem *neighbor, unsigned int neighbor_side, const std::vector< Point > &physical_points, const THREAD_ID tid) override
const std::string & type() const
Get the type of this class.
virtual bool hasVariable(const std::string &var_name) const override
Whether or not this problem has the variable.
void reinit()
Completely redo all geometric search objects.
std::vector< VectorTag > getVectorTags(const std::set< TagID > &tag_ids) const
virtual void addVariable(const std::string &var_type, const std::string &name, InputParameters ¶meters, unsigned int nl_system_number)
virtual Moose::VectorTagType vectorTagType(const TagID tag_id) const override
virtual void reinitOffDiagScalars(const THREAD_ID tid) override
virtual void addJacobianBlockTags(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, std::vector< dof_id_type > &dof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
LineSearch * getLineSearch() override
getter for the MOOSE line search
virtual std::set< dof_id_type > & ghostedElems()
Return the list of elements that should have their DoFs ghosted to this processor.
std::vector< std::string > _displacements
virtual bool vectorTagExists(const TagID tag_id) const
Check to see if a particular Tag exists.
NonlinearSystemBase & getNonlinearSystemBase(const unsigned int sys_num)
virtual const VectorTag & getVectorTag(const TagID tag_id) const override
Get a VectorTag from a TagID.
void clearPoints()
Remove all of the current points and elements.
const NumericVector< Number > * _aux_solution
The auxiliary system solution.
virtual void addResidualLower(const THREAD_ID tid) override
AuxiliarySystem & getAuxiliarySystem()
bool haveADObjects() const
Method for reading wehther we have any ad objects.
virtual bool isTransient() const override
GeometricSearchType
Used to select groups of geometric search objects to update.
virtual void onTimestepEnd() override
virtual std::size_t numNonlinearSystems() const override
virtual const libMesh::CouplingMatrix & nonlocalCouplingMatrix(const unsigned i) const override
virtual void reinitElem(const Elem *elem, const THREAD_ID tid) override
virtual void addCachedResidualDirectly(NumericVector< Number > &residual, const THREAD_ID tid)
virtual void timestepSetup()
virtual unsigned int numMatrixTags() const
The total number of tags.
virtual const MooseVariableFieldBase & getVariable(const 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) const override
Returns the variable reference for requested variable which must be of the expected_var_type (Nonline...
virtual void customSetup(const ExecFlagType &exec_type) override
virtual TagName matrixTagName(TagID tag) override
Retrieve the name associated with a TagID.
const Elem * neighbor_ptr(unsigned int i) const
virtual void reinitNodeFace(const Node *node, BoundaryID bnd_id, const THREAD_ID tid) override
Provides a way for users to bail out of the current solve.
void syncAuxSolution(const NumericVector< Number > &aux_soln)
Copy the provided solution into the displaced auxiliary system.
void setCurrentSubdomainID(SubdomainID i)
set the current subdomain ID
virtual void initialSetup()
virtual void prepareAssembly(const THREAD_ID tid) override
virtual void prepare(const Elem *elem, const THREAD_ID tid) override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual bool contract()=0
Generic class for solving transient nonlinear problems.
subdomain_id_type subdomain_id() const
virtual VectorMooseVariable & getVectorVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested VectorMooseVariable which may be in any system...
Class for containing MooseEnum item information.
unsigned int solverSysNum(const SolverSystemName &solver_sys_name) const override
vec_type::const_iterator const_iterator
virtual unsigned short dim() const=0
virtual bool matrixTagExists(const TagName &tag_name) const override
Check to see if a particular Tag exists.
virtual bool computingScalingJacobian() const override final
Getter for whether we're computing the scaling jacobian.
virtual TagID addMatrixTag(TagName tag_name) override
Create a Tag.
virtual void addResidualNeighbor(const THREAD_ID tid) override
void addJacobianBlockNonlocal(SparseMatrix< Number > &jacobian, unsigned int ivar, unsigned int jvar, const libMesh::DofMap &dof_map, const std::vector< dof_id_type > &idof_indices, const std::vector< dof_id_type > &jdof_indices, const std::set< TagID > &tags, const THREAD_ID tid)
virtual void addResidual(const THREAD_ID tid) override
virtual const std::vector< VectorTag > & currentResidualVectorTags() const override
Return the residual vector tags we are currently computing.
const std::vector< dof_id_type > & send_list() const
virtual void cacheJacobianNonlocal(const THREAD_ID tid)
void update(GeometricSearchType type=ALL)
Update all of the search objects.
Class for scalar variables (they are different).
IntRange< T > make_range(T beg, T end)
virtual unsigned int linearSysNum(const LinearSystemName &sys_name) const override
unsigned int linearSysNum(const LinearSystemName &linear_sys_name) const override
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
virtual unsigned int numVectorTags(const Moose::VectorTagType type=Moose::VECTOR_TAG_ANY) const
The total number of tags, which can be limited to the tag type.
virtual std::size_t numLinearSystems() const override
virtual void setCurrentSubdomainID(const Elem *elem, const THREAD_ID tid) override
const InputParameters & parameters() const
Get the parameters of the object.
virtual void prepareFaceShapes(unsigned int var, const THREAD_ID tid) override
virtual unsigned int numMatrixTags() const override
The total number of tags.
virtual void updateGeomSearch(GeometricSearchData::GeometricSearchType type=GeometricSearchData::ALL) override
virtual void reinitElemNeighborAndLowerD(const Elem *elem, unsigned int side, const THREAD_ID tid) override
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
std::set< const Elem * > & getElements()
Returns a writeable reference to the _elements container.
virtual std::size_t numLinearSystems() const override
virtual bool reinitDirac(const Elem *elem, const THREAD_ID tid) override
Returns true if the Problem has Dirac kernels it needs to compute on elem.
virtual TagName vectorTagName(const TagID tag) const
Retrieve the name associated with a TagID.
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, const THREAD_ID tid) override
static InputParameters validParams()
void automaticScaling(bool automatic_scaling) override
Automatic scaling setter.
virtual ArrayMooseVariable & getArrayVariable(const THREAD_ID tid, const std::string &var_name) override
Returns the variable reference for requested ArrayMooseVariable which may be in any system...
virtual void addJacobianNonlocal(const THREAD_ID tid)
virtual bool isTransient() const override
virtual void reinitScalars(const THREAD_ID tid, bool reinit_for_derivative_reordering=false) override
fills the VariableValue arrays for scalar variables from the solution vector
virtual bool safeAccessTaggedMatrices() const
Is it safe to access the tagged matrices.
virtual void updateMesh(bool mesh_changing=false)
Copy the solutions on the undisplaced systems to the displaced systems and reinitialize the geometry ...
virtual bool safeAccessTaggedVectors() const override
Is it safe to access the tagged vectors.
virtual void getDiracElements(std::set< const Elem *> &elems) override
Fills "elems" with the elements that should be looped over for Dirac Kernels.
virtual bool checkNonlocalCouplingRequirement() const override
void meshChanged(bool contract_mesh, bool clean_refinement_flags)
Storage for all of the information pretaining to a vector tag.
DiracKernelInfo _dirac_kernel_info
virtual void jacobianSetup() override
void setCurrentNeighborSubdomainID(SubdomainID i)
set the current subdomain ID
virtual void addGhostedBoundary(BoundaryID boundary_id) override
Will make sure that all necessary elements from boundary_id are ghosted to this processor.
virtual void prepareNonlocal(const THREAD_ID tid)
virtual std::size_t numSolverSystems() const override
virtual unsigned int currentLinearSysNum() const override
virtual void needFV() override
marks this problem as including/needing finite volume functionality.
virtual void prepareFace(const Elem *elem, const THREAD_ID tid) override
virtual void onNode(NodeRange::const_iterator &nd) override
virtual TagID getVectorTagID(const TagName &tag_name) const override
Get a TagID from a TagName.
void addTimeIntegrator()
Get the time integrators from the problem.
virtual const VectorTag & getVectorTag(const TagID tag_id) const
Get a VectorTag from a TagID.
void updatePointLocator(const MooseMesh &mesh)
Called during FEProblemBase::meshChanged() to update the PointLocator object used by the DiracKernels...
auto index_range(const T &sizable)
virtual bool hasNonlocalCoupling() const override
Whether the simulation has active nonlocal coupling which should be accounted for in the Jacobian...
virtual const CouplingMatrix * couplingMatrix(const unsigned int nl_sys_num) const override
The coupling matrix defining what blocks exist in the preconditioning matrix.
virtual bool vectorTagExists(const TagID tag_id) const override
Check to see if a particular Tag exists.
virtual unsigned int nlSysNum(const NonlinearSystemName &nl_sys_name) const override
virtual bool matrixTagExists(const TagName &tag_name) const
Check to see if a particular Tag exists.
virtual TagName matrixTagName(TagID tag)
Retrieve the name associated with a TagID.
void meshChanged()
Declares that the MooseMesh has changed, invalidates cached data and rebuilds caches.
static InputParameters validParams()
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
void bumpVolumeQRuleOrder(Order order, SubdomainID block)
virtual void init() override
virtual void addJacobianNeighbor(const THREAD_ID tid) override
virtual void ghostGhostedBoundaries() override
Causes the boundaries added using addGhostedBoundary to actually be ghosted.
void setupFiniteVolumeMeshData() const
Sets up the additional data needed for finite volume computations.
Key structure for APIs manipulating global vectors/matrices.