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 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 }
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 numGhostCells() const
Number of cells owned by a different workset.