Bases: esys.escriptcore.modelframe.Model
Creates a characteristic function for the location of constraints for all components of a value and selects the value from an initial value ate these locations.
In the case that the spatial dimension is two, the arguments front and back are ignored.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
return the values used to constrain a solution
Returns: | the mask marking the locations of the constraints |
---|---|
Return type: | escript.Scalar |
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
return the values used to constrain a solution
Returns: | values to be used at the locations of the constraints. If value is not given None is rerturned. |
---|---|
Return type: | escript.Scalar |
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.Model
Creates a characteristic function for the location of constraints for all components of a value and selects the value from an initial value ate these locations.
In the case that the spatial dimension is two, the arguments front and back are ignored.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
return the values used to constrain a solution
Returns: | the mask marking the locations of the constraints |
---|---|
Return type: | escript.Scalar |
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
return the values used to constrain a solution
Returns: | values to be used at the locations of the constraints. If value is not given None is rerturned. |
---|---|
Return type: | escript.Scalar |
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.ParameterSet
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
returns the domain
Returns: | the domain |
---|---|
Return type: | Domain |
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.modellib.geometry.DomainReader
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
returns the domain
Returns: | the domain |
---|---|
Return type: | Domain |
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.ParameterSet
A Model object represents a process marching over time until a finalizing condition is fulfilled. At each time step an iterative process can be performed and the time step size can be controlled. A Model has the following work flow:
doInitialization()
while not terminateInitialIteration(): doInitialStep()
doInitialPostprocessing()
while not finalize():
dt=getSafeTimeStepSize(dt)
doStepPreprocessing(dt)
while not terminateIteration(): doStep(dt)
doStepPostprocessing(dt)
doFinalization()
where doInitialization, finalize, getSafeTimeStepSize, doStepPreprocessing, terminateIteration, doStepPostprocessing, doFinalization are methods of the particular instance of a Model. The default implementations of these methods have to be overwritten by the subclass implementing a Model.
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.LinkableObject
A class which allows to emphasize attributes to be written and read to XML.
Leaves of an ESySParameters object can be:
- a real number
- an integer number
- a string
- a boolean value
- a ParameterSet object
- a Simulation object
- a Model object
- a numpy object
- a list of booleans
- any other object (not considered by writeESySXML and writeXML)
Example for how to create an ESySParameters object:
p11=ParameterSet(gamma1=1.,gamma2=2.,gamma3=3.)
p1=ParameterSet(dim=2,tol_v=0.001,output_file="/tmp/u.%3.3d.dx",runFlag=True,parm11=p11)
parm=ParameterSet(parm1=p1,parm2=ParameterSet(alpha=Link(p11,"gamma1")))
This can be accessed as:
parm.parm1.gamma=0.
parm.parm1.dim=2
parm.parm1.tol_v=0.001
parm.parm1.output_file="/tmp/u.%3.3d.dx"
parm.parm1.runFlag=True
parm.parm1.parm11.gamma1=1.
parm.parm1.parm11.gamma2=2.
parm.parm1.parm11.gamma3=3.
parm.parm2.alpha=1. (value of parm.parm1.parm11.gamma1)
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.ParameterSet
Generates a mesh over a rectangular domain.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
returns the domain
Returns: | the domain |
---|---|
Return type: | Domain |
Returns the object stored for attribute name.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Returns a description of the parameters.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.Model
Creates a characteristic function for the location of constraints for a scalar value and selects the value from an initial value ate these locations.
In the case that the spatial dimension is two, the arguments front and back are ignored.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
return the values used to constrain a solution
Returns: | the mask marking the locations of the constraints |
---|---|
Return type: | escript.Scalar |
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
return the values used to constrain a solution
Returns: | values to be used at the locations of the constraints. If value is not given None is rerturned. |
---|---|
Return type: | escript.Scalar |
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.Model
Creates a characteristic function for the location of constraints for a scalar value and selects the value from an initial value ate these locations.
In the case that the spatial dimension is two, the arguments front and back are ignored.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
return the values used to constrain a solution
Returns: | the mask marking the locations of the constraints |
---|---|
Return type: | escript.Scalar |
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
return the values used to constrain a solution
Returns: | values to be used at the locations of the constraints. If value is not given None is rerturned. |
---|---|
Return type: | escript.Scalar |
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.Model
applies a displacement field to a domain
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
initialize model
applies the current displacement to mesh nodes.
marks nodes as beeing updated.
applies the current displacement to mesh nodes if required.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.Model
Creates a characteristic function for the location of constraints vector value. In the case that the spatial dimension is two, the arguments front and back as well as the third component of each argument is ignored.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
return the values used to constrain a solution
Returns: | the mask marking the locations of the constraints |
---|---|
Return type: | escript.Vector |
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
return the values used to constrain a solution
Returns: | values to be used at the locations of the constraints. If value is not given None is rerturned. |
---|---|
Return type: | escript.Vector |
Writes the object as an XML object into an output stream.
Bases: esys.escriptcore.modelframe.Model
Creates a characteristic function for the location of constraints vector value. In the case that the spatial dimension is two, the arguments front and back as well as the third component of each argument is ignored.
Variables: |
|
---|
Returns a set of tuples (“<self>(<name>)”, <target model>) if the parameter <name> is linked to model <target model> but <target model> is not in the list of models. If a parameter is linked to another parameter set which is not in the hash list the parameter set is checked for its models. hash gives the call history.
Declares one or more new parameters and their initial value.
Declares a set of parameters. parameters can be a list, a dictionary or a ParameterSet.
Finalizes the time stepping.
This function may be overwritten.
Finalises the initialization iteration process. This method is not called in case of a restart.
This function may be overwritten.
Performs an iteration step in the initialization phase. This method is not called in case of a restart.
This function may be overwritten.
Initializes the time stepping scheme. This method is not called in case of a restart.
This function may be overwritten.
Executes an iteration step at a time step.
dt is the currently used time step size.
This function may be overwritten.
Finalises the time step.
dt is the currently used time step size.
This function may be overwritten.
Sets up a time step of step size dt.
This function may be overwritten.
Returns False if the time stepping is finalized.
This function may be overwritten.
Returns the object stored for attribute name.
Returns a time step size which can be safely used.
dt gives the previously used step size.
This function may be overwritten.
Returns True if self has attribute name.
return the values used to constrain a solution
Returns: | the mask marking the locations of the constraints |
---|---|
Return type: | escript.Vector |
Removes parameter name from the parameters.
Sets up the model.
This function may be overwritten.
Returns a description of the parameters.
Returns True if iteration at the inital phase is terminated.
Returns True if iteration on a time step is terminated.
toDom method of Model class.
If debugging is on, prints the message, otherwise does nothing.
return the values used to constrain a solution
Returns: | values to be used at the locations of the constraints. If value is not given None is rerturned. |
---|---|
Return type: | escript.Vector |
Writes the object as an XML object into an output stream.
Construct a Data object containing scalar data-points.
Parameters: |
|
---|---|
Return type: | Data |
Construct a Data object containing rank1 data-points.
param value: scalar value for all points rtype: Data type value: float param what: FunctionSpace for Data type what: FunctionSpace param expanded: If True, a value is stored for each point. If False, more efficient representations may be used type expanded: bool
Vector( (object)value [, (FunctionSpace)what=<esys.escriptcore.escriptcpp.FunctionSpace object at 0x7fd151a8f850> [, (bool)expanded=False]]) -> Data
Returns the minimum value over all data points.
Parameters: | arg (float, int, escript.Data, numpy.ndarray) – argument |
---|---|
Returns: | minimum value of arg over all components and all data points |
Return type: | float |
Raises TypeError: | |
if type of arg cannot be processed |
Returns the length (Euclidean norm) of argument arg at each data point.
Parameters: | arg (float, escript.Data, Symbol, numpy.ndarray) – argument |
---|---|
Return type: | float, escript.Data, Symbol depending on the type of arg |
Returns the maximum value over all data points.
Parameters: | arg (float, int, escript.Data, numpy.ndarray) – argument |
---|---|
Returns: | maximum value of arg over all components and all data points |
Return type: | float |
Raises TypeError: | |
if type of arg cannot be processed |
Returns mask of zero entries of argument arg.
Parameters: |
|
---|---|
Return type: | float, escript.Data, Symbol, numpy.ndarray depending on the type of arg |
Raises: |
|