Changeset 5378


Ignore:
Timestamp:
08/18/10 14:58:34 (15 years ago)
Author:
Mathieu Morlighem
Message:

One adjoint per solution

Location:
issm/trunk/src/c
Files:
3 added
1 deleted
4 edited

Legend:

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

    r5350 r5378  
    11131113                                        ./solutions/objectivefunctionC.cpp\
    11141114                                        ./solutions/gradient_core.cpp\
    1115                                         ./solutions/adjoint_core.cpp\
     1115                                        ./solutions/adjointdiagnostic_core.cpp\
     1116                                        ./solutions/adjointbalancedthickness_core.cpp\
    11161117                                        ./solutions/prognostic_core.cpp\
    11171118                                        ./solutions/balancedthickness_core.cpp\
     
    11261127                                        ./solutions/SolutionConfiguration.cpp\
    11271128                                        ./solutions/CorePointerFromSolutionEnum.cpp\
     1129                                        ./solutions/AdjointCorePointerFromSolutionEnum.cpp\
    11281130                                        ./solvers/solver_linear.cpp\
    11291131                                        ./solvers/solver_adjoint_linear.cpp\
  • issm/trunk/src/c/solutions/control_core.cpp

    r5318 r5378  
    3737        OptPars optpars;
    3838
    39         /*Solution core pointer*/
     39        /*Solution and Adjoint core pointer*/
    4040        void (*solutioncore)(FemModel*)=NULL;
     41        void (*adjointcore)(FemModel*)=NULL;
    4142
    4243        /*output: */
     
    5758        /*}}}*/
    5859
    59         /*out of solution_type, figure out solution core function pointer*/
     60        /*out of solution_type, figure out solution core and adjoint function pointer*/
    6061        CorePointerFromSolutionEnum(&solutioncore,solution_type);
     62        AdjointCorePointerFromSolutionEnum(&adjointcore,solution_type);
    6163
    6264        /*some preliminary work to be done if running full-Stokes analysis: */
     
    8183                /*In case we are running a steady state control method, compute new temperature field using new parameter distribution: */
    8284                if (solution_type==SteadystateSolutionEnum) solutioncore(femmodel);
     85
     86                _printf_("%s\n","      compute adjoint state:");
     87                adjointcore(femmodel);
    8388       
    8489                _printf_("%s\n","      computing gradJ...");
  • issm/trunk/src/c/solutions/gradient_core.cpp

    r4357 r5378  
    1717        /*parameters: */
    1818        bool control_steady;
    19         int control_type;
    20         int verbose;
     19        int  control_type;
     20        int  verbose;
     21
     22        /*Intermediaries*/
    2123        Vec new_gradient=NULL;
    2224        Vec gradient=NULL;
     
    2830        femmodel->parameters->FindParam(&verbose,VerboseEnum);
    2931
    30         if(verbose)_printf_("%s\n","      compute adjoint state:");
    31         adjoint_core(femmodel);
    32        
    3332        if(verbose)_printf_("%s\n","      compute gradient:");
    3433        Gradjx(&gradient, femmodel->elements,femmodel->nodes, femmodel->vertices,femmodel->loads, femmodel->materials,femmodel->parameters, control_type);
  • issm/trunk/src/c/solutions/solutions.h

    r5281 r5378  
    1313
    1414/*cores: */
    15 void adjoint_core(FemModel* femmodel);
     15void adjointdiagnostic_core(FemModel* femmodel);
     16void adjointbalancedthickness_core(FemModel* femmodel);
    1617void gradient_core(FemModel* femmodel,int step=0, double search_scalar=0);
    1718void diagnostic_core(FemModel* femmodel);
     
    4950void SolutionConfiguration(int** panalyses,int* pnumanalyses, void (**psolutioncore)(FemModel*),int solutiontype);
    5051void CorePointerFromSolutionEnum(void (**psolutioncore)(FemModel*),int solutiontype);
     52void AdjointCorePointerFromSolutionEnum(void (**padjointcore)(FemModel*),int solutiontype);
    5153
    5254#endif
Note: See TracChangeset for help on using the changeset viewer.