Ice Sheet System Model  4.18
Code documentation
solutionsequence_adjoint_linear.cpp
Go to the documentation of this file.
1 
5 #include "../toolkits/toolkits.h"
6 #include "../classes/classes.h"
7 #include "../shared/shared.h"
8 #include "../modules/modules.h"
9 
11  /*This is axactly the same solutionsequence as solutionsequence_linear except that Reduceloadfromgtofx and Mergesolutionfromftogx
12  * use the flag "true" so that all spc are taken as 0*/
13 
14  /*intermediary: */
15  Matrix<IssmDouble>* Kff = NULL;
16  Matrix<IssmDouble>* Kfs = NULL;
17  Vector<IssmDouble>* ug = NULL;
18  Vector<IssmDouble>* uf = NULL;
19  Vector<IssmDouble>* pf = NULL;
20  Vector<IssmDouble>* df = NULL;
21  Vector<IssmDouble>* ys = NULL;
22 
23  /*Recover parameters: */
25 
26  SystemMatricesx(&Kff, &Kfs, &pf, &df, NULL,femmodel);
28  Reduceloadx(pf, Kfs, ys,true); delete Kfs; //true means spc = 0
29 
31  Solverx(&uf, Kff, pf, NULL, df, femmodel->parameters); delete Kff; delete pf; delete df;
33 
34  Mergesolutionfromftogx(&ug, uf,ys,femmodel->nodes,femmodel->parameters,true); delete ys; //true means spc0
36  delete ug; delete uf;
37 }
Matrix< IssmDouble >
SOLVER
#define SOLVER
Definition: Profiler.h:16
Mergesolutionfromftogx
void Mergesolutionfromftogx(Vector< IssmDouble > **pug, Vector< IssmDouble > *uf, Vector< IssmDouble > *ys, Nodes *nodes, Parameters *parameters, bool flag_ys0)
Definition: Mergesolutionfromftogx.cpp:8
FemModel::parameters
Parameters * parameters
Definition: FemModel.h:46
Solverx
void Solverx(Vector< IssmDouble > **puf, Matrix< IssmDouble > *Kff, Vector< IssmDouble > *pf, Vector< IssmDouble > *uf0, Vector< IssmDouble > *df, Parameters *parameters)
Definition: Solverx.cpp:15
FemModel::UpdateConstraintsx
void UpdateConstraintsx(void)
Definition: FemModel.cpp:3027
FemModel::nodes
Nodes * nodes
Definition: FemModel.h:56
Profiler::Stop
void Stop(int tagenum, bool dontmpisync=true)
Definition: Profiler.cpp:179
FemModel
Definition: FemModel.h:31
Reduceloadx
void Reduceloadx(Vector< IssmDouble > *pf, Matrix< IssmDouble > *Kfs, Vector< IssmDouble > *y_s, bool flag_ys0)
Definition: Reduceloadx.cpp:14
Profiler::Start
void Start(int tagenum, bool dontmpisync=true)
Definition: Profiler.cpp:139
InputUpdateFromSolutionx
void InputUpdateFromSolutionx(FemModel *femmodel, Vector< IssmDouble > *solution)
Definition: InputUpdateFromSolutionx.cpp:9
solutionsequence_adjoint_linear
void solutionsequence_adjoint_linear(FemModel *femmodel)
Definition: solutionsequence_adjoint_linear.cpp:10
CreateNodalConstraintsx
void CreateNodalConstraintsx(Vector< IssmDouble > **pys, Nodes *nodes)
Definition: CreateNodalConstraintsx.cpp:10
SystemMatricesx
void SystemMatricesx(Matrix< IssmDouble > **pKff, Matrix< IssmDouble > **pKfs, Vector< IssmDouble > **ppf, Vector< IssmDouble > **pdf, IssmDouble *pkmax, FemModel *femmodel, bool isAllocated)
Definition: SystemMatricesx.cpp:10
FemModel::profiler
Profiler * profiler
Definition: FemModel.h:42
Vector< IssmDouble >
femmodel
FemModel * femmodel
Definition: esmfbinders.cpp:16