37 #ifdef MSQ_USE_OLD_STD_HEADERS
47 #include "MeshSet.hpp"
48 #include "MsqInterrupt.hpp"
49 #include "QualityImprover.hpp"
50 #include "QualityAssessor.hpp"
51 #include "MsqError.hpp"
52 #include "MsqDebug.hpp"
53 #include "MeanMidNodeMover.hpp"
55 #include "TargetCalculator.hpp"
57 using namespace Mesquite;
66 InstructionQueue::InstructionQueue() :
68 autoAdjMidNodes(true),
69 nbPreConditionners(0),
95 MSQ_SETERR(err)(
"Cannot add preconditionners once the master "
123 msq_std::list<PatchDataUser*>::iterator pos;
129 MSQ_SETERR(err)(
"Index does not point to a QualityImprover.",
134 string name = (*pos)->get_name();
153 MSQ_SETERR(err)(
"Cannot add a preconditionner after the master "
163 list<PatchDataUser*>::iterator pos;
199 list<PatchDataUser*>::iterator pos;
205 MSQ_SETERR(err)(
"Index does not point to a QualityImprover.",
210 string name = (*pos)->get_name();
227 MSQ_SETERR(err)(
"index points two positions beyond end of list.",
233 list<PatchDataUser*>::iterator pos;
245 MSQ_DBGOUT(1) <<
"InstructionQueue::set_master_quality_improver():\n"
246 <<
"\tOverwriting previously specified master quality improver.\n";
248 list<PatchDataUser*>::iterator master_pos;
265 MSQ_SETERR(err)(
"no pre-conditionners allowed if master QualityImprover "
270 #ifdef ENABLE_INTERRUPT
278 msq_std::list<PatchDataUser*>::const_iterator instr_iter;
302 (*instr_iter)->no_global_patch();
306 (*instr_iter)->loop_over_mesh(ms, err);
MSQ_ERRRTN(err);
310 (*instr_iter)->no_global_patch();
339 msq_std::list<PatchDataUser*>::iterator instr_iter;
340 msq_std::list<PatchDataUser*>::iterator master_pos;
msq_std::list< PatchDataUser * >::iterator clear_master(MsqError &err)
void remove_quality_assessor(size_t index, MsqError &err)
removes a QualityAssessor* from the instruction queue
Class to adjust positions of higher-order nodes.
Used to hold the error state and return it to the application.
PatchData * globalPatch
Used to prevent reallocating a global patch for successive global algorithms.
void set_master_quality_improver(QualityImprover *instr, MsqError &err)
Base class for all quality improvers. Mote that the PatchData settings are inherited from the PathDat...
const char * version_string(bool include_build_number=false)
void remove_preconditioner(size_t index, MsqError &err)
removes a QualityImprover* from the instruction queue
Utility class used by InstructionQueue SIGFPE option.
void add_target_calculator(TargetCalculator *tc, MsqError &err)
msq_std::list< PatchDataUser * > instructions
A QualityAssessor instance can be inserted into an InstructionQueue to calculate and summarize regist...
void add_quality_assessor(QualityAssessor *instr, MsqError &err)
adds a QualityAssessor to the instruction queue.
invalid function argument passed
void add_preconditioner(QualityImprover *instr, MsqError &err)
adds a QualityImprover at the end of the instruction list
#define MSQ_SETERR(err)
Macro to set error - use err.clear() to clear.
size_t nbPreConditionners
Base class that provides the interface for computing the target corner matrices used in the context b...
virtual void run_instructions(MeshSet &msc, MsqError &err)
This function is virtual so that it may be redefined in the wraper classes.
object is in an invalid state
const bool IQ_TRAP_FPE_DEFAULT
#define MSQ_DBGOUT(flag)
Check debug flag and return ostream associated with flag.
void insert_quality_assessor(QualityAssessor *instr, size_t index, MsqError &err)
inserts a QualityAssessor* into the instruction queue.
size_t masterInstrIndex
0-based.
#define MSQ_ERRRTN(err)
If passed error is true, return from a void function.
Class to watch for user-interrupt (SIGINT, ctrl-C)
void insert_preconditioner(QualityImprover *instr, size_t index, MsqError &err)
inserts a QualityImprover* into the instruction queue.
The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh informati...
bool get_next_patch(PatchData &pd, PatchDataUser *pd_user, MsqError &err)
Gets the next PatchData.