Panzer  Version of the Day
Panzer_Workset.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Panzer: A partial differential equation assembly
5 // engine for strongly coupled complex multiphysics systems
6 // Copyright (2011) Sandia Corporation
7 //
8 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9 // the U.S. Government retains certain rights in this software.
10 //
11 // Redistribution and use in source and binary forms, with or without
12 // modification, are permitted provided that the following conditions are
13 // met:
14 //
15 // 1. Redistributions of source code must retain the above copyright
16 // notice, this list of conditions and the following disclaimer.
17 //
18 // 2. Redistributions in binary form must reproduce the above copyright
19 // notice, this list of conditions and the following disclaimer in the
20 // documentation and/or other materials provided with the distribution.
21 //
22 // 3. Neither the name of the Corporation nor the names of the
23 // contributors may be used to endorse or promote products derived from
24 // this software without specific prior written permission.
25 //
26 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 //
38 // Questions? Contact Roger P. Pawlowski (rppawlo@sandia.gov) and
39 // Eric C. Cyr (eccyr@sandia.gov)
40 // ***********************************************************************
41 // @HEADER
42 
43 #include "Panzer_Workset.hpp"
44 
45 namespace panzer {
46 
47  std::ostream& operator<<(std::ostream& os, const panzer::Workset& w)
48  {
49  using std::endl;
50 
51  os << "Workset" << endl;
52  os << " block_id=" << w.block_id << endl;
53  os << " num_cells:" << w.num_cells << endl;
54  os << " cell_local_ids (size=" << w.cell_local_ids.size() << ")" << endl;
55  os << " subcell_dim = " << w.subcell_dim << endl;
56  os << " subcell_index = " << w.subcell_index << endl;
57 
58  os << " ir_degrees: " << endl;
59  for (std::vector<int>::const_iterator ir = w.ir_degrees->begin();
60  ir != w.ir_degrees->end(); ++ir)
61  os << " " << *ir << std::endl;
62 
63  std::vector<int>::const_iterator ir = w.ir_degrees->begin();
64  for (std::vector<Teuchos::RCP<panzer::IntegrationValues2<double> > >::const_iterator irv = w.int_rules.begin();
65  irv != w.int_rules.end(); ++irv,++ir) {
66 
67  os << " IR Values (Degree=" << *ir << "):" << endl;
68 
69  os << " cub_points:" << endl;
70  os << (*irv)->cub_points << endl;
71 
72  os << " side_cub_points:" << endl;
73  os << (*irv)->side_cub_points << endl;
74 
75  os << " cub_weights:" << endl;
76  os << (*irv)->cub_weights << endl;
77 
78  os << " node_coordinates:" << endl;
79  os << (*irv)->node_coordinates << endl;
80 
81  os << " jac:" << endl;
82  os << (*irv)->jac << endl;
83 
84  os << " jac_inv:" << endl;
85  os << (*irv)->jac_inv << endl;
86 
87  os << " jac_det:" << endl;
88  os << (*irv)->jac_det << endl;
89 
90  os << " weighted_measure:" << endl;
91  os << (*irv)->weighted_measure << endl;
92 
93  os << " covarient:" << endl;
94  os << (*irv)->covarient << endl;
95 
96  os << " contravarient:" << endl;
97  os << (*irv)->contravarient << endl;
98 
99  os << " norm_contravarient:" << endl;
100  os << (*irv)->norm_contravarient << endl;
101 
102  os << " ip_coordinates:" << endl;
103  os << (*irv)->ip_coordinates << endl;
104 
105  os << " int_rule->getName():" << (*irv)->int_rule->getName() << endl;
106  }
107 
108 
109  os << " basis_names: " << endl;
110  for (std::vector<std::string>::const_iterator b = w.basis_names->begin();
111  b != w.basis_names->end(); ++b)
112  os << " " << *b << std::endl;
113 
114  std::vector<std::string>::const_iterator b = w.basis_names->begin();
115 
116  for (std::vector<Teuchos::RCP< panzer::BasisValues2<double> > >::const_iterator bv = w.bases.begin(); bv != w.bases.end(); ++bv,++b) {
117 
118  os << " Basis Values (basis_name=" << *b << "):" << endl;
119 
120 /*
121  os << " basis_ref:" << endl;
122  os << (*bv)->basis_ref << endl;
123 
124  os << " basis:" << endl;
125  os << (*bv)->basis_scalar << endl;
126 
127  os << " grad_basis_ref:" << endl;
128  os << (*bv)->grad_basis_ref << endl;
129 
130  os << " grad_basis:" << endl;
131  os << (*bv)->grad_basis << endl;
132 
133  os << " curl_basis_ref:" << endl;
134  os << (*bv)->curl_basis_ref_vector << endl;
135 
136  os << " curl_basis:" << endl;
137  os << (*bv)->curl_basis_vector << endl;
138 
139  os << " basis_coordinates_ref:" << endl;
140  os << (*bv)->basis_coordinates_ref << endl;
141 
142  os << " basis_coordinates:" << endl;
143  os << (*bv)->basis_coordinates << endl;
144 */
145 
146  os << " basis_layout->name():" << (*bv)->basis_layout->name() << endl;
147  }
148 
149 
150 
151  return os;
152  }
153 
154 }
std::vector< std::size_t > cell_local_ids
Teuchos::RCP< std::vector< int > > ir_degrees
If workset corresponds to a sub cell, what is the index?
PHX::MDField< ScalarT > vector
Teuchos::RCP< std::vector< std::string > > basis_names
Value corresponds to basis type. Use the offest for indexing.
std::vector< Teuchos::RCP< panzer::IntegrationValues2< double > > > int_rules
std::ostream & operator<<(std::ostream &os, const AssemblyEngineInArgs &in)
std::vector< Teuchos::RCP< panzer::BasisValues2< double > > > bases
Static basis function data, key is basis name, value is index in the static_bases vector...