Panzer
Version of the Day
|
Computes . More...
#include <Panzer_Integrator_GradBasisCrossVector_decl.hpp>
Classes | |
struct | FieldMultTag |
This empty struct allows us to optimize operator()() depending on the number of field multipliers. More... | |
Public Member Functions | |
Integrator_GradBasisCrossVector (const panzer::EvaluatorStyle &evalStyle, const std::vector< std::string > &resNames, const std::string &vecName, const panzer::BasisIRLayout &basis, const panzer::IntegrationRule &ir, const double &multiplier=1, const std::vector< std::string > &fmNames=std::vector< std::string >(), const Teuchos::RCP< PHX::DataLayout > &vecDL=Teuchos::null) | |
Main Constructor. More... | |
Integrator_GradBasisCrossVector (const Teuchos::ParameterList &p) | |
ParameterList Constructor. More... | |
void | postRegistrationSetup (typename Traits::SetupData d, PHX::FieldManager< Traits > &fm) |
Post-Registration Setup. More... | |
void | evaluateFields (typename Traits::EvalData d) |
Evaluate Fields. More... | |
template<int NUM_FIELD_MULT> | |
KOKKOS_INLINE_FUNCTION void | operator() (const FieldMultTag< NUM_FIELD_MULT > &tag, const std::size_t &cell) const |
Perform the integration. More... | |
template<int NUM_FIELD_MULT> | |
KOKKOS_INLINE_FUNCTION void | operator() (const FieldMultTag< NUM_FIELD_MULT > &, const size_t &cell) const |
Public Member Functions inherited from panzer::EvaluatorWithBaseImpl< Traits > | |
void | setDetailsIndex (const int di) |
An evaluator builder sets the details index. More... | |
Public Member Functions inherited from panzer::DomainEvaluator | |
DomainEvaluator (DomainType domain=ALL) | |
Constructor. More... | |
virtual | ~DomainEvaluator ()=default |
Default destructor. More... | |
void | setDomain (const DomainType domain) |
Set the domain for the evaluator. More... | |
DomainType | getDomain () |
Get the domain for the evaluator. More... | |
virtual int | cellStartIndex (const panzer::Workset &workset) const |
Returns the starting cell for the specified domain for a given workset. More... | |
virtual int | cellEndIndex (const panzer::Workset &workset) const |
Returns the non-inclusive end cell for the specified domain for a given workset. More... | |
Private Types | |
using | ScalarT = typename EvalT::ScalarT |
The scalar type. More... | |
Private Member Functions | |
Teuchos::RCP < Teuchos::ParameterList > | getValidParameters () const |
Get Valid Parameters. More... | |
Private Attributes | |
const panzer::EvaluatorStyle | evalStyle_ |
An enum determining the behavior of this Evaluator . More... | |
Kokkos::View< PHX::MDField < ScalarT, Cell, BASIS > * > | fields_ |
The fields to which we'll contribute, or in which we'll store, the result of computing this integral. More... | |
PHX::MDField< const ScalarT, Cell, IP, Dim > | vector_ |
A field representing the vector-valued function we're integrating ( ). More... | |
double | multiplier_ |
The scalar multiplier out in front of the integral ( ). More... | |
std::vector< PHX::MDField < const ScalarT, Cell, IP > > | fieldMults_ |
The (possibly empty) list of fields that are multipliers out in front of the integral ( , , etc.). More... | |
Kokkos::View< Kokkos::View < const ScalarT **, typename PHX::DevLayout< ScalarT > ::type, PHX::Device > * > | kokkosFieldMults_ |
The Kokkos::View representation of the (possibly empty) list of fields that are multipliers out in front of the integral ( , , etc.). More... | |
int | numDims_ |
The number of dimensions associated with the vector. More... | |
int | numGradDims_ |
The number of dimensions associated with the gradient. More... | |
std::string | basisName_ |
The name of the basis we're using. More... | |
std::size_t | basisIndex_ |
The index in the Workset bases for our particular BasisIRLayout name. More... | |
PHX::MDField< double, panzer::Cell, panzer::BASIS, panzer::IP, panzer::Dim > | basis_ |
The gradient vector basis information necessary for integration. More... | |
Additional Inherited Members | |
Public Types inherited from panzer::DomainEvaluator | |
enum | DomainType : int { OWNED =0, GHOST =1, REAL =2, VIRTUAL =3, EXTERNAL =4, ALL =5 } |
Domain types supported by worksets. More... | |
Protected Attributes inherited from panzer::EvaluatorWithBaseImpl< Traits > | |
WorksetDetailsAccessor | wda |
Computes .
Evaluates the integral
where is some constant, , , etc., are some fields that depend on position, is some vector-valued function, and is some vector basis.
Definition at line 81 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The scalar type.
Definition at line 270 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
panzer::Integrator_GradBasisCrossVector< EvalT, Traits >::Integrator_GradBasisCrossVector | ( | const panzer::EvaluatorStyle & | evalStyle, |
const std::vector< std::string > & | resNames, | ||
const std::string & | vecName, | ||
const panzer::BasisIRLayout & | basis, | ||
const panzer::IntegrationRule & | ir, | ||
const double & | multiplier = 1 , |
||
const std::vector< std::string > & | fmNames = std::vector<std::string>() , |
||
const Teuchos::RCP< PHX::DataLayout > & | vecDL = Teuchos::null |
||
) |
Main Constructor.
Creates an Evaluator
to evaluate the integral
where is some constant, , , etc., are some fields that depend on position, is some vector-valued function, and is some vector basis.
[in] | evalStyle | An enum declaring the behavior of this Evaluator , which is to either:
|
[in] | resNames | The names of either the contributed or evaluated fields, depending on evalStyle . This Evaluator computes either two or three fields, depending on the dimensionality of . |
[in] | vecName | The name of the vector-valued function being integrated ( ). |
[in] | basis | The basis that you'd like to use ( ). |
[in] | ir | The integration rule that you'd like to use. |
[in] | multiplier | The scalar multiplier out in front of the integral you're computing ( ). If not specified, this defaults to 1. |
[in] | fmNames | A list of names of fields that are multipliers out in front of the integral you're computing ( , , etc.). If not specified, this defaults to an empty vector . |
[in] | vecDL | The vector data layout that you'd like to use. If not specified, this defaults to Teuchos::null and the vector data layout from the given ir is used. |
std::invalid_argument | If any of the inputs are invalid. |
std::logic_error | If the basis supplied does not support the gradient operator, or if the dimension of the space exceeds the dimension of the vector data layout, or if has fewer components than the dimensionality of the mesh. |
Definition at line 72 of file Panzer_Integrator_GradBasisCrossVector_impl.hpp.
panzer::Integrator_GradBasisCrossVector< EvalT, Traits >::Integrator_GradBasisCrossVector | ( | const Teuchos::ParameterList & | p | ) |
ParameterList
Constructor.
Creates an Evaluator
to evaluate the integral
where is some constant, , , etc., are some fields that depend on position, is some vector-valued function, and is some basis.
Evaluator
with a ParameterList
; however, it is strongly advised that you not use this ParameterList
Constructor, but rather that you favor the main constructor with its compile-time argument checking instead.[in] | p | A ParameterList of the form <ParameterList>
<Parameter name = "Residual Names" type = "std::vector<std::string>" value = (required) />
<Parameter name = "Vector Name" type = "std::string" value = (required) />
<Parameter name = "Basis" type = "RCP<panzer::BasisIRLayout>" value = (required) />
<Parameter name = "IR" type = "RCP<panzer::IntegrationRule>" value = (required) />
<Parameter name = "Multiplier" type = "double" value = (required) />
<Parameter name = "Field Multipliers" type = "RCP<const std::vector<std::string>>" value = null (default)/>
<Parameter name = "Data Layout Vector" type = "RCP<PHX::DataLayout>" value = null (default)/>
</ParameterList>
|
Definition at line 186 of file Panzer_Integrator_GradBasisCrossVector_impl.hpp.
void panzer::Integrator_GradBasisCrossVector< EvalT, Traits >::postRegistrationSetup | ( | typename Traits::SetupData | d, |
PHX::FieldManager< Traits > & | fm | ||
) |
Post-Registration Setup.
Sets the basis index, and gets the Kokkos::View versions of the field multipliers, if there are any.
[in] | sd | Essentially a list of Workset s, which are collections of cells (elements) that all live on a single process. |
[in] | fm | This is an unused part of the Evaluator interface. |
Definition at line 220 of file Panzer_Integrator_GradBasisCrossVector_impl.hpp.
void panzer::Integrator_GradBasisCrossVector< EvalT, Traits >::evaluateFields | ( | typename Traits::EvalData | d | ) |
Evaluate Fields.
This actually performs the integration by calling operator()()
in a Kokkos::parallel_for
over the cells in the Workset
.
[in] | workset | The Workset on which you're going to do the integration. |
Definition at line 450 of file Panzer_Integrator_GradBasisCrossVector_impl.hpp.
KOKKOS_INLINE_FUNCTION void panzer::Integrator_GradBasisCrossVector< EvalT, Traits >::operator() | ( | const FieldMultTag< NUM_FIELD_MULT > & | tag, |
const std::size_t & | cell | ||
) | const |
Perform the integration.
Generally speaking, for a given cell in the Workset
, this routine loops over quadrature points and bases to perform the integration, scaling the vector field to be integrated by the multiplier ( ) and any field multipliers ( , , etc.).
[in] | tag | An indication of the number of field multipliers we have; either 0, 1, or something else. |
[in] | cell | The cell in the Workset over which to integrate. |
|
private |
Get Valid Parameters.
Get all the parameters that we support such that the ParameterList
Constructor can do some validation of the input ParameterList
.
ParameterList
with all the valid parameters (keys) in it. The values tied to those keys are meaningless default values. Definition at line 478 of file Panzer_Integrator_GradBasisCrossVector_impl.hpp.
KOKKOS_INLINE_FUNCTION void panzer::Integrator_GradBasisCrossVector< EvalT, Traits >::operator() | ( | const FieldMultTag< NUM_FIELD_MULT > & | , |
const size_t & | cell | ||
) | const |
Definition at line 247 of file Panzer_Integrator_GradBasisCrossVector_impl.hpp.
|
private |
An enum
determining the behavior of this Evaluator
.
This Evaluator
will compute the result of its integration and then:
Definition at line 280 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The fields to which we'll contribute, or in which we'll store, the result of computing this integral.
Definition at line 286 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
A field representing the vector-valued function we're integrating ( ).
Definition at line 292 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The scalar multiplier out in front of the integral ( ).
Definition at line 298 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The (possibly empty) list of fields that are multipliers out in front of the integral ( , , etc.).
Definition at line 304 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The Kokkos::View
representation of the (possibly empty) list of fields that are multipliers out in front of the integral ( , , etc.).
Definition at line 313 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The number of dimensions associated with the vector.
Definition at line 318 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The number of dimensions associated with the gradient.
Definition at line 323 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The name of the basis we're using.
Definition at line 328 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The index in the Workset
bases for our particular BasisIRLayout
name.
Definition at line 334 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.
|
private |
The gradient vector basis information necessary for integration.
Definition at line 341 of file Panzer_Integrator_GradBasisCrossVector_decl.hpp.