11 #ifndef PANZER_BASIS_VALUES2_HPP
12 #define PANZER_BASIS_VALUES2_HPP
16 #include "Intrepid2_Basis.hpp"
17 #include "Intrepid2_Orientation.hpp"
25 class OrientationsInterface;
67 template <
typename Scalar>
71 using IntrepidBasis = Intrepid2::Basis<PHX::Device::execution_space,Scalar,Scalar>;
102 const bool allocArrays=
false,
103 const bool buildWeighted=
false);
107 bool computeDerivatives=
true);
113 const int in_num_cells = -1);
121 bool use_node_coordinates=
true,
122 const int in_num_cells = -1);
135 bool use_node_coordinates=
true,
136 const int in_num_cells = -1);
145 bool use_node_coordinates=
true,
146 const int in_num_cells = -1);
155 const int in_num_cells = -1);
209 std::vector<PHX::index_size_type>
ddims_;
215 const int in_num_cells = -1);
308 const int num_evaluated_cells = -1);
329 const int num_evaluated_cells = -1);
333 setOrientations(
const std::vector<Intrepid2::Orientation> & orientations,
334 const int num_orientations_cells = -1);
359 const std::vector<PHX::index_size_type> &
379 const bool force =
false)
const;
394 const bool force =
false)
const;
409 const bool force =
false)
const;
424 const bool force =
false)
const;
440 const bool force =
false)
const;
456 const bool force =
false)
const;
472 const bool force =
false)
const;
486 const bool force =
false)
const;
501 const bool cache =
true,
502 const bool force =
false)
const;
517 const bool cache =
true,
518 const bool force =
false)
const;
533 const bool cache =
true,
534 const bool force =
false)
const;
550 const bool cache =
true,
551 const bool force =
false)
const;
567 const bool cache =
true,
568 const bool force =
false)
const;
584 const bool cache =
true,
585 const bool force =
false)
const;
Array_CellBasisIPDim weighted_curl_basis_vector
void setOrientations(const std::vector< Intrepid2::Orientation > &orientations, const int num_orientations_cells=-1)
Set the orientations object for applying orientations using the lazy evaluation path - required for c...
Teuchos::RCP< IntrepidBasis > intrepid_basis
bool grad_basis_evaluated_
ConstArray_BasisIP getCurl2DVectorBasisRef(const bool cache=true, const bool force=false) const
Get the curl of a vector basis evaluated at reference points.
void setCellVertexCoordinates(PHX::MDField< Scalar, Cell, NODE, Dim > vertex_coordinates)
Array_BasisIP basis_ref_scalar
bool basis_ref_vector_evaluated_
Array_BasisIPDim curl_basis_ref_vector
void evaluateValuesCV(const PHX::MDField< Scalar, Cell, IP, Dim > &cell_cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim > &jac, const PHX::MDField< Scalar, Cell, IP > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim > &jac_inv)
PHX::MDField< const Scalar, Cell, BASIS, IP > ConstArray_CellBasisIP
bool basis_ref_scalar_evaluated_
Used to check if arrays have been cached.
bool curl_basis_ref_scalar_evaluated_
ConstArray_BasisIPDim getVectorBasisValuesRef(const bool cache=true, const bool force=false) const
Get the vector basis values evaluated at reference points.
bool orientations_applied_
bool weighted_curl_basis_scalar_evaluated_
bool hasUniformReferenceSpace() const
Check if reference point space is uniform across all cells (faster evaluation)
PHX::MDField< const Scalar, Cell, IP > cubature_weights_
Array_CellBasisIPDim curl_basis_vector
PHX::MDField< const Scalar, IP, Dim > cubature_points_uniform_ref_
ConstArray_BasisIP getBasisValuesRef(const bool cache=true, const bool force=false) const
Get the basis values evaluated at reference points.
panzer::BasisDescriptor getBasisDescriptor() const
Return the basis descriptor.
ConstArray_CellBasisIPDim getCurlVectorBasis(const bool weighted, const bool cache=true, const bool force=false) const
Get the curl of a 3D vector basis evaluated at mesh points.
PHX::MDField< const Scalar, Cell, IP, Dim, Dim > cubature_jacobian_inverse_
Array_CellBasisIP weighted_basis_scalar
bool curl_basis_vector_evaluated_
PHX::MDField< const Scalar, Cell, IP, Dim > cubature_points_ref_
PHX::MDField< const Scalar > ConstArrayDynamic
bool weighted_basis_vector_evaluated_
PHX::MDField< const Scalar, Cell, BASIS, Dim > ConstArray_CellBasisDim
Teuchos::RCP< const shards::CellTopology > cell_topology_
Array_CellBasisIP basis_scalar
std::vector< Intrepid2::Orientation > orientations_
Array_CellBasisIP div_basis
bool weighted_grad_basis_evaluated_
void applyOrientations(const PHX::MDField< const Scalar, Cell, BASIS > &orientations)
Method to apply orientations to a basis values container.
void setExtendedDimensions(const std::vector< PHX::index_size_type > &ddims)
PHX::MDField< Scalar, Cell, BASIS, IP > Array_CellBasisIP
PHX::MDField< Scalar, Cell, BASIS, IP, Dim > Array_CellBasisIPDim
Array_CellBasisIPDim basis_vector
PHX::MDField< const Scalar, BASIS, IP > ConstArray_BasisIP
PHX::MDField< Scalar, Cell, BASIS, Dim > Array_CellBasisDim
bool basis_coordinates_evaluated_
PHX::MDField< const Scalar, Cell, IP, Dim, Dim > cubature_jacobian_
const std::vector< PHX::index_size_type > & getExtendedDimensions() const
Get the extended dimensions used by sacado AD allocations.
PHX::MDField< const Scalar, Cell, IP > cubature_jacobian_determinant_
int num_orientations_cells_
Array_BasisIPDim basis_ref_vector
bool weighted_div_basis_evaluated_
ConstArray_CellBasisIP getBasisValues(const bool weighted, const bool cache=true, const bool force=false) const
Get the basis values evaluated at mesh points.
std::vector< PHX::index_size_type > ddims_
ArrayTraits< Scalar, PHX::MDField< Scalar > >::size_type size_type
void setup(const Teuchos::RCP< const panzer::BasisIRLayout > &basis, PHX::MDField< const Scalar, Cell, IP, Dim > reference_points, PHX::MDField< const Scalar, Cell, IP, Dim, Dim > point_jacobian, PHX::MDField< const Scalar, Cell, IP > point_jacobian_determinant, PHX::MDField< const Scalar, Cell, IP, Dim, Dim > point_jacobian_inverse, const int num_evaluated_cells=-1)
Setup for lazy evaluation for non-uniform point layout.
ConstArray_CellBasisDim getBasisCoordinates(const bool cache=true, const bool force=false) const
Carterisan coordinates for basis coefficients in mesh space.
Teuchos::RCP< const panzer::BasisIRLayout > basis_layout
PureBasis::EElementSpace getElementSpace() const
bool references_evaluated
ConstArray_BasisIP getDivVectorBasisRef(const bool cache=true, const bool force=false) const
Get the divergence of a vector basis evaluated at reference points.
Array_CellBasisIP weighted_curl_basis_scalar
Array_BasisIP div_basis_ref
Array_CellBasisDim basis_coordinates
Array_CellBasisIPDim weighted_grad_basis
Array_CellBasisIPDim weighted_basis_vector
ConstArray_CellBasisIP getDivVectorBasis(const bool weighted, const bool cache=true, const bool force=false) const
Get the divergence of a vector basis evaluated at mesh points.
void setupArrays(const Teuchos::RCP< const panzer::BasisIRLayout > &basis, bool computeDerivatives=true)
Sizes/allocates memory for arrays.
PHX::MDField< const Scalar, Cell, BASIS, IP, Dim > ConstArray_CellBasisIPDim
Intrepid2::Basis< PHX::Device::execution_space, Scalar, Scalar > IntrepidBasis
bool basis_scalar_evaluated_
PHX::MDField< const Scalar, BASIS, IP, Dim > ConstArray_BasisIPDim
ConstArray_CellBasisIPDim getVectorBasisValues(const bool weighted, const bool cache=true, const bool force=false) const
Get the vector basis values evaluated at mesh points.
ConstArray_BasisIPDim getCurlVectorBasisRef(const bool cache=true, const bool force=false) const
Get the curl of a vector basis evaluated at reference points.
BasisValues2(const std::string &prefix="", const bool allocArrays=false, const bool buildWeighted=false)
Main constructor.
bool orientationsApplied() const
ConstArray_BasisDim getBasisCoordinatesRef(const bool cache=true, const bool force=false) const
Get the reference coordinates for basis.
void evaluateBasisCoordinates(const PHX::MDField< Scalar, Cell, NODE, Dim > &node_coordinates, const int in_num_cells=-1)
bool basis_coordinates_ref_evaluated_
Array_CellBasisIPDim grad_basis
PHX::MDField< Scalar, BASIS, IP, Dim > Array_BasisIPDim
Array_CellBasisIP weighted_div_basis
PHX::MDField< Scalar, BASIS, Dim > Array_BasisDim
Array_BasisDim basis_coordinates_ref
bool curl_basis_ref_vector_evaluated_
Array_BasisIP curl_basis_ref_scalar
void setupUniform(const Teuchos::RCP< const panzer::BasisIRLayout > &basis, PHX::MDField< const Scalar, IP, Dim > reference_points, PHX::MDField< const Scalar, Cell, IP, Dim, Dim > point_jacobian, PHX::MDField< const Scalar, Cell, IP > point_jacobian_determinant, PHX::MDField< const Scalar, Cell, IP, Dim, Dim > point_jacobian_inverse, const int num_evaluated_cells=-1)
Setup for lazy evaluation for uniform point layout.
bool grad_basis_ref_evaluated_
PHX::MDField< const Scalar, BASIS, Dim > ConstArray_BasisDim
PHX::MDField< const Scalar, Cell, NODE, Dim > cell_node_coordinates_
void setCellNodeCoordinates(PHX::MDField< Scalar, Cell, NODE, Dim > node_coordinates)
Set the cell node coordinates (required for getBasisCoordinates())
bool weighted_curl_basis_vector_evaluated_
void evaluateValues(const PHX::MDField< Scalar, IP, Dim > &cub_points, const PHX::MDField< Scalar, Cell, IP, Dim, Dim > &jac, const PHX::MDField< Scalar, Cell, IP > &jac_det, const PHX::MDField< Scalar, Cell, IP, Dim, Dim > &jac_inv, const int in_num_cells=-1)
ConstArray_CellBasisIPDim getGradBasisValues(const bool weighted, const bool cache=true, const bool force=false) const
Get the gradient of the basis evaluated at mesh points.
void setWeightedMeasure(PHX::MDField< const Scalar, Cell, IP > weighted_measure)
Set the cubature weights (weighted measure) for the basis values object - required to get weighted ba...
bool curl_basis_scalar_evaluated_
PHX::MDField< Scalar, BASIS, IP > Array_BasisIP
ConstArray_CellBasisIP getCurl2DVectorBasis(const bool weighted, const bool cache=true, const bool force=false) const
Get the curl of a 2D vector basis evaluated at mesh points.
bool basis_vector_evaluated_
Array_BasisIPDim grad_basis_ref
ConstArray_BasisIPDim getGradBasisValuesRef(const bool cache=true, const bool force=false) const
Get the gradient of the basis evaluated at reference points.
bool div_basis_ref_evaluated_
Array_CellBasisIP curl_basis_scalar
PHX::MDField< Scalar > ArrayDynamic
bool div_basis_evaluated_
bool weighted_basis_scalar_evaluated_