Skip to content

Fixes the mesh deformation for mode shape animation #1696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 5, 2025

Conversation

MeenaBytes
Copy link
Contributor

@MeenaBytes MeenaBytes commented Aug 13, 2024

This commit make deform_by default for mode animation.

Fixes issue #1032, #1644

This commit make deform_by default for mode animation.
This fix transfers deformation scale factor to animator
This fix adds use of scale factor per frame
This change handles integer type scale factor in animator.
ideally integer type scale factor should be acceptable by scale operator.
@MeenaBytes MeenaBytes requested a review from PProfizi June 5, 2025 05:29
Copy link

codecov bot commented Jun 5, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
24335 1 24334 3392
View the top 3 failed test(s) by shortest run time
tests/operators/test_coordinate_system.py::test_operator_coordinate_system_rst[ansys-grpc-dpf]
Stack Traces | 0.006s run time
server_type = <ansys.dpf.core.server_types.LegacyGrpcServer object at 0x7f26b90e0dc0>

    def test_operator_coordinate_system_rst(server_type):
        model = dpf.Model(examples.download_hemisphere(server=server_type), server=server_type)
        if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
            # Starting with DPF 2025.1.pre1
>           cs = dpf.operators.result.coordinate_system(server=server_type)

tests/operators/test_coordinate_system.py:35: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
..../test-operators/lib/python3.10.../operators/result/coordinate_system.py:67: in __init__
    super().__init__(name="CS", config=config, server=server)
..../test-operators/lib/python3.10.../dpf/core/dpf_operator.py:156: in __init__
    self._internal_obj = self._api.operator_new_on_client(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = ('CS', <ansys.dpf.core.server_types.LegacyGrpcServer object at 0x7f26b90e0dc0>)
kwargs = {}, _InactiveRpcError = <class 'grpc._channel._InactiveRpcError'>
_MultiThreadedRendezvous = <class 'grpc._channel._MultiThreadedRendezvous'>
details = 'failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:50054: Failed to connect to remote host: connect: Connection refused (111)'

    @wraps(func)
    def wrapper(*args, **kwargs):
        """Capture gRPC exceptions."""
        from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous
        try:
            out = func(*args, **kwargs)
        except (_InactiveRpcError, _MultiThreadedRendezvous) as error:
            details = error.details()
            if "object is null in the dataBase" in details:
                raise DPFServerNullObject(details) from None
            elif "Unable to open the following file" in details:
                raise DPFServerException(
                    "The result file could not be found or could not be opened, the server raised an error message: \n" + details) from None
>           raise DPFServerException(details) from None
E           ansys.dpf.gate.errors.DPFServerException: failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:50054: Failed to connect to remote host: connect: Connection refused (111)

..../test-operators/lib/python3.10.../dpf/gate/errors.py:46: DPFServerException
tests/operators/test_change_shell_layers.py::test_operator_change_shell_layers_connect_enum[ansys-grpc-dpf]
Stack Traces | 1.89s run time
server_type = <ansys.dpf.core.server_types.LegacyGrpcServer object at 0x7f26b90e0dc0>

    def test_operator_change_shell_layers_connect_enum(server_type):
        model = dpf.Model(
            examples.download_all_kinds_of_complexity_modal(server=server_type), server=server_type
        )
    
>       stress = model.results.stress()

tests/operators/test_change_shell_layers.py:34: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
..../test-operators/lib/python3.10.../dpf/core/model.py:180: in results
    self.metadata._build_connector(),
..../test-operators/lib/python3.10.../dpf/core/model.py:130: in metadata
    self._metadata = Metadata(self._data_sources, self._server)
..../test-operators/lib/python3.10.../dpf/core/model.py:292: in __init__
    self._set_data_sources(data_sources)
..../test-operators/lib/python3.10.../dpf/core/model.py:437: in _set_data_sources
    self._data_sources = DataSources(var_inp, server=self._server)
..../test-operators/lib/python3.10.../dpf/core/data_sources.py:125: in __init__
    self._internal_obj = self._api.data_sources_new_on_client(self._server.client)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<ansys.dpf.core.server_types.LegacyGrpcServer object at 0x7f26b90e0dc0>,)
kwargs = {}, _InactiveRpcError = <class 'grpc._channel._InactiveRpcError'>
_MultiThreadedRendezvous = <class 'grpc._channel._MultiThreadedRendezvous'>
details = 'failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:50054: Failed to connect to remote host: connect: Connection refused (111)'

    @wraps(func)
    def wrapper(*args, **kwargs):
        """Capture gRPC exceptions."""
        from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous
        try:
            out = func(*args, **kwargs)
        except (_InactiveRpcError, _MultiThreadedRendezvous) as error:
            details = error.details()
            if "object is null in the dataBase" in details:
                raise DPFServerNullObject(details) from None
            elif "Unable to open the following file" in details:
                raise DPFServerException(
                    "The result file could not be found or could not be opened, the server raised an error message: \n" + details) from None
>           raise DPFServerException(details) from None
E           ansys.dpf.gate.errors.DPFServerException: failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:50054: Failed to connect to remote host: connect: Connection refused (111)

..../test-operators/lib/python3.10.../dpf/gate/errors.py:46: DPFServerException
test_remote_workflow/test_remote_workflow.py::test_multi_process_local_remote_local_remote_workflow[ansys-grpc-dpf]
Stack Traces | 3.02s run time
server_type_remote_process = <ansys.dpf.core.server_types.LegacyGrpcServer object at 0x7f1d9b337b80>

    @pytest.mark.slow
    @pytest.mark.xfail(raises=ServerTypeError)
    @pytest.mark.skipif(
        not conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_3_0,
        reason="Connecting data from different servers is " "supported starting server version 3.0",
    )
    @pytest.mark.skipif(running_docker, reason="Currently hanging on Docker, under investigation.")
    def test_multi_process_local_remote_local_remote_workflow(server_type_remote_process):
        files = examples.download_distributed_files(server=server_type_remote_process)
>       wf = core.Workflow(server=server_type_remote_process)

test_remote_workflow/test_remote_workflow.py:371: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
..../test-remote_workflow/lib/python3.10.../dpf/core/workflow.py:114: in __init__
    self._internal_obj = self._api.work_flow_new_on_client(self._server.client)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<ansys.dpf.core.server_types.LegacyGrpcServer object at 0x7f1d9b337b80>,)
kwargs = {}, _InactiveRpcError = <class 'grpc._channel._InactiveRpcError'>
_MultiThreadedRendezvous = <class 'grpc._channel._MultiThreadedRendezvous'>
details = 'failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:50060: Failed to connect to remote host: connect: Connection refused (111)'

    @wraps(func)
    def wrapper(*args, **kwargs):
        """Capture gRPC exceptions."""
        from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous
        try:
            out = func(*args, **kwargs)
        except (_InactiveRpcError, _MultiThreadedRendezvous) as error:
            details = error.details()
            if "object is null in the dataBase" in details:
                raise DPFServerNullObject(details) from None
            elif "Unable to open the following file" in details:
                raise DPFServerException(
                    "The result file could not be found or could not be opened, the server raised an error message: \n" + details) from None
>           raise DPFServerException(details) from None
E           ansys.dpf.gate.errors.DPFServerException: failed to connect to all addresses; last error: UNKNOWN: ipv4:127.0.0.1:50060: Failed to connect to remote host: connect: Connection refused (111)

..../test-remote_workflow/lib/python3.10.../dpf/gate/errors.py:46: DPFServerException

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@PProfizi
Copy link
Contributor

PProfizi commented Jun 5, 2025

Hi @MeenaBytes, thanks for that! I just added use of this parameter in the example mentioned in the issue.

@MeenaBytes MeenaBytes enabled auto-merge (squash) June 5, 2025 16:04
@MeenaBytes MeenaBytes disabled auto-merge June 5, 2025 16:38
@PProfizi PProfizi merged commit 598f64a into master Jun 5, 2025
115 of 119 checks passed
@PProfizi PProfizi deleted the fix_mode_animation_issue_1032 branch June 5, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants