10 #ifndef CMZN_FIELDCACHE_HPP__ 
   11 #define CMZN_FIELDCACHE_HPP__ 
   13 #include "zinc/field.h" 
   14 #include "zinc/fieldcache.h" 
   15 #include "zinc/differentialoperator.hpp" 
   16 #include "zinc/element.hpp" 
   17 #include "zinc/fieldmodule.hpp" 
   18 #include "zinc/node.hpp" 
   36     cmzn_fieldcache_id id;
 
   44     explicit Fieldcache(cmzn_fieldcache_id in_field_cache_id) :
 
   49         id(cmzn_fieldcache_access(fieldCache.id))
 
   54         cmzn_fieldcache_id temp_id = cmzn_fieldcache_access(fieldCache.id);
 
   57             cmzn_fieldcache_destroy(&
id);
 
   67             cmzn_fieldcache_destroy(&
id);
 
   86     cmzn_fieldcache_id 
getId()
 const 
  102         return cmzn_fieldcache_clear_location(
id);
 
  116         return cmzn_fieldcache_set_element(
id, element.
getId());
 
  135         const double *coordinatesIn)
 
  137         return cmzn_fieldcache_set_mesh_location(
id, element.
getId(),
 
  138             coordinatesCount, coordinatesIn);
 
  154         const double *valuesIn)
 
  156         return cmzn_fieldcache_set_field_real(
id,
 
  157             referenceField.
getId(), valuesCount, valuesIn);
 
  171         return cmzn_fieldcache_set_node(
id, node.
getId());
 
  182         return cmzn_fieldcache_set_time(
id, time);
 
  188     return Fieldcache(cmzn_fieldmodule_create_fieldcache(
id));
 
  192     int coordinatesCount, 
const double *coordinatesIn)
 
  194     return cmzn_field_assign_mesh_location(
id, cache.
getId(), element.
getId(),
 
  195         coordinatesCount, coordinatesIn);
 
  200     return cmzn_field_assign_real(
id, cache.
getId(), valuesCount, valuesIn);
 
  205     return cmzn_field_assign_string(
id, cache.
getId(), stringValue);
 
  209     double *coordinatesOut)
 
  211     return Element(cmzn_field_evaluate_mesh_location(
id,
 
  212         cache.
getId(), coordinatesCount, coordinatesOut));
 
  217     return cmzn_field_evaluate_real(
id, cache.
getId(), valuesCount, valuesOut);
 
  222     return cmzn_field_evaluate_string(
id, cache.
getId());
 
  226     const Fieldcache& cache, 
int valuesCount, 
double *valuesOut)
 
  228     return cmzn_field_evaluate_derivative(
id, differentialOperator.
getId(),
 
  229         cache.
getId(), valuesCount, valuesOut);
 
  234     return cmzn_field_is_defined_at_location(
id, cache.
getId());
 
int evaluateDerivative(const Differentialoperator&differentialOperator, const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:225
 
A single finite element from a mesh. 
Definition: element.hpp:205
 
Element evaluateMeshLocation(const Fieldcache &cache, int coordinatesCount, double *coordinatesOut)
Definition: fieldcache.hpp:208
 
Base field type: an abstraction of a mathematical field. 
Definition: field.hpp:46
 
int assignReal(const Fieldcache &cache, int valuesCount, const double *valuesIn)
Definition: fieldcache.hpp:198
 
int clearLocation()
Definition: fieldcache.hpp:100
 
int setNode(const Node &node)
Definition: fieldcache.hpp:169
 
Describes the derivative of a field to evaluate. 
Definition: differentialoperator.hpp:26
 
int assignString(const Fieldcache &cache, const char *stringValue)
Definition: fieldcache.hpp:203
 
int setElement(const Element &element)
Definition: fieldcache.hpp:114
 
int setTime(double time)
Definition: fieldcache.hpp:180
 
int setFieldReal(const Field &referenceField, int valuesCount, const double *valuesIn)
Definition: fieldcache.hpp:153
 
char * evaluateString(const Fieldcache &cache)
Definition: fieldcache.hpp:220
 
cmzn_field_id getId() const 
Definition: field.hpp:98
 
bool isDefinedAtLocation(const Fieldcache &cache)
Definition: fieldcache.hpp:232
 
cmzn_element_id getId() const 
Definition: element.hpp:351
 
int assignMeshLocation(const Fieldcache &cache, const Element &element, int coordinatesCount, const double *coordinatesIn)
Definition: fieldcache.hpp:191
 
cmzn_node_id getId() const 
Definition: node.hpp:139
 
Cache for setting domain locations at which fields are evaluated or assigned. 
Definition: fieldcache.hpp:33
 
bool isValid() const 
Definition: fieldcache.hpp:76
 
cmzn_differentialoperator_id getId() const 
Definition: differentialoperator.hpp:79
 
int setMeshLocation(const Element &element, int coordinatesCount, const double *coordinatesIn)
Definition: fieldcache.hpp:134
 
Point object used to represent finite element nodes. 
Definition: node.hpp:37
 
Fieldcache createFieldcache()
Definition: fieldcache.hpp:186
 
cmzn_fieldcache_id getId() const 
Definition: fieldcache.hpp:86
 
int evaluateReal(const Fieldcache &cache, int valuesCount, double *valuesOut)
Definition: fieldcache.hpp:215