10#ifndef __FIELD_EVALUATOR_HPP__
11 #define __FIELD_EVALUATOR_HPP__
58 boost::shared_ptr<SPD>
59 getData(
const double *ptr =
nullptr,
const int nb_eval_points = 0,
70 buildTree(boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
71 const std::string finite_element) {
85 buildTree(boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
135 const std::string problem,
const std::string finite_element,
136 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
137 int lower_rank,
int upper_rank,
138 boost::shared_ptr<CacheTuple> cache_ptr,
140 return evalFEAtThePoint<D>(point,
distance, problem, finite_element,
147 std::pair<boost::shared_ptr<MatrixDouble>,
148 boost::shared_ptr<MatrixDouble>>
173 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
199 const std::string problem,
const std::string finite_element,
200 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
202 BitRefLevel mask, boost::shared_ptr<CacheTuple> cache_ptr,
212 const std::vector<std::array<double, 3>> &
points,
double distance,
213 const std::string &problem,
const std::string &finite_element,
214 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
216 boost::shared_ptr<CacheTuple> cache_ptr,
225 buildTreeImpl(boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
231 const double *
const point,
const double distance,
232 const std::string problem,
const std::string finite_element,
233 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
240 const std::vector<std::array<double, 3>> &
points,
double distance,
241 const std::string &problem,
const std::string &finite_element,
242 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
244 boost::shared_ptr<CacheTuple> cache_ptr,
251 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
260 boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
265 boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
270 const double *
const point,
const double distance,
const std::string problem,
271 const std::string finite_element,
272 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
274 boost::shared_ptr<CacheTuple> cache_ptr,
MoFEMTypes bh,
279 const double *
const point,
const double distance,
const std::string problem,
280 const std::string finite_element,
281 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
283 boost::shared_ptr<CacheTuple> cache_ptr,
MoFEMTypes bh,
288 const std::vector<std::array<double, 3>> &
points,
double distance,
289 const std::string &problem,
const std::string &finite_element,
290 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
292 boost::shared_ptr<CacheTuple> cache_ptr,
298 const std::vector<std::array<double, 3>> &
points,
double distance,
299 const std::string &problem,
const std::string &finite_element,
300 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
302 boost::shared_ptr<CacheTuple> cache_ptr,
308FieldEvaluatorInterface::getDataOperator<2>(
310 const std::string finite_element,
311 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
317FieldEvaluatorInterface::getDataOperator<3>(
319 const std::string finite_element,
320 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
338 boost::shared_ptr<MoFEM::ForcesAndSourcesCore> fe_method_ptr,
339 const double *eval_points,
const int nb_eval_points,
const double eps,
342 void setEvalPoints(
const double *ptr,
const int nb_eval_points);
365 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr);
367 int order_col,
int order_data);
370 boost::weak_ptr<SetIntegrationPtsMethodData>
dataPtr;
377template <
typename VE,
typename SPD,
typename SP>
378boost::shared_ptr<SPD>
382 auto ve_method_ptr = boost::make_shared<VE>(m_field);
384 boost::make_shared<SPD>(ve_method_ptr, ptr, nb_eval_points,
eps, verb);
385 ve_method_ptr->setRuleHook = SP(spd_ptr);
const std::vector< Vec > * points
VERBOSITY_LEVELS
Verbosity levels.
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
implementation of Data Operators for Forces and Sources
Deprecated interface functions.
boost::shared_ptr< MoFEM::ForcesAndSourcesCore > feMethodPtr
MatrixDouble shapeFunctions
void setEvalPoints(const double *ptr, const int nb_eval_points)
SetIntegrationPtsMethodData()=delete
boost::shared_ptr< AdaptiveKDTree > treePtr
friend FieldEvaluatorInterface
std::vector< EntityHandle > evalPointEntityHandle
const double * evalPoints
SetIntegrationPtsMethod()=delete
MoFEMErrorCode operator()(ForcesAndSourcesCore *fe_raw_ptr, int order_row, int order_col, int order_data)
boost::weak_ptr< SetIntegrationPtsMethodData > dataPtr
Field evaluator interface.
MoFEMErrorCode evalFEAtThePoint(const double *const point, const double distance, const std::string problem, const std::string finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, boost::shared_ptr< CacheTuple > cache_ptr, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET)
Evaluate field at arbitrary position.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
MoFEMErrorCode evalFEAtPointsImpl(const std::vector< std::array< double, 3 > > &points, double distance, const std::string &problem, const std::string &finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, BitRefLevel bit, BitRefLevel mask, boost::shared_ptr< CacheTuple > cache_ptr, const PointGroupCallback &on_element, MoFEMTypes bh, VERBOSITY_LEVELS verb)
MoFEMErrorCode evalFEAtThePoint(const double *const point, const double distance, const std::string problem, const std::string finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, BitRefLevel bit, BitRefLevel mask, boost::shared_ptr< CacheTuple > cache_ptr, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET)
Evaluate field at arbitrary position.
boost::function< MoFEMErrorCode(const std::vector< size_t > &)> PointGroupCallback
std::vector< std::pair< boost::shared_ptr< MatrixDouble >, boost::shared_ptr< MatrixDouble > > > MatDataPts
boost::shared_ptr< SPD > getData(const double *ptr=nullptr, const int nb_eval_points=0, const double eps=1e-12, VERBOSITY_LEVELS verb=QUIET)
Get the Data object.
MoFEMErrorCode buildTreeImpl(boost::shared_ptr< SetIntegrationPtsMethodData > spd_ptr, const std::string finite_element, BitRefLevel bit, BitRefLevel mask)
MoFEMErrorCode buildTree(boost::shared_ptr< SetIntegrationPtsMethodData > spd_ptr, const std::string finite_element)
Build spatial tree.
MoFEMErrorCode evalFEAtPoints(const std::vector< std::array< double, 3 > > &points, double distance, const std::string &problem, const std::string &finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, BitRefLevel bit, BitRefLevel mask, boost::shared_ptr< CacheTuple > cache_ptr, const PointGroupCallback &on_element, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET)
MoFEMErrorCode buildTree(boost::shared_ptr< SetIntegrationPtsMethodData > spd_ptr, const std::string finite_element, BitRefLevel bit, BitRefLevel mask)
Build spatial tree.
MoFEMErrorCode evalFEAtThePointImpl(const double *const point, const double distance, const std::string problem, const std::string finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, BitRefLevel bit, BitRefLevel mask, boost::shared_ptr< CacheTuple > cache_ptr, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET)
ForcesAndSourcesCore::UserDataOperator * getDataOperatorImpl(MatDataPts mat_data_pts, const std::string finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, BitRefLevel bit, BitRefLevel mask, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET, DataLayout data_layout=DataLayout::GaussByCoeffs)
ForcesAndSourcesCore::UserDataOperator * getDataOperator(MatDataPts mat_data_pts, const std::string finite_element, boost::shared_ptr< SetIntegrationPtsMethodData > data_ptr, int lower_rank, int upper_rank, BitRefLevel bit, BitRefLevel mask, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET, DataLayout data_layout=DataLayout::GaussByCoeffs)
Evaluate field values at integration points of finite elements to which operator is pushed.
structure to get information from mofem into EntitiesFieldData
base class for all interface classes