Line data Source code
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" 12 : #include "INSFVFullyDevelopedFlowBC.h" 13 : #include "INSFVNoSlipWallBC.h" 14 : #include "INSFVSlipWallBC.h" 15 : #include "INSFVSymmetryBC.h" 16 : #include "INSFVFreeSurfaceBC.h" 17 : #include "INSFVMomentumResidualObject.h" 18 : 19 : void 20 288259 : AttribINSFVBCs::initFrom(const MooseObject * obj) 21 : { 22 288259 : _val = 0; 23 : // clang-format off 24 288259 : _val |= (unsigned int)INSFVBCs::INSFVFlowBC * (dynamic_cast<const INSFVFlowBC *>(obj) != nullptr); 25 288259 : _val |= (unsigned int)INSFVBCs::INSFVFullyDevelopedFlowBC * (dynamic_cast<const INSFVFullyDevelopedFlowBC *>(obj) != nullptr); 26 288259 : _val |= (unsigned int)INSFVBCs::INSFVNoSlipWallBC * (dynamic_cast<const INSFVNoSlipWallBC *>(obj) != nullptr); 27 288259 : _val |= (unsigned int)INSFVBCs::INSFVSlipWallBC * (dynamic_cast<const INSFVSlipWallBC *>(obj) != nullptr); 28 288259 : _val |= (unsigned int)INSFVBCs::INSFVSymmetryBC * (dynamic_cast<const INSFVSymmetryBC *>(obj) != nullptr); 29 288259 : _val |= (unsigned int)INSFVBCs::INSFVFreeSurfaceBC * (dynamic_cast<const INSFVFreeSurfaceBC *>(obj) != nullptr); 30 : // clang-format on 31 288259 : } 32 : 33 : bool 34 3272618 : AttribINSFVBCs::isMatch(const Attribute & other) const 35 : { 36 3272618 : auto a = dynamic_cast<const AttribINSFVBCs *>(&other); 37 3272618 : return a && (a->_val & _val); 38 : } 39 : 40 : bool 41 20139125 : AttribINSFVBCs::isEqual(const Attribute & other) const 42 : { 43 20139125 : auto a = dynamic_cast<const AttribINSFVBCs *>(&other); 44 20139125 : return a && (a->_val == _val); 45 : } 46 : 47 : void 48 288259 : AttribINSFVMomentumResidualObject::initFrom(const MooseObject * obj) 49 : { 50 288259 : _val = dynamic_cast<const INSFVMomentumResidualObject *>(obj); 51 288259 : } 52 : 53 : bool 54 0 : AttribINSFVMomentumResidualObject::isMatch(const Attribute & other) const 55 : { 56 0 : auto a = dynamic_cast<const AttribINSFVMomentumResidualObject *>(&other); 57 0 : return a && (a->_val == _val); 58 : } 59 : 60 : bool 61 0 : AttribINSFVMomentumResidualObject::isEqual(const Attribute & other) const 62 : { 63 0 : auto a = dynamic_cast<const AttribINSFVMomentumResidualObject *>(&other); 64 0 : return a && (a->_val == _val); 65 : }