Changeset 10573


Ignore:
Timestamp:
11/10/11 09:35:02 (13 years ago)
Author:
Eric.Larour
Message:

3D Dakota transient update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r10529 r10573  
    50815081}
    50825082/*}}}*/
     5083/*FUNCTION Penta::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
     5084void  Penta::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type){
     5085       
     5086        int i,j,t;
     5087
     5088        /*Check that name is an element input*/
     5089        if (!IsInput(name)) return;
     5090
     5091        switch(type){
     5092
     5093                case VertexEnum:
     5094                       
     5095                        double values[6];
     5096                        double time;
     5097
     5098                        /*Ok, create transient input: */
     5099                        for(t=0;t<ncols;t++){ //ncols is the number of times
     5100
     5101                                /*create input values: */
     5102                                for(i=0;i<6;i++){
     5103                                        row=this->nodes[i]->GetSidList();
     5104                                        values[i]=(double)matrix[ncols*row+t];
     5105                                }
     5106
     5107                                /*time? :*/
     5108                                time=(double)matrix[(nrows-1)*ncols+t]*yts;
     5109
     5110                                if(t==0) transientinput=new TransientInput(vector_enum);
     5111                                transientinput->AddTimeInput(new PentaVertexInput(vector_enum,nodeinputs),time);
     5112                        }
     5113                        this->inputs->AddInput(transientinput);
     5114                        break;
     5115
     5116                default:
     5117                        _error_("type %i (%s) not implemented yet",type,EnumToStringx(type));
     5118        }
     5119
     5120}
     5121/*}}}*/
    50835122#endif
    50845123
Note: See TracChangeset for help on using the changeset viewer.