Changeset 1210


Ignore:
Timestamp:
07/02/09 07:33:54 (16 years ago)
Author:
Mathieu Morlighem
Message:

do not extrude gradient if control_type='drag'

Location:
issm/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/ModelProcessorx/Control/CreateParametersControl.cpp

    r1046 r1210  
    4646        param= new Param(count,"control_type",STRING);
    4747        param->SetString(model->control_type);
     48        parameters->AddObject(param);
     49
     50        /*extrude_param: */
     51        count++;
     52        param= new Param(count,"extrude_param",DOUBLE);
     53        if (strcmp(model->control_type,"drag")==0)   param->SetDouble(0);
     54        else if (strcmp(model->control_type,"B")==0) param->SetDouble(1);
     55        else throw ErrorException(__FUNCT__,exprintf("control_type %s not supported yet!",model->control_type));
    4856        parameters->AddObject(param);
    4957
  • issm/trunk/src/c/parallel/GradJCompute.cpp

    r1209 r1210  
    4545        int debug=0;
    4646        int dim=-1;
     47        int extrude_param=0;
    4748       
    4849        /*some parameters:*/
     
    5354        femmodel->parameters->FindParam((void*)&solverstring,"solverstring");
    5455        femmodel->parameters->FindParam((void*)&control_type,"control_type");
     56        femmodel->parameters->FindParam((void*)&extrude_param,"extrude_param");
    5557        femmodel->parameters->FindParam((void*)&debug,"debug");
    5658        femmodel->parameters->FindParam((void*)&dim,"dim");
     
    8385                                inputs,analysis_type,sub_analysis_type,control_type);
    8486
    85         if (dim==3){
     87        if (dim==3 && extrude_param){
    8688
    8789                _printf_("%s\n","      extruding gradient...");
  • issm/trunk/src/m/solutions/cielo/GradJCompute.m

    r1204 r1210  
    44debug=m.parameters.debug;
    55dim=m.parameters.dim;
     6extrude_param=m.parameters.extrude_param;
    67ishutter=m.parameters.ishutter;
    78ismacayealpattyn=m.parameters.ismacayealpattyn;
     
    3132grad_g=Gradj(m.elements,m.nodes,m.loads,m.materials,m.parameters,inputs,analysis_type,sub_analysis_type);
    3233
    33 if dim==3,
     34if (dim==3 & extrude_param),
    3435        displaystring(debug,'%s','          extruding gradient...');
    3536        grad_g=FieldExtrude(m.elements,m.nodes,m.loads,m.materials,grad_g,'gradj',0);
Note: See TracChangeset for help on using the changeset viewer.