Panzer  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Panzer_Evaluator_DomainInterface.cpp
Go to the documentation of this file.
2 #include "Panzer_Workset.hpp"
3 #include "Teuchos_Assert.hpp"
4 
5 namespace panzer {
6 
8 
10  {return domain_;}
11 
13  {domain_=domain;}
14 
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 
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 }
int num_cells
DEPRECATED - use: numCells()
All virtual cells for the workset on the MPI process.
All Ghosted cells for the workset on the MPI process.
int numOwnedCells() const
Number of cells owned by this workset.
virtual int cellEndIndex(const panzer::Workset &workset) const
Returns the non-inclusive end cell for the specified domain for a given workset.
int numGhostCells() const
Number of cells owned by a different workset.
virtual int cellStartIndex(const panzer::Workset &workset) const
Returns the starting cell for the specified domain for a given workset.
void setDomain(const DomainType domain)
Set the domain for the evaluator.
DomainType domain_
Domain for this evaluator.
DomainEvaluator(DomainType domain=ALL)
Constructor.
All Owned and Ghosted cells for the workset on the MPI process.
All Owned cells for the workset on the MPI process.
All ghost and virtual cells for the workset on the MPI process.
#define TEUCHOS_ASSERT(assertion_test)
DomainType
Domain types supported by worksets.
DomainType getDomain()
Get the domain for the evaluator.