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<VectorDouble>,
148 boost::shared_ptr<VectorDouble>>
154 std::pair<boost::shared_ptr<MatrixDouble>,
155 boost::shared_ptr<MatrixDouble>>
176 const std::string finite_element,
177 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
202 const std::string problem,
const std::string finite_element,
203 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
205 BitRefLevel mask, boost::shared_ptr<CacheTuple> cache_ptr,
213 buildTreeImpl(boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
219 const double *
const point,
const double distance,
220 const std::string problem,
const std::string finite_element,
221 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
229 const std::string finite_element,
230 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
237 boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
242 boost::shared_ptr<SetIntegrationPtsMethodData> spd_ptr,
247 const double *
const point,
const double distance,
const std::string problem,
248 const std::string finite_element,
249 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
251 boost::shared_ptr<CacheTuple> cache_ptr,
MoFEMTypes bh,
256 const double *
const point,
const double distance,
const std::string problem,
257 const std::string finite_element,
258 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
260 boost::shared_ptr<CacheTuple> cache_ptr,
MoFEMTypes bh,
267 const std::string finite_element,
268 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
276 const std::string finite_element,
277 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr,
int lower_rank,
296 boost::shared_ptr<MoFEM::ForcesAndSourcesCore> fe_method_ptr,
297 const double *eval_points,
const int nb_eval_points,
const double eps,
300 void setEvalPoints(
const double *ptr,
const int nb_eval_points);
323 boost::shared_ptr<SetIntegrationPtsMethodData> data_ptr);
325 int order_col,
int order_data);
328 boost::weak_ptr<SetIntegrationPtsMethodData>
dataPtr;
331template <
typename VE,
typename SPD,
typename SP>
332boost::shared_ptr<SPD>
337 boost::scoped_ptr<VE> elePtr;
338 boost::scoped_ptr<SPD> setPtsDataPtr;
339 boost::scoped_ptr<SP> setPtsPtr;
341 boost::shared_ptr<PackData> pack_data(
new PackData());
343 pack_data->elePtr.reset(
new VE(m_field));
345 pack_data->setPtsDataPtr.reset(
346 new SPD(boost::shared_ptr<VE>(pack_data, pack_data->elePtr.get()), ptr,
347 nb_eval_points,
eps, verb));
348 pack_data->setPtsPtr.reset(
new SP(
349 boost::shared_ptr<SPD>(pack_data, pack_data->setPtsDataPtr.get())));
350 pack_data->elePtr->setRuleHook = boost::ref(*pack_data->setPtsPtr);
351 boost::shared_ptr<SPD> data(pack_data, pack_data->setPtsDataPtr.get());
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.
MatrixDouble shapeFunctions
void setEvalPoints(const double *ptr, const int nb_eval_points)
SetIntegrationPtsMethodData()=delete
friend FieldEvaluatorInterface
boost::scoped_ptr< AdaptiveKDTree > treePtr
std::vector< EntityHandle > evalPointEntityHandle
boost::weak_ptr< MoFEM::ForcesAndSourcesCore > feMethodPtr
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 actbitray position.
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
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 actbitray position.
ForcesAndSourcesCore::UserDataOperator * getDataOperatorImpl(VecDataPts vec_data_pts, 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)
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 buildTree(boost::shared_ptr< SetIntegrationPtsMethodData > spd_ptr, const std::string finite_element, BitRefLevel bit, BitRefLevel mask)
Build spatial tree.
ForcesAndSourcesCore::UserDataOperator * getDataOperator(VecDataPts vec_data_pts, 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)
Evaluate field values at integration points of finite elements to which operator is pushed.
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)
std::vector< std::pair< boost::shared_ptr< VectorDouble >, boost::shared_ptr< VectorDouble > > > VecDataPts
structure to get information from mofem into EntitiesFieldData
base class for all interface classes