BaseVisitor#

class ansys.materials.manager.parsers.base_visitor.BaseVisitor(materials: list[ansys.materials.manager._models.material.Material])#

Base visitor. All visitors should inherit from this class.

Overview#

visit_material_model

Abstract implementation of the visit material model.

get_material_id

Get the material id given the material name.

is_supported

Check if the material model is supported.

visit_materials

Visit materials.

Import detail#

from ansys.materials.manager.parsers.base_visitor import BaseVisitor

Method detail#

BaseVisitor.get_material_id(material_name) int#

Get the material id given the material name.

Parameters:
material_namestr

Name of the material.

Returns:
int

Material id.

BaseVisitor.is_supported(material_model: ansys.materials.manager._models._common.material_model.MaterialModel) bool#

Check if the material model is supported.

Parameters:
material_modelMaterialModel

Material model to check.

Returns:
bool

True if the material model is supported, False otherwise.

abstractmethod BaseVisitor.visit_material_model(material_name: str, material_model: ansys.materials.manager._models._common.material_model.MaterialModel)#

Abstract implementation of the visit material model.

BaseVisitor.visit_materials()#

Visit materials.