https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSFVAttributes.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 "Attributes.h"
13
14enum class INSFVBCs
15{
16 INSFVFlowBC = 1 << 1,
18 INSFVNoSlipWallBC = 1 << 3,
19 INSFVSlipWallBC = 1 << 4,
20 INSFVSymmetryBC = 1 << 5,
21 INSFVFreeSurfaceBC = 1 << 6
22};
23
24#define clonefunc(T) \
25 virtual std::unique_ptr<Attribute> clone() const override \
26 { \
27 return std::unique_ptr<Attribute>(new T(*this)); \
28 }
29
30#define hashfunc(...) \
31 virtual size_t hash() const override \
32 { \
33 size_t h = 0; \
34 Moose::hash_combine(h, __VA_ARGS__); \
35 return h; \
36 }
37
43{
44public:
45 typedef INSFVBCs Key;
46 void setFrom(Key k) { _val = static_cast<uint64_t>(k); }
47
48 AttribINSFVBCs(TheWarehouse & w) : Attribute(w, "insfvbcs") {}
50 : Attribute(w, "insfvbcs"), _val(static_cast<uint64_t>(mask))
51 {
52 }
53 AttribINSFVBCs(TheWarehouse & w, unsigned int mask) : Attribute(w, "insfvbcs"), _val(mask) {}
54 virtual void initFrom(const MooseObject * obj) override;
55 virtual bool isMatch(const Attribute & other) const override;
56 virtual bool isEqual(const Attribute & other) const override;
59
60private:
61 uint64_t _val = 0;
62};
63
69{
70public:
71 typedef bool Key;
72 void setFrom(const Key k) { _val = k; }
74 : Attribute(w, "insfv_residual_object"), _val(false)
75 {
76 }
78 : Attribute(w, "insfv_residual_object"), _val(k)
79 {
80 }
81 void initFrom(const MooseObject * obj) override;
82 bool isMatch(const Attribute & other) const override;
83 bool isEqual(const Attribute & other) const override;
86
87private:
89};
90
91#undef clonefunc
92#undef hashfunc
INSFVBCs
An attribute specifying that a boundary condition is a member of a subset of boundary conditions appr...
AttribINSFVBCs(TheWarehouse &w, INSFVBCs mask)
AttribINSFVBCs(TheWarehouse &w)
virtual bool isMatch(const Attribute &other) const override
clonefunc(AttribINSFVBCs)
AttribINSFVBCs(TheWarehouse &w, unsigned int mask)
void setFrom(Key k)
virtual bool isEqual(const Attribute &other) const override
virtual void initFrom(const MooseObject *obj) override
An attribute specifying that an object is a residual object applicable to the Navier-Stokes momentum ...
clonefunc(AttribINSFVMomentumResidualObject)
AttribINSFVMomentumResidualObject(TheWarehouse &w)
bool isMatch(const Attribute &other) const override
AttribINSFVMomentumResidualObject(TheWarehouse &w, Key k)
bool isEqual(const Attribute &other) const override
void initFrom(const MooseObject *obj) override
A parent class for INSFV flow boundary conditions.
Definition INSFVFlowBC.h:18
A parent class for boundary conditions for freely moving surfaces.
A parent class for INSFV fully developed flow boundary conditions.
A class for no slip velocity boundary condtions.
A parent class for slip/no-slip wall boundary conditions.
A parent class for INSFV symmetry boundary conditions.