Commit 300beff7 authored by Christophe Geuzaine's avatar Christophe Geuzaine

Merge branch 'SetIncrementAsSolution' into 'master'

SetIncrementAsSolution See merge request !53
parents 8d59be68 602023bd
Pipeline #2126 passed with stage
in 9 minutes 40 seconds
......@@ -1325,6 +1325,7 @@ struct IterativeLoopSystem {
#define OPERATION_OPTIMIZER_UPDATE 108
#define OPERATION_OPTIMIZER_FINALIZE 109
#define OPERATION_SETEXTRAPOLATIONORDER 110
#define OPERATION_SETINCREMENTASSOLUTION 111
/* ChangeOfState.Type */
#define CHANGEOFSTATE_NOCHANGE 0
......
......@@ -237,6 +237,7 @@ struct StringXDefine Operation_Type[] = {
{"SetRightHandSideAsSolution" , OPERATION_SETRHSASSOLUTION},
{"SetSolutionAsRHS" , OPERATION_SETSOLUTIONASRHS},
{"SetSolutionAsRightHandSide", OPERATION_SETSOLUTIONASRHS},
{"SetIncrementAsSolution" , OPERATION_SETINCREMENTASSOLUTION},
{"SwapSolutionAndRHS" , OPERATION_SWAPSOLUTIONANDRHS},
{"SwapSolutionAndRightHandSide" , OPERATION_SWAPSOLUTIONANDRHS},
{"SwapSolutionAndResidual", OPERATION_SWAPSOLUTIONANDRESIDUAL},
......
......@@ -1167,6 +1167,21 @@ void Treatment_Operation(struct Resolution * Resolution_P,
}
break ;
/* --> S e t I n c r e m e n t A s S o l u t i o n */
/* ---------------------------------------------------- */
case OPERATION_SETINCREMENTASSOLUTION :
{
/* Compute : x <- dx */
Init_OperationOnSystem("SetIncrementAsSolution",
Resolution_P, Operation_P, DofData_P0, GeoData_P0,
&DefineSystem_P, &DofData_P, Resolution2_P) ;
if(DofData_P->CurrentSolution)
LinAlg_CopyVector(&DofData_P->dx, &DofData_P->CurrentSolution->x);
else
Message::Error("No current solution available");
}
break ;
/* --> S w a p S o l u t i o n */
/* ---------------------------------------- */
case OPERATION_SWAPSOLUTIONANDRHS :
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment