📄 xmdsclasses.h
字号:
// *****************************************************************************// *****************************************************************************// xmdsSegment// *****************************************************************************// *****************************************************************************//! xmds segment classclass xmdsSegment : public xmdsElement {public : //! Number of segments or current segment number (buh?) const unsigned long segmentNumber; //! Constructor of xmdsSegment object xmdsSegment( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsSegment(); //! Returns the output sample count virtual void outputSampleCount() const; //! Writes initialisation calls to file virtual void writeInitialisationCalls( FILE *const outfile) const;};// *****************************************************************************// *****************************************************************************// xmdsSequence// *****************************************************************************// *****************************************************************************//! I think this organises the sequence in which elements of the simulation are processed.class xmdsSequence : public xmdsSegment {public : //! Constructor for xmdsSequence object xmdsSequence( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsSequence(); //! Processes elements within an xmds sequence void processElement( const Element *const yourElement); //! Returns the output sample count of the sequence void outputSampleCount() const;private : unsigned long nCycles; //!< The number of cycles in the sequence list<const xmdsSegment*> mySegmentList; //!< The list of segments //! Write the sequence defines to file void writeDefines( FILE *const outfile) const; //! Write the sequence globals to file void writeGlobals( FILE *const outfile) const; //! Write the sequence prototypes to file void writePrototypes( FILE *const outfile) const; //! Write the sequence routines to file void writeRoutines( FILE *const outfile) const; //! Create an xmds sequence object xmdsSegment* createxmdsSequence(); //! Create an xmds integrate RK4 EX object xmdsSegment* createxmdsIntegrateRK4EX(); //! Create an xmds integrate RK4 IP object xmdsSegment* createxmdsIntegrateRK4IP(); //! Create an xmds integrate SI EX object xmdsSegment* createxmdsIntegrateSIEX(); //! Create an xmds integrate SI IP object xmdsSegment* createxmdsIntegrateSIIP(); //! Create an xmds filte object xmdsSegment* createxmdsFilter();};//! Structure containing components of an xmdsSequencestruct coStruct { unsigned long componentNumber; //!< The component number list<unsigned long> operatorNumbersList; //!< The operator numbers list list<unsigned long> coKeysList; //!< The component keys list};//! Structure containing components of an integrate moment groupstruct integrateMomentGroup { list<XMLString> momentNameList; //!< The list of moment names list<bool> integrateDimensionList; //!< List of whether dimensions are integrated XMLString integrateMomentGroupCode; //!< The integrate moment group code};// *****************************************************************************// *****************************************************************************// xmdsIntegrate// *****************************************************************************// *****************************************************************************//! Class to organise integration of relevant equations in simulationclass xmdsIntegrate : public xmdsSegment {public : //! Enumerator containing the half and full step integration parameters enum stepCaseEnum { FIRST_HALFSTEP, SECOND_HALFSTEP, FULLSTEP }; //! Constructor for xmdsIntegrate object xmdsIntegrate( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsIntegrate(); //! Processes the xmds element void processElement( const Element *const yourElement);protected : //! Writes the defines to outfile void writeDefines( FILE *const outfile) const; //! Writes global variables to outfile void writeGlobals( FILE *const outfile) const; //! Writes function prototypes to outfile void writePrototypes( FILE *const outfile) const; //! Writes the x-space prototypes to outfile virtual void writexSpacePrototype( FILE *const outfile) const; //! Writes the simulation routines void writeRoutines( FILE *const outfile) const; //! Writes the x-space simulation routines virtual void writexSpaceRoutine( FILE *const outfile) const; //! Returns the interval (buh?) const XMLString* interval() const; //! Returns the lattice unsigned long lattice() const; //! Returns the number of samples unsigned long samples( const unsigned long& index) const; //! Returns the vector name list in k-space const list<XMLString>* KVectorNamesList() const; //! Determines if k is constant (buh?) bool constantK() const; //! Returns the number of operators in k-space unsigned long nKOperators() const; //! Returns the k-space operator as XMLString const XMLString* KOperator( const unsigned long& index) const; //! Returns the k-space operator /*! Why does this return boolean? */ bool getKOperator( const XMLString& operatorName, unsigned long& index) const; //! k-space operators code const XMLString* KOperatorsCode() const; //! Returns the vector names list list<XMLString>* vectorNamesList(); //! Returns the vector names list const list<XMLString>* vectorNamesList() const; //! Returns the propagation code XMLString* propagationCode(); //! Returns the propagation code const XMLString* propagationCode() const; //! Returns the cross vector names list const list<XMLString>* crossVectorNamesList() const; //! Returns the cross dimension number unsigned long crossDimNumber() const; //! Returns the cross propagation code const XMLString* crossPropagationCode() const; //! Determines if k-space operators are used bool usesKOperators() const; //! Returns the code element list list<XMLString>* codeElementList(); //! Returns the code element list const list<XMLString>* codeElementList() const; //! Returns number of non-loop propagation elements long unsigned int numNonLoopPropagation() const; //! Returns the non-loop propagation code list const list<XMLString>* nonLoopPropagationCodeList() const; //! Returns the non-loop propagation code list list<XMLString>* nonLoopPropagationCodeList(); //! Returns number of integrate moment groups long unsigned int numIntegrateMomentGroups() const; //! Returns the integrate moment group list const list<integrateMomentGroup>* integrateMomentGroupList() const; //! Returns the integrate moment group list list<integrateMomentGroup>* integrateMomentGroupList(); //! Gets the component structure /*! Why does this return boolean? */ bool getcoStruct( const unsigned long& componentNumber, const coStruct*& thecoStruct) const; //! Gets the component key /*! Why does this return boolean? */ bool getcoKey( const unsigned long& componentNumber, const unsigned long& operatorNumber, unsigned long& coKey) const; //! Adds a component pair unsigned long addcoPair( const unsigned long& componentNumber, const unsigned long& operatorNumber); //! Finds the next component pair /*! Why does this return boolean? */ bool findNextcoPair( XMLString& operatorName, XMLString& componentName, unsigned long& start, unsigned long& end) const; //! Determines if generation of noises is to be supressed bool noNoises() const;private : XMLString myInterval; //!< The interval over which to integrate unsigned long myLattice; //!< The integration lattice list<unsigned long> mySamplesList; //!< The list of samples over the lattice list<XMLString> myKVectorNamesList; //!< The list of the names of the k-space vectors bool myConstantK; //!< Whether or not the k-operators are constant list<XMLString> myKOperatorNamesList; //!< The list of k-operator names XMLString myKOperatorsCode; //!< The k-operators code list<XMLString> myVectorNamesList; //!< The list of vector names XMLString myPropagationCode; //!< The propagation code list<XMLString> myCrossVectorNamesList; //!< The list of cross-propagation vector names unsigned long myCrossDimNumber; //!< The cross-propagation dimension number list<XMLString> myCodeElementList; //!< Names of code elements long myNumIntegrateMomentGroups; //!< Number of non-loop propagation elements list<integrateMomentGroup> myIntegrateMomentGroupList; //!< The list of integrate moment group elements long myNumNonLoopPropagation; //!< Number of non-loop propagation elements list<XMLString> myNonLoopPropagationCodeList; //!< The list of non-loop propagation codes XMLString myCrossPropagationCode; //!< The cross-propagation code list<coStruct> mycoStructList; //!< The component structure list unsigned long myNextcoKey; //!< The key of the next component bool myNonoises; //!< Flag for turning off noise generation //! The output sample count void outputSampleCount() const; //! Write the integrate initialisation calls to file void writeInitialisationCalls( FILE *const outfile) const;};// *****************************************************************************// *****************************************************************************// xmdsFilter// *****************************************************************************// *****************************************************************************//! xmds filter classclass xmdsFilter : public xmdsSegment {public : //! Constructor for xmdsFilter object xmdsFilter( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsFilter(); //! Processes filter element void processElement( const Element *const yourElement);protected: //! Returns the code element list list<XMLString>* codeElementList(); //! Returns the code element list const list<XMLString>* codeElementList() const; //! Returns number of non-loop propagation elements long unsigned int numNonLoopPropagation() const; //! Returns the non-loop propagation code list list<XMLString>* nonLoopPropagationCodeList(); //! Returns the non-loop propagation code list const list<XMLString>* nonLoopPropagationCodeList() const; //! Returns number of integrate moment groups long unsigned int numIntegrateMomentGroups() const; //! Returns the integrate moment group list list<integrateMomentGroup>* integrateMomentGroupList(); //! Returns the integrate moment group list const list<integrateMomentGroup>* integrateMomentGroupList() const;private : list<XMLString> myVectorNamesList; //!< List of vector names unsigned long mySpace; //!< Space of filter (x-space or k-space) XMLString myCode; //!< The filter code list<XMLString> myCodeElementList; //!< Names of code elements long myNumIntegrateMomentGroups; //!< Number of non-loop propagation elements list<integrateMomentGroup> myIntegrateMomentGroupList; //!< The list of integrate moment group elements long myNumNonLoopPropagation; //!< Number of non-loop propagation elements list<XMLString> myNonLoopPropagationCodeList; //!< The list of non-loop propagation codes bool myNonoises; //!< Flag for turning off noise generation //! Write the filter prototypes to file void writePrototypes( FILE *const outfile) const; //! Write the filter routines to file void writeRoutines( FILE *const outfile) const; //! Determine the space at index (buh?) bool space( const long unsigned int& index) const;};// *****************************************************************************// *****************************************************************************// xmdsIntegrateIP// *****************************************************************************// *****************************************************************************//! Class to integrate the equations in the interaction pictureclass xmdsIntegrateIP : public virtual xmdsIntegrate {public : //! Constructor of xmdsIntegrateIP object xmdsIntegrateIP( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsIntegrateIP(); //! Processes the element void processElement( const Element *const yourElement);protected : //! Writes the function prototypes to outfile void writePrototypes( FILE *const outfile) const; //! Writes the routines to outfile void writeRoutines( FILE *const outfile) const;private : //! Write the calculate k-operator field routine to file void writeCalculatekOperatorFieldRoutine( FILE *const outfile) const; //! Write the constant k-operators propagate routine to file void writeConstkPropagateRoutine( FILE *const outfile) const; //! Write the time dependent k-operators propagate routine to file void writeTimeDepkPropagateRoutine( FILE *const outfile) const;};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -