Classes | Namespaces | Defines | Typedefs | Enumerations | Functions

apf.h File Reference

The APF Field interface. More...

Go to the source code of this file.

Classes

class  apf::Integrator
 A virtual base for user-defined integrators. More...
struct  apf::Function
 User-defined Analytic Function. More...

Namespaces

namespace  apf
 

All APF symbols are contained in this namespace.


Defines

#define APF_ITERATE(t, w, i)
 Stress-free iteration over STL-like containers.
#define APF_CONST_ITERATE(t, w, i)
 APF_ITERATE for const containers.

Typedefs

typedef VectorElement apf::MeshElement
 Mesh Elements represent the mesh coordinate vector field.

Enumerations

enum  apf::ValueType {
  apf::SCALAR, apf::VECTOR, apf::MATRIX, apf::PACKED,
  apf::VALUE_TYPES
}
 

The type of value the field stores.

More...

Functions

void apf::destroyMesh (Mesh *m)
 Destroys an apf::Mesh.
MeshElement * apf::createMeshElement (Mesh *m, MeshEntity *e)
 Creates a Mesh Element over an entity.
MeshElement * apf::createMeshElement (Field *c, MeshEntity *e)
 Creates a non-standard Mesh Element over an entity.
MeshEntity * apf::getMeshEntity (MeshElement *me)
 Retrieve the mesh entity associated with an apf::MeshElement.
void apf::destroyMeshElement (MeshElement *e)
 Destroys a Mesh Element.
Field * apf::createLagrangeField (Mesh *m, const char *name, int valueType, int order)
 Create an apf::Field using a Lagrange distribution.
Field * apf::createStepField (Mesh *m, const char *name, int valueType)
 Create an apf::Field using a step distribution.
Field * apf::createIPField (Mesh *m, const char *name, int valueType, int order)
 Create an apf::Field of integration point data.
Field * apf::createField (Mesh *m, const char *name, int valueType, FieldShape *shape)
 Create a Field from any builtin or user defined FieldShape.
Field * apf::createFieldOn (Mesh *m, const char *name, int valueType)
 Create a field using the mesh's coordinate nodal distribution.
Field * apf::createPackedField (Mesh *m, const char *name, int components, apf::FieldShape *shape=0)
 Create a field of N components without a tensor type.
Field * apf::createGeneralField (Mesh *m, const char *name, int valueType, int components, FieldShape *shape)
 Encompasses both packed and typed fields.
Field * apf::cloneField (Field *f, Mesh *onto)
 Declare a copy of a field on another apf::Mesh.
Mesh * apf::getMesh (Field *f)
 Retrieve the Mesh over which a Field is defined.
bool apf::hasEntity (Field *f, MeshEntity *e)
 Returns true iff an entity has data associate with a field.
const char * apf::getName (Field *f)
 Get the name of a Field.
int apf::getValueType (Field *f)
 Retrieve the type of value a field distributes.
void apf::destroyField (Field *f)
 Destroy an apf::Field.
void apf::setScalar (Field *f, MeshEntity *e, int node, double value)
 Set a nodal value of a scalar field.
double apf::getScalar (Field *f, MeshEntity *e, int node)
 Get the node value of a scalar field.
void apf::setVector (Field *f, MeshEntity *e, int node, Vector3 const &value)
 Set the nodal value of a vector field.
void apf::getVector (Field *f, MeshEntity *e, int node, Vector3 &value)
 Get the nodal value of a vector field.
void apf::setMatrix (Field *f, MeshEntity *e, int node, Matrix3x3 const &value)
 Set the nodal value of a matrix field.
void apf::getMatrix (Field *f, MeshEntity *e, int node, Matrix3x3 &value)
 Get the nodal value of a matrix field.
void apf::setComponents (Field *f, MeshEntity *e, int node, double const *components)
 Set the nodal value from an array of component values.
void apf::getComponents (Field *f, MeshEntity *e, int node, double *components)
 Copy the nodal value into an array of component values.
Element * apf::createElement (Field *f, MeshElement *e)
 Create a Field Element from a Mesh Element.
Element * apf::createElement (Field *f, MeshEntity *e)
 Create a Field Element without a parent Mesh Element.
void apf::destroyElement (Element *e)
 Destroy a Field Element.
MeshElement * apf::getMeshElement (Element *e)
 Get the Mesh Element of a Field Element.
MeshEntity * apf::getMeshEntity (Element *e)
 Retrieve the mesh entity of an apf::Element.
double apf::getScalar (Element *e, Vector3 const &param)
 Evaluate a scalar field at a point.
void apf::getGrad (Element *e, Vector3 const &param, Vector3 &grad)
 Get the gradient of a scalar field w.r.t. global coordinates.
void apf::getVector (Element *e, Vector3 const &param, Vector3 &value)
 Evaluate a vector field at a point.
double apf::getDiv (Element *e, Vector3 const &param)
 Evaluate the divergence of a vector field at a point.
void apf::getCurl (Element *e, Vector3 const &param, Vector3 &curl)
 Evaluate the curl of a vector field at a point.
void apf::getVectorGrad (Element *e, Vector3 const &param, Matrix3x3 &deriv)
 Get the gradient of a vector field w.r.t. global coordinates.
void apf::getMatrix (Element *e, Vector3 const &param, Matrix3x3 &value)
 Evaluate the value of a matrix field.
void apf::getComponents (Element *e, Vector3 const &param, double *components)
 Evaluate a field into an array of component values.
int apf::countIntPoints (MeshElement *e, int order)
 Get the number of integration points for an element.
void apf::getIntPoint (MeshElement *e, int order, int point, Vector3 &param)
 Get an integration point in an element.
double apf::getIntWeight (MeshElement *e, int order, int point)
 Get the weight of an integration point in an element.
void apf::mapLocalToGlobal (MeshElement *e, Vector3 const &local, Vector3 &global)
 Map a local coordinate to a global coordinate.
double apf::getDV (MeshElement *e, Vector3 const &param)
 Get the differential volume at a point.
double apf::measure (MeshElement *e)
 Measures the volume, area, or length of a Mesh Element.
double apf::measure (Mesh *m, MeshEntity *e)
 Measures the volume, area, or length of a Mesh Entity.
int apf::getOrder (MeshElement *e)
 Returns the polynomial order of the coordinate field.
void apf::getJacobian (MeshElement *e, Vector3 const &local, Matrix3x3 &j)
 Returns the Jacobian at a local point.
void apf::getJacobianInv (MeshElement *e, Vector3 const &local, Matrix3x3 &jinv)
 Returns the Jacobian inverse at a local point.
double apf::computeCosAngle (Mesh *m, MeshEntity *pe, MeshEntity *e1, MeshEntity *e2, const Matrix3x3 &Q)
 Returns the cosine of the angle between 2 entities of the parent entity.
int apf::countNodes (Element *e)
 Returns the number of element nodes.
void apf::getScalarNodes (Element *e, NewArray< double > &values)
 Returns the element nodal values for a scalar field.
void apf::getVectorNodes (Element *e, NewArray< Vector3 > &values)
 Returns the element nodal values for a vector field.
void apf::getMatrixNodes (Element *e, NewArray< Matrix3x3 > &values)
 Returns the element nodal values for a matrix field.
void apf::getShapeValues (Element *e, Vector3 const &local, NewArray< double > &values)
 Returns the shape function values at a point.
void apf::getShapeGrads (Element *e, Vector3 const &local, NewArray< Vector3 > &grads)
 Returns the shape function gradients at a point.
FieldShape * apf::getShape (Field *f)
 Retrieve the apf::FieldShape used by a field.
int apf::countComponents (Field *f)
 Count the number of scalar components in the field's value type.
void apf::writeVtkFiles (const char *prefix, Mesh *m, int cellDim=-1)
 Write a set of parallel VTK Unstructured Mesh files from an apf::Mesh with binary (base64) encoding and zlib compression (if LION_COMPRESS=ON).
void apf::writeVtkFiles (const char *prefix, Mesh *m, std::vector< std::string > writeFields, int cellDim=-1)
 Write a set of parallel VTK Unstructured Mesh files from an apf::Mesh with binary (base64) encoding and zlib compression (if LION_COMPRESS=ON).
void apf::writeOneVtkFile (const char *prefix, Mesh *m)
 Output just the .vtu file with ASCII encoding for this part.
void apf::writeASCIIVtkFiles (const char *prefix, Mesh *m)
 Write a set of parallel VTK Unstructured Mesh files from an apf::Mesh with ASCII encoding.
void apf::writeASCIIVtkFiles (const char *prefix, Mesh *m, std::vector< std::string > writeFields)
 Write a set of parallel VTK Unstructured Mesh files from an apf::Mesh with ASCII encoding.
void apf::getGaussPoint (int type, int order, int point, Vector3 &param)
 Return the location of a gaussian integration point.
int apf::countGaussPoints (int type, int order)
 Return the number of Gaussian integration points.
double apf::getJacobianDeterminant (Matrix3x3 const &J, int dimension)
 Return the Jacobian determinant or dimensional equivalent.
int apf::getDimension (MeshElement *me)
 Return the dimension of a MeshElement's MeshEntity.
void apf::synchronize (Field *f, Sharing *shr=0)
 Synchronize field values along partition boundary.
void apf::accumulate (Field *f, Sharing *shr=0)
 Add field values along partition boundary.
void apf::fail (const char *why) __attribute__((noreturn))
 Declare failure of code inside APF.
void apf::freeze (Field *f)
 Convert a Field from Tag to array storage.
void apf::unfreeze (Field *f)
 Convert a Field from array to Tag storage.
bool apf::isFrozen (Field *f)
 Returns true iff the Field uses array storage.
double * apf::getArrayData (Field *f)
 Return the contiguous array storing this field.
void apf::zeroField (Field *f)
 Initialize all nodal values with all-zero components.
Field * apf::createUserField (Mesh *m, const char *name, int valueType, FieldShape *s, Function *f)
 Create a Field from a user's analytic function.
Field * apf::recoverGradientByVolume (Field *f)
 Compute a nodal gradient field from a nodal input field.
void apf::projectField (Field *to, Field *from)
 Project a field from an existing field.
void apf::getBF (FieldShape *s, MeshElement *e, Vector3 const &p, NewArray< double > &BF)
 Get the basis functions over a mesh element.
void apf::getGradBF (FieldShape *s, MeshElement *e, Vector3 const &p, NewArray< Vector3 > &gradBF)
 Get global gradients of basis functions over a mesh element.

Detailed Description

The APF Field interface.

Definition in file apf.h.


Define Documentation

#define APF_ITERATE (   t,
  w,
  i 
)
Value:
for (t::iterator (i) = (w).begin(); \
     (i) != (w).end(); ++(i))

Stress-free iteration over STL-like containers.

Parameters:
t The type of the container
w The container itself
i The name to give to the iterator

given an STL container or anything that implements Type::iterator, Type::begin, Type::end, and Type::iterator::operator++(), this macro fills in the boilerplate of a for() loop over this container.

Definition at line 520 of file apf.h.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines