GetFEM
5.4.2
|
Deal with interdependencies of objects. More...
#include <getfem_context.h>
Inherited by getfem::fem_global_function, getfem::global_function_on_levelsets_2D_, getfem::im_data, getfem::interpolate_transformation_element_extrapolation, getfem::interpolate_transformation_expression, getfem::interpolate_transformation_neighbor, getfem::interpolated_fem, getfem::level_set, getfem::mesh, getfem::mesh_fem, getfem::mesh_im, getfem::mesh_level_set, getfem::mf__key_, getfem::model, and getfem::projected_fem.
Public Member Functions | |
virtual void | update_from_context () const =0 |
this function has to be defined and should update the object when the context is modified. | |
bool | context_check () const |
return true if update_from_context was called | |
Deal with interdependencies of objects.
An object can be in three different states : NORMAL : no change is necessary CHANGED : something in the context has changed and the update function of the object has to be called. INVALID : one of the dependencies desappears, the object is invalid and should no longer be used.
add_dependency(ct) : add a dependency to the dependency list.
touch() : significate to the dependent objects that something has change in the object. This make the dependent objects to be in the CHANGED state
context_check() : check if the object has to be updated. if it is the case it makes first a check to the dependency list and call the update function of the object. (the update function of the dependencies are called before the update function of the current object).
context_valid() : says if the object has still a valid context
Remarks :
Definition at line 81 of file getfem_context.h.