Panzer  Version of the Day
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 {
28  TEUCHOS_ASSERT(false);
29  }
30  }
31 
33  {
34  if (domain_ == ALL)
35  return workset.num_cells;
36  else if (domain_ == OWNED)
37  return workset.numOwnedCells();
38  else if (domain_ == GHOST)
39  return workset.numOwnedCells() + workset.numGhostCells();
40  else if (domain_ == REAL)
41  return workset.numOwnedCells() + workset.numGhostCells();
42  else if (domain_ == VIRTUAL)
43  return workset.num_cells;
44  else {
45  TEUCHOS_ASSERT(false);
46  }
47  }
48 
49 }
virtual int cellStartIndex(const panzer::Workset &workset) const
Returns the starting cell for the specified domain for a given workset.
All Ghosted cells for the workset on the MPI process.
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.
int numOwnedCells() const
Number of cells owned by this workset.
All virtual cells for the workset on the MPI process.
int numGhostCells() const
Number of cells owned by a different workset.
#define TEUCHOS_ASSERT(assertion_test)
virtual int cellEndIndex(const panzer::Workset &workset) const
Returns the non-inclusive end cell for the specified domain for a given workset.
DomainType
Domain types supported by worksets.
DomainType getDomain()
Get the domain for the evaluator.