Mesh Field Bulk Data
[Sierra Toolkit Mesh]

Computational data associated with the entities within a mesh. More...

Classes

class  stk::mesh::BucketArray< FieldType >
 Field data Array for a given array field and bucket More...
class  stk::mesh::EntityArray< FieldType >
 Field data Array for a given array field and entity More...
struct  stk::mesh::EntityArray< Field< ScalarType, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7 > >
 Field data Array for a given array field and entity More...
struct  stk::mesh::EntityDimension
 Implement ArrayDimTag for the entity count dimension of a BucketArray. More...
struct  stk::mesh::BucketArray< Field< ScalarType, void, void, void, void, void, void, void > >
 Field data Array for a given scalar field and bucket More...
struct  stk::mesh::BucketArray< Field< ScalarType, Tag1, Tag2, Tag3, Tag4, Tag5, Tag6, Tag7 > >
 Field data Array for a given array field and bucket More...

Functions

bool stk::mesh::field_data_valid (const FieldBase &f, const Bucket &k, unsigned ord=0, const char *required_by=NULL)
 Check for existence of field data.
bool stk::mesh::field_data_valid (const FieldBase &f, const Entity &e, const char *required_by=NULL)
 Check for existence of field data.
unsigned stk::mesh::field_data_size (const FieldBase &f, const Bucket &k)
 Size, in bytes, of the field data for each entity.
unsigned stk::mesh::field_data_size (const FieldBase &f, const Entity &e)
 Size, in bytes, of the field data for each entity.
template<class field_type >
FieldTraits< field_type >
::data_type * 
stk::mesh::field_data (const field_type &f, const Bucket::iterator &i)
 Pointer to the field data array.
template<class field_type >
FieldTraits< field_type >
::data_type * 
stk::mesh::field_data (const field_type &f, const Entity &e)
 Pointer to the field data array.

Detailed Description

Computational data associated with the entities within a mesh.

Introduction

The data for a given field is allocated in one or more multi-dimensional arrays. The contiguous memory for each array resides within a bucket.

Multi-dimensional Array View

Contiguous array field data may be accessed as an multidimensional array through the EntityArray or BucketArray wrappers to the multidimensional array class.

For example, given a reference to an application-defined field these arrays are obtained as follows.

  typedef Field<...> MyFieldType ;
  const MyFieldType & my_field = ... ; // obtained from somewhere
  const Entity & entity = ... ;        // obtained from somewhere
  const Bucket & bucket = ... ;        // obtained from somewhere
  EntityArray< MyFieldType > entity_data( my_field , entity );
  BucketArray< MyFieldType > bucket_data( my_field , bucket );
  

In this example the entity_data and bucket_data are multidimensional array objects conforming to the scalar type and dimensions specified by MyFieldType . As such the dimensions and members of the arrays can be accessed through the multidimensional array interface.

A bucket provides field data for a homogeneous collection of entities. As such when an application defines a multi-dimensional array field with variable dimensions then these dimensions will be constant for a given bucket; but may vary with different buckets.

Raw Data View

The field_data functions return a pointer to the field data for a given field and entity or bucket. For example, if the scalar type of MyFieldType is "double" then a raw pointer to the field data is obtained as follows.

  double * entity_data_ptr = field_data( my_field , entity );
  double * bucket_data_ptr = field_data( my_field , bucket );
  

When this "raw" interface is used and the field data is a multi-dimensional array then the application is on its own to obtain the array dimensions.


Function Documentation

bool stk::mesh::field_data_valid ( const FieldBase &  f,
const Bucket &  k,
unsigned  ord = 0,
const char *  required_by = NULL 
)

Check for existence of field data.

Exceptions:
std::runtime_error Thrown if required_by != NULL and the field data does not exist.
bool stk::mesh::field_data_valid ( const FieldBase &  f,
const Entity &  e,
const char *  required_by = NULL 
) [inline]

Check for existence of field data.

Exceptions:
std::runtime_error Thrown if required_by != NULL and the field data does not exist.

Definition at line 57 of file FieldData.hpp.

Generated on Wed Apr 13 10:05:49 2011 for Sierra Toolkit by  doxygen 1.6.3