www.mooseframework.org
xfem
src
efa
EFANode.C
Go to the documentation of this file.
1
//* This file is part of the MOOSE framework
2
//* https://www.mooseframework.org
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 "
EFANode.h
"
11
12
#include <sstream>
13
14
EFANode::EFANode
(
unsigned
int
nid,
N_CATEGORY
ncat,
EFANode
* nparent)
15
: _category(ncat), _id(nid), _parent(nparent)
16
{
17
}
18
19
std::string
20
EFANode::idCatString
()
21
{
22
std::ostringstream s;
23
s <<
_id
;
24
if
(
_category
==
N_CATEGORY_EMBEDDED
)
25
s <<
"e"
;
26
else
if
(
_category
==
N_CATEGORY_TEMP
)
27
s <<
"t"
;
28
else
if
(
_category
==
N_CATEGORY_EMBEDDED_PERMANENT
)
29
s <<
"ep"
;
30
else
31
s <<
" "
;
32
return
s.str();
33
}
34
35
unsigned
int
36
EFANode::id
()
const
37
{
38
return
_id
;
39
}
40
41
EFANode::N_CATEGORY
42
EFANode::category
()
const
43
{
44
return
_category
;
45
}
46
47
EFANode
*
48
EFANode::parent
()
const
49
{
50
return
_parent
;
51
}
52
53
void
54
EFANode::removeParent
()
55
{
56
_parent
=
nullptr
;
57
}
58
59
void
60
EFANode::setCategory
(
EFANode::N_CATEGORY
category)
61
{
62
_category
=
category
;
63
}
EFANode::idCatString
std::string idCatString()
Definition:
EFANode.C:20
EFANode::N_CATEGORY
N_CATEGORY
Definition:
EFANode.h:17
EFANode::_category
N_CATEGORY _category
Definition:
EFANode.h:29
EFANode.h
EFANode::removeParent
void removeParent()
Definition:
EFANode.C:54
EFANode::N_CATEGORY_EMBEDDED_PERMANENT
Definition:
EFANode.h:22
EFANode::N_CATEGORY_TEMP
Definition:
EFANode.h:20
EFANode::setCategory
void setCategory(EFANode::N_CATEGORY category)
Definition:
EFANode.C:60
EFANode
Definition:
EFANode.h:14
EFANode::N_CATEGORY_EMBEDDED
Definition:
EFANode.h:21
EFANode::EFANode
EFANode(unsigned int nid, N_CATEGORY ncat, EFANode *nparent=nullptr)
Definition:
EFANode.C:14
EFANode::_id
unsigned int _id
Definition:
EFANode.h:30
EFANode::_parent
EFANode * _parent
Definition:
EFANode.h:31
EFANode::parent
EFANode * parent() const
Definition:
EFANode.C:48
EFANode::id
unsigned int id() const
Definition:
EFANode.C:36
EFANode::category
N_CATEGORY category() const
Definition:
EFANode.C:42
Generated on Thu Apr 18 2024 15:39:59 for www.mooseframework.org by
1.8.14