Return to UnderWorld main page |

StGermain Component Codex

This is a list of components available in StGermain.

AbstractContext


Organisation:
VPAC
Project:
StGermain
Location:
./StGermain/Base/Context/src/
Project Web:
http://www.stgermainproject.org/
Copyright:
StGermain Framework. Copyright (C) 2003-2005 VPAC.
License:
The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
Parent:
Stg_Component
Description:
A Context encapsulates the specfic concerns of the application. A way to look at it is that it is where one places all the variables one would typically place as global or on the main in traditional computional programming. The AbstractContext is an abstract representation of this capability from the StGermain perspective. An AbstractContext implements its five Component phases of Construct, Build, Initialise, Execute and Destroy as EntryPoints. EntryPoints are sites where where functionality can be added. Toolboxes and plugins insert algorithms or alter the control flow by these EntryPoints. An EntryPoint is implemented as a dynamically changeable array of function pointers, which get executed sequentially. Entrypoints can be coarse-grained (“the mesh”, “the solve phase”) or fine-grained (“each particle”, “updating the stress of each particle”). From an aspect oriented programming point of view, these entry points are point cuts on the context concern. From a software architecture point of view, plugins are a flexible way of adding runtime-configurable extensions to a core application. AbstractContext is standardised interface for StGermain to manage toolboxes and plugins. It is a crucial, low-level component of the framework because it establishes and maintains interconnections between other Codes and their high-level features. The Context is the first component to start. An AbstractContext goes through a setup phase before proceeding to its run phase. During setup, it goes through build and then initialise function calls. Each step contains entry point, and a hook is positioned there to attach each function call. Following the setup phase, AbstractContext enters the Run phase. It encapsulates timing, stepping through iterations to solve the equation, and collating and saving output. A note on checkpoints: Checkpoints are places where states of variables are saved. When using checkpoints, identify which variables to checkpoint and specify the frequency (the number of timesteps between checkpoint event). You may want to restart from last checkpoint to: modify parameters at a moment and run from there rather than re-calculating the all timesteps save the state before a scheduled interruption, or for when time-sharing processor/memory resources where a modelling job may take weeks in total to run save current state if you think it may be a useful point to rollback to, or to resume from after an unscheduled interruption skip the setup process for frequently performed tasks to save time. For more information on checkpointing, see the wiki.
Example:
n/a
Params
NameTypeDefaultDescription
outputEveryUnsigned int1Specifies how often to output FrequentOutput.dat. 0 means not at all.
dumpEveryUnsigned int10Specifies how often to output big data dumps (if you use gLucifer, this is when gLufier renders). 0 means not at all.
checkpointEveryUnsigned int0Specifies how often to output checkpoints (if you use gLucifer, this is when gLufier renders). 0 means not at all.
experimentNameStringexperimentNot used by anything at present.
outputPathString./Specifies the relative path to output and dump into.
checkpointPathStringoutputPathSpecifies the relative path to read and write checkpoint files to if checkpointReadPath or checkpointWritePath are not defined.
checkpointReadPathStringcheckpointPathSpecifies the relative path to read checkpoint files from when restarting.
checkpointWritePathStringcheckpointPathSpecifies the relative path to save checkpoint files to.
startDoubleContext specificThe start time of the simulation.
startTimeDoubleContext specificDeprecated - see "start".
endDoubleContext specificThe end time of the simulation. This will stop the simulation even if the desired number of timesteps have not been reached.
stopDoubleContext specificDeprecated - see "end".
maxLoopsDouble0The maximum number of timesteps to run the simulation. If this is a restart from checkpoint, the effective final timestep is the restart timestep timestep plus this value. 0 means no maximum is applied.
maxTimeStepsDouble0Deprecated - see maxLoops.
finalTimeStepDouble0The maximum number of timesteps to run the simulation. 0 means no maximum is applied.
restartTimeStepDouble0The timestep to enforce when loading from a checkpoint. O means ignore this parameter (use "start" time).
checkPointPrefixStringString""Prefixes checkpoint filenames.
Dependencies
TypeEssentialDescriptionNameFallbackKey

Back to top


Codelet


Organisation:
VPAC
Project:
StGermain
Location:
./StGermain/Base/Extensibility/src/
Project Web:
http://www.stgermainproject.org/
Copyright:
StGermain Framework. Copyright (C) 2003-2005 VPAC.
License:
The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
Parent:
Stg_Component
Children:

    Description:
    Codelets are essentially nothing more than Components that are used for encapsulating the concerns/features of a plugin into one object. The plugin registration process expects Codelet to be submitted for addition to the component factory. Codelets are assumed to be instantiated only one (i.e. are singletons) by the system. A Codelet is an abstract class that is used in the C API and not directly in the XML model description files
    Example:
    n/a
    Params
    NameTypeDefaultDescription
    Dependencies
    TypeEssentialDescriptionNameFallbackKey

    Back to top


    CompositeVC


    Organisation:
    VPAC
    Project:
    StGermain
    Location:
    ./StGermain/Base/Automation/src/
    Project Web:
    http://www.stgermainproject.org/
    Copyright:
    StGermain Framework. Copyright (C) 2003-2005 VPAC.
    License:
    The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
    Children:

      Description:
      CompositeVC is used as a container to combine multiple variable conditions.
      Example:
      Refer to ./StgFEM/Apps/StokesMomentumUzawa/lidDrivenBCs.xml
      Params
      NameTypeDefaultDescription
      vcNameStringself->name Deprecated; should not be used.
      vcListList A list of other VariableCondition definitions.
      Dependencies
      TypeEssentialDescriptionNameFallbackKey
      Stg_ComponentNo User defined data in the form of a Stg_Component. Data

      Back to top


      DynamicVC


      Organisation:
      VPAC
      Project:
      StGermain
      Location:
      ./StGermain/Base/Automation/src/
      Project Web:
      http://www.stgermainproject.org/
      Copyright:
      StGermain Framework. Copyright (C) 2003-2005 VPAC.
      License:
      The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
      Children:

        Description:
        DynamicVC provides a mechanism to set and remove variable conditions during run-time. It is not intended for use through XML, but instead should be instantiated and manipulated by other components internally.
        Example:
        n/a
        Params
        NameTypeDefaultDescription
        Dependencies
        TypeEssentialDescriptionNameFallbackKey

        Back to top


        FeMesh_Algorithms


        Organisation:
        VPAC
        Project:
        StGermain
        Location:
        ./StgFEM/Discretisation/Utils/src/
        Project Web:
        http://www.stgermainproject.org/StgFEM.html
        Copyright:
        StGermain Framework. Copyright (C) 2003-2005 VPAC.
        License:
        The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
        Parent:
        Stg_Component
        Children:

          Description:
          ...

          Back to top


          LocalPlugin1


          Organisation:
          VPAC
          Project:
          StGermain
          Location:
          ./StGermain/Base/Extensibility/src/
          Project Web:
          http://www.stgermainproject.org/
          Copyright:
          StGermain Framework. Copyright (C) 2003-2005 VPAC.
          License:
          The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
          Parent:
          Stg_Component
          Children:

            Description:
            LocalPlugin1 (in the unit tests)
            dependenices
            TypeEssentialDescriptionNameFallbackKey

            Back to top


            SetVC


            Organisation:
            VPAC
            Project:
            StGermain
            Location:
            ./StGermain/Base/Automation/src/
            Project Web:
            http://www.stgermainproject.org/
            Copyright:
            StGermain Framework. Copyright (C) 2003-2005 VPAC.
            License:
            The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
            Children:

              Description:
              Selects a definite set of entries from a variable to have a condition applied.
              Example:
              No examples available.
              Params
              NameTypeDefaultDescription
              indexCountInteger The number of entries in the index set.
              indicesList A list of integers representing the indices in the set to be applied to.
              variablesList A list of variable structures describing a Variable object to have values set and the values to apply. Each structure has three parameters: 'name' (the name of the Variable object), 'type' (the type of the value, either double or func) and 'value' (for a double this is a number and for a func this is the name of the condition function).
              Dependencies
              TypeEssentialDescriptionNameFallbackKey

              Back to top


              Stg_Component


              Organisation:
              VPAC
              Project:
              StGermain
              Location:
              ./StGermain/Base/Automation/src/
              Copyright:
              StGermain Framework. Copyright (C) 2003-2005 VPAC.
              License:
              The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
              Parent:
              Description:
              An abstract class representing the parent of all Components
              Description:
              The base class for every other component class in StGermain (and super projects). Components provide an interface for information to be read from the dictionary and introduce 'phases' into the system, namely the construction phase, the build phase, the initialisation phase and the execution phase.
              Example:
              n/a
              Params
              NameTypeDefaultDescription
              Dependencies
              TypeEssentialDescriptionNameFallbackKey

              Back to top


              Variable


              Organisation:
              VPAC
              Project:
              StGermain
              Location:
              ./StGermain/Base/Automation/src/
              Project Web:
              http://www.stgermainproject.org/
              Copyright:
              StGermain Framework. Copyright (C) 2003-2005 VPAC.
              License:
              The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
              Parent:
              Stg_Component
              Children:

              Description:
              Variable makes an association between a defined, textual name and a chunk of data in memory. This data could take the form of a basic type (such as an int or double), or an element of an array, or an entire array or struct. Variable may also index a regular series of non-contiguous locations in memory. This capability to define arbitrary data within a datastructure makes it very powerful. For example, a Variable can refer to a series of ints in an array with an offset of 1 and a stride of 3. This terminology will be familiar to those who are accustomed with MPI. Once a Variable is defined, it is stored in the Variable Register. Like other Registers of StGermain, it can be accessed by any other Component. The benefit of using Variable is that it provides access to data without the need for the original source code or linking to the header file. Practically everything you need to use the data is supplied by Variable: the memory location, a name for the data, its type and its size. When specified throught the XML system, the Variable will actually allocate the memory of the underlying memory variable itself. When used in the C API, the Variable must be passed the underlying memory chunk (but the memory chunk itself need not yet be allocated until just before the Variable undergoes its build phase). The XML implementation of Variable doesn't allow the specification of complex data types or arrays. For arrays, components such as MeshVariable should be used
              Example:
              <p>Examples: XML version / MDF (Model Description File): Unlike the C usage, MDF automatically handles memory allocation. </p> <p> <struct name="velocity"> <param name="Type">Variable</param> <param name="Rank">Vector</param> <param name="DataType">Double</param> <param name="VectorComponentCount">3</param> <list name="names"> <param>vx</param> <param>vy</param> <param>vz</param> </list> </struct> </p> <p> This example create an entry in the variable register of the name "velocity", which is a vector of 3 double components. Also, 3 more entries into the variable register will be made, targetting the 3 vector components of "velocity", named "vx", "vy", "vz". </p> <p>C version: Using Variable in C is different to the XML implementation because you need to do own memory handling. This example is based on the sourcecode in ~/code/StGermain/Base/Automation/tests/testVariable.c </p> <p> /* Construct phase */ double* velocity; Variable_NewVector("velocity", Variable_DataType_Double, 3, amp;aSize[1], (void**)amp;velocity, vr, "vx", "vy", "vz"); /* Build phase*/ velocity = malloc(...); component_Build(v); A general form of the C version: Variable_NewVector(name, type, length, array size, data array, variable register, [optional: list of names of array items]); </p>
              Params
              NameTypeDefaultDescription
              DataType[Double,Float,Int,Char,Short]None - not specifying causes an errorSpecifies the fundamental data type of the variable.
              Rank[Scalar,Vector]None - not specifying causes an errorSpecifies whether the variable is of a vector not. If it is of a vector, VectorComponentCount and names is used to specify the number of vector subcomponents and the name of the variables to create for each component.
              VectorComponentCountUnsignedInt0The count of subcomponents inside this Variable that are also to become variables.
              nameslist(empty)The list of textual names for the subcomponents if this variable. A good example is a Variable named velocity which has the subcomponents vx, vy, vz.
              Dependencies
              TypeEssentialDescriptionNameFallbackKey

              Back to top


              VariableAllVC


              Organisation:
              VPAC
              Project:
              StGermain
              Location:
              ./StGermain/Base/Automation/src/
              Project Web:
              http://www.stgermainproject.org/
              Copyright:
              StGermain Framework. Copyright (C) 2003-2005 VPAC.
              License:
              The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
              Children:

                Description:
                Selects all available entries in a Variable object to have a value applied.
                Example:
                n/a
                Params
                NameTypeDefaultDescription
                variablesList A list of variable structures describing a Variable object to have values set and the values to apply. Each structure has three parameters: 'name' (the name of the Variable object), 'type' (the type of the value, either double or func) and 'value' (for a double this is a number and for a func this is the name of the condition function).
                Dependencies
                TypeEssentialDescriptionNameFallbackKey

                Back to top


                VariableCondition


                Organisation:
                VPAC
                Project:
                StGermain
                Location:
                ./StGermain/Base/Automation/src/
                Project Web:
                http://www.stgermainproject.org/
                Copyright:
                StGermain Framework. Copyright (C) 2003-2005 VPAC.
                License:
                The Gnu Lesser General Public License http://www.gnu.org/licenses/lgpl.html
                Parent:
                Stg_Component
                Description:
                Base class for any concrete variable condition. Defines the interface for specifying boundary conditions.
                Example:
                n/a
                Params
                NameTypeDefaultDescription
                Dependencies
                TypeEssentialDescriptionNameFallbackKey

                Back to top