void ReferenceFrame2D::GetElementData(ElementDataContainer& edc) 		//fill in all element data
{
	Body2D::GetElementData(edc);

	//IVector FFRFelements; //elements connected to ReferenceFrame
	//SearchTree searchtree; //for optimized node fill
	//TArray<Node*> nodes;
	//int resortconstraint;  //activates resorting of the DOF of the reference frame into the constraint part
	//int isACRS;  //absolute coordinates reduced strain --> the frame rotation and translation is not taken into account in GetPos2D() etc.


	ElementData ed;
	SetElemDataIVector(edc, FFRFelements, "FFRF_elements");

	ed.SetBool(draw_frame, "Draw_Frame"); edc.Add(ed);
}
Пример #2
0
void MathFunction::GetElementData(ElementDataContainer& edc) 		//fill in all element data
{
    ElementData ed;

    //structure of ElementData:
    //Mathfunction
    //{
    //  piecewise_mode = 0/1/2     %modus for piecewise interpolation: -1=not piecewise==>use parsed function, 0=constant, 1=linear, 2=quadratic
    //  piecewise_points = [ ... ] %supporting points (e.g. time or place) for piecewise interpolation
    //  piecewise_values = [ ... ] %values at supporting points
    //  piecewise_diff_values = [ ... ] %differential values at supporting points - for quadratic interpolation
    //  parsed_function = " ... " %string representing parsed function, e.g. "A*sin(omega*t)"
    //  parsed_function_parameter = " ... " %string representing parameter of parsed function, e.g. "t"
    //  user_defined_function = yes %not editable, hard-coded userdefined function!
    //}
    int piecewise_mode = -1;

    //if (funcmode == TMFpiecewiseconst || funcmode == TMFpiecewiselinear || funcmode == TMFpiecewisequad)
    //{
    //}
    if (funcmode == TMFpiecewiseconst)
    {
        piecewise_mode = 0;
    }
    else if (funcmode == TMFpiecewiselinear)
    {
        piecewise_mode = 1;
    }
    else if (funcmode == TMFpiecewisequad)
    {
        piecewise_mode = 2;
    }
    ed.SetInt(piecewise_mode, "piecewise_mode", -1, 2);
    ed.SetToolTipText("modus for piecewise interpolation: -1=not piecewise, 0=constant, 1=linear, 2=quadratic");
    edc.Add(ed);
    ed.SetVector(vectime.GetVecPtr(), vectime.Length(), "piecewise_points");
    ed.SetVariableLength();
    ed.SetToolTipText("supporting points (e.g. time or place) for piecewise interpolation");
    edc.Add(ed);
    ed.SetVector(valX.GetVecPtr(), valX.Length(), "piecewise_values");
    ed.SetVariableLength();
    ed.SetToolTipText("values at supporting points");
    edc.Add(ed);
    ed.SetVector(valY.GetVecPtr(), valY.Length(), "piecewise_diff_values");
    ed.SetVariableLength();
    ed.SetToolTipText("differential values at supporting points - for quadratic interpolation");
    edc.Add(ed);


    if (funcmode == TMFexpression)
    {
        ed.SetText(parsedFunctionExpression.c_str(), "parsed_function");
        ed.SetToolTipText("string representing parsed function, e.g. 'A*sin(omega*t)'");
        edc.Add(ed);
        ed.SetText(parsedFunctionVariables.c_str(), "parsed_function_parameter");
        ed.SetToolTipText("string representing parameter of parsed function, e.g. 't'");
        edc.Add(ed);
    }
    else
    {
        //initialize with zero strings:
        ed.SetText("", "parsed_function");
        ed.SetToolTipText("string representing parsed function, e.g. 'A*sin(omega*t)'");
        edc.Add(ed);
        ed.SetText("", "parsed_function_parameter");
        ed.SetToolTipText("string representing parameter of parsed function, e.g. 't'");
        edc.Add(ed);
    }

    if (funcmode == TMFuserdefined)
    {
        ed.SetBool(1,"user_defined_function");
        ed.SetLocked(1);
        ed.SetToolTipText("not editable, hard-coded userdefined function!");
        edc.Add(ed);
    }
}