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 }
panzer::WorksetDetails::numGhostCells
int numGhostCells() const
Number of cells owned by a different workset.
Definition: Panzer_Workset.hpp:150
panzer::DomainEvaluator::OWNED
Definition: Panzer_Evaluator_DomainInterface.hpp:18
panzer::DomainEvaluator::GHOST
All Owned cells for the workset on the MPI process.
Definition: Panzer_Evaluator_DomainInterface.hpp:19
panzer::DomainEvaluator::VIRTUAL
All Owned and Ghosted cells for the workset on the MPI process.
Definition: Panzer_Evaluator_DomainInterface.hpp:21
Panzer_Workset.hpp
panzer::DomainEvaluator::ALL
All virtual cells for the workset on the MPI process.
Definition: Panzer_Evaluator_DomainInterface.hpp:22
TEUCHOS_ASSERT
#define TEUCHOS_ASSERT(assertion_test)
panzer::Workset
Definition: Panzer_Workset.hpp:186
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:32
panzer::DomainEvaluator::DomainType
DomainType
Domain types supported by worksets.
Definition: Panzer_Evaluator_DomainInterface.hpp:17
panzer::Workset::num_cells
index_t num_cells
Definition: Panzer_Workset.hpp:200
panzer::DomainEvaluator::getDomain
DomainType getDomain()
Get the domain for the evaluator.
Definition: Panzer_Evaluator_DomainInterface.cpp:9
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::WorksetDetails::numOwnedCells
int numOwnedCells() const
Number of cells owned by this workset.
Definition: Panzer_Workset.hpp:147
panzer::DomainEvaluator::setDomain
void setDomain(const DomainType domain)
Set the domain for the evaluator.
Definition: Panzer_Evaluator_DomainInterface.cpp:12
panzer::DomainEvaluator::REAL
All Ghosted cells for the workset on the MPI process.
Definition: Panzer_Evaluator_DomainInterface.hpp:20
Panzer_Evaluator_DomainInterface.hpp
panzer
Definition: Panzer_BasisValues_Evaluator_decl.hpp:54
panzer::DomainEvaluator::domain_
DomainType domain_
Domain for this evaluator.
Definition: Panzer_Evaluator_DomainInterface.hpp:79
panzer::DomainEvaluator::DomainEvaluator
DomainEvaluator(DomainType domain=ALL)
Constructor.
Definition: Panzer_Evaluator_DomainInterface.cpp:7