result:mapdl run
Last update: 31.07.2026Version: 0.0.0
Description
Solve in mapdl a dat/inp file and returns a datasources with the rst file.
Inputs
This table lists the input pins for this operator. Input pins define the data that the operator requires to perform its operation. Some inputs are required, while others are optional and provide additional configuration. Each parameter is detailed in the sections that follow the table.
| Pin number | Name | Status | Expected type(s) |
|---|---|---|---|
| 0 | mapdl_exe_path | string |
|
| 1 | working_dir | string |
|
| 2 | number_of_processes | int32 |
|
| 3 | number_of_threads | int32 |
|
| 4 | data_sources | Required | data_sources |
| 5 | server_mode | bool |
mapdl_exe_path (Pin 0)
- Required: No
- Expected type(s):
string
working_dir (Pin 1)
- Required: No
- Expected type(s):
string
number_of_processes (Pin 2)
- Required: No
- Expected type(s):
int32
Set the number of MPI processes used for resolution (default is 2)
number_of_threads (Pin 3)
- Required: No
- Expected type(s):
int32
Set the number of threads used for resolution (default is 1)
data_sources (Pin 4)
- Required: Yes
- Expected type(s):
data_sources
data sources containing the input file.
server_mode (Pin 5)
- Required: No
- Expected type(s):
bool
used when a user includes commands in the input file allowing to launch DPF server inside MAPDL to interact with MAPDL using DPF client API
Outputs
This table lists the output pins for this operator. Output pins provide the results of the operator's computation and can be connected to inputs of other operators or retrieved for further processing. Each output is detailed in the sections that follow the table.
| Pin number | Name | Expected type(s) |
|---|---|---|
| 0 | data_sources | data_sources |
| 1 | ip | string |
| 2 | port | string |
data_sources (Pin 0)
- Expected type(s):
data_sources
returns the data source if the server_mode pin is not set to yes
ip (Pin 1)
- Expected type(s):
string
returns the Ip if the server_mode pin is set to yes
port (Pin 2)
- Expected type(s):
string
returns a port when the server mode pin is set to yes
Configurations
This operator supports configuration options that modify its behavior.
mutex
- Expected type(s):
bool - Default value: false
If this option is set to true, the shared memory is prevented from being simultaneously accessed by multiple threads.
Scripting
This operator can be accessed through scripting interfaces using these identifiers.
Category: result
Plugin: mapdl
Scripting name: mapdl.run
Full name: result.mapdl.run
Internal name: mapdl::run
License: None
Examples
These examples demonstrate how to use this operator in different programming environments. Each example shows how to instantiate the operator, connect the required inputs, and retrieve the output.
C++
#include "dpf_api.h"
ansys::dpf::Operator op("mapdl::run"); // operator instantiation
op.connect(0, my_mapdl_exe_path);
op.connect(1, my_working_dir);
op.connect(2, my_number_of_processes);
op.connect(3, my_number_of_threads);
op.connect(4, my_data_sources);
op.connect(5, my_server_mode);
ansys::dpf::DataSources my_data_sources = op.getOutput<ansys::dpf::DataSources>(0);
std::string my_ip = op.getOutput<std::string>(1);
std::string my_port = op.getOutput<std::string>(2);
CPython
import ansys.dpf.core as dpf
op = dpf.operators.result.mapdl.run() # operator instantiation
op.inputs.mapdl_exe_path.connect(my_mapdl_exe_path)
op.inputs.working_dir.connect(my_working_dir)
op.inputs.number_of_processes.connect(my_number_of_processes)
op.inputs.number_of_threads.connect(my_number_of_threads)
op.inputs.data_sources.connect(my_data_sources)
op.inputs.server_mode.connect(my_server_mode)
my_data_sources = op.outputs.data_sources()
my_ip = op.outputs.ip()
my_port = op.outputs.port()
IPython
import mech_dpf
import Ans.DataProcessing as dpf
op = dpf.operators.result.mapdl.run() # operator instantiation
op.inputs.mapdl_exe_path.Connect(my_mapdl_exe_path)
op.inputs.working_dir.Connect(my_working_dir)
op.inputs.number_of_processes.Connect(my_number_of_processes)
op.inputs.number_of_threads.Connect(my_number_of_threads)
op.inputs.data_sources.Connect(my_data_sources)
op.inputs.server_mode.Connect(my_server_mode)
my_data_sources = op.outputs.data_sources.GetData()
my_ip = op.outputs.ip.GetData()
my_port = op.outputs.port.GetData()
Changelog
- Version 0.0.0: Initial release.