Krasimira Tsaneva wrote:
Dear all,

 Suppose I have a time series data written in native dx file format with
regular 3D positions and conections. Is it possible to extract the time series
 at a certain point (from my mesh) and plot them with opendx?

 Thank you very much!

 -Krasimira

--



Some time ago I've built this macro.
It works, but perhaps can be simplified.

Hope this helps,

Marco

--
Marco Morandini, Ph.D.
Dip. di Ingegneria Aerospaziale
Politecnico di Milano
Via La Masa, 34                 | phone: (+39) 02 2399 8362
20156 MILANO - Italy            | fax:   (+39) 02 2399 8334
-----------------------------------------------------------

Please avoid sending me Word or PowerPoint attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html
//
// time: Tue Nov 27 10:44:13 2001
//
// version: 3.1.2 (format), 4.1.0 (DX)
//
//
//
// macro reference (direct): FormatList 
/opt/dx/samples/macros/FormatListMacro.net
include "FormatListMacro.net"
//
// Begin MDF
// MODULE ChooseComponent
// CATEGORY Fem
// INPUT input_1; object; (no default);  
// INPUT input_2; value list or string list or object; (no default);  
// OUTPUT output_1; object;  
// End MDF
// workspace: width = 469, height = 680
// layout: snap = 0, width = 50, height = 50, align = NN
//
macro ChooseComponent(
 input_1
,input_2
) -> (
 output_1
) {
    // 
    // node Input[43]: x = 334, y = 27, inputs = 0, label = Input1
    // parameter: position = 1, name = 'input_1', value = '(no default)', 
descriptive = 1, description = ' ', required = 0, visible = 1
    //
ChooseComponent_Input_43_out_1 = input_1;
    // 
    // node Inquire[1]: x = 343, y = 133, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "shape"
    //
ChooseComponent_Inquire_1_out_1 = 
    Inquire(
    ChooseComponent_Input_43_out_1,
    "shape",
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Compute[1]: x = 362, y = 237, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0-1"
    // expression: value = a-1
    // name[2]: value = a
    // name[3]: value = b
    //
ChooseComponent_Compute_1_out_1 = 
    Compute(
    "$0-1",
    ChooseComponent_Inquire_1_out_1,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node Input[47]: x = 84, y = 19, inputs = 0, label = Input2
    // parameter: position = 2, name = 'input_2', value = '(no default)', 
descriptive = 1, description = ' ', required = 0, visible = 1
    //
ChooseComponent_Input_47_out_1 = input_2;
    // 
    // node Inquire[7]: x = 113, y = 146, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "items"
    //
ChooseComponent_Inquire_7_out_1 = 
    Inquire(
    ChooseComponent_Input_47_out_1,
    "items",
    NULL
    ) [instance: 7, cache: 1];
    // 
    // node Compute[2]: x = 133, y = 304, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 == $1"
    // expression: value = a == b
    // name[2]: value = a
    // name[3]: value = b
    //
ChooseComponent_Compute_2_out_1 = 
    Compute(
    "$0 == $1",
    ChooseComponent_Inquire_7_out_1,
    ChooseComponent_Inquire_1_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Enumerate[1]: x = 349, y = 327, inputs = 5, label = Enumerate
    // input[1]: defaulting = 0, visible = 1, type = 29, value = 0
    // input[4]: defaulting = 0, visible = 1, type = 29, value = 1
    //
ChooseComponent_Enumerate_1_out_1 = 
    Enumerate(
    0,
    ChooseComponent_Compute_1_out_1,
    NULL,
    1,
    NULL
    ) [instance: 1, cache: 1];
    // 
    // node FormatList[1]: x = 389, y = 427, inputs = 2, label = FormatList
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "component %d"
    //
ChooseComponent_FormatList_1_out_1 = 
    FormatList(
    ChooseComponent_Enumerate_1_out_1,
    "component %d"
    ) [instance: 1, cache: 1];
    // 
    // node Inquire[6]: x = 26, y = 240, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is null+1"
    //
ChooseComponent_Inquire_6_out_1 = 
    Inquire(
    ChooseComponent_Input_47_out_1,
    "is null+1",
    NULL
    ) [instance: 6, cache: 1];
    // 
    // node Switch[9]: x = 183, y = 410, inputs = 3, label = Switch
    //
ChooseComponent_Switch_9_out_1 = 
    Switch(
    ChooseComponent_Compute_2_out_1,
    ChooseComponent_Input_47_out_1,
    NULL
    ) [instance: 9, cache: 1];
    // 
    // node Switch[13]: x = 61, y = 508, inputs = 3, label = Switch
    //
ChooseComponent_Switch_13_out_1 = 
    Switch(
    ChooseComponent_Inquire_6_out_1,
    ChooseComponent_Switch_9_out_1,
    ChooseComponent_FormatList_1_out_1
    ) [instance: 13, cache: 1];
    // 
    // node Output[13]: x = 243, y = 618, inputs = 1, label = Output
    // parameter: position = 1, name = 'output_1', value = ' ', descriptive = 
0, description = ' ', required = 0, visible = 1
    //
output_1 = ChooseComponent_Switch_13_out_1;
// network: end of macro body
}
ChooseComponent_Input_43_out_1 = NULL;
ChooseComponent_Inquire_1_out_1 = NULL;
ChooseComponent_Compute_1_out_1 = NULL;
ChooseComponent_Input_47_out_1 = NULL;
ChooseComponent_Inquire_7_out_1 = NULL;
ChooseComponent_Compute_2_out_1 = NULL;
ChooseComponent_Enumerate_1_out_1 = NULL;
ChooseComponent_FormatList_1_out_1 = NULL;
ChooseComponent_Inquire_6_out_1 = NULL;
ChooseComponent_Switch_9_out_1 = NULL;
ChooseComponent_Switch_13_out_1 = NULL;

Reply via email to