MeshKit  1.0
IAInterface Class Reference

The class used in MeshKit for Interval Assignment. More...

#include <meshkit/IAInterface.hpp>

Inheritance diagram for IAInterface:

List of all members.

Classes

class  ProblemSets
 Collections of indicator sets of variables and constraints that define a subproblem, or define the global problem, or define the remaining part of the global problem. More...
struct  SubProblem
 Represent a subproblem, its IAData and its mapping back to the global problem. More...
struct  VariableConstraintDependencies
 Represent the dependency of the problem using indicator sets. More...

Public Member Functions

virtual void setup_this ()
 More constraint types may be implemented here.
virtual const moab::EntityType * mesh_types_arr () const
 Return the mesh entity types operated on by this scheme.
void print_problem () const
 Print the problem that was defined.
void destroy_data ()
 Destroy all the variables and constraints.
virtual void setup_this ()
 More constraint types may be implemented here.
void print_problem () const
 Function returning whether this scheme can mesh entities of the specified dimension.
void destroy_data ()
 Destroy all the variables and constraints.
virtual void setup_this ()
 More constraint types may be implemented here.
virtual const moab::EntityType * mesh_types_arr () const
 Return the mesh entity types operated on by this scheme.
void print_problem () const
 Print the problem that was defined.
void destroy_data ()
 Destroy all the variables and constraints.

Static Public Member Functions

static const char * name ()
 Get class name.
static bool can_mesh (iBase_EntityType dim)
 Function returning whether this scheme can mesh entities of the specified dimension.
static bool can_mesh (ModelEnt *model_ent)
 Function returning whether this scheme can mesh the specified entity.
static const moab::EntityType * output_types ()
 Get list of mesh entity types that can be generated.
static const char * name ()
 Get class name.
static const char * name ()
 Get class name.
static bool can_mesh (iBase_EntityType dim)
 Function returning whether this scheme can mesh entities of the specified dimension.
static bool can_mesh (ModelEnt *model_ent)
 Function returning whether this scheme can mesh the specified entity.
static const moab::EntityType * output_types ()
 Get list of mesh entity types that can be generated.

Private Types

typedef std::vector< VariableVecVariableVecVec
typedef std::vector< VariableVecVariableVecVec
typedef std::vector< VariableVecVariableVecVec

Private Member Functions

int variable_to_index (const IAVariable *var) const
 Find the global interface index of the given variable.
IAVariableindex_to_variable (int ind) const
 Find the ind'th variable.
bool solve_subproblem (SubProblem *subproblem)
 For a subproblem, find a solution for the number of intervals for each variable.
void assign_solution (SubProblem *subproblem)
 Assign the found solution to the IAVariables.
int variable_to_index (const IAVariable *var) const
 Find the global interface index of the given variable.
IAVariableindex_to_variable (int ind) const
 Find the ind'th variable.
bool solve_subproblem (SubProblem *subproblem)
 For a subproblem, find a solution for the number of intervals for each variable.
void assign_solution (SubProblem *subproblem)
 Assign the found solution to the IAVariables.
int variable_to_index (const IAVariable *var) const
 Find the global interface index of the given variable.
IAVariableindex_to_variable (int ind) const
 Find the ind'th variable.
bool solve_subproblem (SubProblem *subproblem)
 For a subproblem, find a solution for the number of intervals for each variable.
void assign_solution (SubProblem *subproblem)
 Assign the found solution to the IAVariables.

Private Attributes

VariableVec variables
 Internal representation of the data specifying the Interval Assignment problem.
VariableVecVec sumEqualConstraints1
VariableVecVec sumEqualConstraints2
VariableVecVec sumEvenConstraints

Static Private Attributes

static const bool debugging = false

Constructor/destructor

 IAInterface (MKCore *mkcore, const MEntVector &me_vec=MEntVector())
 Constructor; model entity can be missing, in which case it's retrieved or created.
virtual ~IAInterface ()
 Destructor, destroys IAVariables.
virtual ~IAInterface ()
 Constructor; model entity can be missing, in which case it's retrieved or created.
 IAInterface (MKCore *mkcore, const MEntVector &me_vec=MEntVector())
 Constructor; model entity can be missing, in which case it's retrieved or created.
virtual ~IAInterface ()
 Destructor, destroys IAVariables.

Variables

typedef std::vector< IAVariable * > VariableVec
 Get const_iterators over the variables.
typedef std::vector< IAVariable * > VariableVec
 Get const_iterators over the variables.
typedef std::vector< IAVariable * > VariableVec
 Get const_iterators over the variables.
IAVariableget_variable (ModelEnt *model_entity=NULL, bool create_if_missing=true)
 Create a variable. Variables are created before constraints. It is OK if a variable is not in any constraint, but constraints are defined by their variables.
IAVariablecreate_variable (ModelEnt *model_entity, IAVariable::Firmness set_firmness, double goal_value)
 Create a variable and assign it a firmness and goal.
VariableVec::const_iterator variables_begin () const
VariableVec::const_iterator variables_end () const
void destroy_variable (IAVariable *ia_variable)
 Destroy a variable. If a variable is not explicitly destroyed, it will be destroyed on IAInterface tool destruction.
IAVariableget_variable (ModelEnt *model_entity=NULL, bool create_if_missing=true)
 Create a variable. Variables are created before constraints. It is OK if a variable is not in any constraint, but constraints are defined by their variables.
IAVariablecreate_variable (ModelEnt *model_entity, IAVariable::Firmness set_firmness, double goal_value)
 Create a variable and assign it a firmness and goal.
VariableVec::const_iterator variables_begin () const
VariableVec::const_iterator variables_end () const
void destroy_variable (IAVariable *ia_variable)
 Destroy a variable. If a variable is not explicitly destroyed, it will be destroyed on IAInterface tool destruction.
IAVariableget_variable (ModelEnt *model_entity=NULL, bool create_if_missing=true)
 Create a variable. Variables are created before constraints. It is OK if a variable is not in any constraint, but constraints are defined by their variables.
IAVariablecreate_variable (ModelEnt *model_entity, IAVariable::Firmness set_firmness, double goal_value)
 Create a variable and assign it a firmness and goal.
VariableVec::const_iterator variables_begin () const
VariableVec::const_iterator variables_end () const
void destroy_variable (IAVariable *ia_variable)
 Destroy a variable. If a variable is not explicitly destroyed, it will be destroyed on IAInterface tool destruction.

Constraints

typedef std::vector< IAVariable * > IAVariableVec
 Containers for variables for specifying constraints.
typedef std::vector< IAVariable * > IAVariableVec
 Containers for variables for specifying constraints.
typedef std::vector< IAVariable * > IAVariableVec
 Containers for variables for specifying constraints.
IAVariableVec make_constraint_group (const MEntVector &model_entity_vec)
 Convert container of ModelEnts to a container of IAVariables. MEVec is an indirect way of specifying the model entities's variables.
void constrain_sum_equal (const IAVariableVec &side_one, const IAVariableVec &side_two)
 Constrain that the sum of the number of intervals on one side is equal to the number on the other side. E.g. when mapping a surface, the opposite sides require equal intervals.
void constrain_sum_even (const IAVariableVec &sum_even_vars)
 Constrain that the sum of the number of intervals is an even number, i.e. 2k for some integer k. E.g. for the curves bounding an unstructured quad mesh.
IAVariableVec make_constraint_group (const MEntVector &model_entity_vec)
 Convert container of ModelEnts to a container of IAVariables. MEVec is an indirect way of specifying the model entities's variables.
void constrain_sum_equal (const IAVariableVec &side_one, const IAVariableVec &side_two)
 Constrain that the sum of the number of intervals on one side is equal to the number on the other side. E.g. when mapping a surface, the opposite sides require equal intervals.
void constrain_sum_even (const IAVariableVec &sum_even_vars)
 Constrain that the sum of the number of intervals is an even number, i.e. 2k for some integer k. E.g. for the curves bounding an unstructured quad mesh.
IAVariableVec make_constraint_group (const MEntVector &model_entity_vec)
 Convert container of ModelEnts to a container of IAVariables. MEVec is an indirect way of specifying the model entities's variables.
void constrain_sum_equal (const IAVariableVec &side_one, const IAVariableVec &side_two)
 Constrain that the sum of the number of intervals on one side is equal to the number on the other side. E.g. when mapping a surface, the opposite sides require equal intervals.
void constrain_sum_even (const IAVariableVec &sum_even_vars)
 Constrain that the sum of the number of intervals is an even number, i.e. 2k for some integer k. E.g. for the curves bounding an unstructured quad mesh.

Solve the problem

virtual void execute_this ()
 Main function that graph calls. Inherited from MeshScheme. find solution satisfying all the constraints assign the solution to the variables May be unsuccessful if the problem is over-specified. (how can callers detect failure? exception throw? no valid solution value in variables?)
virtual void execute_this ()
 Main function that graph calls. Inherited from MeshScheme. find solution satisfying all the constraints assign the solution to the variables May be unsuccessful if the problem is over-specified. (how can callers detect failure? exception throw? no valid solution value in variables?)
virtual void execute_this ()
 Main function that graph calls. Inherited from MeshScheme. find solution satisfying all the constraints assign the solution to the variables May be unsuccessful if the problem is over-specified. (how can callers detect failure? exception throw? no valid solution value in variables?)

Represent a sub-set for a sub-problem

Subdivide the problem into independent subproblems, in the sense that the solution to one subproblem is not affected in any way by the solution to another. I.e. independent if have no constraints or variables in common. A given subproblem is complete, in that it contains all the variables for each of its constraints, and also all the constraints for each of its variables.

typedef std::set< int > IndexSet
typedef std::set< int > IndexSet
typedef std::set< int > IndexSet

Represent a sub-set for a sub-problem, vector for variable or constraint

typedef std::vector< IndexSetIndexSetVec
typedef std::vector< int > IndexVec
typedef std::vector< IndexVecIndexVecVec
typedef std::vector< SubProblem * > SubProblemVec
typedef std::vector< IndexSetIndexSetVec
typedef std::vector< int > IndexVec
typedef std::vector< IndexVecIndexVecVec
typedef std::vector< SubProblem * > SubProblemVec
typedef std::vector< IndexSetIndexSetVec
typedef std::vector< int > IndexVec
typedef std::vector< IndexVecIndexVecVec
typedef std::vector< SubProblem * > SubProblemVec
void make_set_0_to_nm1 (IndexSet &index_set, const size_t k)
 Set = [0,1,...k-1].
void make_vec_0_to_nm1 (IndexVec &index_vec, const size_t k)
 Vector = [0,1,...k-1].
void make_vec_unset (IndexVec &index_vec, const size_t k)
 Vector = [-1,-1,...-1] of length k.
void set_variable_constraint_indices (VariableConstraintDependencies &var_con_dep)
 Build a representation of the dependency of the problem using indicator sets.
void set_variable_constraint_indices (VariableConstraintDependencies &var_con_dep, const int i_start, const VariableVecVec &variable_vec_vec)
 Underlying workhorse to build a representation of the dependency of the problem using indicator sets, for one constraint.
void make_global_set (ProblemSets &problem_sets)
 Initialize the global set defining the global problem.
void global_to_sub_side (const VariableVec &global_constraint, IndexVec &global_var_map, IndexVec &local_constraint, int &rhs) const
 Convert a globally-indexed constraint into a locally-indexed constraint.
void fill_problem (ProblemSets &sub_sets, SubProblem *sub_problem, IndexVec &global_var_map) const
 Convert set-based definition of problem into an IAData based representation.
void subdivide_problem (SubProblemVec &subproblems)
 Build independent subproblems.
void subdivide_problem_one (std::vector< IAData * > &subproblems)
void make_set_0_to_nm1 (IndexSet &index_set, const size_t k)
 Set = [0,1,...k-1].
void make_vec_0_to_nm1 (IndexVec &index_vec, const size_t k)
 Vector = [0,1,...k-1].
void make_vec_unset (IndexVec &index_vec, const size_t k)
 Vector = [-1,-1,...-1] of length k.
void set_variable_constraint_indices (VariableConstraintDependencies &var_con_dep)
 Build a representation of the dependency of the problem using indicator sets.
void set_variable_constraint_indices (VariableConstraintDependencies &var_con_dep, const int i_start, const VariableVecVec &variable_vec_vec)
 Underlying workhorse to build a representation of the dependency of the problem using indicator sets, for one constraint.
void make_global_set (ProblemSets &problem_sets)
 Initialize the global set defining the global problem.
void global_to_sub_side (const VariableVec &global_constraint, IndexVec &global_var_map, IndexVec &local_constraint, int &rhs) const
 Convert a globally-indexed constraint into a locally-indexed constraint.
void fill_problem (ProblemSets &sub_sets, SubProblem *sub_problem, IndexVec &global_var_map) const
 Convert set-based definition of problem into an IAData based representation.
void subdivide_problem (SubProblemVec &subproblems)
 Build independent subproblems.
void subdivide_problem_one (std::vector< IAData * > &subproblems)
void make_set_0_to_nm1 (IndexSet &index_set, const size_t k)
 Set = [0,1,...k-1].
void make_vec_0_to_nm1 (IndexVec &index_vec, const size_t k)
 Vector = [0,1,...k-1].
void make_vec_unset (IndexVec &index_vec, const size_t k)
 Vector = [-1,-1,...-1] of length k.
void set_variable_constraint_indices (VariableConstraintDependencies &var_con_dep)
 Build a representation of the dependency of the problem using indicator sets.
void set_variable_constraint_indices (VariableConstraintDependencies &var_con_dep, const int i_start, const VariableVecVec &variable_vec_vec)
 Underlying workhorse to build a representation of the dependency of the problem using indicator sets, for one constraint.
void make_global_set (ProblemSets &problem_sets)
 Initialize the global set defining the global problem.
void global_to_sub_side (const VariableVec &global_constraint, IndexVec &global_var_map, IndexVec &local_constraint, int &rhs) const
 Convert a globally-indexed constraint into a locally-indexed constraint.
void fill_problem (ProblemSets &sub_sets, SubProblem *sub_problem, IndexVec &global_var_map) const
 Convert set-based definition of problem into an IAData based representation.
void subdivide_problem (SubProblemVec &subproblems)
 Build independent subproblems.
void subdivide_problem_one (std::vector< IAData * > &subproblems)

Detailed Description

The class used in MeshKit for Interval Assignment.

Instances of this class are tools. The problem is to set up and solving the number of mesh edges to place on model entities and entity features. When solved, each curve can be meshed independently, and treated as fixed when meshing each surface or volume containing it. Different mesh schemes have different requirements (constraints), such as a mapped surface needs opposite sides to have equal numbers of mesh edges (intervals). The number of mesh edges on one curve is a variable; there may be additional variables. The goal (objective function) is to have mesh edges close to the user-desired sizes.

Construction of IAInterface does not cause the construction of variables. Destruction of IAInterface does destroy the underlying variables. IAInterface owns an IAVariable, for creation and deletion. But the ModelEnt can request a variable for itself, and lets the interface know when it is no longer wanted. ModelEnt keeps handles (pointers) to the variables it cares about.

Examples:
example_intassign.cpp.

Definition at line 41 of file IntervalAssignment/meshkit/IAInterface.hpp.


Member Typedef Documentation

typedef std::vector<IAVariable*> IAVariableVec

Containers for variables for specifying constraints.

Definition at line 109 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector<IAVariable*> IAVariableVec

Containers for variables for specifying constraints.

Definition at line 109 of file meshkit/IAInterface.hpp.

typedef std::vector<IAVariable*> IAVariableVec

Containers for variables for specifying constraints.

Definition at line 113 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::set<int> IndexSet [private]

Definition at line 218 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::set<int> IndexSet [private]

Definition at line 218 of file meshkit/IAInterface.hpp.

typedef std::set<int> IndexSet [private]

Definition at line 226 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::vector< IndexSet > IndexSetVec [private]

Definition at line 221 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector< IndexSet > IndexSetVec [private]

Definition at line 221 of file meshkit/IAInterface.hpp.

typedef std::vector< IndexSet > IndexSetVec [private]

Definition at line 229 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::vector< int > IndexVec [private]

Definition at line 222 of file meshkit/IAInterface.hpp.

typedef std::vector< int > IndexVec [private]

Definition at line 222 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector< int > IndexVec [private]

Definition at line 230 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::vector< IndexVec > IndexVecVec [private]

Definition at line 223 of file meshkit/IAInterface.hpp.

typedef std::vector< IndexVec > IndexVecVec [private]

Definition at line 223 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector< IndexVec > IndexVecVec [private]

Definition at line 231 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::vector<SubProblem*> SubProblemVec [private]

Definition at line 326 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector<SubProblem*> SubProblemVec [private]

Definition at line 326 of file meshkit/IAInterface.hpp.

typedef std::vector<SubProblem*> SubProblemVec [private]

Definition at line 334 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::vector< IAVariable* > VariableVec

Get const_iterators over the variables.

Definition at line 91 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector< IAVariable* > VariableVec

Get const_iterators over the variables.

Definition at line 91 of file meshkit/IAInterface.hpp.

typedef std::vector< IAVariable* > VariableVec

Get const_iterators over the variables.

Definition at line 95 of file IntervalAssignment/stubs/IAInterface.hpp.

typedef std::vector< VariableVec > VariableVecVec [private]

Definition at line 192 of file IntervalAssignment/meshkit/IAInterface.hpp.

typedef std::vector< VariableVec > VariableVecVec [private]

Definition at line 192 of file meshkit/IAInterface.hpp.

typedef std::vector< VariableVec > VariableVecVec [private]

Definition at line 200 of file IntervalAssignment/stubs/IAInterface.hpp.


Constructor & Destructor Documentation

IAInterface ( MKCore mkcore,
const MEntVector me_vec = MEntVector() 
) [inline]

Constructor; model entity can be missing, in which case it's retrieved or created.

Parameters:
MKCoreinstance
MEntVector

Definition at line 53 of file IntervalAssignment/meshkit/IAInterface.hpp.

~IAInterface ( ) [virtual]

Destructor, destroys IAVariables.

Definition at line 142 of file IAInterface.cpp.

virtual ~IAInterface ( ) [virtual]

Constructor; model entity can be missing, in which case it's retrieved or created.

Parameters:
MKCoreinstance
MEntVectorDestructor, destroys IAVariables
IAInterface ( MKCore mkcore,
const MEntVector me_vec = MEntVector() 
) [inline]

Constructor; model entity can be missing, in which case it's retrieved or created.

Parameters:
MKCoreinstance
MEntVector

Definition at line 53 of file meshkit/IAInterface.hpp.

virtual ~IAInterface ( ) [virtual]

Destructor, destroys IAVariables.


Member Function Documentation

void assign_solution ( SubProblem subproblem) [private]

Assign the found solution to the IAVariables.

Definition at line 541 of file IAInterface.cpp.

void assign_solution ( SubProblem subproblem) [private]

Assign the found solution to the IAVariables.

void assign_solution ( SubProblem subproblem) [private]

Assign the found solution to the IAVariables.

static bool can_mesh ( iBase_EntityType  dim) [inline, static]

Function returning whether this scheme can mesh entities of the specified dimension.

Parameters:
dimentity dimension

Definition at line 156 of file meshkit/IAInterface.hpp.

static bool can_mesh ( iBase_EntityType  dim) [inline, static]

Function returning whether this scheme can mesh entities of the specified dimension.

Parameters:
dimentity dimension

Definition at line 156 of file IntervalAssignment/meshkit/IAInterface.hpp.

static bool can_mesh ( ModelEnt model_ent) [inline, static]

Function returning whether this scheme can mesh the specified entity.

Used by MeshOpFactory to find scheme for an entity.

Parameters:
model_entModelEnt being queried
Returns:
If true, this scheme can mesh the specified ModelEnt

Definition at line 165 of file meshkit/IAInterface.hpp.

static bool can_mesh ( ModelEnt model_ent) [inline, static]

Function returning whether this scheme can mesh the specified entity.

Used by MeshOpFactory to find scheme for an entity.

Parameters:
model_entModelEnt being queried
Returns:
If true, this scheme can mesh the specified ModelEnt

Definition at line 165 of file IntervalAssignment/meshkit/IAInterface.hpp.

void constrain_sum_equal ( const IAVariableVec side_one,
const IAVariableVec side_two 
)

Constrain that the sum of the number of intervals on one side is equal to the number on the other side. E.g. when mapping a surface, the opposite sides require equal intervals.

void constrain_sum_equal ( const IAVariableVec side_one,
const IAVariableVec side_two 
)

Constrain that the sum of the number of intervals on one side is equal to the number on the other side. E.g. when mapping a surface, the opposite sides require equal intervals.

Examples:
example_intassign.cpp.

Definition at line 152 of file IAInterface.cpp.

void constrain_sum_equal ( const IAVariableVec side_one,
const IAVariableVec side_two 
)

Constrain that the sum of the number of intervals on one side is equal to the number on the other side. E.g. when mapping a surface, the opposite sides require equal intervals.

void constrain_sum_even ( const IAVariableVec sum_even_vars)

Constrain that the sum of the number of intervals is an even number, i.e. 2k for some integer k. E.g. for the curves bounding an unstructured quad mesh.

void constrain_sum_even ( const IAVariableVec sum_even_vars)

Constrain that the sum of the number of intervals is an even number, i.e. 2k for some integer k. E.g. for the curves bounding an unstructured quad mesh.

Definition at line 147 of file IAInterface.cpp.

void constrain_sum_even ( const IAVariableVec sum_even_vars)

Constrain that the sum of the number of intervals is an even number, i.e. 2k for some integer k. E.g. for the curves bounding an unstructured quad mesh.

IAVariable * create_variable ( ModelEnt model_entity,
IAVariable::Firmness  set_firmness,
double  goal_value 
)

Create a variable and assign it a firmness and goal.

Parameters:
IAVariable::FirmnessThe required fidelity of the solution to the goal. If HARD, then it is required that the solution equals the goal; goal should be integer. If SOFT, usual case, try to get close to the goal. If LIMP, we don't care how far the solution is from the goal.
doublegoal The desired number of intervals for this variable. The goal may be non-integer, but we assume the solution must be a natural number, i.e. an integer >= 1.

Definition at line 71 of file IAInterface.cpp.

IAVariable* create_variable ( ModelEnt model_entity,
IAVariable::Firmness  set_firmness,
double  goal_value 
)

Create a variable and assign it a firmness and goal.

Parameters:
IAVariable::FirmnessThe required fidelity of the solution to the goal. If HARD, then it is required that the solution equals the goal; goal should be integer. If SOFT, usual case, try to get close to the goal. If LIMP, we don't care how far the solution is from the goal.
doublegoal The desired number of intervals for this variable. The goal may be non-integer, but we assume the solution must be a natural number, i.e. an integer >= 1.
IAVariable* create_variable ( ModelEnt model_entity,
IAVariable::Firmness  set_firmness,
double  goal_value 
)

Create a variable and assign it a firmness and goal.

Parameters:
IAVariable::FirmnessThe required fidelity of the solution to the goal. If HARD, then it is required that the solution equals the goal; goal should be integer. If SOFT, usual case, try to get close to the goal. If LIMP, we don't care how far the solution is from the goal.
doublegoal The desired number of intervals for this variable. The goal may be non-integer, but we assume the solution must be a natural number, i.e. an integer >= 1.
void destroy_data ( )

Destroy all the variables and constraints.

Examples:
example_intassign.cpp.

Definition at line 119 of file IAInterface.cpp.

void destroy_data ( )

Destroy all the variables and constraints.

void destroy_data ( )

Destroy all the variables and constraints.

void destroy_variable ( IAVariable ia_variable)

Destroy a variable. If a variable is not explicitly destroyed, it will be destroyed on IAInterface tool destruction.

Definition at line 105 of file IAInterface.cpp.

void destroy_variable ( IAVariable ia_variable)

Destroy a variable. If a variable is not explicitly destroyed, it will be destroyed on IAInterface tool destruction.

void destroy_variable ( IAVariable ia_variable)

Destroy a variable. If a variable is not explicitly destroyed, it will be destroyed on IAInterface tool destruction.

virtual void execute_this ( ) [virtual]

Main function that graph calls. Inherited from MeshScheme. find solution satisfying all the constraints assign the solution to the variables May be unsuccessful if the problem is over-specified. (how can callers detect failure? exception throw? no valid solution value in variables?)

Implements GraphNode.

void execute_this ( ) [virtual]

Main function that graph calls. Inherited from MeshScheme. find solution satisfying all the constraints assign the solution to the variables May be unsuccessful if the problem is over-specified. (how can callers detect failure? exception throw? no valid solution value in variables?)

Implements GraphNode.

Definition at line 561 of file IAInterface.cpp.

virtual void execute_this ( ) [virtual]

Main function that graph calls. Inherited from MeshScheme. find solution satisfying all the constraints assign the solution to the variables May be unsuccessful if the problem is over-specified. (how can callers detect failure? exception throw? no valid solution value in variables?)

Implements GraphNode.

void fill_problem ( ProblemSets sub_sets,
SubProblem sub_problem,
IndexVec global_var_map 
) const [private]

Convert set-based definition of problem into an IAData based representation.

void fill_problem ( ProblemSets sub_sets,
SubProblem sub_problem,
IndexVec global_var_map 
) const [private]

Convert set-based definition of problem into an IAData based representation.

Definition at line 380 of file IAInterface.cpp.

void fill_problem ( ProblemSets sub_sets,
SubProblem sub_problem,
IndexVec global_var_map 
) const [private]

Convert set-based definition of problem into an IAData based representation.

IAVariable * get_variable ( ModelEnt model_entity = NULL,
bool  create_if_missing = true 
)

Create a variable. Variables are created before constraints. It is OK if a variable is not in any constraint, but constraints are defined by their variables.

Parameters:
ModelEnt*model entity: this variable corresponds to the number of intervals on that model entity. If NULL, the variable corresponds to anything else that has meaning to the caller, and the caller will have to keep track of the variable in order to access its solution value later.

Definition at line 36 of file IAInterface.cpp.

IAVariable* get_variable ( ModelEnt model_entity = NULL,
bool  create_if_missing = true 
)

Create a variable. Variables are created before constraints. It is OK if a variable is not in any constraint, but constraints are defined by their variables.

Parameters:
ModelEnt*model entity: this variable corresponds to the number of intervals on that model entity. If NULL, the variable corresponds to anything else that has meaning to the caller, and the caller will have to keep track of the variable in order to access its solution value later.
IAVariable* get_variable ( ModelEnt model_entity = NULL,
bool  create_if_missing = true 
)

Create a variable. Variables are created before constraints. It is OK if a variable is not in any constraint, but constraints are defined by their variables.

Parameters:
ModelEnt*model entity: this variable corresponds to the number of intervals on that model entity. If NULL, the variable corresponds to anything else that has meaning to the caller, and the caller will have to keep track of the variable in order to access its solution value later.
void global_to_sub_side ( const VariableVec global_constraint,
IndexVec global_var_map,
IndexVec local_constraint,
int &  rhs 
) const [private]

Convert a globally-indexed constraint into a locally-indexed constraint.

void global_to_sub_side ( const VariableVec global_constraint,
IndexVec global_var_map,
IndexVec local_constraint,
int &  rhs 
) const [private]

Convert a globally-indexed constraint into a locally-indexed constraint.

Definition at line 307 of file IAInterface.cpp.

void global_to_sub_side ( const VariableVec global_constraint,
IndexVec global_var_map,
IndexVec local_constraint,
int &  rhs 
) const [private]

Convert a globally-indexed constraint into a locally-indexed constraint.

IAVariable * index_to_variable ( int  ind) const [private]

Find the ind'th variable.

Definition at line 165 of file IAInterface.cpp.

IAVariable* index_to_variable ( int  ind) const [private]

Find the ind'th variable.

IAVariable* index_to_variable ( int  ind) const [private]

Find the ind'th variable.

IAVariableVec make_constraint_group ( const MEntVector model_entity_vec)

Convert container of ModelEnts to a container of IAVariables. MEVec is an indirect way of specifying the model entities's variables.

Convert container of ModelEnts to a container of IAVariables. MEVec is an indirect way of specifying the model entities's variables.

Examples:
example_intassign.cpp.

Definition at line 93 of file IAInterface.cpp.

IAVariableVec make_constraint_group ( const MEntVector model_entity_vec)

Convert container of ModelEnts to a container of IAVariables. MEVec is an indirect way of specifying the model entities's variables.

void make_global_set ( ProblemSets problem_sets) [private]

Initialize the global set defining the global problem.

void make_global_set ( ProblemSets problem_sets) [private]

Initialize the global set defining the global problem.

Definition at line 298 of file IAInterface.cpp.

void make_global_set ( ProblemSets problem_sets) [private]

Initialize the global set defining the global problem.

void make_set_0_to_nm1 ( IndexSet index_set,
const size_t  k 
) [private]

Set = [0,1,...k-1].

Definition at line 171 of file IAInterface.cpp.

void make_set_0_to_nm1 ( IndexSet index_set,
const size_t  k 
) [private]

Set = [0,1,...k-1].

void make_set_0_to_nm1 ( IndexSet index_set,
const size_t  k 
) [private]

Set = [0,1,...k-1].

void make_vec_0_to_nm1 ( IndexVec index_vec,
const size_t  k 
) [private]

Vector = [0,1,...k-1].

Definition at line 182 of file IAInterface.cpp.

void make_vec_0_to_nm1 ( IndexVec index_vec,
const size_t  k 
) [private]

Vector = [0,1,...k-1].

void make_vec_0_to_nm1 ( IndexVec index_vec,
const size_t  k 
) [private]

Vector = [0,1,...k-1].

void make_vec_unset ( IndexVec index_vec,
const size_t  k 
) [private]

Vector = [-1,-1,...-1] of length k.

void make_vec_unset ( IndexVec index_vec,
const size_t  k 
) [private]

Vector = [-1,-1,...-1] of length k.

Definition at line 190 of file IAInterface.cpp.

void make_vec_unset ( IndexVec index_vec,
const size_t  k 
) [private]

Vector = [-1,-1,...-1] of length k.

virtual const moab::EntityType* mesh_types_arr ( ) const [inline, virtual]

Return the mesh entity types operated on by this scheme.

Returns:
array terminated with moab::MBMAXTYPE

Implements MeshOp.

Definition at line 176 of file meshkit/IAInterface.hpp.

virtual const moab::EntityType* mesh_types_arr ( ) const [inline, virtual]

Return the mesh entity types operated on by this scheme.

Returns:
array terminated with moab::MBMAXTYPE

Implements MeshOp.

Definition at line 176 of file IntervalAssignment/meshkit/IAInterface.hpp.

static const char* name ( ) [inline, static]

Get class name.

Definition at line 149 of file meshkit/IAInterface.hpp.

static const char* name ( ) [inline, static]

Get class name.

Definition at line 149 of file IntervalAssignment/meshkit/IAInterface.hpp.

static const char* name ( ) [inline, static]

Get class name.

Definition at line 153 of file IntervalAssignment/stubs/IAInterface.hpp.

static const moab::EntityType* output_types ( ) [static]

Get list of mesh entity types that can be generated.

Returns:
array terminated with moab::MBMAXTYPE
const moab::EntityType * output_types ( ) [static]

Get list of mesh entity types that can be generated.

Returns:
array terminated with moab::MBMAXTYPE

Definition at line 28 of file IAInterface.cpp.

void print_problem ( ) const

Print the problem that was defined.

Definition at line 519 of file IAInterface.cpp.

void print_problem ( ) const

Print the problem that was defined.

void print_problem ( ) const

Function returning whether this scheme can mesh entities of the specified dimension.

Parameters:
dimentity dimensionFunction returning whether this scheme can mesh the specified entity

Used by MeshOpFactory to find scheme for an entity.

Parameters:
model_entModelEnt being queried
Returns:
If true, this scheme can mesh the specified ModelEntGet list of mesh entity types that can be generated.
array terminated with moab::MBMAXTYPEReturn the mesh entity types operated on by this scheme
array terminated with moab::MBMAXTYPEPrint the problem that was defined

Build a representation of the dependency of the problem using indicator sets.

Parameters:
constraintVariables(member) Output.
variableConstraints(member) Output.

Build a representation of the dependency of the problem using indicator sets.

Parameters:
constraintVariables(member) Output.
variableConstraints(member) Output.

Definition at line 218 of file IAInterface.cpp.

Build a representation of the dependency of the problem using indicator sets.

Parameters:
constraintVariables(member) Output.
variableConstraints(member) Output.
void set_variable_constraint_indices ( VariableConstraintDependencies var_con_dep,
const int  i_start,
const VariableVecVec variable_vec_vec 
) [private]

Underlying workhorse to build a representation of the dependency of the problem using indicator sets, for one constraint.

Parameters:
constraintVariables(member) Output.
variableConstraints(member) Output.
inti_start: Input. The following vector of constraints is indexed starting at i_start.
VariableVecVec,:Input. Constraints, each entry is a vector specifying one constraint.

Definition at line 198 of file IAInterface.cpp.

void set_variable_constraint_indices ( VariableConstraintDependencies var_con_dep,
const int  i_start,
const VariableVecVec variable_vec_vec 
) [private]

Underlying workhorse to build a representation of the dependency of the problem using indicator sets, for one constraint.

Parameters:
constraintVariables(member) Output.
variableConstraints(member) Output.
inti_start: Input. The following vector of constraints is indexed starting at i_start.
VariableVecVec,:Input. Constraints, each entry is a vector specifying one constraint.
void set_variable_constraint_indices ( VariableConstraintDependencies var_con_dep,
const int  i_start,
const VariableVecVec variable_vec_vec 
) [private]

Underlying workhorse to build a representation of the dependency of the problem using indicator sets, for one constraint.

Parameters:
constraintVariables(member) Output.
variableConstraints(member) Output.
inti_start: Input. The following vector of constraints is indexed starting at i_start.
VariableVecVec,:Input. Constraints, each entry is a vector specifying one constraint.
virtual void setup_this ( ) [virtual]

More constraint types may be implemented here.

Main function that graph calls. Inherited from MeshScheme.

Implements GraphNode.

void setup_this ( ) [virtual]

More constraint types may be implemented here.

Main function that graph calls. Inherited from MeshScheme.

Implements GraphNode.

Definition at line 31 of file IAInterface.cpp.

virtual void setup_this ( ) [virtual]

More constraint types may be implemented here.

Main function that graph calls. Inherited from MeshScheme.

Implements GraphNode.

bool solve_subproblem ( SubProblem subproblem) [private]

For a subproblem, find a solution for the number of intervals for each variable.

Definition at line 535 of file IAInterface.cpp.

bool solve_subproblem ( SubProblem subproblem) [private]

For a subproblem, find a solution for the number of intervals for each variable.

bool solve_subproblem ( SubProblem subproblem) [private]

For a subproblem, find a solution for the number of intervals for each variable.

void subdivide_problem ( SubProblemVec subproblems) [private]

Build independent subproblems.

void subdivide_problem ( SubProblemVec subproblems) [private]

Build independent subproblems.

Definition at line 435 of file IAInterface.cpp.

void subdivide_problem ( SubProblemVec subproblems) [private]

Build independent subproblems.

void subdivide_problem_one ( std::vector< IAData * > &  subproblems) [private]
void subdivide_problem_one ( std::vector< IAData * > &  subproblems) [private]

Definition at line 470 of file IAInterface.cpp.

void subdivide_problem_one ( std::vector< IAData * > &  subproblems) [private]
int variable_to_index ( const IAVariable var) const [private]

Find the global interface index of the given variable.

int variable_to_index ( const IAVariable var) const [private]

Find the global interface index of the given variable.

Definition at line 160 of file IAInterface.cpp.

int variable_to_index ( const IAVariable var) const [private]

Find the global interface index of the given variable.

VariableVec::const_iterator variables_begin ( ) const [inline]

Definition at line 92 of file IntervalAssignment/meshkit/IAInterface.hpp.

VariableVec::const_iterator variables_begin ( ) const [inline]

Definition at line 92 of file meshkit/IAInterface.hpp.

VariableVec::const_iterator variables_begin ( ) const [inline]

Definition at line 96 of file IntervalAssignment/stubs/IAInterface.hpp.

VariableVec::const_iterator variables_end ( ) const [inline]

Definition at line 93 of file IntervalAssignment/meshkit/IAInterface.hpp.

VariableVec::const_iterator variables_end ( ) const [inline]

Definition at line 93 of file meshkit/IAInterface.hpp.

VariableVec::const_iterator variables_end ( ) const [inline]

Definition at line 97 of file IntervalAssignment/stubs/IAInterface.hpp.


Member Data Documentation

static const bool debugging = false [static, private]

Definition at line 347 of file IntervalAssignment/meshkit/IAInterface.hpp.

Internal representation of the data specifying the Interval Assignment problem.

Definition at line 191 of file IntervalAssignment/meshkit/IAInterface.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines