Changeset 10576


Ignore:
Timestamp:
11/10/11 10:55:14 (13 years ago)
Author:
Eric.Larour
Message:

Fixed all bugs in new implementation of transient inputs for Dakota runs.

Location:
issm/trunk/src/c
Files:
3 added
20 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/c/Makefile.am

    r10568 r10576  
    361361                                          ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h\
    362362                                          ./modules/InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.cpp\
     363                                          ./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.h\
     364                                          ./modules/InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.cpp\
    363365                                          ./modules/AverageOntoPartitionx/AverageOntoPartitionx.cpp\
    364366                                          ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h\
  • issm/trunk/src/c/modules/ModelProcessorx/CreateParameters.cpp

    r10522 r10576  
    110110
    111111        #ifdef _HAVE_DAKOTA_
    112         CreateParametersQmu(&parameters,iomodel,solution_type,analysis_type);
     112        CreateParametersDakota(&parameters,iomodel,solution_type,analysis_type);
    113113        #endif
    114114
  • issm/trunk/src/c/modules/ModelProcessorx/ModelProcessorx.h

    r9340 r10576  
    2020void  CreateParameters(Parameters** pparameters,IoModel* iomodel,const int solution_type,int analysis_type,int analysis_counter);
    2121void  CreateParametersControl(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type);
    22 void  CreateParametersQmu(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type);
     22void  CreateParametersDakota(Parameters** pparameters,IoModel* iomodel,int solution_type,int analysis_type);
    2323void  UpdateElementsAndMaterialsControl(Elements* elements,Materials* materials, IoModel* iomodel);
    2424
  • issm/trunk/src/c/modules/modules.h

    r10440 r10576  
    5050#include "./InputUpdateFromVectorx/InputUpdateFromVectorx.h"
    5151#include "./InputUpdateFromVectorDakotax/InputUpdateFromVectorDakotax.h"
     52#include "./InputUpdateFromMatrixDakotax/InputUpdateFromMatrixDakotax.h"
    5253#include "./InputArtificialNoisex/InputArtificialNoisex.h"
    5354#include "./IoModelToConstraintsx/IoModelToConstraintsx.h"
  • issm/trunk/src/c/objects/Elements/Penta.cpp

    r10573 r10576  
    50815081}
    50825082/*}}}*/
    5083 /*FUNCTION Penta::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
    5084 void  Penta::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type){
     5083/*FUNCTION Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
     5084void  Penta::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
    50855085       
    50865086        int i,j,t;
     5087        TransientInput* transientinput=NULL;
     5088        double values[6];
     5089        double time;
     5090        int row;
     5091        double yts;
    50875092
    50885093        /*Check that name is an element input*/
     
    50935098                case VertexEnum:
    50945099                       
    5095                         double values[6];
    5096                         double time;
    5097 
    5098                         /*Ok, create transient input: */
     5100                        /*Create transient input: */
     5101                                               
     5102                        parameters->FindParam(&yts,ConstantsYtsEnum);
     5103
    50995104                        for(t=0;t<ncols;t++){ //ncols is the number of times
    51005105
     
    51085113                                time=(double)matrix[(nrows-1)*ncols+t]*yts;
    51095114
    5110                                 if(t==0) transientinput=new TransientInput(vector_enum);
    5111                                 transientinput->AddTimeInput(new PentaVertexInput(vector_enum,nodeinputs),time);
     5115                                if(t==0) transientinput=new TransientInput(name);
     5116                                transientinput->AddTimeInput(new PentaVertexInput(name,values),time);
    51125117                        }
    51135118                        this->inputs->AddInput(transientinput);
  • issm/trunk/src/c/objects/Elements/Tria.cpp

    r10571 r10576  
    49804980}
    49814981/*}}}*/
    4982 /*FUNCTION Tria::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
    4983 void  Tria::InputUpdateFromVectorMatrix(double* matrix, int nrows, int ncols, int name, int type){
     4982/*FUNCTION Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type);{{{1*/
     4983void  Tria::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
    49844984       
    49854985        int i,j,t;
     4986        TransientInput* transientinput=NULL;
     4987        double values[3];
     4988        double time;
     4989        int row;
     4990        double yts;
    49864991
    49874992        /*Check that name is an element input*/
     
    49924997                case VertexEnum:
    49934998                       
    4994                         double values[3];
    4995                         double time;
    4996 
    4997                         /*Ok, create transient input: */
     4999                        /*Create transient input: */
     5000                                               
     5001                        parameters->FindParam(&yts,ConstantsYtsEnum);
     5002
    49985003                        for(t=0;t<ncols;t++){ //ncols is the number of times
    49995004
     
    50075012                                time=(double)matrix[(nrows-1)*ncols+t]*yts;
    50085013
    5009                                 if(t==0) transientinput=new TransientInput(vector_enum);
    5010                                 transientinput->AddTimeInput(new TriaVertexInput(vector_enum,nodeinputs),time);
     5014                                if(t==0) transientinput=new TransientInput(name);
     5015                                transientinput->AddTimeInput(new TriaVertexInput(name,values),time);
    50115016                        }
    50125017                        this->inputs->AddInput(transientinput);
  • issm/trunk/src/c/objects/Loads/Icefront.cpp

    r10523 r10576  
    393393/*FUNCTION Icefront::InputUpdateFromVector(bool* vector, int name, int type) {{{1*/
    394394void  Icefront::InputUpdateFromVector(bool* vector, int name, int type){
     395        /*Nothing updated yet*/
     396}
     397/*}}}*/
     398/*FUNCTION Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type) {{{1*/
     399void  Icefront::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
    395400        /*Nothing updated yet*/
    396401}
  • issm/trunk/src/c/objects/Loads/Icefront.h

    r10407 r10576  
    6161                void  InputUpdateFromVector(int* vector, int name, int type);
    6262                void  InputUpdateFromVector(bool* vector, int name, int type);
     63                void  InputUpdateFromMatrixDakota(double* matrix,int ncols,int nrows, int name, int type);
    6364                void  InputUpdateFromVectorDakota(double* vector, int name, int type);
    6465                void  InputUpdateFromVectorDakota(int* vector, int name, int type);
  • issm/trunk/src/c/objects/Loads/Numericalflux.h

    r9883 r10576  
    5757                void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
    5858                void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
     59                void    InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){/*Do nothing*/}
    5960                void    InputUpdateFromVectorDakota(double* vector, int name, int type){/*Do nothing*/}
    6061                void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
  • issm/trunk/src/c/objects/Loads/Pengrid.cpp

    r10523 r10576  
    390390}
    391391/*}}}*/
     392/*FUNCTION Pengrid::InputUpdateFromMatrixDakota(double* vector, int nrows, int ncols, int name, int type) {{{1*/
     393void  Pengrid::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
     394        /*Nothing updated yet*/
     395}
     396/*}}}*/
    392397/*FUNCTION Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type) {{{1*/
    393398void  Pengrid::InputUpdateFromVectorDakota(double* vector, int name, int type){
  • issm/trunk/src/c/objects/Loads/Pengrid.h

    r10407 r10576  
    6262                void  InputUpdateFromVector(int* vector, int name, int type);
    6363                void  InputUpdateFromVector(bool* vector, int name, int type);
     64                void  InputUpdateFromMatrixDakota(double* matrix ,int nrows, int ncols, int name, int type);
    6465                void  InputUpdateFromVectorDakota(double* vector, int name, int type);
    6566                void  InputUpdateFromVectorDakota(int* vector, int name, int type);
  • issm/trunk/src/c/objects/Loads/Penpair.h

    r9883 r10576  
    4949                void  InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
    5050                void  InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
     51                void  InputUpdateFromMatrixDakota(double* matrix, int nrow, int ncols,int name, int type){_error_("Not implemented yet!");}
    5152                void  InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
    5253                void  InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
  • issm/trunk/src/c/objects/Loads/Riftfront.h

    r9883 r10576  
    6969                void    InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
    7070                void    InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
     71                void    InputUpdateFromMatrixDakota(double* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");}
    7172                void    InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
    7273                void    InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
  • issm/trunk/src/c/objects/Materials/Matice.cpp

    r10135 r10576  
    622622}
    623623/*}}}*/
     624/*FUNCTION Matice::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{1*/
     625void  Matice::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols,int name, int type){
     626        /*Nothing updated yet*/
     627}
     628/*}}}*/
    624629/*FUNCTION Matice::InputUpdateFromVectorDakota(int* vector, int name, int type) {{{1*/
    625630void  Matice::InputUpdateFromVectorDakota(int* vector, int name, int type){
  • issm/trunk/src/c/objects/Materials/Matice.h

    r9883 r10576  
    4747                void  InputUpdateFromVector(int* vector, int name, int type);
    4848                void  InputUpdateFromVector(bool* vector, int name, int type);
     49                void  InputUpdateFromMatrixDakota(double* matrix, int nrow, int ncols, int name, int type);
    4950                void  InputUpdateFromVectorDakota(double* vector, int name, int type);
    5051                void  InputUpdateFromVectorDakota(int* vector, int name, int type);
  • issm/trunk/src/c/objects/Materials/Matpar.cpp

    r10565 r10576  
    228228/*FUNCTION Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type) {{{1*/
    229229void   Matpar::InputUpdateFromVectorDakota(bool* vector, int name, int type){
     230        /*Nothing updated yet*/
     231}
     232/*}}}*/
     233/*FUNCTION Matpar::InputUpdateFromMatrixDakota(int* vector, int name, int type) {{{1*/
     234void  Matpar::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols,int name, int type){
    230235        /*Nothing updated yet*/
    231236}
  • issm/trunk/src/c/objects/Materials/Matpar.h

    r10565 r10576  
    5858                void   InputUpdateFromVector(int* vector, int name, int type);
    5959                void   InputUpdateFromVector(bool* vector, int name, int type);
     60                void   InputUpdateFromMatrixDakota(double* matrix,int nrows,int ncols, int name, int type);
    6061                void   InputUpdateFromVectorDakota(double* vector, int name, int type);
    6162                void   InputUpdateFromVectorDakota(int* vector, int name, int type);
  • issm/trunk/src/c/objects/Node.cpp

    r10367 r10576  
    827827}
    828828/*}}}*/
     829/*FUNCTION Node::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){{{1*/
     830void  Node::InputUpdateFromMatrixDakota(double* matrix, int nrows, int ncols, int name, int type){
     831
     832        /*Nothing updated yet*/
     833}
     834/*}}}*/
    829835/*FUNCTION Node::InputUpdateFromVectorDakota(int* vector, int name, int type){{{1*/
    830836void  Node::InputUpdateFromVectorDakota(int* vector, int name, int type){
  • issm/trunk/src/c/objects/Node.h

    r10367 r10576  
    5555                void  InputUpdateFromVector(int* vector, int name, int type);
    5656                void  InputUpdateFromVector(bool* vector, int name, int type);
     57                void  InputUpdateFromMatrixDakota(double* matrix,int nrows, int ncols, int name, int type);
    5758                void  InputUpdateFromVectorDakota(double* vector, int name, int type);
    5859                void  InputUpdateFromVectorDakota(int* vector, int name, int type);
  • issm/trunk/src/c/objects/Update.h

    r9761 r10576  
    1919                virtual void  InputUpdateFromVector(bool* vector, int name, int type)=0;
    2020                #ifdef _HAVE_DAKOTA_
     21                virtual void  InputUpdateFromMatrixDakota(double* matrix, int rows, int ncols, int name, int type)=0;
    2122                virtual void  InputUpdateFromVectorDakota(double* vector, int name, int type)=0;
    2223                virtual void  InputUpdateFromVectorDakota(int* vector, int name, int type)=0;
Note: See TracChangeset for help on using the changeset viewer.