Panzer
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
disc-fe
src
Panzer_Traits.hpp
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
#ifndef PANZER_TRAITS_HPP
44
#define PANZER_TRAITS_HPP
45
46
#include "PanzerDiscFE_config.hpp"
47
48
// Teuchos includes
49
#include "Teuchos_RCP.hpp"
50
51
// mpl (Meta Programming Library) templates
52
#include "Sacado_mpl_vector.hpp"
53
#include "Sacado_mpl_find.hpp"
54
55
// Scalar types
56
#include "Sacado.hpp"
57
//#include "Sacado_CacheFad_DFad.hpp"
58
//#include "Sacado_ELRFad_DFad.hpp"
59
//#include "Sacado_ELRCacheFad_DFad.hpp"
60
61
#include "Phalanx_Traits.hpp"
62
63
// Include User Data Types
64
//#include "Phalanx_Allocator_Contiguous.hpp"
65
#include "
Panzer_Workset.hpp
"
66
//#include "Panzer_GlobalEvaluationDataContainer.hpp"
67
68
// Debugging information
69
//#include "Phalanx_Print.hpp"
70
71
// forward declaration
72
namespace
Intrepid2
{
73
class
Orientation;
74
}
75
76
namespace
panzer
{
77
78
class
GlobalEvaluationDataContainer;
79
80
struct
Traits
{
81
82
// ******************************************************************
83
// *** Scalar Types
84
// ******************************************************************
85
86
// Scalar types we plan to use
87
typedef
double
RealType
;
88
// typedef Sacado::Fad::DFad<double> FadType;
89
// typedef Sacado::CacheFad::DFad<double> FadType;
90
// typedef Sacado::ELRFad::DFad<double> FadType;
91
// typedef Sacado::ELRCacheFad::DFad<double> FadType;
92
// typedef Sacado::Fad::SLFad<double,8> FadType;
93
typedef
PANZER_FADTYPE
FadType
;
94
95
#ifdef Panzer_BUILD_HESSIAN_SUPPORT
96
// typedef Sacado::Fad::SFad<FadType,1> HessianType;
97
typedef
Sacado::Fad::DFad<Sacado::Fad::SFad<RealType,1> >
HessianType
;
98
#endif
99
100
// ******************************************************************
101
// *** Evaluation Types
102
// ******************************************************************
103
struct
Residual
{
typedef
RealType
ScalarT
; };
104
struct
Jacobian
{
typedef
FadType
ScalarT
; };
105
struct
Tangent
{
typedef
FadType
ScalarT
; };
106
107
#ifdef Panzer_BUILD_HESSIAN_SUPPORT
108
struct
Hessian
{
typedef
HessianType
ScalarT
; };
109
#endif
110
111
typedef
Sacado::mpl::vector<
Residual
112
,
Jacobian
113
,
Tangent
114
#ifdef Panzer_BUILD_HESSIAN_SUPPORT
115
,
Hessian
116
#endif
117
>
EvalTypes
;
118
119
// ******************************************************************
120
// *** User Defined Object Passed in for Evaluation Method
121
// ******************************************************************
122
123
struct
SD
{
124
Teuchos::RCP<const std::vector<panzer::Workset>>
worksets_
;
125
Teuchos::RCP<const std::vector<Intrepid2::Orientation>>
orientations_
;
126
};
127
using
SetupData
=
const
SD
&;
128
129
using
EvalData
=
const
panzer::Workset
&;
130
131
struct
PED
{
132
PED
();
133
Teuchos::RCP<GlobalEvaluationDataContainer>
gedc
;
134
std::string
first_sensitivities_name
;
135
std::string
second_sensitivities_name
;
136
};
137
using
PreEvalData
=
const
PED
&;
138
139
typedef
void
*
PostEvalData
;
140
141
};
142
143
}
144
145
namespace
PHX
{
146
147
template
<>
148
struct
eval_scalar_types<
panzer
::Traits::Residual>
149
{
typedef
Sacado::mpl::vector<panzer::Traits::RealType,bool>
type
; };
150
151
template
<>
152
struct
eval_scalar_types<
panzer
::Traits::Jacobian>
153
{
typedef
Sacado::mpl::vector<panzer::Traits::FadType,panzer::Traits::RealType,bool>
type
; };
154
155
template
<>
156
struct
eval_scalar_types<
panzer
::Traits::Tangent>
157
{
typedef
Sacado::mpl::vector<panzer::Traits::FadType,panzer::Traits::RealType,bool>
type
; };
158
159
#ifdef Panzer_BUILD_HESSIAN_SUPPORT
160
template
<>
161
struct
eval_scalar_types<
panzer
::Traits::Hessian>
162
{
typedef
Sacado::mpl::vector<panzer::Traits::HessianType,bool>
type
; };
163
#endif
164
165
}
166
167
#endif
Panzer_Workset.hpp
panzer::Workset
Definition
Panzer_Workset.hpp:358
Intrepid2
Definition
Panzer_Traits.hpp:72
PHX
Definition
Panzer_BCStrategy_Base.hpp:52
panzer
Computes .
Definition
Panzer_BasisValues_Evaluator_decl.hpp:54
PHX::eval_scalar_types< panzer::Traits::Hessian >::type
Sacado::mpl::vector< panzer::Traits::HessianType, bool > type
Definition
Panzer_Traits.hpp:162
PHX::eval_scalar_types< panzer::Traits::Jacobian >::type
Sacado::mpl::vector< panzer::Traits::FadType, panzer::Traits::RealType, bool > type
Definition
Panzer_Traits.hpp:153
PHX::eval_scalar_types< panzer::Traits::Residual >::type
Sacado::mpl::vector< panzer::Traits::RealType, bool > type
Definition
Panzer_Traits.hpp:149
PHX::eval_scalar_types< panzer::Traits::Tangent >::type
Sacado::mpl::vector< panzer::Traits::FadType, panzer::Traits::RealType, bool > type
Definition
Panzer_Traits.hpp:157
panzer::Traits::Hessian
Definition
Panzer_Traits.hpp:108
panzer::Traits::Hessian::ScalarT
HessianType ScalarT
Definition
Panzer_Traits.hpp:108
panzer::Traits::Jacobian
Definition
Panzer_Traits.hpp:104
panzer::Traits::Jacobian::ScalarT
FadType ScalarT
Definition
Panzer_Traits.hpp:104
panzer::Traits::PED
Definition
Panzer_Traits.hpp:131
panzer::Traits::PED::gedc
Teuchos::RCP< GlobalEvaluationDataContainer > gedc
Definition
Panzer_Traits.hpp:133
panzer::Traits::PED::PED
PED()
Definition
Panzer_Traits.cpp:46
panzer::Traits::PED::second_sensitivities_name
std::string second_sensitivities_name
Definition
Panzer_Traits.hpp:135
panzer::Traits::PED::first_sensitivities_name
std::string first_sensitivities_name
Definition
Panzer_Traits.hpp:134
panzer::Traits::Residual
Definition
Panzer_Traits.hpp:103
panzer::Traits::Residual::ScalarT
RealType ScalarT
Definition
Panzer_Traits.hpp:103
panzer::Traits::SD
Definition
Panzer_Traits.hpp:123
panzer::Traits::SD::worksets_
Teuchos::RCP< const std::vector< panzer::Workset > > worksets_
Definition
Panzer_Traits.hpp:124
panzer::Traits::SD::orientations_
Teuchos::RCP< const std::vector< Intrepid2::Orientation > > orientations_
Definition
Panzer_Traits.hpp:125
panzer::Traits::Tangent
Definition
Panzer_Traits.hpp:105
panzer::Traits::Tangent::ScalarT
FadType ScalarT
Definition
Panzer_Traits.hpp:105
panzer::Traits
Definition
Panzer_Traits.hpp:80
panzer::Traits::RealType
double RealType
Definition
Panzer_Traits.hpp:87
panzer::Traits::FadType
PANZER_FADTYPE FadType
Definition
Panzer_Traits.hpp:93
panzer::Traits::PreEvalData
const PED & PreEvalData
Definition
Panzer_Traits.hpp:137
panzer::Traits::EvalTypes
Sacado::mpl::vector< Residual, Jacobian, Tangent, Hessian > EvalTypes
Definition
Panzer_Traits.hpp:117
panzer::Traits::HessianType
Sacado::Fad::DFad< Sacado::Fad::SFad< RealType, 1 > > HessianType
Definition
Panzer_Traits.hpp:97
panzer::Traits::PostEvalData
void * PostEvalData
Definition
Panzer_Traits.hpp:139
panzer::Traits::EvalData
const panzer::Workset & EvalData
Definition
Panzer_Traits.hpp:129
panzer::Traits::SetupData
const SD & SetupData
Definition
Panzer_Traits.hpp:127
Generated by
1.17.0