Panzer Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits > Class Template Reference

Computes $ \int (a(x)\cdots\vec{s}(x))\cdot\vec{\phi}(x)\,dx
       $. More...

#include <Panzer_Integrator_BasisTimesTensorTimesVector.hpp>

Inheritance diagram for panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >:
Inheritance graph
[legend]

Public Member Functions

 Integrator_BasisTimesTensorTimesVector (const panzer::EvaluatorStyle &evalStyle, const std::string &resName, const std::string &valName, const panzer::BasisIRLayout &basis, const panzer::IntegrationRule &ir, const std::string &tensorName)
 Main Constructor.
 
 Integrator_BasisTimesTensorTimesVector (const Teuchos::ParameterList &p)
 ParameterList Constructor.
 
 Integrator_BasisTimesTensorTimesVector (const panzer::EvaluatorStyle &evalStyle, const PHX::FieldTag &resTag, const PHX::FieldTag &valTag, const BasisDescriptor &bd, const IntegrationDescriptor &id, const PHX::FieldTag &tensorTag)
 Descriptor Constructor.
 
void postRegistrationSetup (typename Traits::SetupData sd, PHX::FieldManager< Traits > &fm)
 Post-Registration Setup.
 
void evaluateFields (typename Traits::EvalData workset)
 Evaluate Fields.
 
KOKKOS_INLINE_FUNCTION void operator() (const std::size_t &cell) const
 Perform the integration.
 
- Public Member Functions inherited from panzer::EvaluatorWithBaseImpl< Traits >
void setDetailsIndex (const int di)
 An evaluator builder sets the details index.
 
- Public Member Functions inherited from panzer::DomainEvaluator
 DomainEvaluator (DomainType domain=ALL)
 Constructor.
 
virtual ~DomainEvaluator ()=default
 Default destructor.
 
void setDomain (const DomainType domain)
 Set the domain for the evaluator.
 
DomainType getDomain ()
 Get the domain for the evaluator.
 
virtual int cellStartIndex (const panzer::Workset &workset) const
 Returns the starting cell for the specified domain for a given workset.
 
virtual int cellEndIndex (const panzer::Workset &workset) const
 Returns the non-inclusive end cell for the specified domain for a given workset.
 

Private Types

using ScalarT = typename EvalT::ScalarT
 The scalar type.
 

Private Member Functions

Teuchos::RCP< Teuchos::ParameterList > getValidParameters () const
 Get Valid Parameters.
 

Private Attributes

const panzer::EvaluatorStyle evalStyle_
 An enum determining the behavior of this Evaluator.
 
bool useDescriptors_
 A flag indicating whether or not to use the descriptor interface.
 
BasisDescriptor bd_
 The BasisDescriptor for the basis to use.
 
IntegrationDescriptor id_
 The IntegrationDescriptor for the quadrature to use.
 
PHX::MDField< ScalarT, panzer::Cell, panzer::BASISfield_
 A field to which we'll contribute, or in which we'll store, the result of computing this integral.
 
PHX::MDField< const ScalarT, panzer::Cell, panzer::IP, panzer::Dimvector_
 A field representing the vector-valued function we're integrating ( $ \vec{s} $).
 
PHX::MDField< const ScalarT, panzer::Cell, panzer::IP, panzer::Dim, panzer::Dimtensor_
 The tensor field( $ a(x) $).
 
PHX::View< const ScalarT **** > kokkosTensor_
 The PHX::View representation of the tensor fields that are multiplied out in front of the integral ( $ a(x) $).
 
int numQP_
 The number of quadrature points for each cell.
 
int numDim_
 The dimensionality of our vector-valued fields.
 
std::string basisName_
 The name of the basis we're using.
 
std::size_t basisIndex_
 The index in the Workset bases for our particular BasisIRLayout name.
 
PHX::MDField< const double, panzer::Cell, panzer::BASIS, panzer::IP, panzer::Dimbasis_
 The vector basis information necessary for integration.
 
PHX::View< ScalarT * > tmp_
 Scratch space for caching temporary values in the kokkos kernel.
 

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
 

Detailed Description

template<typename EvalT, typename Traits>
class panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >

Computes $ \int (a(x)\cdots\vec{s}(x))\cdot\vec{\phi}(x)\,dx
       $.

Evaluates the integral

\[
  \int (a(x)\cdots\vec{s}(x))\cdot\vec{\phi}(x)\,dx,
\]

where $ a(x) $ is a tensor valued field that depends on position, $ \vec{s} $ is some vector- valued function, and $ \vec{\phi} $ is some vector basis.

Definition at line 81 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

Member Typedef Documentation

◆ ScalarT

template<typename EvalT , typename Traits >
using panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::ScalarT = typename EvalT::ScalarT
private

The scalar type.

Definition at line 265 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

Constructor & Destructor Documentation

◆ Integrator_BasisTimesTensorTimesVector() [1/3]

template<typename EvalT , typename Traits >
panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::Integrator_BasisTimesTensorTimesVector ( const panzer::EvaluatorStyle & evalStyle,
const std::string & resName,
const std::string & valName,
const panzer::BasisIRLayout & basis,
const panzer::IntegrationRule & ir,
const std::string & tensorName )

Main Constructor.

Creates an Evaluator to evaluate the integral

\[
  \int (a(x)\cdots\vec{s}(x))\cdot\vec{\phi}(x)\,dx,
\]

where $ a(x) $ is a tensor valued field that depends on position, $ \vec{s} $ is some vector- valued function, and $ \vec{\phi} $ is some vector basis.

Parameters
[in]evalStyleAn enum declaring the behavior of this Evaluator, which is to either:
  • compute and contribute (CONTRIBUTES), or
  • compute and store (EVALUATES).
[in]resNameThe name of either the contributed or evaluated field, depending on evalStyle.
[in]valNameThe name of the vector value being integrated ( $ \vec{s} $).
[in]basisThe vector basis that you'd like to use ( $
                      \vec{\phi} $).
[in]irThe integration rule that you'd like to use.
[in]tensorNameThe tensors name ( $ a(x) $).
Exceptions
std::invalid_argumentIf any of the inputs are invalid.
std::logic_errorIf the basis supplied is not a vector basis, or if it doesn't require orientations.

Definition at line 65 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

◆ Integrator_BasisTimesTensorTimesVector() [2/3]

template<typename EvalT , typename Traits >
panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::Integrator_BasisTimesTensorTimesVector ( const Teuchos::ParameterList & p)

ParameterList Constructor.

Creates an Evaluator to evaluate the integral

\[
  \int (a(x)\cdots\vec{s}(x))\cdot\vec{\phi}(x)\,dx,
\]

where $ a(x) $ is a tensor valued field that depends on position, $ \vec{s} $ is some vector- valued function, and $ \vec{\phi} $ is some vector basis.

Note
This constructor exists to preserve the older way of creating an 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.
Parameters
[in]pA ParameterList of the form
<ParameterList>
<Parameter name = "Residual Name" type = "std::string" value = (required) />
<Parameter name = "Value 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 = "Tensor Name" type = "std::string" value = (required) />
</ParameterList>
where
  • "Residual Name" is the name for the term this Evaluator is evaluating,
  • "Value Name" is the name of the vector value being integrated ( $ \vec{s} $),
  • "Basis" is the vector basis that you'd like to use ( $ \vec{\phi} $),
  • "IR" is the integration rule that you'd like to use, and
  • "Tensor Name" is the name of the tensor field ( $ a(x) $).

Definition at line 202 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

◆ Integrator_BasisTimesTensorTimesVector() [3/3]

template<typename EvalT , typename Traits >
panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::Integrator_BasisTimesTensorTimesVector ( const panzer::EvaluatorStyle & evalStyle,
const PHX::FieldTag & resTag,
const PHX::FieldTag & valTag,
const BasisDescriptor & bd,
const IntegrationDescriptor & id,
const PHX::FieldTag & tensorTag )

Descriptor Constructor.

Creates an Evaluator to evaluate the integral

\[
  \int (a(x)\cdots\vec{s}(x))\cdot\vec{\phi}(x)\,dx,
\]

where $ a(x) $ is a tensor valued field that depends on position, $ \vec{s} $ is some vector- valued function, and $ \vec{\phi} $ is some vector basis.

Parameters
[in]evalStyleAn enum declaring the behavior of this Evaluator, which is to either:
  • compute and contribute (CONTRIBUTES), or
  • compute and store (EVALUATES).
[in]resTagThe tag of either the contributed or evaluated field, depending on evalStyle.
[in]valTagThe tag of the vector value being integrated ( $ \vec{s} $).
[in]bdThe vector basisdescripotr that you'd like to use ( $ \vec{\phi} $).
[in]idThe integration descriptor that you'd like to use.
[in]tensorTagThe tag of the tensor ( $ a(x) $).
Exceptions
std::invalid_argumentIf any of the inputs are invalid.
std::logic_errorIf the basis supplied is not a vector basis, or if it doesn't require orientations.

Definition at line 137 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

Member Function Documentation

◆ postRegistrationSetup()

template<typename EvalT , typename Traits >
void panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::postRegistrationSetup ( typename Traits::SetupData sd,
PHX::FieldManager< Traits > & fm )

Post-Registration Setup.

Sets the PHX::Views for all the of the field multipliers, sets the number of quadrature points and dimensions in our vector field, and sets the basis index.

Parameters
[in]sdEssentially a list of Worksets, which are collections of cells (elements) that all live on a single process.
[in]fmThis is unused, though part of the interface.

Definition at line 229 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

◆ evaluateFields()

template<typename EvalT , typename Traits >
void panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::evaluateFields ( typename Traits::EvalData workset)

Evaluate Fields.

This actually performs the integration by calling operator()() in a Kokkos::parallel_for over the cells in the Workset.

Parameters
[in]workesetThe Workset on which you're going to do the integration.

Definition at line 301 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

◆ operator()()

template<typename EvalT , typename Traits >
KOKKOS_INLINE_FUNCTION void panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::operator() ( const std::size_t & cell) const

Perform the integration.

Generally speaking, for a given cell in the Workset, this routine loops over quadrature points, vector dimensions, and bases to perform the integration, scaling the vector field to be integrated by the tensor ( $ a(x) $).

Parameters
[in]tagAn indication of the number of field multipliers we have; either 0, 1, or something else.
[in]cellThe cell in the Workset over which to integrate.

Definition at line 266 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

◆ getValidParameters()

template<typename EvalT , typename Traits >
Teuchos::RCP< Teuchos::ParameterList > panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::getValidParameters ( ) const
private

Get Valid Parameters.

Get all the parameters that we support such that the ParameterList Constructor can do some validation of the input ParameterList.

Returns
A ParameterList with all the valid parameters (keys) in it. The values tied to those keys are meaningless default values.

Definition at line 325 of file Panzer_Integrator_BasisTimesTensorTimesVector_impl.hpp.

Member Data Documentation

◆ evalStyle_

template<typename EvalT , typename Traits >
const panzer::EvaluatorStyle panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::evalStyle_
private

An enum determining the behavior of this Evaluator.

This Evaluator will compute the result of its integration and then:

  • CONTRIBUTES: contribute it to a specified residual, not saving anything; or
  • EVALUATES: save it under a specified name for future use.

Definition at line 275 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ useDescriptors_

template<typename EvalT , typename Traits >
bool panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::useDescriptors_
private

A flag indicating whether or not to use the descriptor interface.

Definition at line 281 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ bd_

template<typename EvalT , typename Traits >
BasisDescriptor panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::bd_
private

The BasisDescriptor for the basis to use.

Definition at line 286 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ id_

template<typename EvalT , typename Traits >
IntegrationDescriptor panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::id_
private

The IntegrationDescriptor for the quadrature to use.

Definition at line 291 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ field_

template<typename EvalT , typename Traits >
PHX::MDField<ScalarT, panzer::Cell, panzer::BASIS> panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::field_
private

A field to which we'll contribute, or in which we'll store, the result of computing this integral.

Definition at line 297 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ vector_

template<typename EvalT , typename Traits >
PHX::MDField<const ScalarT, panzer::Cell, panzer::IP, panzer::Dim> panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::vector_
private

A field representing the vector-valued function we're integrating ( $ \vec{s} $).

Definition at line 304 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ tensor_

template<typename EvalT , typename Traits >
PHX::MDField<const ScalarT, panzer::Cell, panzer::IP, panzer::Dim, panzer::Dim> panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::tensor_
private

The tensor field( $ a(x) $).

Definition at line 310 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ kokkosTensor_

template<typename EvalT , typename Traits >
PHX::View<const ScalarT****> panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::kokkosTensor_
private

The PHX::View representation of the tensor fields that are multiplied out in front of the integral ( $ a(x) $).

Definition at line 316 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ numQP_

template<typename EvalT , typename Traits >
int panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::numQP_
private

The number of quadrature points for each cell.

Definition at line 322 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ numDim_

template<typename EvalT , typename Traits >
int panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::numDim_
private

The dimensionality of our vector-valued fields.

Definition at line 327 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ basisName_

template<typename EvalT , typename Traits >
std::string panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::basisName_
private

The name of the basis we're using.

Definition at line 332 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ basisIndex_

template<typename EvalT , typename Traits >
std::size_t panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::basisIndex_
private

The index in the Workset bases for our particular BasisIRLayout name.

Definition at line 338 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ basis_

template<typename EvalT , typename Traits >
PHX::MDField<const double, panzer::Cell, panzer::BASIS, panzer::IP, panzer::Dim> panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::basis_
private

The vector basis information necessary for integration.

Definition at line 344 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.

◆ tmp_

template<typename EvalT , typename Traits >
PHX::View<ScalarT*> panzer::Integrator_BasisTimesTensorTimesVector< EvalT, Traits >::tmp_
private

Scratch space for caching temporary values in the kokkos kernel.

Definition at line 347 of file Panzer_Integrator_BasisTimesTensorTimesVector.hpp.


The documentation for this class was generated from the following files: