Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_Evaluator_DomainInterface.cpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
12#include "Panzer_Workset.hpp"
13#include "Teuchos_Assert.hpp"
14
15namespace panzer {
16
18
21
24
26 {
27 if (domain_ == ALL)
28 return 0;
29 else if (domain_ == OWNED)
30 return 0;
31 else if (domain_ == GHOST)
32 return workset.numOwnedCells();
33 else if (domain_ == REAL)
34 return 0;
35 else if (domain_ == VIRTUAL)
36 return workset.numOwnedCells() + workset.numGhostCells();
37 else if (domain_ == EXTERNAL)
38 return workset.numOwnedCells();
39 else {
40 TEUCHOS_ASSERT(false);
41 }
42 }
43
45 {
46 if (domain_ == ALL)
47 return workset.num_cells;
48 else if (domain_ == OWNED)
49 return workset.numOwnedCells();
50 else if (domain_ == GHOST)
51 return workset.numOwnedCells() + workset.numGhostCells();
52 else if (domain_ == REAL)
53 return workset.numOwnedCells() + workset.numGhostCells();
54 else if (domain_ == VIRTUAL)
55 return workset.num_cells;
56 else if(domain_ == EXTERNAL)
57 return workset.num_cells;
58 else {
59 TEUCHOS_ASSERT(false);
60 }
61 }
62
63}
DomainType domain_
Domain for this evaluator.
void setDomain(const DomainType domain)
Set the domain for the evaluator.
DomainType
Domain types supported by worksets.
@ ALL
All ghost and virtual cells for the workset on the MPI process.
@ REAL
All Ghosted cells for the workset on the MPI process.
@ EXTERNAL
All virtual cells for the workset on the MPI process.
@ VIRTUAL
All Owned and Ghosted cells for the workset on the MPI process.
@ GHOST
All Owned cells for the workset on the MPI process.
DomainEvaluator(DomainType domain=ALL)
Constructor.
virtual int cellStartIndex(const panzer::Workset &workset) const
Returns the starting cell for the specified domain for a given workset.
DomainType getDomain()
Get the domain for the evaluator.
virtual int cellEndIndex(const panzer::Workset &workset) const
Returns the non-inclusive end cell for the specified domain for a given workset.
int numOwnedCells() const
Number of cells owned by this workset.
int num_cells
DEPRECATED - use: numCells()
int numGhostCells() const
Number of cells owned by a different workset.