[21337] | 1 | Index: ../trunk-jpl/src/c/cores/movingfront_core.cpp
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- ../trunk-jpl/src/c/cores/movingfront_core.cpp (revision 20981)
|
---|
| 4 | +++ ../trunk-jpl/src/c/cores/movingfront_core.cpp (revision 20982)
|
---|
| 5 | @@ -13,7 +13,7 @@
|
---|
| 6 |
|
---|
| 7 | /* intermediaries */
|
---|
| 8 | bool save_results,isstressbalance,ismasstransport,isthermal,isenthalpy,islevelset,ismovingfront;
|
---|
| 9 | - int domaintype, num_extrapol_vars, index;
|
---|
| 10 | + int domaintype, num_extrapol_vars, index,reinit_frequency,step;
|
---|
| 11 | int* extrapol_vars=NULL;
|
---|
| 12 | Analysis *analysis=NULL;
|
---|
| 13 |
|
---|
| 14 | @@ -24,13 +24,16 @@
|
---|
| 15 | femmodel->parameters->FindParam(&ismasstransport,TransientIsmasstransportEnum);
|
---|
| 16 | femmodel->parameters->FindParam(&isthermal,TransientIsthermalEnum);
|
---|
| 17 | femmodel->parameters->FindParam(&ismovingfront,TransientIsmovingfrontEnum);
|
---|
| 18 | + femmodel->parameters->FindParam(&reinit_frequency,LevelsetReinitFrequencyEnum);
|
---|
| 19 | + femmodel->parameters->FindParam(&step,StepEnum);
|
---|
| 20 | if(isthermal && domaintype==Domain3DEnum) femmodel->parameters->FindParam(&isenthalpy,ThermalIsenthalpyEnum);
|
---|
| 21 |
|
---|
| 22 | if(!ismovingfront) return;
|
---|
| 23 |
|
---|
| 24 | /* start the work from here */
|
---|
| 25 | Calvingx(femmodel);
|
---|
| 26 | - if(VerboseSolution()) _printf0_(" computing levelset transport\n");
|
---|
| 27 | + if(VerboseSolution()) _printf0_(" computing level set transport\n");
|
---|
| 28 | +
|
---|
| 29 | /* smoothen slope of lsf for computation of normal on ice domain*/
|
---|
| 30 | levelsetfunctionslope_core(femmodel);
|
---|
| 31 |
|
---|
| 32 | @@ -66,6 +69,12 @@
|
---|
| 33 | analysis->Core(femmodel);
|
---|
| 34 | delete analysis;
|
---|
| 35 |
|
---|
| 36 | + /*Reset levelset if needed*/
|
---|
| 37 | + if(reinit_frequency && (step%reinit_frequency==0)){
|
---|
| 38 | + if(VerboseSolution()) _printf0_(" reinitializing level set\n");
|
---|
| 39 | + femmodel->ResetLevelset();
|
---|
| 40 | + }
|
---|
| 41 | +
|
---|
| 42 | /* update vertices included for next calculation */
|
---|
| 43 | GetMaskOfIceVerticesLSMx(femmodel);
|
---|
| 44 |
|
---|