26#ifndef FEEvaluationWrapper_h
27#define FEEvaluationWrapper_h
29#include <boost/preprocessor.hpp>
33#include <deal.II/matrix_free/matrix_free.h>
34#include <deal.II/matrix_free/fe_evaluation.h>
45 dealii::LinearAlgebra::distributed::Vector<T,
46 dealii::MemorySpace::Host>;
60 reinit(
const unsigned int macrocell) = 0;
78 evaluate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags) = 0;
82 dealii::VectorizedArray<double> &alpha) = 0;
90 dealii::VectorizedArray<double> &alpha) = 0;
97 dealii::AlignedVector<dealii::VectorizedArray<double>> &alpha) = 0;
101 const dealii::VectorizedArray<double> &scaling,
102 dealii::AlignedVector<
103 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>> &alpha) = 0;
107 dealii::AlignedVector<
108 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>> &alpha) = 0;
112 dealii::AlignedVector<dealii::VectorizedArray<double>> &alpha) = 0;
115 virtual dealii::VectorizedArray<double>
120 const dealii::VectorizedArray<double> &value) = 0;
125 double * outputVector) = 0;
130 double * outputVector) = 0;
135 double * outputVector) = 0;
140 const dealii::VectorizedArray<double> &scaleValues,
141 const bool scaleValuesFlag,
142 const dealii::VectorizedArray<double> &scaleGradients,
143 const bool scaleGradientsFlag) = 0;
146 integrate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags) = 0;
148 virtual dealii::Point<3, dealii::VectorizedArray<double>>
153 dealii::AlignedVector<dealii::VectorizedArray<double>> &tempVec) = 0;
159 template <
int FEOrder,
160 unsigned int num_1d_quadPoints,
161 unsigned int n_components>
166 const dealii::MatrixFree<3, double> &matrixFreeData,
167 const unsigned int matrixFreeVectorComponent,
168 const unsigned int matrixFreeQuadratureComponent);
173 dealii::FEEvaluation<3, FEOrder, num_1d_quadPoints, n_components>>
181 reinit(
const unsigned int macrocell)
override;
190 evaluate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags)
override;
194 dealii::VectorizedArray<double> &alpha)
override;
202 dealii::VectorizedArray<double> &alpha)
override;
209 dealii::AlignedVector<dealii::VectorizedArray<double>> &alpha)
override;
212 submitValues(
const dealii::VectorizedArray<double> &scaling,
213 dealii::AlignedVector<
214 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>>
219 dealii::Tensor<1, 3, dealii::VectorizedArray<double>>>
224 dealii::AlignedVector<dealii::VectorizedArray<double>> &alpha)
override;
226 dealii::VectorizedArray<double>
231 const unsigned int iQuadPoint,
232 const dealii::VectorizedArray<double> &value)
override;
234 dealii::Point<3, dealii::VectorizedArray<double>>
240 double *outputVector)
override;
245 double * outputVector)
override;
250 double * outputVector)
override;
254 const dealii::VectorizedArray<double> &scaleValues,
255 const bool scaleValuesFlag,
256 const dealii::VectorizedArray<double> &scaleGradients,
257 const bool scaleGradientsFlag)
override;
261 dealii::EvaluationFlags::EvaluationFlags evaluateFlags)
override;
264 getValues(dealii::AlignedVector<dealii::VectorizedArray<double>> &tempVec)
273 template <
unsigned int numberOfComponents>
288 unsigned int fe_degree,
289 unsigned int num_1d_quad,
290 const dealii::MatrixFree<3, double> &matrixFreeData,
291 const unsigned int matrixFreeVectorComponent,
292 const unsigned int matrixFreeQuadratureComponent);
Definition: DealiiFEEvaluationWrapper.h:275
~DealiiFEEvaluationWrapper()
Definition: DealiiFEEvaluationWrapper.cpp:526
const dealii::MatrixFree< 3, double > * d_matrix_free_data
Definition: DealiiFEEvaluationWrapper.h:306
unsigned int d_matrixFreeVectorComponent
Definition: DealiiFEEvaluationWrapper.h:302
FEEvaluationWrapperBase & getFEEvaluationWrapperBase() const
Definition: DealiiFEEvaluationWrapper.cpp:536
unsigned int d_matrixFreeQuadratureComponent
Definition: DealiiFEEvaluationWrapper.h:303
std::unique_ptr< FEEvaluationWrapperBase > d_feEvaluationBase
Definition: DealiiFEEvaluationWrapper.h:305
unsigned int d_num1dQuad
Definition: DealiiFEEvaluationWrapper.h:301
unsigned int d_feDegree
Definition: DealiiFEEvaluationWrapper.h:300
Definition: DealiiFEEvaluationWrapper.h:41
virtual dealii::Point< 3, dealii::VectorizedArray< double > > getQuadraturePoint(const unsigned int iQuadPoint)=0
virtual void submitValueAtQuadpoint(const unsigned int iQuadPoint, const dealii::VectorizedArray< double > &value)=0
virtual void readDoFValuesPlain(const distributedCPUVec< double > &tempvec)=0
Calls dealii::FEEvaluation::read_dofs_values_plain.
virtual void alphaTimesQuadValuesPlusYFromSubCell(const unsigned int subCellIndex, const double alpha, double *outputVector)=0
virtual void getQuadHessianForSubCell(const unsigned int subCellIndex, const double alpha, double *outputVector)=0
virtual void submitInterpolatedValuesAndMultiplySquared()=0
virtual unsigned int totalNumberofQuadraturePoints()=0
Returns the total number of quadrature points in all 3 directions.
dealii::LinearAlgebra::distributed::Vector< T, dealii::MemorySpace::Host > distributedCPUVec
Definition: DealiiFEEvaluationWrapper.h:46
virtual void submitValues(const dealii::VectorizedArray< double > &scaling, dealii::AlignedVector< dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > > &alpha)=0
virtual void readDoFValues(const distributedCPUVec< double > &tempvec)=0
Calls dealii::FEEvaluation::read_dof_values.
virtual void integrate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags)=0
virtual void getValues(dealii::AlignedVector< dealii::VectorizedArray< double > > &tempVec)=0
virtual dealii::VectorizedArray< double > integrateValue()=0
virtual void submitInterpolatedValuesSubmitInterpolatedGradients(const dealii::VectorizedArray< double > &scaleValues, const bool scaleValuesFlag, const dealii::VectorizedArray< double > &scaleGradients, const bool scaleGradientsFlag)=0
virtual void reinit(const unsigned int macrocell)=0
reinits the dealii::FEEvaluation object for the macrocellIndex
virtual void submitInterpolatedValuesAndMultiply(dealii::VectorizedArray< double > &alpha)=0
virtual void submitInterpolatedValuesAndMultiply(dealii::AlignedVector< dealii::VectorizedArray< double > > &alpha)=0
virtual void getQuadGradientsForSubCell(const unsigned int subCellIndex, const double alpha, double *outputVector)=0
virtual void distributeLocalToGlobal(distributedCPUVec< double > &tempvec)=0
virtual void submitValues(dealii::AlignedVector< dealii::VectorizedArray< double > > &alpha)=0
virtual void submitGradients(dealii::AlignedVector< dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > > &alpha)=0
virtual ~FEEvaluationWrapperBase()=0
Definition: DealiiFEEvaluationWrapper.cpp:57
virtual void submitInterpolatedGradientsAndMultiply(dealii::VectorizedArray< double > &alpha)=0
virtual void evaluate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags)=0
Calls the dealii::FEEvaluation::evaluate.
Definition: DealiiFEEvaluationWrapper.h:163
void submitGradients(dealii::AlignedVector< dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > > &alpha) override
Definition: DealiiFEEvaluationWrapper.cpp:257
void submitInterpolatedValuesAndMultiply(dealii::VectorizedArray< double > &alpha) override
Definition: DealiiFEEvaluationWrapper.cpp:128
void distributeLocalToGlobal(distributedCPUVec< double > &tempvec) override
Definition: DealiiFEEvaluationWrapper.cpp:451
void submitInterpolatedGradientsAndMultiply(dealii::VectorizedArray< double > &alpha) override
Definition: DealiiFEEvaluationWrapper.cpp:113
void submitInterpolatedValuesSubmitInterpolatedGradients(const dealii::VectorizedArray< double > &scaleValues, const bool scaleValuesFlag, const dealii::VectorizedArray< double > &scaleGradients, const bool scaleGradientsFlag) override
Definition: DealiiFEEvaluationWrapper.cpp:193
void submitValues(const dealii::VectorizedArray< double > &scaling, dealii::AlignedVector< dealii::Tensor< 1, 3, dealii::VectorizedArray< double > > > &alpha) override
Definition: DealiiFEEvaluationWrapper.cpp:176
std::unique_ptr< dealii::FEEvaluation< 3, FEOrder, num_1d_quadPoints, n_components > > d_dealiiFEEvaluation
Definition: DealiiFEEvaluationWrapper.h:174
dealii::Point< 3, dealii::VectorizedArray< double > > getQuadraturePoint(const unsigned int iQuadPoint) override
Definition: DealiiFEEvaluationWrapper.cpp:441
~FEEvaluationWrapperDerived()
Definition: DealiiFEEvaluationWrapper.cpp:52
void getQuadHessianForSubCell(const unsigned int subCellIndex, const double alpha, double *outputVector) override
Definition: DealiiFEEvaluationWrapper.cpp:328
void submitInterpolatedValuesAndMultiplySquared() override
Definition: DealiiFEEvaluationWrapper.cpp:143
void readDoFValuesPlain(const distributedCPUVec< double > &tempvec) override
Calls dealii::FEEvaluation::read_dofs_values_plain.
Definition: DealiiFEEvaluationWrapper.cpp:93
void reinit(const unsigned int macrocell) override
reinits the dealii::FEEvaluation object for the macrocellIndex
Definition: DealiiFEEvaluationWrapper.cpp:75
unsigned int totalNumberofQuadraturePoints() override
Returns the total number of quadrature points in all 3 directions.
Definition: DealiiFEEvaluationWrapper.cpp:65
void getValues(dealii::AlignedVector< dealii::VectorizedArray< double > > &tempVec) override
Definition: DealiiFEEvaluationWrapper.cpp:400
dealii::VectorizedArray< double > integrateValue() override
Definition: DealiiFEEvaluationWrapper.cpp:272
void alphaTimesQuadValuesPlusYFromSubCell(const unsigned int subCellIndex, const double alpha, double *outputVector) override
Definition: DealiiFEEvaluationWrapper.cpp:282
void evaluate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags) override
Calls the dealii::FEEvaluation::evaluate.
Definition: DealiiFEEvaluationWrapper.cpp:102
void submitValueAtQuadpoint(const unsigned int iQuadPoint, const dealii::VectorizedArray< double > &value) override
Definition: DealiiFEEvaluationWrapper.cpp:429
void integrate(dealii::EvaluationFlags::EvaluationFlags evaluateFlags) override
Definition: DealiiFEEvaluationWrapper.cpp:419
void getQuadGradientsForSubCell(const unsigned int subCellIndex, const double alpha, double *outputVector) override
Definition: DealiiFEEvaluationWrapper.cpp:301
void readDoFValues(const distributedCPUVec< double > &tempvec) override
Calls dealii::FEEvaluation::read_dof_values.
Definition: DealiiFEEvaluationWrapper.cpp:84
dealii includes
Definition: AtomFieldDataSpherical.cpp:31