https://mooseframework.inl.gov
SidesetAroundSubdomainUpdater.h
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 #pragma once
11 
12 #include "DomainUserObject.h"
13 
14 class DisplacedProblem;
15 
22 {
23 public:
25 
27 
28  virtual void initialize() override;
29 
30  virtual void executeOnExternalSide(const Elem * /*elem*/, unsigned int /*side*/) override;
31  virtual void executeOnInternalSide() override;
32 
33  virtual void finalize() override;
34 
35  virtual void threadJoin(const UserObject &) override;
36 
37 protected:
38  void processSide(const Elem * primary_elem,
39  unsigned short int primary_side,
40  const Elem * secondary_elem);
41 
44 
47 
49  const unsigned int & _neighbor_side;
50 
52  std::set<SubdomainID> _inner_ids;
53  std::set<SubdomainID> _outer_ids;
55 
58 
60  BoundaryName _boundary_name;
63 
66 
67  BoundaryInfo & _boundary_info;
68  BoundaryInfo * _displaced_boundary_info;
69 
70  using SideList = std::vector<std::tuple<dof_id_type, unsigned short int>>;
71 
72  std::map<processor_id_type, SideList> _add, _remove;
73 };
DisplacedProblem * _displaced_problem
Pointer to the displaced problem.
virtual void finalize() override
Finalize.
virtual void threadJoin(const UserObject &) override
Must override.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
This user object allows related evaluations on elements, boundaries, internal sides, interfaces in one single place.
std::set< SubdomainID > _inner_ids
Subdomains on the two sides of the boundary.
std::vector< std::tuple< dof_id_type, unsigned short int > > SideList
std::map< processor_id_type, SideList > _remove
Update side sets around subdomains during a run, as subdomain IDs are changing.
BoundaryName _boundary_name
Boundary / sideset to update.
uint8_t processor_id_type
const unsigned int & _neighbor_side
Current side on the neighboring element.
boundary_id_type BoundaryID
SidesetAroundSubdomainUpdater(const InputParameters &parameters)
const bool _assign_outer_surface_sides
assign sideset to sides that have no neighbor elements
std::map< processor_id_type, SideList > _add
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
virtual void executeOnInternalSide() override
execute method that is called during ComputeUserObjects::onInternalSide
void processSide(const Elem *primary_elem, unsigned short int primary_side, const Elem *secondary_elem)
const processor_id_type _pid
The MPI rank of this processor.
const InputParameters & parameters() const
Get the parameters of the object.
virtual void executeOnExternalSide(const Elem *, unsigned int) override
execute method that is called during ComputeUserObjects::onExternalSide
Base class for user-specific data.
Definition: UserObject.h:40
const BoundaryID _mask_side
If specified, only sides also on this boundary will be updated.