esys.modellib.geometry Package¶
Classes¶
- class esys.modellib.geometry.ConstrainerAtBoxVertex(**kwargs)¶
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.
- Note
Instance variable domain
- Note
Instance variable tol - absolute tolerance for “x=left, front, bottom vertex” condition, default 1.e-8 (in).
- __init__(**kwargs)¶
Creates a model.
Just calls the parent constructor.
- location_of_constraint()¶
return the values used to constrain a solution
- Returns
the mask marking the locations of the constraints
- Return type
escript.Scalar
- value_of_constraint()¶
return the values used to constrain a solution
- Returns
values to be used at the locations of the constraints. If
value
is not givenNone
is rerturned.- Return type
escript.Scalar
- class esys.modellib.geometry.ConstrainerOverBox(**kwargs)¶
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.
- Note
Instance variable - domain (in).
- Note
Instance variable left - True to set a constraint at the left face of the domain (x[0]=min x[0]), default False (in).
- Note
Instance variable right - True to set a constraint at the left face of the domain (x[0]=max x[0]), default False (in).
- Note
Instance variable top - True to set a constraint at the left face of the domain (x[1]=min x[1]), default False (in).
- Note
Instance variable bottom - True to set a constraint at the left face of the domain (x[1]=max x[1]), default False (in).
- Note
Instance variable front - True to set a constraint at the left face of the domain (x[2]=min x[2]), default False (in).
- Note
Instance variable back - True to set a constraint at the left face of the domain (x[2]=max x[2]), default False (in).
- Note
Instance variable tol - absolute tolerance for “x=max x” condition, default 1.e-8 (in).
- __init__(**kwargs)¶
Creates a model.
Just calls the parent constructor.
- location_of_constraint()¶
return the values used to constrain a solution
- Returns
the mask marking the locations of the constraints
- Return type
escript.Scalar
- value_of_constraint()¶
return the values used to constrain a solution
- Returns
values to be used at the locations of the constraints. If
value
is not givenNone
is rerturned.- Return type
escript.Scalar
- class esys.modellib.geometry.DomainReader(domainmodule=None, **kwargs)¶
- __init__(domainmodule=None, **kwargs)¶
initializes the object
- domain()¶
returns the domain
- Returns
the domain
- Return type
Domain
- class esys.modellib.geometry.RectangularDomain(domainmodule=None, **kwargs)¶
Generates a mesh over a rectangular domain.
- Variables
dim – spatial dimension, default =2 (in).
l – spatial lengths, default [1.,1.,1.] (in).
n – number of elements, default [10,10,10] (in).
order – element order, default 1 (in).
periodic – flags for periodicity, default [False,False,False] (in).
intergrationOrder – integration order, default -1 (in).
- __init__(domainmodule=None, **kwargs)¶
initializes the object
- domain()¶
returns the domain
- Returns
the domain
- Return type
Domain
- class esys.modellib.geometry.ScalarConstrainerAtBoxVertex(**kwargs)¶
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.
- Note
Instance variable domain
- Note
Instance variable tol - absolute tolerance for “x=left, front, bottom vertex” condition, default 1.e-8 (in).
- __init__(**kwargs)¶
Creates a model.
Just calls the parent constructor.
- location_of_constraint()¶
return the values used to constrain a solution
- Returns
the mask marking the locations of the constraints
- Return type
escript.Scalar
- value_of_constraint()¶
return the values used to constrain a solution
- Returns
values to be used at the locations of the constraints. If
value
is not givenNone
is rerturned.- Return type
escript.Scalar
- class esys.modellib.geometry.ScalarConstrainerOverBox(**kwargs)¶
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.
- Note
Instance variable domain - domain (in).
- Note
Instance variable left - True to set a constraint at the left face of the domain (x[0]=min x[0]), default False (in).
- Note
Instance variable right - True to set a constraint at the left face of the domain (x[0]=max x[0]), default False (in).
- Note
Instance variable top - True to set a constraint at the left face of the domain (x[1]=min x[1]), default False (in).
- Note
Instance variable bottom - True to set a constraint at the left face of the domain (x[1]=max x[1]), default False (in).
- Note
Instance variable front - True to set a constraint at the left face of the domain (x[2]=min x[2]), default False (in).
- Note
Instance variable back - True to set a constraint at the left face of the domain (x[2]=max x[2]), default False (in).
- Note
Instance variable tol - absolute tolerance for “x=max x” condition, default 1.e-8 (in).
- __init__(**kwargs)¶
Creates a model.
Just calls the parent constructor.
- location_of_constraint()¶
return the values used to constrain a solution
- Returns
the mask marking the locations of the constraints
- Return type
escript.Scalar
- value_of_constraint()¶
return the values used to constrain a solution
- Returns
values to be used at the locations of the constraints. If
value
is not givenNone
is rerturned.- Return type
escript.Scalar
- class esys.modellib.geometry.UpdateGeometry(**kwargs)¶
applies a displacement field to a domain
- Note
Instance variable displacement - displacements applied to the original mesh coordinates (in).
- Note
Instance variable displacement -
escript.Vector
- Note
Instance variable domain - domain
- Note
Instance variable domain -
escript.Domain
- __init__(**kwargs)¶
set-up the object
- doInitialization()¶
initialize model
- doStep(dt)¶
applies the current
displacement
to mesh nodes.
- doStepPostprocessing(dt)¶
marks nodes as beeing updated.
- doStepPreprocessing(dt)¶
applies the current
displacement
to mesh nodes if required.
- class esys.modellib.geometry.VectorConstrainerAtBoxVertex(**kwargs)¶
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.
- Note
Instance variable domain
- Note
Instance variable comp_mask - list of three boolean. comp_mask[i]==True sets a constraint for the i-th component at the left, front, bottom vertex, default [False,False,False] (in).
- Note
Instance variable tol - absolute tolerance for “x=left, front, bottom vertex” condition, default 1.e-8 (in).
- __init__(**kwargs)¶
Creates a model.
Just calls the parent constructor.
- location_of_constraint()¶
return the values used to constrain a solution
- Returns
the mask marking the locations of the constraints
- Return type
escript.Vector
- value_of_constraint()¶
return the values used to constrain a solution
- Returns
values to be used at the locations of the constraints. If
value
is not givenNone
is rerturned.- Return type
escript.Vector
- class esys.modellib.geometry.VectorConstrainerOverBox(**kwargs)¶
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.
- Note
Instance variable domain
- Note
Instance variable left - list of three boolean. left[i]==True sets a constraint for the i-th component at the left face of the domain (x[0]=min x[0]), default [False,False,False] (in).
- Note
Instance variable right - list of three boolean. left[i]==True sets a constraint for the i-th component at the right face of the domain (x[0]=max x[0]), default [False,False,False] (in).
- Note
Instance variable top - list of three boolean. left[i]==True sets a constraint for the i-th component at the top face of the domain (x[1]=min x[1]), default [False,False,False] (in).
- Note
Instance variable bottom - list of three boolean. left[i]==True sets a constraint for the i-th component at the bottom face of the domain (x[1]=min x[1]), default [False,False,False] (in).
- Note
Instance variable front - list of three boolean. left[i]==True sets a constraint for the i-th component at the front face of the domain (x[2]=min x[2]), default [False,False,False] (in).
- Note
Instance variable back - list of three boolean. left[i]==True sets a constraint for the i-th component at the back face of the domain (x[2]=max x[2]), default [False,False,False] (in).
- Note
Instance variable tol - absolute tolerance for “x=max x” condition, default 1.e-8 (in).
- __init__(**kwargs)¶
Creates a model.
Just calls the parent constructor.
- location_of_constraint()¶
return the values used to constrain a solution
- Returns
the mask marking the locations of the constraints
- Return type
escript.Vector
- value_of_constraint()¶
return the values used to constrain a solution
- Returns
values to be used at the locations of the constraints. If
value
is not givenNone
is rerturned.- Return type
escript.Vector