Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions flow360/component/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,12 +283,12 @@ def from_file(

def show_available_groupings(self, verbose_mode: bool = False):
"""Display all the possible groupings for faces and edges"""
self._show_avaliable_entity_groups(
self._show_available_entity_groups(
"faces",
ignored_attribute_tags=["__all__", "faceId"],
show_ids_in_each_group=verbose_mode,
)
self._show_avaliable_entity_groups(
self._show_available_entity_groups(
"edges",
ignored_attribute_tags=["__all__", "edgeId"],
show_ids_in_each_group=verbose_mode,
Expand All @@ -315,7 +315,7 @@ def from_local_storage(cls, geometry_id: str = None, local_storage_path="") -> G
asset_id=geometry_id, local_storage_path=local_storage_path
)

def _show_avaliable_entity_groups(
def _show_available_entity_groups(
self,
entity_type_name: Literal["faces", "edges"],
ignored_attribute_tags: list = None,
Expand Down Expand Up @@ -359,8 +359,6 @@ def _group_entity_by_tag(
else self.edge_group_tag is not None
)
if found_existing_grouping is True:
# pylint: disable=fixme
# TODO: We need to make sure only 1 grouping is used in simluationParams.
log.warning(
f"Grouping already exists for {entity_type_name}. Resetting the grouping and regroup with {tag_name}."
)
Expand Down
5 changes: 4 additions & 1 deletion flow360/component/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,12 @@ def _get_tag(entity_registry, entity_type: Union[type[Surface], type[Edge]]):
for entity in entity_registry.find_by_type(entity_type):
if entity.private_attribute_tag_key is None:
raise Flow360ValueError(
f"`{entity_type.__name__}` without taging information is found."
f"`{entity_type.__name__}` without tagging information is found."
f" Please make sure all `{entity_type.__name__}` come from the geometry and is not created ad-hoc."
)
if entity.private_attribute_tag_key == "__standalone__":
# Does not provide information on what grouping user selected.
continue
if group_tag is not None and group_tag != entity.private_attribute_tag_key:
raise Flow360ValueError(
f"Multiple `{entity_type.__name__}` group tags detected in"
Expand Down
2 changes: 1 addition & 1 deletion flow360/component/simulation/outputs/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Caveats:
1. Check if we support non-average and average output specified at the same time in solver.
(Yes but they share the same output_fields)
2. We do not support mulitple output frequencies/file format for the same type of output.
2. We do not support multiple output frequencies/file format for the same type of output.
"""

from typing import Annotated, List, Literal, Optional, Union
Expand Down
12 changes: 6 additions & 6 deletions flow360/component/simulation/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _get_boundary_full_name(surface_name: str, volume_mesh_meta: dict[str, dict]
"""Ideally volume_mesh_meta should be a pydantic model.

TODO: Note that the same surface_name may appear in different blocks. E.g.
`farFieldBlock/slipWall`, and `plateBlock/slipWall`. Currently the mesher does not support spliting boundary into
`farFieldBlock/slipWall`, and `plateBlock/slipWall`. Currently the mesher does not support splitting boundary into
blocks but we will need to support this someday.
"""
for zone_name, zone_meta in volume_mesh_meta["zones"].items():
Expand Down Expand Up @@ -61,7 +61,7 @@ def _check_axis_is_orthogonal(axis_pair: Tuple[Axis, Axis]) -> Tuple[Axis, Axis]

class ReferenceGeometry(Flow360BaseModel):
"""
:class:`ReferenceGeometry` class contains all geometrical related refrence values.
:class:`ReferenceGeometry` class contains all geometrical related reference values.

Example
-------
Expand Down Expand Up @@ -183,7 +183,7 @@ class Edge(_EdgeEntityBase):
private_attribute_entity_type_name: Literal["Edge"] = pd.Field("Edge", frozen=True)
private_attribute_tag_key: Optional[str] = pd.Field(
None,
description="The tag/attribute string used to gourp geometry edges to form this `Edge`.",
description="The tag/attribute string used to group geometry edges to form this `Edge`.",
)
private_attribute_sub_components: Optional[List[str]] = pd.Field(
[], description="The edge ids in geometry that composed into this `Edge`."
Expand Down Expand Up @@ -400,7 +400,7 @@ def _check_inner_radius_is_less_than_outer_radius(self) -> Self:
@final
class Surface(_SurfaceEntityBase):
"""
:class:`Surface` represents a boudary surface in three-dimensional space.
:class:`Surface` represents a boundary surface in three-dimensional space.
"""

private_attribute_entity_type_name: Literal["Surface"] = pd.Field("Surface", frozen=True)
Expand All @@ -412,7 +412,7 @@ class Surface(_SurfaceEntityBase):
)
private_attribute_tag_key: Optional[str] = pd.Field(
None,
description="The tag/attribute string used to gourp geometry faces to form this `Surface`.",
description="The tag/attribute string used to group geometry faces to form this `Surface`.",
)
private_attribute_sub_components: Optional[List[str]] = pd.Field(
[], description="The face ids in geometry that composed into this `Surface`."
Expand All @@ -424,7 +424,7 @@ class Surface(_SurfaceEntityBase):

class GhostSurface(_SurfaceEntityBase):
"""
Represents a boudary surface that may or may not be generated therefore may or may not exist.
Represents a boundary surface that may or may not be generated therefore may or may not exist.
It depends on the submitted geometry/Surface mesh. E.g. the symmetry plane in `AutomatedFarfield`.

For now we do not use metadata or any other information to validate (on the client side) whether the surface
Expand Down
Loading