Panzer
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
disc-fe
src
Panzer_Evaluator_DomainInterface.cpp
Go to the documentation of this file.
1
#include "
Panzer_Evaluator_DomainInterface.hpp
"
2
#include "
Panzer_Workset.hpp
"
3
#include "Teuchos_Assert.hpp"
4
5
namespace
panzer
{
6
7
DomainEvaluator::DomainEvaluator
(
DomainEvaluator::DomainType
domain) :
domain_
(domain) {}
8
9
DomainEvaluator::DomainType
DomainEvaluator::getDomain
()
10
{
return
domain_
;}
11
12
void
DomainEvaluator::setDomain
(
const
DomainEvaluator::DomainType
domain)
13
{
domain_
=domain;}
14
15
int
DomainEvaluator::cellStartIndex
(
const
panzer::Workset
& workset)
const
16
{
17
if
(
domain_
==
ALL
)
18
return
0;
19
else
if
(
domain_
==
OWNED
)
20
return
0;
21
else
if
(
domain_
==
GHOST
)
22
return
workset.
numOwnedCells
();
23
else
if
(
domain_
==
REAL
)
24
return
0;
25
else
if
(
domain_
==
VIRTUAL
)
26
return
workset.
numOwnedCells
() + workset.
numGhostCells
();
27
else
if
(
domain_
==
EXTERNAL
)
28
return
workset.
numOwnedCells
();
29
else
{
30
TEUCHOS_ASSERT(
false
);
31
}
32
}
33
34
int
DomainEvaluator::cellEndIndex
(
const
panzer::Workset
& workset)
const
35
{
36
if
(
domain_
==
ALL
)
37
return
workset.
num_cells
;
38
else
if
(
domain_
==
OWNED
)
39
return
workset.
numOwnedCells
();
40
else
if
(
domain_
==
GHOST
)
41
return
workset.
numOwnedCells
() + workset.
numGhostCells
();
42
else
if
(
domain_
==
REAL
)
43
return
workset.
numOwnedCells
() + workset.
numGhostCells
();
44
else
if
(
domain_
==
VIRTUAL
)
45
return
workset.
num_cells
;
46
else
if
(
domain_
==
EXTERNAL
)
47
return
workset.
num_cells
;
48
else
{
49
TEUCHOS_ASSERT(
false
);
50
}
51
}
52
53
}
Panzer_Evaluator_DomainInterface.hpp
Panzer_Workset.hpp
panzer::DomainEvaluator::domain_
DomainType domain_
Domain for this evaluator.
Definition
Panzer_Evaluator_DomainInterface.hpp:80
panzer::DomainEvaluator::setDomain
void setDomain(const DomainType domain)
Set the domain for the evaluator.
Definition
Panzer_Evaluator_DomainInterface.cpp:12
panzer::DomainEvaluator::DomainType
DomainType
Domain types supported by worksets.
Definition
Panzer_Evaluator_DomainInterface.hpp:17
panzer::DomainEvaluator::ALL
@ ALL
All ghost and virtual cells for the workset on the MPI process.
Definition
Panzer_Evaluator_DomainInterface.hpp:23
panzer::DomainEvaluator::OWNED
@ OWNED
Definition
Panzer_Evaluator_DomainInterface.hpp:18
panzer::DomainEvaluator::REAL
@ REAL
All Ghosted cells for the workset on the MPI process.
Definition
Panzer_Evaluator_DomainInterface.hpp:20
panzer::DomainEvaluator::EXTERNAL
@ EXTERNAL
All virtual cells for the workset on the MPI process.
Definition
Panzer_Evaluator_DomainInterface.hpp:22
panzer::DomainEvaluator::VIRTUAL
@ VIRTUAL
All Owned and Ghosted cells for the workset on the MPI process.
Definition
Panzer_Evaluator_DomainInterface.hpp:21
panzer::DomainEvaluator::GHOST
@ GHOST
All Owned cells for the workset on the MPI process.
Definition
Panzer_Evaluator_DomainInterface.hpp:19
panzer::DomainEvaluator::DomainEvaluator
DomainEvaluator(DomainType domain=ALL)
Constructor.
Definition
Panzer_Evaluator_DomainInterface.cpp:7
panzer::DomainEvaluator::cellStartIndex
virtual int cellStartIndex(const panzer::Workset &workset) const
Returns the starting cell for the specified domain for a given workset.
Definition
Panzer_Evaluator_DomainInterface.cpp:15
panzer::DomainEvaluator::getDomain
DomainType getDomain()
Get the domain for the evaluator.
Definition
Panzer_Evaluator_DomainInterface.cpp:9
panzer::DomainEvaluator::cellEndIndex
virtual int cellEndIndex(const panzer::Workset &workset) const
Returns the non-inclusive end cell for the specified domain for a given workset.
Definition
Panzer_Evaluator_DomainInterface.cpp:34
panzer::WorksetDetails::numOwnedCells
int numOwnedCells() const
Number of cells owned by this workset.
Definition
Panzer_Workset.hpp:310
panzer::WorksetDetails::num_cells
int num_cells
DEPRECATED - use: numCells().
Definition
Panzer_Workset.hpp:116
panzer::WorksetDetails::numGhostCells
int numGhostCells() const
Number of cells owned by a different workset.
Definition
Panzer_Workset.hpp:313
panzer::Workset
Definition
Panzer_Workset.hpp:358
panzer
Computes .
Definition
Panzer_BasisValues_Evaluator_decl.hpp:54
Generated by
1.17.0