Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_PointRule.hpp
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
11#ifndef PANZER_POINT_RULE_HPP
12#define PANZER_POINT_RULE_HPP
13
14#include "Teuchos_ArrayRCP.hpp"
15
16#include "Phalanx_DataLayout.hpp"
17
18#include "Shards_CellTopology.hpp"
19
21
22namespace panzer {
23
24 class CellData;
25
29 class PointRule {
30 public:
31
38 PointRule(const std::string & ptName,int np, const panzer::CellData& cell_data);
39
40
50 PointRule(const std::string & point_rule_name,
51 const int num_cells,
52 const int num_points_per_cell,
53 const int num_faces,
54 const int num_points_per_face,
55 const Teuchos::RCP<const shards::CellTopology> & cell_topology);
56
59 PointRule(const panzer::PointDescriptor& description,
60 const Teuchos::RCP<const shards::CellTopology> & cell_topology,
61 const int num_cells);
62
64 virtual ~PointRule() {}
65
66 void setup(const std::string & ptName,int np, const panzer::CellData& cell_data);
67
68 // Returns true if this point rule is for a sideset
69 bool isSide() const;
70
73 const std::string & getName() const;
74
75 Teuchos::RCP<const shards::CellTopology> topology;
76
77 Teuchos::RCP<shards::CellTopology> side_topology;
78
80 Teuchos::RCP<PHX::DataLayout> dl_scalar;
82 Teuchos::RCP<PHX::DataLayout> dl_vector;
84 Teuchos::RCP<PHX::DataLayout> dl_tensor;
85
87 Teuchos::RCP<PHX::DataLayout> dl_vector3;
88
90 Teuchos::RCP<PHX::DataLayout> dl_tensor3x3;
91
95
97 int side;
98
100 virtual void print(std::ostream & os);
101
102 // TODO: These need to be moved to a DataLayoutGenerator
103
104 Teuchos::RCP<PHX::DataLayout> getCellDataLayout() const;
105 Teuchos::RCP<PHX::DataLayout> getCellDataLayout(const int dim0) const;
106 Teuchos::RCP<PHX::DataLayout> getCellDataLayout(const int dim0, const int dim1) const;
107
108 Teuchos::RCP<PHX::DataLayout> getCellPointDataLayout() const;
109 Teuchos::RCP<PHX::DataLayout> getCellPointDataLayout(const int dim0) const;
110 Teuchos::RCP<PHX::DataLayout> getCellPointDataLayout(const int dim0, const int dim1) const;
111
112 Teuchos::RCP<PHX::DataLayout> getFaceDataLayout() const;
113 Teuchos::RCP<PHX::DataLayout> getFaceDataLayout(const int dim0) const;
114 Teuchos::RCP<PHX::DataLayout> getFaceDataLayout(const int dim0, const int dim1) const;
115
116 Teuchos::RCP<PHX::DataLayout> getFacePointDataLayout() const;
117 Teuchos::RCP<PHX::DataLayout> getFacePointDataLayout(const int dim0) const;
118 Teuchos::RCP<PHX::DataLayout> getFacePointDataLayout(const int dim0, const int dim1) const;
119
120 protected:
121 PointRule() : side(-1) {}
122
126 static Teuchos::RCP<shards::CellTopology> getSideTopology(const CellData & cell_data);
127
128
129 void setup(const std::string & point_rule_name,
130 const int num_cells,
131 const int num_points_per_cell,
132 const int num_faces,
133 const int num_points_per_face,
134 const Teuchos::RCP<const shards::CellTopology> & cell_topology);
135
138
139 private:
140 std::string point_name;
141 };
142
143}
144
145#endif
Data for determining cell topology and dimensionality.
Teuchos::RCP< PHX::DataLayout > getFaceDataLayout() const
Teuchos::RCP< PHX::DataLayout > getFacePointDataLayout() const
Teuchos::RCP< PHX::DataLayout > dl_vector
Data layout for vector fields.
Teuchos::RCP< PHX::DataLayout > dl_vector3
Data layout for vector fields - full (x,y,z)
Teuchos::RCP< PHX::DataLayout > dl_scalar
Data layout for scalar fields.
static Teuchos::RCP< shards::CellTopology > getSideTopology(const CellData &cell_data)
Teuchos::RCP< shards::CellTopology > side_topology
virtual void print(std::ostream &os)
print information about the integration rule
int side
Defaults to -1 if this is volume and not sideset.
void setup(const std::string &ptName, int np, const panzer::CellData &cell_data)
Teuchos::RCP< PHX::DataLayout > dl_tensor3x3
Data layout for vector fields - full ((xx,xy,xz),(yx,yy,yz),(zx,zy,zz)) (or transpose?...
Teuchos::RCP< PHX::DataLayout > getCellDataLayout() const
Teuchos::RCP< PHX::DataLayout > dl_tensor
Data layout for rank-2 tensor fields.
Teuchos::RCP< PHX::DataLayout > getCellPointDataLayout() const
virtual ~PointRule()
Destructor (Satisfying the compiler)
Teuchos::RCP< const shards::CellTopology > topology
const std::string & getName() const