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.
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 
15 namespace panzer {
16 
18 
20  {return domain_;}
21 
23  {domain_=domain;}
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 }
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.