📄 xmdsclasses.h
字号:
const xmdsField *const myField; //!< The field object XMLString myName; //!< The name of the field xmdsVectorType myType; //!< The data type of the field (double or complex) unsigned long myInitialSpace; //!< The initial space of the simulation (x-space or k-space) list<XMLString> myComponentsNamesList; //!< The list of the names of the components mutable bool myNeedsFFTWRoutines; //!< Whether or not the fftw routines are needed};// *****************************************************************************// *****************************************************************************// xmdsVectorElement// *****************************************************************************// *****************************************************************************//! xmds vector element classclass xmdsVectorElement : public xmdsVector, public xmdsElement {public : //! Constructor for the xmdsVectorElement object xmdsVectorElement( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode, const xmdsField *const yourField); //! Destructor ~xmdsVectorElement(); //! Processes an element of an xmds vector element void processElement( const Element *const yourElement);private : XMLString myFileName; //!< The input filename of the initialisation vector int myInputFileFormat; //!< The input file format list<XMLString> myVectorNamesList; //!< The list of vector names XMLString myCode; //!< The string of code for initialisation of the vector(s) //! Write the initialisation routine to file void writeInitialiseRoutine( FILE *const outfile) const;};// *****************************************************************************// *****************************************************************************// xmdsArgv// *****************************************************************************// *****************************************************************************class xmdsArg;class xmdsArgElement;//! xmds argv class/*! The class that handles command line arguments to xmds simulations. This is equivalent to the **argv array in C.*/class xmdsArgv : public xmdsElement {public : //! Constructor of xmdsArgv object xmdsArgv( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsArgv(); //! Processes the xmds element void processElement( const Element *const yourElement); //! Processes the args in the argument names list void processArgs( const list<XMLString>& argNamesList, const unsigned long& space) const; //! Gets the arg? /*! Why does this return boolean if it gets the argument? */ bool getArg( const XMLString& argName, const xmdsArg*& theArg) const; //! Returns the argument names in a list void argNames( list<XMLString>& argNamesList) const; //! Creates an xmds argument xmdsArg* createxmdsArg();protected:private : list<const xmdsArg*> myArgsList; //!< The list of arguments //! Create an xmds argument element object xmdsArgElement* createxmdsArgElement();};// *****************************************************************************// *****************************************************************************// xmdsArg// *****************************************************************************// *****************************************************************************//! xmds arg class/*! The class that handles individual arguments for the simulation command line. More specifically, it handles the name, type and default value of arguments to be used on the command line.*/class xmdsArg {public : //! Constructor for xmdsArg object xmdsArg( const xmdsArgv *const yourArgv); //! Destructor virtual ~xmdsArg(); //! grabs the argument name const XMLString* name() const; //! Sets the argument name void setName( const XMLString& yourName);protected: //! Obtains an instance of the xmdsArgv object const xmdsArgv* argv() const;private : const xmdsArgv *const myArgv; //!< The "vector" of arguments XMLString myName; //!< The name of the argument};// *****************************************************************************// *****************************************************************************// xmdsArgElement// *****************************************************************************// *****************************************************************************//! xmds arg element class/*! The class that handles individual elements of an argument. These are the name of the argument, its type and its default value.*/class xmdsArgElement : public xmdsArg, public xmdsElement {public : //! Constructor for the xmdsArgElement object xmdsArgElement( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode, const xmdsArgv *const yourArgv); //! Destructor ~xmdsArgElement(); //! Processes an element of an xmds vector element void processElement( const Element *const yourElement);private : // void writeArgDeclaration( // FILE *const outfile) const; // void writeArgCode( // FILE *const outfile) const; // list<XMLString> myArgNamesList;};// *****************************************************************************// *****************************************************************************// xmdsMomentGroup// *****************************************************************************// *****************************************************************************//! xmds moment group classclass xmdsMomentGroup : public xmdsField {public : //! Constructor for the xmdsMomentGroup class /*! @param yourSimulation an xmdsSimulation object @param yourVerboseMode a boolean @param yourGroupNumber an unsigned long */ xmdsMomentGroup( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode, const unsigned long& yourGroupNumber); //! Destructor ~xmdsMomentGroup(); //! Process elements within a moment group void processElement( const Element *const yourElement); //! Adds the specified number of samples to the moment group void addSamples( const unsigned long& n2add) const; //! Sets up the final geometry of the moment group void finaliseGeometry(); //! Function to determine if simulation requires integrations bool requiresIntegrations() const; //! Function to determine if simulation requires a complex raw vector bool needscomplexRawVector() const;private : const unsigned long myGroupNumber; //!< The group number (of the current object?) list<XMLString> myVectorNamesList; //!< The list of vector names unsigned long mySamplingSpace; //!< The sampling space (x-space or k-space) list<unsigned long> mySamplingLatticeList; //!< The sampling lattice list list<XMLString> mySamplingMomentsList; //!< The sampling moments list XMLString mySamplingCode; //!< String containing the sampling code unsigned long myRawSpace; //!< Integer representing the raw space (before post-processing) unsigned long myPostSpace; //!< Integer representing the post space list<XMLString> myPostMomentsList; //!< List of moments in the post space XMLString myPostCode; //!< Code for post-propagation list<XMLString> myPostProcessingVectorNamesList; //!< List of vector names in post-propagation list<unsigned long> myMain2PostDimList; //!< List of dimensions from main space to post space (I think) list<unsigned long> myPost2MainDimList; //!< List of dimensions from post space to main space (I think) xmdsFieldGeometry tempGeometry; //!< Temporary field geometry bool complexRawVector; //!< Whether or not we have a complex raw vector bool myRequiresIntegrations; //!< Whether or not integrations are required mutable unsigned long nSamples; //!< The number of samples to take //! Write the moment group defines to file void writeDefines( FILE *const outfile) const; //! Write the moment group globals to file void writeGlobals( FILE *const outfile) const; //! Write the moment group prototypes to file void writePrototypes( FILE *const outfile) const; //! Write the moment group routines to file void writeRoutines( FILE *const outfile) const; //! Determine the sampling space at index bool samplingSpace( const unsigned long& index) const; //! Determin the post space at index bool postSpace( const unsigned long& index) const; //! Return the main to post-propagation dimension unsigned long main2PostDim( const unsigned long& index) const; //! Return the post-propagation to main dimension unsigned long post2MainDim( const unsigned long& index) const;};// *****************************************************************************// *****************************************************************************// xmdsBreakPoint// *****************************************************************************// *****************************************************************************//! xmds break point classclass xmdsBreakPoint : public xmdsField {public : //! Constructor for the xmdsBreakPoint class /*! @param yourSimulation an xmdsSimulation object @param yourVerboseMode a boolean @todo Break points need to be implemented */ xmdsBreakPoint( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsBreakPoint(); //! Process elements within a moment group void processElement( const Element *const yourElement);private : XMLString bpFname; //!< The filename for the breakpoint file XMLString bpStatus; //!< The status of the breakpoint file (old, new, unknown) XMLString bpFormat; //!< The format of the breakpoint file (ascii, binary) /* const unsigned long myGroupNumber; list<XMLString> myVectorNamesList; unsigned long mySamplingSpace; list<unsigned long> mySamplingLatticeList; list<XMLString> mySamplingMomentsList; XMLString mySamplingCode; unsigned long myRawSpace; unsigned long myPostSpace; list<XMLString> myPostMomentsList; XMLString myPostCode; list<XMLString> myPostProcessingVectorNamesList; list<unsigned long> myMain2PostDimList; list<unsigned long> myPost2MainDimList; xmdsFieldGeometry tempGeometry; bool complexRawVector; bool myRequiresIntegrations; */ //! Write the breakpoint specific defines to file void writeDefines( FILE *const outfile) const; //! Write the breakpoint specific globals to file void writeGlobals( FILE *const outfile) const; //! Write the breakpoint prototypes to file void writePrototypes( FILE *const outfile) const; //! Write the breakpoint routines to file void writeRoutines( FILE *const outfile) const;};// *****************************************************************************// *****************************************************************************// xmdsOutput// *****************************************************************************// *****************************************************************************//! Class which organises data output of simulationclass xmdsOutput : public xmdsElement {public : //! Constructor of xmdsOutput object xmdsOutput( const xmdsSimulation *const yourSimulation, const bool& yourVerboseMode); //! Destructor ~xmdsOutput(); //! Process elements defined in output section of xmds file void processElement( const Element *const yourElement); //! Sets the point in the input file to split void setInFileSplitPoint( const unsigned long& inFileSplitPoint); //! Determines the number of moment groups for output unsigned long nMomentGroups() const; //! Return the output file name XMLString getOutputFileName() const; //! Creates an xmdsMomentGroup object const xmdsMomentGroup* momentGroup( const unsigned long& index) const; //! Adds samples to the output samples list void addSamples( const list<unsigned long>& samplesList) const; //! Sets up the final geometry to use for output void finaliseGeometry(); //! Assigns the active vector pointers in the list of moment groups void assignActiveVectorPointers( FILE *const outfile, const char *const tempVectorName) const; //! Writes the FFTW plan creation calls to file void writePlanCreationCalls( FILE *const outfile, const bool& useFFTWMeasure, const bool& useWisdom) const; //! Writes the FFTW plan deletion calls to file void writePlanDeletionCalls( FILE *const outfile) const;private : XMLString myOutputFileName; //!< The output filename list<xmdsMomentGroup*> myMomentGroupsList; //!< The list of output moment groups unsigned long myInFileSplitPoint; //!< The point at which to split the input file bool bpEnabledFlag; //!< Whether or not breakpoints are enabled //! Write the output prototypes to file void writePrototypes( FILE *const outfile) const; //! Write the output routines to file void writeRoutines( FILE *const outfile) const; //! Create an xmds moment group object xmdsMomentGroup* createxmdsMomentGroup(); //! Create an xmds breakpoint object xmdsBreakPoint* createxmdsBreakPoint();};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -