Skip to content
Open
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
16 changes: 8 additions & 8 deletions doc/source/_static/dpf_operators.html
Original file line number Diff line number Diff line change
Expand Up @@ -15271,14 +15271,14 @@ <h2 class="h2-main">Configurating operators</h2>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="threshold"></pin-name></td><td><req-type typeName="(double)"></req-type></td><td><div class = "pin-des-text"><p>Threshold (precision) desired.</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="output_field"></pin-name></td><td><req-type typeName="(field)"></req-type></td><td><div class = "pin-des-text"><p>Scaled and rounded field</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="quantization" license="any_dpf_supported_increments" cat="compression" plugin="core" cpp-name="quantization"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="apply svd" scripting_name="apply_svd"plugin="core"cat="compression"><h1 class="op-des-h1">compression: apply svd</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>Computes the coefficients (=U*Sigma) and VT components from SVD.</p>
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="field_contaner_to_compress"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td><td><div class = "pin-des-text"><p>fields container to be compressed</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="scalar_int"></pin-name></td><td><req-type typeName="(int32)"></req-type></td><td><div class = "pin-des-text"><p>number of vectors (r) to keep for the future reconstraction of the matrix A, ex. A[m,n]=coef[m,r]<em>VT[r,n], where coef=U</em>Sigma</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="2" ellipsis = "false"></pin-number></td><td><pin-name name="scalar_double"></pin-name></td><td><req-type typeName="(double)"></req-type></td><td><div class = "pin-des-text"><p>threshold (precision) as a double, default value is 1e-7. If both pin1 and pin2 are provided, choose the min r-vectors</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="3" ellipsis = "false"></pin-number></td><td><pin-name name="boolean"></pin-name></td><td><req-type typeName="(bool)"></req-type></td><td><div class = "pin-des-text"><p>apply svd on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="us_svd"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td><td><div class = "pin-des-text"><p>the output entity is a field container (time dependant); it contains the multiplication of two matrices, U and S, where A=U.S.Vt</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="vt_svd"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td><td><div class = "pin-des-text"><p>the output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="2" ellipsis = "false"></pin-number></td><td><pin-name name="sigma"></pin-name></td><td><req-type typeName="(field | fields_container)"></req-type></td><td><div class = "pin-des-text"><p>the output entity is a field (or a field container if input fc contains several labels, where field contains results per label), containing singular (S) values of the input data, where A=U.S.Vt</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><config-spec name="num_threads" default="0" doc="Number of threads to use to run in parallel" types="int32" ></config-spec><config-spec name="run_in_parallel" default="true" doc="Loops are allowed to run in parallel if the value of this config is set to true." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="apply_svd" license="any_dpf_supported_increments" cat="compression" plugin="core" cpp-name="svd_operator"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="zfp decompression" scripting_name="zfp_decompress"plugin="core"cat="compression"><h1 class="op-des-h1">compression: zfp decompression</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>zfp decompression using the information about compression written into the properties of the field(s)</p>
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="field_contaner_to_compress"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td><td><div class = "pin-des-text"><p>Fields container with data to be compressed</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number-optional n="1" ellipsis = "false"></pin-number-optional></td><td><pin-name name="scalar_int"></pin-name></td><td><req-type typeName="(int32)"></req-type></td><td><div class = "pin-des-text"><p>Number of vectors (r) to keep for the future reconstraction of the matrix A, ex.A[m,n] = coef[m,r] * VT[r,n], where coef = U * Sigma</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number-optional n="2" ellipsis = "false"></pin-number-optional></td><td><pin-name name="scalar_double"></pin-name></td><td><req-type typeName="(double)"></req-type></td><td><div class = "pin-des-text"><p>Threshold (precision) as a double (Default : 1e-7). If both pin1 and pin2 are provided, choose the min r-vectors</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number-optional n="3" ellipsis = "false"></pin-number-optional></td><td><pin-name name="boolean"></pin-name></td><td><req-type typeName="(bool)"></req-type></td><td><div class = "pin-des-text"><p>Apply SVD on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="us_svd"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td><td><div class = "pin-des-text"><p>The output entity is a fields container (time dependant); it contains the product of two matrices, U and S, where A=U.S.Vt</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="vt_svd"></pin-name></td><td><req-type typeName="(fields_container)"></req-type></td><td><div class = "pin-des-text"><p>The output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="2" ellipsis = "false"></pin-number></td><td><pin-name name="sigma"></pin-name></td><td><req-type typeName="(field | fields_container)"></req-type></td><td><div class = "pin-des-text"><p>The output entity is a field (or a field container if input fc contains several labels, where field contains results per label), containing singular (S) values of the input data, where A=U.S.Vt</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Configurations</h2><config-spec name="mutex" default="false" doc="If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads." types="bool" ></config-spec><config-spec name="num_threads" default="0" types="int32" ></config-spec><config-spec name="run_in_parallel" default="true" doc="Loops are allowed to run in parallel if the value of this config is set to true." types="bool" ></config-spec><h2 class="op-des-h2">Scripting</h2><scripting-part scripting_name="apply_svd" license="any_dpf_supported_increments" cat="compression" plugin="core" cpp-name="svd_operator"></scripting-part><h2 class="op-des-h2">Changelog</h2><op-changelog content='{"0.0.0":"New"}'></op-changelog></div><div class="operator" id="zfp decompression" scripting_name="zfp_decompress"plugin="core"cat="compression"><h1 class="op-des-h1">compression: zfp decompression</h1><figure class="figure-op-des"> <figcaption > Description </figcaption><div class = "figure-op-des-text"><p>zfp decompression using the information about compression written into the properties of the field(s)</p>
</div></figure><div class="op-version">Version 0.0.0</div><h2 class="op-des-h2">Inputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="dataIn"></pin-name></td><td><req-type typeName="(custom_type_fields_container)"></req-type></td><td><div class = "pin-des-text"><p>custom type field container from zfp_compression operator to decompress</p>
</div></td></tr></tbody></table></div><h2 class="op-des-h2">Outputs</h2><div><table class="pin-box"><tbody><tr><td><pin-number n="0" ellipsis = "false"></pin-number></td><td><pin-name name="dataOut"></pin-name></td><td><req-type typeName="(field | fields_container)"></req-type></td><td><div class = "pin-des-text"><p>the output entity is a field or a fields container; it contains decompressed data</p>
</div></td></tr></tbody></table><table class="pin-box"><tbody><tr><td><pin-number n="1" ellipsis = "false"></pin-number></td><td><pin-name name="decompress_speed"></pin-name></td><td><req-type typeName="(double)"></req-type></td><td><div class = "pin-des-text"><p>the output entity is a double, containing decompression speed (mb/sec)</p>
Expand Down
52 changes: 26 additions & 26 deletions src/ansys/dpf/core/operators/compression/apply_svd.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@ class apply_svd(Operator):
Parameters
----------
field_contaner_to_compress: FieldsContainer
fields container to be compressed
scalar_int: int
number of vectors (r) to keep for the future reconstraction of the matrix A, ex. A[m,n]=coef[m,r]*VT[r,n], where coef=U*Sigma
scalar_double: float
threshold (precision) as a double, default value is 1e-7. If both pin1 and pin2 are provided, choose the min r-vectors
boolean: bool
apply svd on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).
Fields container with data to be compressed
scalar_int: int, optional
Number of vectors (r) to keep for the future reconstraction of the matrix A, ex.A[m,n] = coef[m,r] * VT[r,n], where coef = U * Sigma
scalar_double: float, optional
Threshold (precision) as a double (Default : 1e-7). If both pin1 and pin2 are provided, choose the min r-vectors
boolean: bool, optional
Apply SVD on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).

Returns
-------
us_svd: FieldsContainer
the output entity is a field container (time dependant); it contains the multiplication of two matrices, U and S, where A=U.S.Vt
The output entity is a fields container (time dependant); it contains the product of two matrices, U and S, where A=U.S.Vt
vt_svd: FieldsContainer
the output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt
The output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt
sigma: Field or FieldsContainer
the output entity is a field (or a field container if input fc contains several labels, where field contains results per label), containing singular (S) values of the input data, where A=U.S.Vt
The output entity is a field (or a field container if input fc contains several labels, where field contains results per label), containing singular (S) values of the input data, where A=U.S.Vt

Examples
--------
Expand Down Expand Up @@ -103,45 +103,45 @@ def _spec() -> Specification:
name="field_contaner_to_compress",
type_names=["fields_container"],
optional=False,
document=r"""fields container to be compressed""",
document=r"""Fields container with data to be compressed""",
),
1: PinSpecification(
name="scalar_int",
type_names=["int32"],
optional=False,
document=r"""number of vectors (r) to keep for the future reconstraction of the matrix A, ex. A[m,n]=coef[m,r]*VT[r,n], where coef=U*Sigma""",
optional=True,
document=r"""Number of vectors (r) to keep for the future reconstraction of the matrix A, ex.A[m,n] = coef[m,r] * VT[r,n], where coef = U * Sigma""",
),
2: PinSpecification(
name="scalar_double",
type_names=["double"],
optional=False,
document=r"""threshold (precision) as a double, default value is 1e-7. If both pin1 and pin2 are provided, choose the min r-vectors""",
optional=True,
document=r"""Threshold (precision) as a double (Default : 1e-7). If both pin1 and pin2 are provided, choose the min r-vectors""",
),
3: PinSpecification(
name="boolean",
type_names=["bool"],
optional=False,
document=r"""apply svd on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).""",
optional=True,
document=r"""Apply SVD on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).""",
),
},
map_output_pin_spec={
0: PinSpecification(
name="us_svd",
type_names=["fields_container"],
optional=False,
document=r"""the output entity is a field container (time dependant); it contains the multiplication of two matrices, U and S, where A=U.S.Vt""",
document=r"""The output entity is a fields container (time dependant); it contains the product of two matrices, U and S, where A=U.S.Vt""",
),
1: PinSpecification(
name="vt_svd",
type_names=["fields_container"],
optional=False,
document=r"""the output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt""",
document=r"""The output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt""",
),
2: PinSpecification(
name="sigma",
type_names=["field", "fields_container"],
optional=False,
document=r"""the output entity is a field (or a field container if input fc contains several labels, where field contains results per label), containing singular (S) values of the input data, where A=U.S.Vt""",
document=r"""The output entity is a field (or a field container if input fc contains several labels, where field contains results per label), containing singular (S) values of the input data, where A=U.S.Vt""",
),
},
)
Expand Down Expand Up @@ -226,7 +226,7 @@ def __init__(self, op: Operator):
def field_contaner_to_compress(self) -> Input:
r"""Allows to connect field_contaner_to_compress input to the operator.

fields container to be compressed
Fields container with data to be compressed

Returns
-------
Expand All @@ -247,7 +247,7 @@ def field_contaner_to_compress(self) -> Input:
def scalar_int(self) -> Input:
r"""Allows to connect scalar_int input to the operator.

number of vectors (r) to keep for the future reconstraction of the matrix A, ex. A[m,n]=coef[m,r]*VT[r,n], where coef=U*Sigma
Number of vectors (r) to keep for the future reconstraction of the matrix A, ex.A[m,n] = coef[m,r] * VT[r,n], where coef = U * Sigma

Returns
-------
Expand All @@ -268,7 +268,7 @@ def scalar_int(self) -> Input:
def scalar_double(self) -> Input:
r"""Allows to connect scalar_double input to the operator.

threshold (precision) as a double, default value is 1e-7. If both pin1 and pin2 are provided, choose the min r-vectors
Threshold (precision) as a double (Default : 1e-7). If both pin1 and pin2 are provided, choose the min r-vectors

Returns
-------
Expand All @@ -289,7 +289,7 @@ def scalar_double(self) -> Input:
def boolean(self) -> Input:
r"""Allows to connect boolean input to the operator.

apply svd on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).
Apply SVD on the initial data (Default : false), otherwise use reduced data (square matrix with the smallest dimensions).

Returns
-------
Expand Down Expand Up @@ -346,7 +346,7 @@ def __init__(self, op: Operator):
def us_svd(self) -> Output:
r"""Allows to get us_svd output of the operator

the output entity is a field container (time dependant); it contains the multiplication of two matrices, U and S, where A=U.S.Vt
The output entity is a fields container (time dependant); it contains the product of two matrices, U and S, where A=U.S.Vt

Returns
-------
Expand All @@ -366,7 +366,7 @@ def us_svd(self) -> Output:
def vt_svd(self) -> Output:
r"""Allows to get vt_svd output of the operator

the output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt
The output entity is a field container (space dependant), containing the Vt, where A=U.S.Vt

Returns
-------
Expand Down
Binary file modified src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll
Binary file not shown.
Binary file modified src/ansys/dpf/gatebin/DPFClientAPI.dll
Binary file not shown.
Loading