31 #ifndef CORE_DATATYPES_VFIELD_H
32 #define CORE_DATATYPES_VFIELD_H 1
108 if (basis_order_ == -1)
111 dim.resize(1); dim[0] = 0;
112 vfdata_->resize_fdata(dim);
115 else if (basis_order_ == 0)
118 vmesh_->get_elem_dimensions(dim);
119 vfdata_->resize_fdata(dim);
121 else if (basis_order_ == 1)
124 vmesh_->get_dimensions(dim);
125 vfdata_->resize_fdata(dim);
127 else if (basis_order_ == 2)
130 vmesh_->get_dimensions(dim);
131 vfdata_->resize_fdata(dim);
132 vfdata_->resize_efdata(dim);
142 if (basis_order_ == -1) { dims.clear(); }
143 else if (basis_order_ == 0) { vmesh_->get_elem_dimensions(dims); }
144 else { vmesh_->get_dimensions(dims); }
150 if (basis_order_ == -1)
return (
false);
151 if (basis_order_ == 0)
174 { vfdata_->get_value(val,idx); }
178 { vfdata_->get_evalue(val,idx); }
180 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
182 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
184 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
186 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
188 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
190 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx)); }
192 { vfdata_->get_evalue(val,static_cast<VMesh::index_type>(idx)); }
199 { vfdata_->get_value(val,idx);
return (
true); }
201 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));
return (
true); }
203 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));
return (
true); }
205 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));
return (
true); }
207 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));
return (
true); }
209 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));
return (
true); }
211 { vfdata_->get_value(val,static_cast<VMesh::index_type>(idx));
return (
true); }
215 { vfdata_->get_weighted_value(val,idx,w,sz); }
217 { vfdata_->get_weighted_value(val,&(idx[0]),&(w[0]),idx.size()); }
219 { vfdata_->get_weighted_evalue(val,idx,w,sz); }
221 { vfdata_->get_weighted_value(val,&(idx[0]),&(w[0]),idx.size()); }
227 { vfdata_->set_value(val,idx); }
229 { vfdata_->set_evalue(val,idx); }
231 { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
233 { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
235 { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
237 { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
239 { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
241 { vfdata_->set_value(val,static_cast<VMesh::index_type>(idx)); }
243 { vfdata_->set_evalue(val,static_cast<VMesh::index_type>(idx)); }
247 {
if (!values.empty()) vfdata_->set_values(&(values[0]),values.size(),0); }
249 { vfdata_->set_values(data,sz,offset); }
251 { values.resize(vfdata_->fdata_size());
if (values.size()) vfdata_->get_values(&(values[0]),values.size(),0); }
253 { vfdata_->get_values(data,sz,offset); }
257 {
if (values.size() > 0) vfdata_->set_values(&(values[0]),nodes); }
259 {
if (values.size() > 0) vfdata_->set_values(&(values[0]),elems); }
260 template<
class T,
class ARRAY>
inline void set_values(
const std::vector<T>&
values, ARRAY& idx)
261 {
if (values.size() > 0) vfdata_->set_values(&(values[0]),&(idx[0]),static_cast<size_type>(idx.size())); }
263 { vfdata_->set_values(values,nodes); }
265 { vfdata_->set_values(values,elems); }
267 { vfdata_->set_values(values,&(idx[0]),static_cast<size_type>(idx.size())); }
270 { values.resize(nodes.size());
if (values.size() > 0) vfdata_->get_values(&(values[0]),nodes); }
272 { values.resize(elems.size());
if (values.size() > 0) vfdata_->get_values(&(values[0]),elems); }
273 template<
class T,
class ARRAY>
inline void get_values(std::vector<T>&
values, ARRAY& idx)
const
274 { values.resize(idx.size());
if (values.size() > 0) vfdata_->get_values(&(values[0]),&(idx[0]),idx.size()); }
276 { vfdata_->get_values(values,nodes); }
278 { vfdata_->get_values(values,elems); }
280 { vfdata_->get_values(values,&(idx[0]),idx.size()); }
284 { vfdata_->set_all_values(val); }
300 { vfdata_->set_all_values(static_cast<double>(0)); }
306 { vfdata_->set_evalues(&(values[0]),values.size(),0); }
308 { vfdata_->set_evalues(data,sz,offset); }
312 values.resize(vfdata_->efdata_size());
314 vfdata_->get_evalues(&(values[0]),values.size(),0);
317 { vfdata_->get_evalues(data,sz,offset); }
324 template<
class INDEX1,
class INDEX2>
331 template<
class INDEX1,
class INDEX2>
337 template<
class INDEX1,
class INDEX2>
345 template<
class INDEX1,
class INDEX2>
355 { vfdata_->copy_values(field->
vfdata_); }
358 { vfdata_->copy_evalues(field->
vfdata_); }
362 { mn = 0.0;
return(vfdata_->min(mn,idx)); }
364 inline bool min(
double& mn)
365 { mn = 0.0;
index_type idx;
return(vfdata_->min(mn,idx)); }
368 { mx = 0.0;
return(vfdata_->max(mx,idx)); }
369 inline bool max(
double& mx)
const
370 {
index_type idx; mx =0.0;
return(vfdata_->max(mx,idx)); }
378 return(vfdata_->minmax(mn,idxmn,mx,idxmx));
382 inline bool minmax(
double& mn,
double& mx)
const
388 return(vfdata_->minmax(mn,idxmn,mx,idxmx));
397 inline int dofs() {
return(element_dofs_); }
412 template<
class ARRAY,
class DATA>
416 DATA def_value)
const
419 vmesh_->get_minterpolate_weights(coords,idx,ei,basis_order_);
420 vfdata_->minterpolate(val,ei, static_cast<typename ARRAY::value_type>(def_value));
424 template<
class ARRAY>
430 vmesh_->get_minterpolate_weights(coords,idx,ei,basis_order_);
431 vfdata_->minterpolate(val,ei,
typename ARRAY::value_type(0));
438 T def_value = (static_cast<T>(0)))
const
441 vmesh_->get_interpolate_weights(coords,idx,ei,basis_order_);
442 vfdata_->interpolate(val,ei,def_value);
445 template<
class ARRAY,
class DATA>
447 const std::vector<Core::Geometry::Point>& points,
448 DATA def_value = (static_cast<DATA>(0)))
const
451 vmesh_->get_minterpolate_weights(points,ei,basis_order_);
452 vfdata_->minterpolate(val,ei, static_cast<typename ARRAY::value_type>(def_value));
455 template<
class ARRAY,
class DATA>
457 const std::vector<Core::Geometry::Point>& points,
461 vmesh_->get_minterpolate_weights(points,ei,basis_order_);
462 vfdata_->minterpolate(val,ei, static_cast<typename ARRAY::value_type>(def_value));
469 vmesh_->get_interpolate_weights(point,ei,basis_order_);
473 vfdata_->interpolate(val,ei,def_value);
485 vmesh_->get_interpolate_weights(point,ei,basis_order_);
488 vfdata_->interpolate(val,ei,def_value);
497 vmesh_->interpolate(val,coords,idx);
502 { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
504 { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
506 { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
508 { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
510 { interpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
513 { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
515 { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
517 { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
519 { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
521 { minterpolate(val, coords, static_cast<VMesh::index_type>(idx)); }
529 vmesh_->get_gradient_weights(coords,idx,eg,basis_order_);
530 vfdata_->gradient(val,eg,def_value);
536 vmesh_->get_mgradient_weights(coords,idx,eg,basis_order_);
537 vfdata_->mgradient(val,eg,def_value);
543 vmesh_->get_gradient_weights(point,eg,basis_order_);
546 vfdata_->gradient(val,eg,def_value);
557 vmesh_->get_gradient_weights(point,eg,basis_order_);
560 vfdata_->gradient(val,eg,def_value);
569 template<
class T>
inline void mgradient(std::vector<
StackVector<T,3> >& val,
const std::vector<Core::Geometry::Point>& points,T def_value = (static_cast<T>(0)))
const
572 vmesh_->get_mgradient_weights(points,eg,basis_order_);
573 vfdata_->mgradient(val,eg,def_value);
578 vmesh_->get_mgradient_weights(points,eg,basis_order_);
579 vfdata_->mgradient(val,eg,def_value);
584 { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
586 { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
588 { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
590 { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
592 { gradient(val, coords, static_cast<VMesh::index_type>(idx)); }
597 vmesh_ = mesh->
vmesh();
609 inline bool is_nodata() {
return (basis_order_ == -1); }
622 inline bool is_isomorphic() {
return (basis_order_ == vmesh_->basis_order()); }
629 inline bool is_char() {
return ((data_type_==
"char")||(data_type_==
"signed char")); }
631 inline bool is_short() {
return ((data_type_==
"short")||(data_type_==
"signed short")); }
633 inline bool is_int() {
return ((data_type_==
"int")||(data_type_==
"signed int")); }
635 inline bool is_long() {
return ((data_type_==
"long")||(data_type_==
"signed long")); }
637 inline bool is_longlong() {
return ((data_type_==
"long long")||(data_type_==
"signed long long")); }
639 inline bool is_float() {
return (data_type_==
"float"); }
640 inline bool is_double() {
return (data_type_==
"double"); }
642 inline bool is_type(
char* ) {
return (is_char()); }
643 inline bool is_type(
unsigned char* ) {
return (is_unsigned_char()); }
644 inline bool is_type(
short* ) {
return (is_short()); }
645 inline bool is_type(
unsigned short* ) {
return (is_unsigned_short()); }
646 inline bool is_type(
int* ) {
return (is_int()); }
647 inline bool is_type(
unsigned int* ) {
return (is_unsigned_int()); }
648 inline bool is_type(
long* ) {
return (is_long()); }
649 inline bool is_type(
unsigned long* ) {
return (is_unsigned_long()); }
650 inline bool is_type(
long long* ) {
return (is_longlong()); }
651 inline bool is_type(
unsigned long long* ) {
return (is_unsigned_longlong()); }
652 inline bool is_type(
double* ) {
return (is_double()); }
653 inline bool is_type(
float* ) {
return (is_float()); }
656 template<
class T>
bool is_type(T*) {
return (
false); }
661 inline bool is_unsigned_integer() {
return (is_unsigned_char()||is_unsigned_short()||is_unsigned_int()); }
662 inline bool is_integer() {
return (is_signed_integer()||is_unsigned_integer()); }
668 pm_->copy_properties(ifield->
pm_);
675 pm_->set_property(name,val,is_transient);
682 return(pm_->get_property(name,val));
689 return(pm_->is_property(name));
void gradient(StackVector< T, 3 > &val, const VMesh::coords_type &coords, VMesh::Edge::index_type idx) const
Different versions for different index types.
Definition: VField.h:583
bool is_type(unsigned int *)
Definition: VField.h:647
bool is_type(T *)
Definition: VField.h:656
Mesh * mesh_
Definition: VField.h:698
bool gradient(StackVector< T, 3 > &val, const Core::Geometry::Point &point, T def_value=(static_cast< T >(0))) const
Definition: VField.h:540
void get_evalue(T &val, index_type idx) const
Definition: VField.h:177
bool get_center(Core::Geometry::Point &p, index_type idx)
Definition: VField.h:148
void get_values(T *values, ARRAY &idx) const
Definition: VField.h:279
bool is_double()
Definition: VField.h:640
void set_values(const T *values, ARRAY &idx)
Definition: VField.h:266
void interpolate(T &val, const VMesh::coords_type &coords, VMesh::DElem::index_type idx) const
Definition: VField.h:509
void get_values(T *values, VMesh::Node::array_type nodes) const
Definition: VField.h:275
void interpolate(T &val, const VMesh::coords_type &coords, VMesh::Cell::index_type idx) const
Definition: VField.h:505
std::vector< ElemInterpolate > MultiElemInterpolate
Definition: VMesh.h:208
int basis_order_
Definition: VField.h:708
bool is_vector_
Definition: VField.h:716
bool value(T &val, VMesh::Cell::index_type idx) const
Definition: VField.h:206
void set_values(const std::vector< T > &values, ARRAY &idx)
Definition: VField.h:260
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::DElem::index_type idx) const
Definition: VField.h:520
Distinct type for elem index.
Definition: FieldVIndex.h:228
int element_dim_
Definition: VField.h:711
void get_weighted_value(T &val, index_array_type idx, weight_array_type w) const
Definition: VField.h:216
std::vector< StackVector< double, 3 > > coords_array_type
An array of coords.
Definition: VMesh.h:83
void set_value(const T &val, VMesh::Elem::index_type idx)
Definition: VField.h:238
void * efdata_pointer()
Definition: VField.h:607
bool is_cubicmesh()
Definition: VField.h:620
VMesh::weight_type weight_type
Definition: VField.h:81
bool is_constantmesh()
Definition: VField.h:616
FieldHandle field()
get a handle to the field
Definition: VField.h:92
void get_weighted_evalue(T &val, index_array_type idx, weight_array_type w) const
Definition: VField.h:220
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::Edge::index_type idx) const
Definition: VField.h:512
VMesh::size_type num_values()
get the number of values in the field (data at corner nodes of the elements)
Definition: VField.h:101
void get_weighted_evalue(T &val, const index_type *idx, const weight_type *w, size_type sz) const
Definition: VField.h:218
void gradient(StackVector< T, 3 > &val, const VMesh::coords_type &coords, VMesh::Face::index_type idx) const
Definition: VField.h:585
void get_values(std::vector< T > &values, VMesh::Node::array_type nodes) const
Definition: VField.h:269
void get_evalues(std::vector< T > &values) const
Definition: VField.h:310
std::string get_data_type()
Definition: VField.h:658
bool is_longlong()
Definition: VField.h:637
void gradient(StackVector< T, 3 > &val, const VMesh::coords_type &coords, VMesh::index_type idx, T def_value=(static_cast< T >(0))) const
Definition: VField.h:526
bool is_time_
Definition: VField.h:718
VMesh * vmesh_
Definition: VField.h:704
VMesh::index_array_type index_array_type
Definition: VField.h:83
void set_values(const T *data, size_type sz, index_type offset=0)
Definition: VField.h:248
void get_values_dimension(dimension_type &dims)
Definition: VField.h:140
index_type elem_index
Definition: VMesh.h:198
bool is_vector()
Definition: VField.h:626
bool min(double &mn, index_type &idx)
Maximum and minimum of values (with index to see where maximum is located)
Definition: VField.h:361
bool is_long()
Definition: VField.h:635
bool is_unsigned_longlong()
Definition: VField.h:638
#define SCISHARE
Definition: share.h:39
bool is_pair_
Definition: VField.h:715
void copy_values(VField *field)
Definition: VField.h:354
bool is_isomorphic()
Definition: VField.h:622
void set_value(const T &val, VMesh::Edge::index_type idx)
Definition: VField.h:232
Distinct type for face index.
Definition: FieldVIndex.h:210
bool minmax(double &mn, double &mx) const
version of minmax without indices
Definition: VField.h:382
boost::shared_ptr< Mesh > MeshHandle
Definition: DatatypeFwd.h:67
bool is_property(const std::string &name)
Definition: VField.h:686
void copy_evalues(VField *field, INDEX1 idx1, INDEX2 idx2, size_type sz)
Same for edge values.
Definition: VField.h:346
void get_values(std::vector< T > &values, VMesh::Elem::array_type elems) const
Definition: VField.h:271
Distinct type for edge index.
Definition: FieldVIndex.h:200
VMesh * vmesh()
Definition: VField.h:89
void set_values(const std::vector< T > &values, VMesh::Node::array_type nodes)
Definition: VField.h:256
void set_values(const std::vector< T > &values)
Get/Set all values at once.
Definition: VField.h:246
Definition: StackBasedVector.h:47
Distinct type for elem index.
Definition: FieldVIndex.h:237
void mgradient(std::vector< StackVector< T, 3 > > &val, const std::vector< Core::Geometry::Point > &points, T def_value=(static_cast< T >(0))) const
Definition: VField.h:569
bool value(T &val, VMesh::Elem::index_type idx) const
Definition: VField.h:208
void mgradient(std::vector< StackVector< T, 3 > > &val, const VMesh::coords_array_type &coords, VMesh::index_type idx, T def_value=(static_cast< T >(0))) const
Definition: VField.h:533
virtual ~VField()
Definition: VField.h:72
list values
Definition: readAllFields.py:22
void get_value(T &val, VMesh::DElem::index_type idx) const
Definition: VField.h:189
bool minmax(double &mn, index_type &idxmn, double &mx, index_type idxmx) const
Combined min max for efficiency.
Definition: VField.h:373
void set_value(const T &val, index_type idx)
Definition: VField.h:226
void set_property(const std::string &name, const T &val, bool is_transient)
Definition: VField.h:672
bool is_type(long *)
Definition: VField.h:648
void get_values(T *values, VMesh::Elem::array_type elems) const
Definition: VField.h:277
bool is_integer()
Definition: VField.h:662
void copy_weighted_evalue(VField *field, ARRAY idx, weight_array_type w, INDEX i) const
Definition: VField.h:293
Distinct type for node index.
Definition: FieldVIndex.h:181
bool is_nodata()
Definition: VField.h:609
void set_value(const T &val, VMesh::Node::index_type idx)
Definition: VField.h:230
void get_value(T &val, VMesh::Face::index_type idx) const
Definition: VField.h:183
void * get_values_pointer()
Definition: VField.h:603
Manage dynamic properties of persistent objects.
void copy_evalue(VField *field, INDEX1 idx1, INDEX2 idx2)
Same for edge values.
Definition: VField.h:332
void get_values(T *data, size_type sz, index_type offset=0) const
Definition: VField.h:252
void get_values(std::vector< T > &values, ARRAY &idx) const
Definition: VField.h:273
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::Elem::index_type idx) const
Definition: VField.h:518
bool is_tensor_
Definition: VField.h:717
virtual VMesh::size_type size()
Definition: VFData.cc:209
int element_dofs_
Definition: VField.h:712
void mgradient(std::vector< StackVector< T, 3 > > &val, const std::vector< Core::Geometry::Point > &points, T def_value, VMesh::MultiElemGradient &eg) const
Definition: VField.h:576
bool is_unsigned_short()
Definition: VField.h:632
void set_values(const T *values, VMesh::Elem::array_type elems)
Definition: VField.h:264
bool is_tensor()
Definition: VField.h:627
const char * name[]
Definition: BoostGraphExampleTests.cc:87
bool value(T &val, VMesh::Edge::index_type idx) const
Definition: VField.h:202
bool is_quadraticmesh()
Definition: VField.h:619
Distinct type for additional lagrangian node.
Definition: FieldVIndex.h:190
void copy_values(VField *field, INDEX1 idx1, INDEX2 idx2, size_type sz)
Definition: VField.h:338
void clear_all_values()
Definition: VField.h:299
void interpolate(T &val, const VMesh::coords_type &coords, VMesh::Elem::index_type idx) const
Definition: VField.h:507
VField()
Definition: VField.h:53
void copy_properties(VField *ifield)
Definition: VField.h:665
dictionary data
Definition: eabLatVolData.py:11
std::string data_type_
Definition: VField.h:720
double weight_type
Weights for interpolation.
Definition: VMesh.h:65
bool interpolate(T &val, const Core::Geometry::Point &point, T def_value=(static_cast< T >(0))) const
Definition: VField.h:466
bool get_property(const std::string &name, T &val)
Definition: VField.h:679
bool is_type(unsigned char *)
Definition: VField.h:643
void size(VMesh::ENode::size_type &sz)
Definition: VField.h:392
void set_evalues(const T *data, size_type sz, index_type offset=0)
Definition: VField.h:307
void copy_evalues(VField *field)
Definition: VField.h:357
bool min(double &mn)
Definition: VField.h:364
void get_value(T &val, VMesh::Edge::index_type idx) const
Definition: VField.h:181
bool is_lineardata()
Definition: VField.h:611
PropertyManager * pm_
Definition: VField.h:701
bool is_constantdata()
Definition: VField.h:610
void interpolate(T &val, const VMesh::coords_type &coords, VMesh::index_type idx, T def_value=(static_cast< T >(0))) const
Definition: VField.h:435
virtual VMesh * vmesh()
Definition: Mesh.cc:413
bool is_cubicdata()
Definition: VField.h:614
bool is_type(float *)
Definition: VField.h:653
void get_value(T &val, VMesh::Cell::index_type idx) const
Definition: VField.h:185
void set_evalue(const T &val, index_type idx)
Definition: VField.h:228
void update_mesh_pointer(Mesh *mesh)
internal function - this one may change in the future
Definition: VField.h:595
void resize_values()
Definition: VField.h:138
void set_all_values(const T val)
Set all values to a specific value.
Definition: VField.h:283
bool is_scalar_
Definition: VField.h:714
int number_of_enodes_
Definition: VField.h:710
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::Cell::index_type idx) const
Definition: VField.h:516
void copy_value(VField *field, INDEX1 idx1, INDEX2 idx2)
Definition: VField.h:325
void minterpolate(ARRAY &val, const std::vector< Core::Geometry::Point > &points, DATA def_value, VMesh::MultiElemInterpolate &ei) const
Definition: VField.h:456
void copy_weighted_value(VField *field, ARRAY idx, weight_array_type w, INDEX i) const
Definition: VField.h:289
void size(VMesh::Node::size_type &sz)
Definition: VField.h:391
void get_value(T &val, index_type idx) const
Definition: VField.h:173
bool is_unsigned_integer()
Definition: VField.h:661
void get_value(T &val, VMesh::Elem::index_type idx) const
Definition: VField.h:187
bool is_nonlineardata()
Definition: VField.h:612
bool is_type(short *)
Definition: VField.h:644
bool is_linearmesh()
Definition: VField.h:617
Field * field_
Definition: VField.h:697
bool is_char()
Definition: VField.h:629
VFData * vfdata_
Definition: VField.h:705
bool is_type(unsigned short *)
Definition: VField.h:645
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::index_type idx) const
Definition: VField.h:425
void * get_evalues_pointer()
Definition: VField.h:604
bool is_nonlinearmesh()
Definition: VField.h:618
bool is_unsigned_long()
Definition: VField.h:636
bool is_float()
Definition: VField.h:639
bool is_pair()
Definition: VField.h:625
bool is_type(unsigned long long *)
Definition: VField.h:651
bool max(double &mx) const
Definition: VField.h:369
bool is_type(Core::Geometry::Tensor *)
Definition: VField.h:655
VField * vfield()
for completeness get a pointer to itself
Definition: VField.h:94
bool is_signed_integer()
Definition: VField.h:660
Distinct type for cell index.
Definition: FieldVIndex.h:219
void interpolate(T &val, const VMesh::coords_type &coords, VMesh::Face::index_type idx) const
Definition: VField.h:503
VMesh::size_type size_type
Definition: VField.h:79
void * fdata_pointer()
Definition: VField.h:606
void set_value(const T &val, VMesh::DElem::index_type idx)
Definition: VField.h:240
bool is_int()
Definition: VField.h:633
void interpolate(T &val, const VMesh::coords_type &coords, VMesh::Edge::index_type idx) const
Definition: VField.h:501
long long index_type
Definition: Types.h:39
int basis_order()
Definition: VField.h:98
void get_values(std::vector< T > &values) const
Definition: VField.h:250
void gradient(StackVector< T, 3 > &val, const VMesh::coords_type &coords, VMesh::Elem::index_type idx) const
Definition: VField.h:589
bool gradient(StackVector< T, 3 > &val, const Core::Geometry::Point &point, T def_value, VMesh::ElemGradient &eg) const
Definition: VField.h:555
void get_evalues(T *data, size_type sz, index_type offset=0) const
Definition: VField.h:316
bool is_unsigned_int()
Definition: VField.h:634
void copy_weighted_value(VField *field, index_type *idx, weight_type *w, size_type sz, INDEX i) const
Functions for getting a weighted value.
Definition: VField.h:287
bool max(double &mx, index_type &idx) const
Definition: VField.h:367
VMesh::weight_array_type weight_array_type
Definition: VField.h:84
bool is_scalar()
Definition: VField.h:624
void get_value(T &val, VMesh::Node::index_type idx) const
Definition: VField.h:179
boost::shared_ptr< Field > FieldHandle
Definition: DatatypeFwd.h:65
void minterpolate(ARRAY &val, const std::vector< Core::Geometry::Point > &points, DATA def_value=(static_cast< DATA >(0))) const
Definition: VField.h:446
void set_values(const T *values, VMesh::Node::array_type nodes)
Definition: VField.h:262
bool is_type(double *)
Definition: VField.h:652
bool is_unsigned_char()
Definition: VField.h:630
void gradient(StackVector< T, 3 > &val, const VMesh::coords_type &coords, VMesh::DElem::index_type idx) const
Definition: VField.h:591
bool is_type(char *)
Definition: VField.h:642
void set_value(const T &val, VMesh::Face::index_type idx)
Definition: VField.h:234
bool is_type(Core::Geometry::Vector *)
Definition: VField.h:654
void copy_weighted_evalue(VField *field, index_type *idx, weight_type *w, size_type sz, INDEX i) const
Definition: VField.h:291
bool is_type(long long *)
Definition: VField.h:650
void gradient(StackVector< T, 3 > &val, const VMesh::coords_type &coords, VMesh::Cell::index_type idx) const
Definition: VField.h:587
bool is_type(unsigned long *)
Definition: VField.h:649
bool is_short()
Definition: VField.h:631
bool value(T &val, VMesh::DElem::index_type idx) const
Definition: VField.h:210
bool value(T &val, VMesh::Node::index_type idx) const
Definition: VField.h:200
void resize_fdata()
resize the data fields to match the number of nodes/edges in the mesh
Definition: VField.h:106
void set_evalues(const std::vector< T > &values)
Definition: VField.h:305
void get_weighted_value(T &val, const index_type *idx, const weight_type *w, size_type sz) const
Functions for getting a weighted value.
Definition: VField.h:214
VMesh::size_type num_evalues()
get the number of edge values in the field (for quadratic approximation)
Definition: VField.h:103
VMesh::coords_type coords_type
Definition: VField.h:80
void set_values(const std::vector< T > &values, VMesh::Elem::array_type elems)
Definition: VField.h:258
#define DEBUG_CONSTRUCTOR(type)
Definition: Debug.h:64
bool value(T &val, VMesh::Face::index_type idx) const
Definition: VField.h:204
MeshHandle mesh()
mesh() and vmesh() get the handle to the mesh and its virtual interface
Definition: VField.h:88
std::vector< size_type > dimension_type
Definition: VMesh.h:76
int number_of_nodes_
Definition: VField.h:709
bool interpolate(T &val, const Core::Geometry::Point &point, T def_value, VMesh::ElemInterpolate &ei) const
Definition: VField.h:482
Mesh::size_type size_type
Definition: VMesh.h:68
Definition: PropertyManager.h:193
void set_value(const T &val, VMesh::ENode::index_type idx)
Definition: VField.h:242
int dofs()
number of degree of freedoms in each element type in the mesh
Definition: VField.h:397
VMesh::dimension_type dimension_type
Definition: VField.h:85
void interpolate(Core::Geometry::Point &val, const VMesh::coords_type &coords, VMesh::index_type idx) const
Definition: VField.h:495
bool is_type(int *)
Definition: VField.h:646
VMesh::index_type index_type
Import a couple of useful typedefs from VMesh.
Definition: VField.h:78
bool is_quadraticdata()
Definition: VField.h:613
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::index_type idx, DATA def_value) const
Definition: VField.h:413
index_type elem_index
Definition: VMesh.h:217
Mesh::index_type index_type
VIRTUAL INTERFACE.
Definition: VMesh.h:63
void get_value(T &val, VMesh::ENode::index_type idx) const
Definition: VField.h:191
void minterpolate(ARRAY &val, const VMesh::coords_array_type &coords, VMesh::Face::index_type idx) const
Definition: VField.h:514
std::vector< ElemGradient > MultiElemGradient
Multiple gradient calculations in parallel.
Definition: VMesh.h:229
#define DEBUG_DESTRUCTOR(type)
Definition: Debug.h:65
int dimension()
dimensions of the element 0 .. 3
Definition: VField.h:395
bool value(T &val, index_type idx) const
Definition: VField.h:198
void set_value(const T &val, VMesh::Cell::index_type idx)
Definition: VField.h:236