Required
model_a| Type: | UnstructuredModel |
| Description: | First model. |
def retrieve_valence_and_mass_matrix(
model_a: UnstructuredModel, model_b: UnstructuredModel
) -> tuple[npt.NDArray, npt.NDArray]: ...| Type: | UnstructuredModel |
| Description: | First model. |
| Type: | UnstructuredModel |
| Description: | Second model. |
tuple[npt.NDArray, npt.NDArray]class UnstructuredModel(salvus.opt.models.base_model.BaseModel):
def __init__(
self,
name: str,
model: str | pathlib.Path | UnstructuredMesh,
fields: list[str],
): ...| Type: | str |
| Description: | Name of the model. |
| Type: | str | pathlib.Path | UnstructuredMesh |
| Description: | The unstructured mesh. |
| Type: | list[str] |
| Description: | Names of the elemental fields to use. |
npt.NDArray[np.float64])-The mass matrix as SalvusCompute would write it.npt.NDArray[np.float64])-The mass matrix as defined on the mesh, without valence scaling.UnstructuredMesh)-The actual dataset representing the model.str)-Model name.ModelStatus)-Model status to keep track of whether the model has been modified.npt.NDArray[np.float64])-The valence as defined on the mesh.npt.NDArray[np.float64])-The unstructured mesh model as a vector.def from_disk(parent_folder: pathlib.Path, d: dict) -> Self: ...| Type: | pathlib.Path |
| Description: | Path to store the model. |
| Type: | dict |
| Description: | Dictionary containing meta information of the model. |
def from_json(d: dict) -> Self: ...| Type: | dict |
| Description: | Dictionary containing meta information of the model. |
def compute_inf_norm(self) -> float: ...def compute_norm(self) -> float: ...def copy(self, name: str) -> Self: ...| Type: | str |
| Description: | Name of the new model. |
def dot(self, other: Self) -> float: ...| Type: | Self |
| Description: | The other model. |
def max(self, other: Self) -> Self: ...| Type: | Self |
| Description: | Model to compare with. |
def min(self, other: Self) -> Self: ...| Type: | Self |
| Description: | Model to compare with. |
def set_vector(self, vector: npt.NDArray[np.float64]) -> None: ...| Type: | npt.NDArray[np.float64] |
| Description: | The vector to set the model from. |
def to_disk(self, parent_folder: pathlib.Path | str) -> dict: ...| Type: | pathlib.Path | str |
| Description: | Parent folder where the JSON + h5 files should be stored. |
def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...| Type: | types |
| Default value: | None |
| Description: | Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file. |
| Type: | types |
| Default value: | None |
| Description: | Execution timer. |
| Type: | bool |
| Default value: | False |
| Description: | Log timings to the logger. |
| Type: | types |
| Default value: | None |
| Description: | MPI communicator, if any. |