Exemplo n.º 1
0
BoundaryParams::BoundaryParams(GridParams* _GP, SpatialRegionGroup* srg)
	  : ParameterGroup()
{name = "Boundary";
 parameterGroupList.add(&SP);
 GP = _GP;
 spatialRegionGroup = srg;
 j1.setNameAndDescription(ostring("j1"),
  ostring("x1 Index for a boundary endpoint"));
 j1.setValue("-1");
 k1.setNameAndDescription(ostring("k1"),
  ostring("x1 Index for a boundary endpoint"));
 k1.setValue("-1");
 j2.setNameAndDescription(ostring("j2"),
  ostring("x2 Index for a boundary endpoint"));
 j2.setValue("-1");
 k2.setNameAndDescription(ostring("k2"),
  ostring("x2 Index for a boundary endpoint"));
 k2.setValue("-1");
 A1.setNameAndDescription("A1","x1 Location (MKS) of boundary endpoint");
 A1.setValue("-1");
 parameterList.add(&A1);
 A2.setNameAndDescription("A2","x2 Location (MKS) of boundary endpoint");
 A2.setValue("-1");
 parameterList.add(&A2);
 B1.setNameAndDescription("B1","x1 Location (MKS) of boundary endpoint");
 B1.setValue("-1");
 parameterList.add(&B1);
 B2.setNameAndDescription("B2","x2 Location (MKS) of boundary endpoint");
 B2.setValue("-1");
 parameterList.add(&B2);

 fill.setNameAndDescription("fill",  "if fill = 1 the boundary is filled in");
 fill.setValue("0");
 parameterList.add(&fill);

 normal.setNameAndDescription(ostring("normal"),
		ostring("Sign of normal to surface (1 or -1)"));
 normal.setValue("1");

 EFFlag.setNameAndDescription("EFFlag",  "A flag to record EM energy");
 EFFlag.setValue("0");

 IdiagFlag.setNameAndDescription("IdiagFlag","Flag turning on and off current collection for this boundary");
 IdiagFlag.setValue("0");
 parameterList.add(&IdiagFlag);

 Ihist_len.setNameAndDescription("Ihist_len","");
 Ihist_len.setValue("1024");
 parameterList.add(&Ihist_len);

 Ihist_avg.setNameAndDescription("Ihist_avg","");
 Ihist_avg.setValue("1");
 parameterList.add(&Ihist_avg);

 spotSize_p0.setNameAndDescription("spotSize_p0"," ");
 spotSize_p1.setNameAndDescription("spotSize_p1"," ");
 waveLeng_p0.setNameAndDescription("waveLeng_p0"," ");
 waveLeng_p1.setNameAndDescription("waveLeng_p1"," ");
 focus_p0.setNameAndDescription("focus_p0"," ");
 focus_p1.setNameAndDescription("focus_p1"," ");
 amp_p0.setNameAndDescription("amp_p0"," ");
 amp_p1.setNameAndDescription("amp_p1"," ");
 tdelay_p0.setNameAndDescription("tdelay_p0"," ");
 tdelay_p1.setNameAndDescription("tdelay_p1"," ");
 pulLeng_p0.setNameAndDescription("pulLeng_p0"," ");
 pulLeng_p1.setNameAndDescription("pulLeng_p1"," ");
 pulShp_p0.setNameAndDescription("pulShp_p0"," ");
 pulShp_p1.setNameAndDescription("pulShp_p1"," ");
 chirp_p0.setNameAndDescription("chirp_p0"," ");
 chirp_p1.setNameAndDescription("chirp_p1"," ");

 parameterList.add(&j1);
 parameterList.add(&k1);
 parameterList.add(&j2);
 parameterList.add(&k2);
 parameterList.add(&normal);
 parameterList.add(&EFFlag);
 parameterList.add(&spotSize_p0);
 parameterList.add(&spotSize_p1);
 parameterList.add(&waveLeng_p0);
 parameterList.add(&waveLeng_p1);
 parameterList.add(&focus_p0);
 parameterList.add(&focus_p1);
 parameterList.add(&amp_p0);
 parameterList.add(&amp_p1);
 parameterList.add(&tdelay_p0);
 parameterList.add(&tdelay_p1);
 parameterList.add(&pulLeng_p0);
 parameterList.add(&pulLeng_p1);
 parameterList.add(&chirp_p0);
 parameterList.add(&chirp_p1);
 parameterList.add(&pulShp_p0);
 parameterList.add(&pulShp_p1);


 nxbins.setNameAndDescription("nxbins","");
 nxbins.setValue("0");
 parameterList.add(&nxbins);

 nenergybins.setNameAndDescription("nenergybins","");
 nenergybins.setValue("0");
 parameterList.add(&nenergybins);

 nthetabins.setNameAndDescription("nthetabins", "");
 nthetabins.setValue("0");
 parameterList.add(&nthetabins);

 theta_min.setNameAndDescription("theta_min", "");
 theta_min.setValue("0");
 parameterList.add(&theta_min);

 theta_max.setNameAndDescription("theta_max", "");
 theta_max.setValue("90");
 parameterList.add(&theta_max);

 energy_min.setNameAndDescription("energy_min", "");
 energy_min.setValue("0");
 parameterList.add(&energy_min);

 energy_max.setNameAndDescription("energy_max", "");
 energy_max.setValue("100");
 parameterList.add(&energy_max);

 Name.setNameAndDescription("name","A string label for this boundary");
 Name.setValue("Noname");
 parameterList.add(&Name);

  //Time parameter stuff

 C.setNameAndDescription("C","DC value of time dependent function on the boundary");
 A.setNameAndDescription("A","AC sinusoidal value of the boundary");
 frequency.setNameAndDescription("frequency","frequency of the AC signal in Hz");
 phase.setNameAndDescription("phase","phase of the AC signal");

 trise.setNameAndDescription("trise","rise time of the envelope");
 tpulse.setNameAndDescription("tpulse","pulse time of the envelope");
 tfall.setNameAndDescription("tfall","fall time of the envelope");
 tdelay.setNameAndDescription("tdelay","delay time before the envelope");
 a0.setNameAndDescription("a0","lower amplitude of envelope");
 a1.setNameAndDescription("a1","upper amplitude of envelope");
 parameterList.add(&C);
	C.setValue("1.0");
	parameterList.add(&A);
	A.setValue("0.0");
	parameterList.add(&frequency);
	frequency.setValue("0.0");
	parameterList.add(&phase);
	phase.setValue("0.0");

	parameterList.add(&trise);
	trise.setValue("0.0");
	parameterList.add(&tpulse);
	tpulse.setValue("10000.0");
	parameterList.add(&tfall);
	tfall.setValue("0.0");
 	parameterList.add(&tdelay);
	tdelay.setValue("0.0");
	parameterList.add(&a0);
	a0.setValue("1.0");
	parameterList.add(&a1);
	a1.setValue("1.0");

 xtFlag.setNameAndDescription("xtFlag","");
 xtFlag.setValue("0");
 parameterList.add(&xtFlag);

 F.setNameAndDescription("F","");
 F.setValue("100");
 parameterList.add(&F);


	bPtr = NULL;								// gets set by CreateCounterPart()
};
Exemplo n.º 2
0
static IPTR mNew(struct IClass *cl, Object *obj, struct opSet *msg)
{
    struct data            temp;
    struct URL_MailerNode  *mn;
    struct TagItem         *attrs = msg->ops_AttrList;

    memset(&temp,0,sizeof(temp));

    temp.mailerList = (Object *)GetTagData(MUIA_MailerEditWin_ListObj,(IPTR)NULL,attrs);
    if (!temp.mailerList) return 0;

    mn = temp.mn  = (struct URL_MailerNode *)GetTagData(MUIA_MailerEditWin_Mailer,(IPTR)NULL,attrs);
    if (!mn) return 0;

    if((obj = (Object *)DoSuperNew(cl,obj,
        MUIA_HelpNode,             "MWIN",
        MUIA_Window_ID,            MAKE_ID('E', 'D', 'M', 'L'),
        MUIA_Window_Title,         getString(MSG_Mailer_WinTitle),
        MUIA_Window_AllowTopMenus, FALSE,
        MUIA_Window_ScreenTitle,   getString(MSG_App_ScreenTitle),

        WindowContents, VGroup,
            Child, ColGroup(2),
                GroupFrameT(getString(MSG_Edit_Definitions)),

                Child, olabel2(MSG_Edit_Name),
                Child, temp.name = ostring(NAME_LEN,MSG_Edit_Name,MSG_Edit_Name_Help),

                Child, olabel2(MSG_Edit_Path),
                Child, temp.path = opopph(syms,names,PATH_LEN,MSG_Edit_Path,TRUE,MSG_Edit_Path_Help),

                Child, olabel2(MSG_Edit_Port),
                Child, temp.port = opopport(PORT_LEN,MSG_Edit_Port,MSG_Edit_Port_Help),
            End,

            Child, ColGroup(2),
                GroupFrameT(getString(MSG_Edit_ARexx)),

                Child, olabel2(MSG_Edit_Show),
                Child, temp.show = ostring(SHOWCMD_LEN,MSG_Edit_Show,MSG_Edit_Show_Help),

                Child, olabel2(MSG_Edit_Screen),
                Child, temp.toFront = ostring(TOFRONTCMD_LEN,MSG_Edit_Screen,MSG_Edit_Screen_Help),

                Child, olabel2(MSG_Mailer_Write),
                Child, temp.write = opopph(syms,names,WRITEMAILCMD_LEN,MSG_Mailer_Write,FALSE,MSG_Mailer_Write_Help),
            End,

            Child, ColGroup(3),
                Child, temp.use = obutton(MSG_Edit_Use,MSG_Edit_Use_Help),
                Child, RectangleObject, End,
                Child, temp.cancel = obutton(MSG_Edit_Cancel,MSG_Edit_Cancel_Help),
            End,
        End,
        TAG_MORE, attrs)) != NULL)
    {
        struct data *data = INST_DATA(cl,obj);

        CopyMem(&temp,data,sizeof(*data));

        set(data->name,MUIA_String_Contents,mn->umn_Name);
        set(data->path,MUIA_String_Contents,mn->umn_Path);
        set(data->port,MUIA_String_Contents,mn->umn_Port);
        set(data->show,MUIA_String_Contents,mn->umn_ShowCmd);
        set(data->toFront,MUIA_String_Contents,mn->umn_ToFrontCmd);
        set(data->write,MUIA_String_Contents,mn->umn_WriteMailCmd);
    }

    return (IPTR)obj;
}
Exemplo n.º 3
0
ostring BoundaryParams::AlignmentConstraint()
{char buffer[200];
  sprintf(buffer, "%s","");
 return(ostring(buffer));}