https://mooseframework.inl.gov
INSFVAttributes.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 "INSFVAttributes.h"
11 #include "INSFVFlowBC.h"
13 #include "INSFVNoSlipWallBC.h"
14 #include "INSFVSlipWallBC.h"
15 #include "INSFVSymmetryBC.h"
16 #include "INSFVFreeSurfaceBC.h"
18 
19 void
21 {
22  _val = 0;
23  // clang-format off
24  _val |= (unsigned int)INSFVBCs::INSFVFlowBC * (dynamic_cast<const INSFVFlowBC *>(obj) != nullptr);
25  _val |= (unsigned int)INSFVBCs::INSFVFullyDevelopedFlowBC * (dynamic_cast<const INSFVFullyDevelopedFlowBC *>(obj) != nullptr);
26  _val |= (unsigned int)INSFVBCs::INSFVNoSlipWallBC * (dynamic_cast<const INSFVNoSlipWallBC *>(obj) != nullptr);
27  _val |= (unsigned int)INSFVBCs::INSFVSlipWallBC * (dynamic_cast<const INSFVSlipWallBC *>(obj) != nullptr);
28  _val |= (unsigned int)INSFVBCs::INSFVSymmetryBC * (dynamic_cast<const INSFVSymmetryBC *>(obj) != nullptr);
29  _val |= (unsigned int)INSFVBCs::INSFVFreeSurfaceBC * (dynamic_cast<const INSFVFreeSurfaceBC *>(obj) != nullptr);
30  // clang-format on
31 }
32 
33 bool
34 AttribINSFVBCs::isMatch(const Attribute & other) const
35 {
36  auto a = dynamic_cast<const AttribINSFVBCs *>(&other);
37  return a && (a->_val & _val);
38 }
39 
40 bool
41 AttribINSFVBCs::isEqual(const Attribute & other) const
42 {
43  auto a = dynamic_cast<const AttribINSFVBCs *>(&other);
44  return a && (a->_val == _val);
45 }
46 
47 void
49 {
50  _val = dynamic_cast<const INSFVMomentumResidualObject *>(obj);
51 }
52 
53 bool
55 {
56  auto a = dynamic_cast<const AttribINSFVMomentumResidualObject *>(&other);
57  return a && (a->_val == _val);
58 }
59 
60 bool
62 {
63  auto a = dynamic_cast<const AttribINSFVMomentumResidualObject *>(&other);
64  return a && (a->_val == _val);
65 }
An attribute specifying that a boundary condition is a member of a subset of boundary conditions appr...
bool isMatch(const Attribute &other) const override
An attribute specifying that an object is a residual object applicable to the Navier-Stokes momentum ...
virtual void initFrom(const MooseObject *obj) override
bool isEqual(const Attribute &other) const override
All objects that contribute to pressure-based (e.g.
virtual bool isEqual(const Attribute &other) const override
virtual bool isMatch(const Attribute &other) const override
void initFrom(const MooseObject *obj) override
void ErrorVector unsigned int