https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
15
22{
23public:
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
37protected:
38 void processSide(const Elem * primary_elem,
39 unsigned short int primary_side,
40 const Elem * secondary_elem);
41
43 const processor_id_type _pid;
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;
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};
boundary_id_type BoundaryID
This user object allows related evaluations on elements, boundaries, internal sides,...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
Update side sets around subdomains during a run, as subdomain IDs are changing.
const processor_id_type _pid
The MPI rank of this processor.
DisplacedProblem * _displaced_problem
Pointer to the displaced problem.
const bool _assign_outer_surface_sides
assign sideset to sides that have no neighbor elements
virtual void finalize() override
Finalize.
const BoundaryID _mask_side
If specified, only sides also on this boundary will be updated.
virtual void executeOnExternalSide(const Elem *, unsigned int) override
execute method that is called during ComputeUserObjects::onExternalSide
std::map< processor_id_type, SideList > _add
virtual void executeOnInternalSide() override
execute method that is called during ComputeUserObjects::onInternalSide
const unsigned int & _neighbor_side
Current side on the neighboring element.
BoundaryName _boundary_name
Boundary / sideset to update.
std::set< SubdomainID > _inner_ids
Subdomains on the two sides of the boundary.
std::vector< std::tuple< dof_id_type, unsigned short int > > SideList
virtual void threadJoin(const UserObject &) override
Must override.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
void processSide(const Elem *primary_elem, unsigned short int primary_side, const Elem *secondary_elem)
std::map< processor_id_type, SideList > _remove
Base class for user-specific data.
Definition UserObject.h:20