OpenPisco.PhysicalSolvers.SolverBase module#
- OpenPisco.PhysicalSolvers.SolverBase.AssessConnectedZones(support: Mesh, phi: Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]], rootZones: Iterable[Union[str, NodeFilter]], connectedZones: Iterable[Union[str, NodeFilter]]) bool [source]#
Assess whether all pair of zones are connected
- Parameters
levelset (LevelSet) – level set to check
rootZones (Iterable[Union[str,NodeFilter]]) – collection of zones
connectedZones (Iterable[Union[str,NodeFilter]]) – collection of zones
- Returns
True if all pair of zones are connected, else False
- Return type
bool
- OpenPisco.PhysicalSolvers.SolverBase.AssessZonesAttachedToLevelset(support: Mesh, phi: Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]], boundaryFilters: Iterable[NodeFilter]) bool [source]#
Assess each zone belong to the support (negative part of the level set)
- Parameters
levelset (LevelSet) – level set to check
boundaryFilters (Iterable[NodeFilter]) – collection of zones
- Returns
True if all zones atached to level set, else False
- Return type
bool
- class OpenPisco.PhysicalSolvers.SolverBase.SolverBase[source]#
Bases:
object
Base class for physical solvers
- CanSupplyAuxiliaryField(name: str, on: <module 'OpenPisco.PhysicalSolvers.FieldsNames' from '/home/docs/checkouts/readthedocs.org/user_builds/openpisco/checkouts/latest/src/OpenPisco/PhysicalSolvers/FieldsNames.py'> = 'Nodes') bool [source]#
Check whether solver can supply auxiliary field
- Parameters
name (str) – auxiliary field name
on (FN, optional) – computational support of the field, by default FN.Nodes
- Returns
True if solver can supply auxiliary field on location, else False
- Return type
bool
- GetAuxiliaryField(name: str, on: <module 'OpenPisco.PhysicalSolvers.FieldsNames' from '/home/docs/checkouts/readthedocs.org/user_builds/openpisco/checkouts/latest/src/OpenPisco/PhysicalSolvers/FieldsNames.py'> = 'Nodes', index: ~typing.Optional[int] = None)[source]#
Retrieve an auxiliary field on the computational support specified by the keyword “on”
- Parameters
name (name of the field to be retrieved) – _description_
on (FN, optional) – computational support of the field, by default FN.Nodes
index (Optional[int], optional) – index of the field to be retrieved (if needed), by default None
- Raises
NotImplementedError – To be redefined in derived class if needed
- GetAuxiliaryFieldGeneration(name: str, on: <module 'OpenPisco.PhysicalSolvers.FieldsNames' from '/home/docs/checkouts/readthedocs.org/user_builds/openpisco/checkouts/latest/src/OpenPisco/PhysicalSolvers/FieldsNames.py'> = 'Nodes') bool [source]#
Check whether an auxiliary field is to be generated on computational support
- Parameters
name (str) – name of the field to be generated
on (FN, optional) – computational support of the field, by default FN.Nodes
- Returns
True if the field is ti be generated on specified computational support, else False
- Return type
bool
- GetAuxiliaryScalar(name: str)[source]#
Retrieve an auxiliary scalar quantity
- Parameters
name (str) – name of the scalar to be retrieved
- Raises
NotImplementedError – To be redefined in the derived class
- GetAuxiliaryScalarNames()[source]#
this is the list of standard names. the prefix “int_” means the integral over the domain of a Auxiliary Field
- GetBoundaryConditionsFilters() Tuple[Iterable[NodeFilter], Iterable[NodeFilter]] [source]#
Specify which pair of zones should be connected. If this method is not redefined in derived class, there is no check
- Returns
pair of zones to be checked
- Return type
Tuple[Iterable,Iterable]
- GetNodalSolution(i: int = 0)[source]#
Retrieve the PDE solution at mesh nodes
- Parameters
i (int, optional) – solution index, by default 0
- Raises
NotImplementedError – to be redefined in derived class
- SetAuxiliaryFieldGeneration(name: str, on: <module 'OpenPisco.PhysicalSolvers.FieldsNames' from '/home/docs/checkouts/readthedocs.org/user_builds/openpisco/checkouts/latest/src/OpenPisco/PhysicalSolvers/FieldsNames.py'> = 'Nodes', flag: bool = True)[source]#
- VerifyBoundaryZonesConnected(support: Mesh, phi: Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) bool [source]#
Verify boundary zones are connected
- Parameters
levelset (LevelSet) – problem level set
- Returns
True if boundary zones are connected, else False
- Return type
bool
- VerifyBoundaryZonesInBody(support: Mesh, phi: Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) bool [source]#
Verify boundary zones are fully contained in body
- Parameters
levelset (LevelSet) – problem level set
- Returns
True if boundary zones in body, else False
- Return type
bool
- VerifyPhysicalDomainValidity(support: Mesh, phi: Union[_SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) bool [source]#
- Verify physical domain validity:
boundary zone should be in body
boundary zones should be connected
- Parameters
levelSet (LevelSet) – problem level set
- Returns
True if both conditions are fullfilled, else False
- Return type
bool