diff --git a/docs/source/_static/dpf_operators.html b/docs/source/_static/dpf_operators.html index c0475e28e6..970295ea49 100644 --- a/docs/source/_static/dpf_operators.html +++ b/docs/source/_static/dpf_operators.html @@ -2106,7 +2106,7 @@

Configurating operators

Only linear analysis are supported without On Demand Expansion. All coordinates are global coordinates. Euler Angles need to be included in the database. - Get the XZ shear component (02 component).">

Inputs

Outputs

Configurations

Scripting

result: cms dst table provider

Inputs

Outputs

Configurations

Scripting

invariant: eigen vectors (on field)

Inputs

Outputs

Configurations

Scripting

result: mapdl material properties

Inputs

Outputs

Configurations

Scripting

result: mapdl_section

Inputs

Outputs

Configurations

Scripting

result: rom data provider

Inputs

Outputs

Configurations

Scripting

geo: transform invariant terms rbd

Inputs

Outputs

Configurations

Scripting

result: compute invariant terms motion

Inputs

Outputs

Configurations

Scripting

result: write motion dfmf file

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded element heat flux

Inputs

Outputs

Configurations

Scripting

mesh: mesh plan clipper

Inputs

Outputs

Configurations

Scripting

mesh: mesh_to_graphics_edges

Inputs

Outputs

Configurations

Scripting

serialization: migrate to vtk

Inputs

Outputs

Configurations

Scripting

mesh: combine levelset

Inputs

Outputs

Configurations

Scripting

mesh: exclude levelset

Inputs

Outputs

Configurations

Scripting

mesh: make plane levelset

Inputs

Outputs

Configurations

Scripting

mesh: mesh extraction

Inputs

Outputs

Configurations

Scripting

mapping: fft

Inputs

Outputs

Configurations

Scripting

math: fft gradient evaluation

Inputs

Outputs

Configurations

Scripting

math: fft multi harmonic solution minmax

Inputs

Outputs

Configurations

Scripting

math: qr solve

Inputs

Outputs

Configurations

Scripting

math: svd

Inputs

Outputs

Configurations

Scripting

mapping: prep sampling fft

Inputs

Outputs

Configurations

Scripting

math: window welch

Inputs

Outputs

Configurations

Scripting

serialization: hdf5dpf generate result file

Inputs

Outputs

Configurations

Scripting

result: migrate to h5dpf

Inputs

Outputs

Configurations

Scripting

utility: hdf5dpf workflow provider

Inputs

Outputs

Configurations

Scripting

other: hdf5dpf mesh property provider

Inputs

Outputs

Configurations

Scripting

serialization: vtu export

Inputs

Outputs

Configurations

Scripting

result: compute total strain Y

Inputs

Outputs

Configurations

Scripting

result: cms dst table provider

Inputs

Outputs

Configurations

Scripting

result: spectrum data

Inputs

Outputs

Configurations

Scripting

invariant: eigen vectors (on field)

Inputs

Outputs

Configurations

Scripting

result: mapdl material properties

Inputs

Outputs

Configurations

Scripting

result: mapdl_section

Inputs

Outputs

Configurations

Scripting

result: rom data provider

Inputs

Outputs

Configurations

Scripting

geo: transform invariant terms rbd

Inputs

Outputs

Configurations

Scripting

result: compute invariant terms motion

Inputs

Outputs

Configurations

Scripting

result: write motion dfmf file

Inputs

Outputs

Configurations

Scripting

result: cyclic expanded element heat flux

Inputs

Outputs

Configurations

Scripting

mesh: mesh plan clipper

Inputs

Outputs

Configurations

Scripting

mesh: mesh_to_graphics_edges

Inputs

Outputs

Configurations

Scripting

serialization: migrate to vtk

Inputs

Outputs

Configurations

Scripting

mesh: combine levelset

Inputs

Outputs

Configurations

Scripting

mesh: exclude levelset

Inputs

Outputs

Configurations

Scripting

mesh: make plane levelset

Inputs

Outputs

Configurations

Scripting

mesh: mesh extraction

Inputs

Outputs

Configurations

Scripting

mapping: fft

Inputs

Outputs

Configurations

Scripting

math: fft gradient evaluation

Inputs

Outputs

Configurations

Scripting

math: fft multi harmonic solution minmax

Inputs

Outputs

Configurations

Scripting

math: qr solve

Inputs

Outputs

Configurations

Scripting

math: svd

Inputs

Outputs

Configurations

Scripting

mapping: prep sampling fft

Inputs

Outputs

Configurations

Scripting

math: window welch

Inputs

Outputs

Configurations

Scripting

serialization: hdf5dpf generate result file

Inputs

Outputs

Configurations

Scripting

result: migrate to h5dpf

Inputs

Outputs

Configurations

Scripting

utility: hdf5dpf workflow provider

Inputs

Outputs

Configurations

Scripting

other: hdf5dpf mesh property provider

Inputs

Outputs

Configurations

Scripting

serialization: vtu export

Inputs

Outputs

Configurations

Scripting

result: compute total strain Y

>> from ansys.dpf import core as dpf + + >>> # Instantiate operator + >>> op = dpf.operators.result.spectrum_data() + + >>> # Make input connections + >>> my_data_sources = dpf.DataSources() + >>> op.inputs.data_sources.connect(my_data_sources) + + >>> # Instantiate operator and connect inputs in one line + >>> op = dpf.operators.result.spectrum_data( + ... data_sources=my_data_sources, + ... ) + + >>> # Get output data + >>> result_participation_factors = op.outputs.participation_factors() + """ + + def __init__(self, data_sources=None, config=None, server=None): + super().__init__(name="spectrum_data", config=config, server=server) + self._inputs = InputsSpectrumData(self) + self._outputs = OutputsSpectrumData(self) + if data_sources is not None: + self.inputs.data_sources.connect(data_sources) + + @staticmethod + def _spec(): + description = """Read participation factors from mode file.""" + spec = Specification( + description=description, + map_input_pin_spec={ + 4: PinSpecification( + name="data_sources", + type_names=["data_sources"], + optional=False, + document="""Data_sources (must contain at least one mode + file).""", + ), + }, + map_output_pin_spec={ + 0: PinSpecification( + name="participation_factors", + type_names=["fields_container"], + optional=False, + document="""Fields container containing participation + factors.""", + ), + }, + ) + return spec + + @staticmethod + def default_config(server=None): + """Returns the default config of the operator. + + This config can then be changed to the user needs and be used to + instantiate the operator. The Configuration allows to customize + how the operation will be processed by the operator. + + Parameters + ---------- + server : server.DPFServer, optional + Server with channel connected to the remote or local instance. When + ``None``, attempts to use the global server. + """ + return Operator.default_config(name="spectrum_data", server=server) + + @property + def inputs(self): + """Enables to connect inputs to the operator + + Returns + -------- + inputs : InputsSpectrumData + """ + return super().inputs + + @property + def outputs(self): + """Enables to get outputs of the operator by evaluating it + + Returns + -------- + outputs : OutputsSpectrumData + """ + return super().outputs + + +class InputsSpectrumData(_Inputs): + """Intermediate class used to connect user inputs to + spectrum_data operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.spectrum_data() + >>> my_data_sources = dpf.DataSources() + >>> op.inputs.data_sources.connect(my_data_sources) + """ + + def __init__(self, op: Operator): + super().__init__(spectrum_data._spec().inputs, op) + self._data_sources = Input(spectrum_data._spec().input_pin(4), 4, op, -1) + self._inputs.append(self._data_sources) + + @property + def data_sources(self): + """Allows to connect data_sources input to the operator. + + Data_sources (must contain at least one mode + file). + + Parameters + ---------- + my_data_sources : DataSources + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.spectrum_data() + >>> op.inputs.data_sources.connect(my_data_sources) + >>> # or + >>> op.inputs.data_sources(my_data_sources) + """ + return self._data_sources + + +class OutputsSpectrumData(_Outputs): + """Intermediate class used to get outputs from + spectrum_data operator. + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.spectrum_data() + >>> # Connect inputs : op.inputs. ... + >>> result_participation_factors = op.outputs.participation_factors() + """ + + def __init__(self, op: Operator): + super().__init__(spectrum_data._spec().outputs, op) + self._participation_factors = Output(spectrum_data._spec().output_pin(0), 0, op) + self._outputs.append(self._participation_factors) + + @property + def participation_factors(self): + """Allows to get participation_factors output of the operator + + Returns + ---------- + my_participation_factors : FieldsContainer + + Examples + -------- + >>> from ansys.dpf import core as dpf + >>> op = dpf.operators.result.spectrum_data() + >>> # Connect inputs : op.inputs. ... + >>> result_participation_factors = op.outputs.participation_factors() + """ # noqa: E501 + return self._participation_factors diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll index 9eed75b250..73e18912e6 100644 Binary files a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll and b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll differ diff --git a/src/ansys/dpf/gatebin/DPFClientAPI.dll b/src/ansys/dpf/gatebin/DPFClientAPI.dll index f489123cc5..cb2477c1f9 100644 Binary files a/src/ansys/dpf/gatebin/DPFClientAPI.dll and b/src/ansys/dpf/gatebin/DPFClientAPI.dll differ diff --git a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so index a5deb659d2..0c17c36d21 100644 Binary files a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ diff --git a/src/ansys/dpf/gatebin/libDPFClientAPI.so b/src/ansys/dpf/gatebin/libDPFClientAPI.so index 80a8c5f24c..988926b265 100644 Binary files a/src/ansys/dpf/gatebin/libDPFClientAPI.so and b/src/ansys/dpf/gatebin/libDPFClientAPI.so differ