 |
Ice Sheet System Model
4.18
Code documentation
|
#include <FemModel.h>
|
| FemModel (int argc, char **argv, ISSM_MPI_Comm comm_init, bool trace=false) |
|
| FemModel (char *rootpath, char *inputfilename, char *outputfilename, char *toolkitsfilename, char *lockfilename, char *restartfilename, ISSM_MPI_Comm incomm, int solution_type, IssmPDouble *X) |
|
| ~FemModel () |
|
int | AnalysisIndex (int) |
|
void | CheckPoint (void) |
|
void | CleanUp (void) |
|
FemModel * | copy () |
|
void | Echo () |
|
int | GetElementsWidth () |
|
void | InitFromFiles (char *rootpath, char *inputfilename, char *outputfilename, char *petscfilename, char *lockfilename, char *restartfilename, const int solution_type, bool trace, IssmPDouble *X=NULL) |
|
void | InitFromFids (char *rootpath, FILE *IOMODEL, FILE *toolkitsoptionsfid, int in_solution_type, bool trace, IssmPDouble *X=NULL) |
|
void | Marshall (char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction) |
|
void | Restart (void) |
|
void | SetCurrentConfiguration (int configuration_type) |
|
void | SetCurrentConfiguration (int configuration_type, int analysis_type) |
|
int | Size (void) |
|
void | SolutionAnalysesList (int **panalyses, int *pnumanalyses, IoModel *iomodel, int solutiontype) |
|
void | Solve (void) |
|
void | BalancethicknessMisfitx (IssmDouble *pV) |
|
void | CalvingRateVonmisesx () |
|
void | CalvingRateLevermannx () |
|
void | CalvingFluxLevelsetx () |
|
void | CalvingMeltingFluxLevelsetx () |
|
void | DeviatoricStressx () |
|
void | Divergencex (IssmDouble *pdiv) |
|
void | ElementOperationx (void(Element::*function)(void)) |
|
void | ElementResponsex (IssmDouble *presponse, int response_enum) |
|
void | FloatingAreax (IssmDouble *pV, bool scaled) |
|
void | GetInputLocalMinMaxOnNodesx (IssmDouble **pmin, IssmDouble **pmax, IssmDouble *ug) |
|
void | GetLocalVectorWithClonesGset (IssmDouble **plocal_ug, Vector< IssmDouble > *ug) |
|
void | GetLocalVectorWithClonesVertices (IssmDouble **plocal_vector, Vector< IssmDouble > *vector) |
|
void | SyncLocalVectorWithClonesVertices (IssmDouble *local_vector) |
|
void | SyncLocalVectorWithClonesVerticesAdd (IssmDouble *local_vector) |
|
void | GetLocalVectorWithClonesNodes (IssmDouble **plocal_vector, Vector< IssmDouble > *vector) |
|
void | GroundedAreax (IssmDouble *pV, bool scaled) |
|
void | IcefrontAreax () |
|
void | IcefrontMassFluxx (IssmDouble *presponse, bool scaled) |
|
void | IcefrontMassFluxLevelsetx (IssmDouble *presponse, bool scaled) |
|
void | GroundinglineMassFluxx (IssmDouble *presponse, bool scaled) |
|
void | IceMassx (IssmDouble *pV, bool scaled) |
|
void | IceVolumex (IssmDouble *pV, bool scaled) |
|
void | IceVolumeAboveFloatationx (IssmDouble *pV, bool scaled) |
|
void | InputMakeDiscontinuous (int enum_in) |
|
void | MassFluxx (IssmDouble *presponse) |
|
void | MaxAbsVxx (IssmDouble *presponse) |
|
void | MaxAbsVyx (IssmDouble *presponse) |
|
void | MaxAbsVzx (IssmDouble *presponse) |
|
void | MaxDivergencex (IssmDouble *pdiv) |
|
void | MaxVelx (IssmDouble *presponse) |
|
void | MaxVxx (IssmDouble *presponse) |
|
void | MaxVyx (IssmDouble *presponse) |
|
void | MaxVzx (IssmDouble *presponse) |
|
void | MinVelx (IssmDouble *presponse) |
|
void | MinVxx (IssmDouble *presponse) |
|
void | MinVyx (IssmDouble *presponse) |
|
void | MinVzx (IssmDouble *presponse) |
|
void | DistanceToFieldValue (int fieldenum, IssmDouble fieldvalue, int distanceenum) |
|
void | ResetLevelset () |
|
void | StrainRateparallelx () |
|
void | StrainRateperpendicularx () |
|
void | StrainRateeffectivex () |
|
void | StressIntensityFactorx () |
|
void | RignotMeltParameterizationx () |
|
void | TotalCalvingFluxLevelsetx (IssmDouble *pGbmb, bool scaled) |
|
void | TotalCalvingMeltingFluxLevelsetx (IssmDouble *pGbmb, bool scaled) |
|
void | TotalFloatingBmbx (IssmDouble *pFbmb, bool scaled) |
|
void | TotalGroundedBmbx (IssmDouble *pGbmb, bool scaled) |
|
void | TotalSmbx (IssmDouble *pSmb, bool scaled) |
|
void | CostFunctionx (IssmDouble *pJ, IssmDouble **pJlist, int *pn) |
|
void | OutputControlsx (Results **presults) |
|
void | RequestedDependentsx (void) |
|
void | RequestedOutputsx (Results **presults, char **requested_outputs, int numoutputs, bool save_results=true) |
|
void | RequestedOutputsx (Results **presults, int *requested_outputs, int numoutputs, bool save_results=true) |
|
void | Responsex (IssmDouble *presponse, int response_descriptor_enum) |
|
void | Responsex (IssmDouble *presponse, const char *response_descriptor) |
|
void | SurfaceAbsMisfitx (IssmDouble *pJ) |
|
void | OmegaAbsGradientx (IssmDouble *pJ) |
|
void | EtaDiffx (IssmDouble *pJ) |
|
void | ThicknessAverage () |
|
void | ThicknessAbsGradientx (IssmDouble *pJ) |
|
void | ThicknessPositivex (IssmDouble *pJ) |
|
void | HydrologyEPLupdateDomainx (IssmDouble *pEplcount) |
|
void | HydrologyIDSupdateDomainx (IssmDouble *pIDScount) |
|
void | TimeAdaptx (IssmDouble *pdt) |
|
void | UpdateConstraintsExtrudeFromBasex () |
|
void | UpdateConstraintsExtrudeFromTopx () |
|
void | UpdateConstraintsL2ProjectionEPLx (IssmDouble *pL2count) |
|
void | InitTransientInputx (int *transientinput_enum, int numoutputs) |
|
void | StackTransientInputx (int *input_enum, int *transientinput_enum, IssmDouble hydrotime, int numoutputs) |
|
void | AverageTransientInputx (int *transientinput_enum, int *averagedinput_enum, IssmDouble init_time, IssmDouble end_time, int numoutputs, int averaging_method) |
|
void | UpdateConstraintsx (void) |
|
int | UpdateVertexPositionsx (void) |
|
void | ReMesh (void) |
|
void | BedrockFromMismipPlus (void) |
|
void | AdjustBaseThicknessAndMask (void) |
|
void | GetMesh (Vertices *femmodel_vertices, Elements *femmodel_elements, IssmDouble **px, IssmDouble **py, int **pelementslist) |
|
void | GetMesh (int **elementslist, IssmDouble **x, IssmDouble **y, int *numberofvertices, int *numberofelements) |
|
void | SetMesh (int **elementslist, IssmDouble **x, IssmDouble **y, int *numberofvertices, int *numberofelements) |
|
void | GetMeshOnPartition (Vertices *femmodel_vertices, Elements *femmodel_elements, IssmDouble **px, IssmDouble **py, IssmDouble **pz, int **pelementslist, int **psidtoindex) |
|
void | CreateElements (int newnumberofelements, int elementswidth, int *newelementslist, bool *my_elements, Elements *elements) |
|
void | CreateMaterials (int newnumberofelements, bool *my_elements, Materials *materials) |
|
void | CreateConstraints (Vertices *newfemmodel_vertices, int analysis_enum, Constraints *newfemmodel_constraints) |
|
void | GetInputs (int *pnumP0inputs, IssmDouble **pP0inputs, int **pP0input_enums, int **pP0input_interp, int *pnumP1inputs, IssmDouble **pP1inputs, int **pP1input_enums, int **pP1input_interp) |
|
void | InterpolateInputs (Vertices *newfemmodel_vertices, Elements *newfemmodel_elements, Inputs2 *new_inputs) |
|
void | UpdateElements (int newnumberofelements, int *newelementslist, bool *my_elements, int analysis_counter, Elements *newelements) |
|
void | WriteMeshInResults (void) |
|
void | WriteErrorEstimatorsInResults (void) |
|
void | SmoothedDeviatoricStressTensor (IssmDouble **ptauxx, IssmDouble **ptauyy, IssmDouble **ptauxy) |
|
void | ZZErrorEstimator (IssmDouble **pelementerror) |
|
void | SmoothedGradThickness (IssmDouble **pdHdx, IssmDouble **pdHdy) |
|
void | ThicknessZZErrorEstimator (IssmDouble **pelementerror) |
|
void | MeanGroundedIceLevelSet (IssmDouble **pmasklevelset) |
|
void | GetElementCenterCoordinates (IssmDouble **pxc, IssmDouble **pyc) |
|
void | GetZeroLevelSetPoints (IssmDouble **pzerolevelset_points, int &numberofpoints, int levelset_type) |
|
Definition at line 31 of file FemModel.h.
◆ FemModel() [1/2]
FemModel::FemModel |
( |
int |
argc, |
|
|
char ** |
argv, |
|
|
ISSM_MPI_Comm |
comm_init, |
|
|
bool |
trace = false |
|
) |
| |
Definition at line 56 of file FemModel.cpp.
63 char *lockfilename = NULL;
64 char *binfilename = NULL;
65 char *outbinfilename = NULL;
66 char *petscfilename = NULL;
67 char *restartfilename = NULL;
68 char *rootpath = NULL;
75 PETSC_COMM_WORLD=incomm;
76 ierr=PetscInitialize(&argc,&argv,(
char*)0,
"");
if(ierr)
_error_(
"Could not initialize Petsc");
97 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_AD_)
100 #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
101 this->amrbamg = NULL;
103 #if !defined(_HAVE_AD_)
107 int domaintype,element_type;
112 if(
analysis_counter==-1)
_error_(
"Could not find alias for analysis_type StressbalanceAnalysisEnum in list of FemModel analyses\n");
118 if(!isSSA)
_error_(
"Flow equation not supported with AMR yet!\n ");
124 #if defined(_HAVE_NEOPZ_)
125 case AmrNeopzEnum: this->InitializeAdaptiveRefinementNeopz();
break;
128 #if defined(_HAVE_BAMG_)
129 case AmrBamgEnum: this->InitializeAdaptiveRefinementBamg();
break;
132 default:
_error_(
"not implemented yet");
138 xDelete<char>(lockfilename);
139 xDelete<char>(binfilename);
140 xDelete<char>(outbinfilename);
141 xDelete<char>(petscfilename);
142 xDelete<char>(restartfilename);
143 xDelete<char>(rootpath);
◆ FemModel() [2/2]
FemModel::FemModel |
( |
char * |
rootpath, |
|
|
char * |
inputfilename, |
|
|
char * |
outputfilename, |
|
|
char * |
toolkitsfilename, |
|
|
char * |
lockfilename, |
|
|
char * |
restartfilename, |
|
|
ISSM_MPI_Comm |
incomm, |
|
|
int |
solution_type, |
|
|
IssmPDouble * |
X |
|
) |
| |
Definition at line 147 of file FemModel.cpp.
158 this->
InitFromFiles(rootpath,inputfilename,outputfilename,toolkitsfilename,lockfilename,restartfilename,
solution_type,traceon,X);
161 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_AD_)
164 #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
165 this->amrbamg = NULL;
◆ ~FemModel()
Definition at line 172 of file FemModel.cpp.
176 char *outbinfilename = NULL;
177 char *lockfilename = NULL;
179 #ifndef _HAVE_JAVASCRIPT_
186 if(outbinfilename)xDelete<char>(outbinfilename);
187 if(lockfilename)xDelete<char>(lockfilename);
207 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_AD_)
211 #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
212 if(amrbamg)
delete amrbamg;
◆ AnalysisIndex()
int FemModel::AnalysisIndex |
( |
int |
analysis_enum | ) |
|
◆ CheckPoint()
void FemModel::CheckPoint |
( |
void |
| ) |
|
Definition at line 238 of file FemModel.cpp.
240 FILE* restartfid=NULL;
241 char* restartfilename = NULL;
243 char* femmodel_buffer=NULL;
244 char* femmodel_buffer_ini=NULL;
250 restartfid=
pfopen(restartfilename,
"wb");
257 femmodel_buffer=xNew<char>(femmodel_size);
259 femmodel_buffer_ini=femmodel_buffer;
265 femmodel_buffer=femmodel_buffer_ini;
268 fwrite(femmodel_buffer,femmodel_size,
sizeof(
char),restartfid);
271 pfclose(restartfid,restartfilename);
274 xDelete<char>(femmodel_buffer);
275 xDelete<char>(restartfilename);
◆ CleanUp()
void FemModel::CleanUp |
( |
void |
| ) |
|
Definition at line 279 of file FemModel.cpp.
282 char *lockfilename = NULL;
283 bool waitonlock =
false;
318 xDelete<char>(lockfilename);
◆ copy()
Definition at line 320 of file FemModel.cpp.
368 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_AD_)
371 #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
372 this->amrbamg = NULL;
◆ Echo()
void FemModel::Echo |
( |
void |
| ) |
|
◆ GetElementsWidth()
int FemModel::GetElementsWidth |
( |
| ) |
|
|
inline |
◆ InitFromFiles()
void FemModel::InitFromFiles |
( |
char * |
rootpath, |
|
|
char * |
inputfilename, |
|
|
char * |
outputfilename, |
|
|
char * |
petscfilename, |
|
|
char * |
lockfilename, |
|
|
char * |
restartfilename, |
|
|
const int |
solution_type, |
|
|
bool |
trace, |
|
|
IssmPDouble * |
X = NULL |
|
) |
| |
Definition at line 393 of file FemModel.cpp.
396 FILE *IOMODEL = NULL;
397 FILE *toolkitsoptionsfid = NULL;
403 if(my_rank==0) IOMODEL =
pfopen0(inputfilename ,
"rb");
406 toolkitsoptionsfid=
pfopen(toolkitsfilename,
"r");
409 this->
InitFromFids(rootpath,IOMODEL,toolkitsoptionsfid,in_solution_type,trace,X);
412 if(my_rank==0)
pfclose(IOMODEL,inputfilename);
413 pfclose(toolkitsoptionsfid,toolkitsfilename);
◆ InitFromFids()
void FemModel::InitFromFids |
( |
char * |
rootpath, |
|
|
FILE * |
IOMODEL, |
|
|
FILE * |
toolkitsoptionsfid, |
|
|
int |
in_solution_type, |
|
|
bool |
trace, |
|
|
IssmPDouble * |
X = NULL |
|
) |
| |
Definition at line 424 of file FemModel.cpp.
438 ModelProcessorx(&this->
elements,&this->
nodes_list,&this->
vertices,&this->
materials,&this->
constraints_list,&this->
loads_list,&this->
parameters,&this->
inputs2,iomodel,toolkitsoptionsfid,rootpath,this->
solution_type,this->
nummodels,this->
analysis_type_list);
◆ Marshall()
void FemModel::Marshall |
( |
char ** |
pmarshalled_data, |
|
|
int * |
pmarshalled_data_size, |
|
|
int |
marshall_direction |
|
) |
| |
Definition at line 464 of file FemModel.cpp.
506 this->
materials->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
507 this->
parameters->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
508 this->
inputs2->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
509 this->
results->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
510 this->
vertices->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
511 this->
elements->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
516 this->
loads_list = xNew<Loads*>(this->nummodels);
518 this->
nodes_list = xNew<Nodes*>(this->nummodels);
524 this->
loads_list[i]->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
525 this->
nodes_list[i]->
Marshall(pmarshalled_data,pmarshalled_data_size,marshall_direction);
◆ Restart()
void FemModel::Restart |
( |
void |
| ) |
|
Definition at line 549 of file FemModel.cpp.
551 FILE* restartfid=NULL;
552 char* restartfilename = NULL;
555 char* femmodel_buffer=NULL;
556 char* femmodel_buffer_ini=NULL;
562 restartfid=
pfopen(restartfilename,
"r",
false);
564 if(restartfid==NULL){
565 xDelete<char>(restartfilename);
571 _printf0_(
"====================================================================\n");
574 _printf0_(
" Restart file: "<<restartfilename<<
" \n");
575 _printf0_(
"====================================================================\n");
579 fseek(restartfid, 0L, SEEK_END);
580 femmodel_size = ftell(restartfid);
581 fseek(restartfid, 0L, SEEK_SET);
584 femmodel_buffer=xNew<char>(femmodel_size);
587 fread_return=fread(femmodel_buffer,femmodel_size,
sizeof(
char),restartfid);
if(fread_return!=1)
_error_(
"error reading the buffer from marshalled file!");
588 femmodel_buffer_ini=femmodel_buffer;
594 femmodel_buffer=femmodel_buffer_ini;
597 pfclose(restartfid,restartfilename);
600 xDelete<char>(restartfilename);
601 xDelete<char>(femmodel_buffer);
◆ SetCurrentConfiguration() [1/2]
void FemModel::SetCurrentConfiguration |
( |
int |
configuration_type | ) |
|
◆ SetCurrentConfiguration() [2/2]
void FemModel::SetCurrentConfiguration |
( |
int |
configuration_type, |
|
|
int |
analysis_type |
|
) |
| |
◆ Size()
int FemModel::Size |
( |
void |
| ) |
|
◆ SolutionAnalysesList()
void FemModel::SolutionAnalysesList |
( |
int ** |
panalyses, |
|
|
int * |
pnumanalyses, |
|
|
IoModel * |
iomodel, |
|
|
int |
solutiontype |
|
) |
| |
Definition at line 646 of file FemModel.cpp.
650 int *analyses = NULL;
653 const int MAXANALYSES = 30;
654 int analyses_temp[MAXANALYSES];
657 switch(solutiontype){
680 bool isSIA,isenthalpy;
682 iomodel->
FindConstant(&isenthalpy,
"md.thermal.isenthalpy");
701 iomodel->
FindConstant(&isenthalpy,
"md.thermal.isenthalpy");
714 iomodel->
FindConstant(&hydrology_model,
"md.hydrology.model");
798 bool isSIA,isFS,isthermal,isenthalpy,ismasstransport,isgroundingline,isstressbalance,ismovingfront,ishydrology,isdamage,issmb,isslr,isesa,isgia;
799 iomodel->
FindConstant(&isthermal,
"md.transient.isthermal");
800 iomodel->
FindConstant(&ismovingfront,
"md.transient.ismovingfront");
801 iomodel->
FindConstant(&ismasstransport,
"md.transient.ismasstransport");
802 iomodel->
FindConstant(&isstressbalance,
"md.transient.isstressbalance");
803 iomodel->
FindConstant(&isgroundingline,
"md.transient.isgroundingline");
804 iomodel->
FindConstant(&isdamage,
"md.transient.isdamageevolution");
805 iomodel->
FindConstant(&ishydrology,
"md.transient.ishydrology");
810 int* analyses_iter = NULL;
811 int num_analyses_iter = 0;
814 xMemCpy<int>(&analyses_temp[numanalyses],analyses_iter,num_analyses_iter);
815 numanalyses+=num_analyses_iter; xDelete<int>(analyses_iter);
819 xMemCpy<int>(&analyses_temp[numanalyses],analyses_iter,num_analyses_iter);
820 numanalyses+=num_analyses_iter; xDelete<int>(analyses_iter);
822 if(ismasstransport || isgroundingline){
824 int basalforcing_model;
825 iomodel->
FindConstant(&basalforcing_model,
"md.basalforcings.model");
828 iomodel->
FindConstant(&isplume,
"md.basalforcings.isplume");
841 xMemCpy<int>(&analyses_temp[numanalyses],analyses_iter,num_analyses_iter);
842 numanalyses+=num_analyses_iter; xDelete<int>(analyses_iter);
875 analyses=xNew<int>(numanalyses);
876 for(
int i=0;i<numanalyses;i++) analyses[i]=analyses_temp[i];
879 if(pnumanalyses) *pnumanalyses=numanalyses;
880 if(panalyses) *panalyses=analyses;
881 else xDelete<int>(analyses);
◆ Solve()
void FemModel::Solve |
( |
void |
| ) |
|
Definition at line 883 of file FemModel.cpp.
886 bool profiling =
false;
893 void (*solutioncore)(
FemModel*)=NULL;
921 _printf0_(
"\nCore solution profiling\n");
922 _printf0_(
" elapsed time : " << solution_time <<
" Seconds\n");
923 _printf0_(
" number of flops : " << solution_flops <<
" Flops\n");
924 _printf0_(
" memory used : " << solution_memory <<
" Bytes\n");
927 _printf0_(
"Individual core profiling\n");
952 _printf0_(
" elapsed time : " << solution_time <<
" Seconds\n");
953 _printf0_(
" number of flops : " << solution_flops <<
" Flops\n");
954 _printf0_(
" memory used : " << solution_memory <<
" Bytes\n");
◆ BalancethicknessMisfitx()
void FemModel::BalancethicknessMisfitx |
( |
IssmDouble * |
pV | ) |
|
Definition at line 962 of file FemModel.cpp.
968 IssmDouble weight,vx,vy,H,dvx[2],dvy[2],dH[2];
969 IssmDouble temp,Jdet,dhdt,groundedice_melting,surface_mass_balance;
992 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
1003 surface_mass_balance_input->
GetInputValue(&surface_mass_balance,gauss);
1004 groundedice_melting_input->
GetInputValue(&groundedice_melting,gauss);
1012 temp = vx*dH[0]+vy*dH[1]+H*(dvx[0]+dvy[1]) - (surface_mass_balance-groundedice_melting-dhdt);
1013 J +=weight*1/2*temp*temp*Jdet*gauss->
weight;
1017 xDelete<IssmDouble>(xyz_list);
◆ CalvingRateVonmisesx()
void FemModel::CalvingRateVonmisesx |
( |
| ) |
|
◆ CalvingRateLevermannx()
void FemModel::CalvingRateLevermannx |
( |
| ) |
|
◆ CalvingFluxLevelsetx()
void FemModel::CalvingFluxLevelsetx |
( |
| ) |
|
◆ CalvingMeltingFluxLevelsetx()
void FemModel::CalvingMeltingFluxLevelsetx |
( |
| ) |
|
◆ DeviatoricStressx()
void FemModel::DeviatoricStressx |
( |
| ) |
|
◆ Divergencex()
◆ ElementOperationx()
void FemModel::ElementOperationx |
( |
void(Element::*)(void) |
function | ) |
|
◆ ElementResponsex()
void FemModel::ElementResponsex |
( |
IssmDouble * |
presponse, |
|
|
int |
response_enum |
|
) |
| |
Definition at line 1252 of file FemModel.cpp.
1268 if (element->
Id()==index){
1277 if(!sumfound)
_error_(
"could not find material with id" << index <<
" to compute ElementResponse");
1280 if(my_rank==cpu_found){
1289 *presponse=response;
◆ FloatingAreax()
void FemModel::FloatingAreax |
( |
IssmDouble * |
pV, |
|
|
bool |
scaled |
|
) |
| |
◆ GetInputLocalMinMaxOnNodesx()
Definition at line 1308 of file FemModel.cpp.
1312 IssmDouble* uLmin_local = xNew<IssmDouble>(numnodes);
1313 IssmDouble* uLmax_local = xNew<IssmDouble>(numnodes);
1314 IssmDouble* uLmin = xNew<IssmDouble>(numnodes);
1315 IssmDouble* uLmax = xNew<IssmDouble>(numnodes);
1316 for(
int i=0;i<numnodes;i++){
1317 uLmin_local[i] = +1.e+50;
1318 uLmax_local[i] = -1.e+50;
1329 xDelete<IssmDouble>(uLmin_local);
1330 xDelete<IssmDouble>(uLmax_local);
◆ GetLocalVectorWithClonesGset()
◆ GetLocalVectorWithClonesVertices()
Definition at line 1342 of file FemModel.cpp.
1349 int *indices_vector_masters = NULL;
1351 vector->
GetLocalVector(&local_vector_masters,&indices_vector_masters);
1352 _assert_(localsize_masters==indices_vector_masters[localsize_masters-1] - indices_vector_masters[0]+1);
1353 xDelete<int>(indices_vector_masters);
1356 IssmDouble *local_vector = xNew<IssmDouble>(localsize);
1357 xMemCpy<IssmDouble>(local_vector,local_vector_masters,localsize_masters);
1358 xDelete<IssmDouble>(local_vector_masters);
1364 *plocal_vector = local_vector;
◆ SyncLocalVectorWithClonesVertices()
void FemModel::SyncLocalVectorWithClonesVertices |
( |
IssmDouble * |
local_vector | ) |
|
Definition at line 1366 of file FemModel.cpp.
1379 for(
int rank=0;rank<num_procs;rank++){
1382 for(
int i=0;i<numids;i++){
1386 buffer[i] = local_vector[vertex->
lid];
1391 for(
int rank=0;rank<num_procs;rank++){
1395 for(
int i=0;i<numids;i++){
1399 local_vector[vertex->
lid] = buffer[i];
1403 xDelete<IssmDouble>(buffer);
◆ SyncLocalVectorWithClonesVerticesAdd()
void FemModel::SyncLocalVectorWithClonesVerticesAdd |
( |
IssmDouble * |
local_vector | ) |
|
Definition at line 1405 of file FemModel.cpp.
1420 for(
int rank=0;rank<num_procs;rank++){
1423 for(
int i=0;i<numids;i++){
1427 buffer[i] = local_vector[vertex->
lid];
1432 for(
int rank=0;rank<num_procs;rank++){
1436 for(
int i=0;i<numids;i++){
1440 local_vector[vertex->
lid] += buffer[i];
1446 for(
int rank=0;rank<num_procs;rank++){
1449 for(
int i=0;i<numids;i++){
1453 buffer[i] = local_vector[vertex->
lid];
1458 for(
int rank=0;rank<num_procs;rank++){
1462 for(
int i=0;i<numids;i++){
1466 local_vector[vertex->
lid] = buffer[i];
1470 xDelete<IssmDouble>(buffer);
◆ GetLocalVectorWithClonesNodes()
Definition at line 1472 of file FemModel.cpp.
1484 int *indices_vector_masters = NULL;
1486 vector->
GetLocalVector(&local_vector_masters,&indices_vector_masters);
1487 _assert_(localsize_masters==indices_vector_masters[localsize_masters-1] - indices_vector_masters[0]+1);
1488 xDelete<int>(indices_vector_masters);
1491 IssmDouble *local_vector = xNew<IssmDouble>(localsize);
1492 xMemCpy<IssmDouble>(local_vector,local_vector_masters,localsize_masters);
1493 xDelete<IssmDouble>(local_vector_masters);
1501 for(
int rank=0;rank<num_procs;rank++){
1504 for(
int i=0;i<numids;i++){
1508 buffer[i] = local_vector[vertex->
lid];
1513 for(
int rank=0;rank<num_procs;rank++){
1517 for(
int i=0;i<numids;i++){
1521 local_vector[vertex->
lid] = buffer[i];
1525 xDelete<IssmDouble>(buffer);
1528 *plocal_vector = local_vector;
◆ GroundedAreax()
void FemModel::GroundedAreax |
( |
IssmDouble * |
pV, |
|
|
bool |
scaled |
|
) |
| |
◆ IcefrontAreax()
void FemModel::IcefrontAreax |
( |
| ) |
|
Definition at line 1546 of file FemModel.cpp.
1548 int numvertices = 6;
1550 IssmDouble* BasinId = xNew<IssmDouble>(numvertices);
1552 IssmDouble* basin_icefront_area = xNewZeroInit<IssmDouble>(numbasins);
1554 for(
int basin=1;basin<numbasins+1;basin++){
1561 for(
int j=0;j<numvertices;j++){
1562 if(BasinId[j]==basin){
1571 basin_icefront_area[basin-1]=total_icefront_area;
1576 xDelete<IssmDouble>(basin_icefront_area);
1577 xDelete<IssmDouble>(BasinId);
◆ IcefrontMassFluxx()
void FemModel::IcefrontMassFluxx |
( |
IssmDouble * |
presponse, |
|
|
bool |
scaled |
|
) |
| |
◆ IcefrontMassFluxLevelsetx()
void FemModel::IcefrontMassFluxLevelsetx |
( |
IssmDouble * |
presponse, |
|
|
bool |
scaled |
|
) |
| |
◆ GroundinglineMassFluxx()
void FemModel::GroundinglineMassFluxx |
( |
IssmDouble * |
presponse, |
|
|
bool |
scaled |
|
) |
| |
◆ IceMassx()
void FemModel::IceMassx |
( |
IssmDouble * |
pV, |
|
|
bool |
scaled |
|
) |
| |
◆ IceVolumex()
void FemModel::IceVolumex |
( |
IssmDouble * |
pV, |
|
|
bool |
scaled |
|
) |
| |
◆ IceVolumeAboveFloatationx()
void FemModel::IceVolumeAboveFloatationx |
( |
IssmDouble * |
pV, |
|
|
bool |
scaled |
|
) |
| |
◆ InputMakeDiscontinuous()
void FemModel::InputMakeDiscontinuous |
( |
int |
enum_in | ) |
|
Definition at line 1611 of file FemModel.cpp.
1613 int numvertices = 6;
1614 IssmDouble* P1DGlist = xNew<IssmDouble>(numvertices);
1621 xDelete<IssmDouble>(P1DGlist);
◆ MassFluxx()
void FemModel::MassFluxx |
( |
IssmDouble * |
presponse | ) |
|
Definition at line 1703 of file FemModel.cpp.
1708 bool ispresent =
false;
1714 int *mdims_array = NULL;
1715 int *ndims_array = NULL;
1721 if(!ispresent)
_error_(
"no mass flux segments available!");
1728 segments = array[counter-1];
1729 num_segments = mdims_array[counter-1];
1733 for(i=0;i<num_segments;i++){
1734 element_id=reCast<int,IssmDouble>(*(segments+5*i+4));
1737 if (element->
Id()==element_id){
1739 mass_flux+=element->
MassFlux(segments+5*i+0);
1746 mass_flux=all_mass_flux;
1751 xDelete<IssmDouble>(matrix);
1753 xDelete<int>(mdims_array);
1754 xDelete<int>(ndims_array);
1755 xDelete<IssmDouble*>(array);
1758 *pmass_flux=mass_flux;
◆ MaxAbsVxx()
void FemModel::MaxAbsVxx |
( |
IssmDouble * |
presponse | ) |
|
Definition at line 1761 of file FemModel.cpp.
1774 if(element_maxabsvx>maxabsvx) maxabsvx=element_maxabsvx;
1780 maxabsvx=node_maxabsvx;
1783 *pmaxabsvx=maxabsvx;
◆ MaxAbsVyx()
void FemModel::MaxAbsVyx |
( |
IssmDouble * |
presponse | ) |
|
Definition at line 1786 of file FemModel.cpp.
1799 if(element_maxabsvy>maxabsvy) maxabsvy=element_maxabsvy;
1805 maxabsvy=node_maxabsvy;
1808 *pmaxabsvy=maxabsvy;
◆ MaxAbsVzx()
void FemModel::MaxAbsVzx |
( |
IssmDouble * |
presponse | ) |
|
Definition at line 1811 of file FemModel.cpp.
1824 if(element_maxabsvz>maxabsvz) maxabsvz=element_maxabsvz;
1830 maxabsvz=node_maxabsvz;
1833 *pmaxabsvz=maxabsvz;
◆ MaxDivergencex()
void FemModel::MaxDivergencex |
( |
IssmDouble * |
pdiv | ) |
|
Definition at line 1836 of file FemModel.cpp.
1845 if(fabs(local_divergence)>max_divergence) max_divergence=fabs(local_divergence);
1849 max_divergence=node_max_divergence;
1852 *pdiv=max_divergence;
◆ MaxVelx()
Definition at line 1855 of file FemModel.cpp.
1868 if(element_maxvel>maxvel) maxvel=element_maxvel;
◆ MaxVxx()
Definition at line 1880 of file FemModel.cpp.
1893 if(element_maxvx>maxvx) maxvx=element_maxvx;
◆ MaxVyx()
Definition at line 1905 of file FemModel.cpp.
1918 if(element_maxvy>maxvy) maxvy=element_maxvy;
◆ MaxVzx()
Definition at line 1930 of file FemModel.cpp.
1943 if(element_maxvz>maxvz) maxvz=element_maxvz;
◆ MinVelx()
Definition at line 1955 of file FemModel.cpp.
1968 if(element_minvel<minvel) minvel=element_minvel;
◆ MinVxx()
Definition at line 1980 of file FemModel.cpp.
1993 if(element_minvx<minvx) minvx=element_minvx;
◆ MinVyx()
Definition at line 2005 of file FemModel.cpp.
2018 if(element_minvy<minvy) minvy=element_minvy;
◆ MinVzx()
Definition at line 2030 of file FemModel.cpp.
2043 if(element_minvz<minvz) minvz=element_minvz;
◆ DistanceToFieldValue()
void FemModel::DistanceToFieldValue |
( |
int |
fieldenum, |
|
|
IssmDouble |
fieldvalue, |
|
|
int |
distanceenum |
|
) |
| |
Definition at line 1103 of file FemModel.cpp.
1125 int segcount=segments->
Size();
1126 int* allsegcount=xNew<int>(num_procs);
1131 int numseg_offset=0;
1133 for(
int i=0;i<my_rank; i++) numseg_offset+=allsegcount[i];
1134 for(
int i=0;i<num_procs;i++) numseg+=allsegcount[i];
1135 IssmDouble* segmentlist = xNewZeroInit<IssmDouble>(4*numseg);
1136 IssmDouble* allsegmentlist = xNewZeroInit<IssmDouble>(4*numseg);
1137 for(
int i=0;i<segments->
Size();i++){
1140 segmentlist[(numseg_offset+i)*4 + 0] = segment->
x[0];
1141 segmentlist[(numseg_offset+i)*4 + 1] = segment->
y[0];
1142 segmentlist[(numseg_offset+i)*4 + 2] = segment->
x[1];
1143 segmentlist[(numseg_offset+i)*4 + 3] = segment->
y[1];
1148 xDelete<IssmDouble>(segmentlist);
1149 xDelete<int>(allsegcount);
1163 dmin = pow(allsegmentlist[4*last+0] - x,2) + pow(y-allsegmentlist[4*last+1],2);
1169 for(
int i=0;i<numseg;i++){
1172 if(pow(allsegmentlist[4*i+0] - x,2)>10*dmin)
continue;
1173 if(pow(allsegmentlist[4*i+1] - y,2)>10*dmin)
continue;
1175 IssmDouble l2 = (allsegmentlist[4*i+2]-allsegmentlist[4*i+0])*(allsegmentlist[4*i+2]-allsegmentlist[4*i+0]) + (allsegmentlist[4*i+3]-allsegmentlist[4*i+1])*(allsegmentlist[4*i+3]-allsegmentlist[4*i+1]);
1179 d = (x-allsegmentlist[4*i+0])*(x-allsegmentlist[4*i+0])+(y-allsegmentlist[4*i+1])*(y-allsegmentlist[4*i+1]);
1190 IssmDouble t = ((x-allsegmentlist[4*i+0])*(allsegmentlist[4*i+2]-allsegmentlist[4*i+0]) + (y-allsegmentlist[4*i+1])*(allsegmentlist[4*i+3]-allsegmentlist[4*i+1]))/l2;
1193 d = (x-allsegmentlist[4*i+0])*(x-allsegmentlist[4*i+0])+(y-allsegmentlist[4*i+1])*(y-allsegmentlist[4*i+1]);
1197 d = (x-allsegmentlist[4*i+2])*(x-allsegmentlist[4*i+2])+(y-allsegmentlist[4*i+3])*(y-allsegmentlist[4*i+3]);
1201 xn = allsegmentlist[4*i+0] + t * (allsegmentlist[4*i+2] - allsegmentlist[4*i+0]);
1202 yn = allsegmentlist[4*i+1] + t * (allsegmentlist[4*i+3] - allsegmentlist[4*i+1]);
1203 d = (x-xn)*(x-xn)+(y-yn)*(y-yn);
1214 distances[vertex->
lid] = sqrt(dmin);
1224 xDelete<IssmDouble>(distances);
1225 xDelete<IssmDouble>(allsegmentlist);
◆ ResetLevelset()
void FemModel::ResetLevelset |
( |
void |
| ) |
|
◆ StrainRateparallelx()
void FemModel::StrainRateparallelx |
( |
| ) |
|
◆ StrainRateperpendicularx()
void FemModel::StrainRateperpendicularx |
( |
| ) |
|
◆ StrainRateeffectivex()
void FemModel::StrainRateeffectivex |
( |
| ) |
|
◆ StressIntensityFactorx()
void FemModel::StressIntensityFactorx |
( |
| ) |
|
◆ RignotMeltParameterizationx()
void FemModel::RignotMeltParameterizationx |
( |
| ) |
|
◆ TotalCalvingFluxLevelsetx()
void FemModel::TotalCalvingFluxLevelsetx |
( |
IssmDouble * |
pGbmb, |
|
|
bool |
scaled |
|
) |
| |
◆ TotalCalvingMeltingFluxLevelsetx()
void FemModel::TotalCalvingMeltingFluxLevelsetx |
( |
IssmDouble * |
pGbmb, |
|
|
bool |
scaled |
|
) |
| |
◆ TotalFloatingBmbx()
void FemModel::TotalFloatingBmbx |
( |
IssmDouble * |
pFbmb, |
|
|
bool |
scaled |
|
) |
| |
◆ TotalGroundedBmbx()
void FemModel::TotalGroundedBmbx |
( |
IssmDouble * |
pGbmb, |
|
|
bool |
scaled |
|
) |
| |
◆ TotalSmbx()
void FemModel::TotalSmbx |
( |
IssmDouble * |
pSmb, |
|
|
bool |
scaled |
|
) |
| |
◆ CostFunctionx()
Definition at line 1062 of file FemModel.cpp.
1066 int *responses = NULL;
1067 Results *cost_functions = NULL;
1078 IssmDouble* Jlist = xNew<IssmDouble>(num_responses);
1079 for(
int i=0;i<num_responses;i++){
1081 Jlist[i] = reCast<IssmDouble>(result->
GetValue());
1087 delete cost_functions;
1088 xDelete<int>(responses);
1090 if(pJlist) *pJlist = Jlist;
1091 else xDelete<IssmDouble>(Jlist);
1092 if(pn) *pn = num_responses;
◆ OutputControlsx()
void FemModel::OutputControlsx |
( |
Results ** |
presults | ) |
|
Definition at line 2171 of file FemModel.cpp.
2174 int num_controls,step;
2176 int *control_type = NULL;
2188 for(
int i=0;i<num_controls;i++){
2190 int control_enum = control_type[i];
2197 default:
_error_(
"more than 3 controls not implemented yet");
2217 xDelete<int>(control_type);
◆ RequestedDependentsx()
void FemModel::RequestedDependentsx |
( |
void |
| ) |
|
Definition at line 2220 of file FemModel.cpp.
2222 bool isautodiff =
false;
2227 DataSet* dependent_objects=NULL;
2238 dependents=xNew<IssmPDouble>(num_dependents);
2240 #if defined(_HAVE_CODIPACK_)
2241 auto& tape_codi = IssmDouble::getGlobalTape();
2245 for(
int i=0;i<dependent_objects->
Size();i++){
2249 #if defined(_HAVE_CODIPACK_)
2250 tape_codi.registerOutput(output_value);
2251 dependents[i] = output_value.getValue();
2252 codi_global.output_indices.push_back(output_value.getGradientData());
2254 output_value>>=dependents[i];
2259 delete dependent_objects;
2260 if(num_dependents)xDelete<IssmPDouble>(dependents);
2262 _error_(
"Should not be requesting dependents when an AD library is not available!");
◆ RequestedOutputsx() [1/2]
void FemModel::RequestedOutputsx |
( |
Results ** |
presults, |
|
|
char ** |
requested_outputs, |
|
|
int |
numoutputs, |
|
|
bool |
save_results = true |
|
) |
| |
Definition at line 2267 of file FemModel.cpp.
2270 bool isvec,results_on_nodes;
2271 int step,output_enum,numonnodes;
2274 const char *output_string = NULL;
2275 char** resultsonnodes = NULL;
2289 for(
int i=0;i<numoutputs;i++){
2290 output_string = requested_outputs[i];
2313 switch(output_enum){
2376 int numchannels_local=0,numchannels;
2383 IssmPDouble* values = xNewZeroInit<IssmPDouble>(numchannels);
2384 IssmPDouble* allvalues = xNew<IssmPDouble>(numchannels);
2396 xDelete<IssmPDouble>(values);
2399 xDelete<IssmPDouble>(allvalues);
2418 int interpolation,nodesperelement,size,nlines,ncols,array_size;
2419 int rank_interpolation=-1,rank_nodesperelement=-1,rank_arraysize=-1,max_rank_arraysize=0;
2425 element->
ResultInterpolation(&rank_interpolation,&rank_nodesperelement,&rank_arraysize,output_enum);
2426 if(rank_arraysize>max_rank_arraysize)max_rank_arraysize=rank_arraysize;
2428 rank_arraysize=max_rank_arraysize;
2438 results_on_nodes=
false;
2440 for(
int j=0;j<numonnodes & results_on_nodes==
false;j++){
2441 if(strcmp(resultsonnodes[j],output_string) == 0 || strcmp(resultsonnodes[j],
"all") == 0) results_on_nodes=
true;
2444 if(results_on_nodes){
2448 IssmDouble* values = xNewZeroInit<IssmDouble>(nbe*nodesperelement);
2449 IssmDouble* allvalues = xNew<IssmDouble>(nbe*nodesperelement);
2459 xDelete<IssmDouble>(values);
2462 xDelete<IssmDouble>(allvalues);
2468 switch(interpolation){
2490 delete vector_result;
2494 IssmDouble* values = xNewZeroInit<IssmDouble>(nlines*ncols);
2495 IssmDouble* allvalues = xNew<IssmDouble>(nlines*ncols);
2504 xDelete<IssmDouble>(values);
2507 xDelete<IssmDouble>(allvalues);
2518 if(!isvec && save_results){
2524 for(
int i=0;i<numonnodes;i++) xDelete<char>(resultsonnodes[i]);
2525 xDelete<char*>(resultsonnodes);
◆ RequestedOutputsx() [2/2]
void FemModel::RequestedOutputsx |
( |
Results ** |
presults, |
|
|
int * |
requested_outputs, |
|
|
int |
numoutputs, |
|
|
bool |
save_results = true |
|
) |
| |
Definition at line 2531 of file FemModel.cpp.
2534 char** enumlist = xNew<char*>(numoutputs);
2535 for(
int i=0;i<numoutputs;i++)
EnumToStringx(&enumlist[i],requested_outputs[i]);
2541 for(
int i=0;i<numoutputs;i++) xDelete<char>(enumlist[i]);
2542 xDelete<char*>(enumlist);
◆ Responsex() [1/2]
void FemModel::Responsex |
( |
IssmDouble * |
presponse, |
|
|
int |
response_descriptor_enum |
|
) |
| |
Definition at line 2558 of file FemModel.cpp.
2560 switch (response_descriptor_enum){
2614 *responses=double_result;
2616 else _error_(
"response descriptor \"" <<
EnumToStringx(response_descriptor_enum) <<
"\" not supported yet!");
◆ Responsex() [2/2]
void FemModel::Responsex |
( |
IssmDouble * |
presponse, |
|
|
const char * |
response_descriptor |
|
) |
| |
◆ SurfaceAbsMisfitx()
void FemModel::SurfaceAbsMisfitx |
( |
IssmDouble * |
pJ | ) |
|
Definition at line 2663 of file FemModel.cpp.
2690 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
2703 J+=0.5*(surface-surfaceobs)*(surface-surfaceobs)*weight*Jdet*gauss->
weight;
2706 xDelete<IssmDouble>(xyz_list);
◆ OmegaAbsGradientx()
void FemModel::OmegaAbsGradientx |
( |
IssmDouble * |
pJ | ) |
|
Definition at line 2055 of file FemModel.cpp.
2082 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
2095 J+=weight*1/2*pow(dp[0]*dp[0]+dp[1]*dp[1],2)*Jdet*gauss->
weight;
2099 xDelete<IssmDouble>(xyz_list);
◆ EtaDiffx()
Definition at line 2112 of file FemModel.cpp.
2140 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
2154 J+=weight*1/2*pow(p - p0,2)*Jdet*gauss->
weight;
2158 xDelete<IssmDouble>(xyz_list);
◆ ThicknessAverage()
void FemModel::ThicknessAverage |
( |
| ) |
|
Definition at line 2774 of file FemModel.cpp.
2782 IssmDouble* H = xNew<IssmDouble>(elementswidth);
2815 for(
int i=0;i<numberofvertices;i++){
2817 Hserial[i]=Hserial[i]/totalweight[i];
2831 delete vectotalweight;
2832 xDelete<IssmDouble>(H);
2833 xDelete<IssmDouble>(Hserial);
2834 xDelete<IssmDouble>(totalweight);
◆ ThicknessAbsGradientx()
void FemModel::ThicknessAbsGradientx |
( |
IssmDouble * |
pJ | ) |
|
Definition at line 2718 of file FemModel.cpp.
2745 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
2757 J+=weight*1/2*(dp[0]*dp[0]+dp[1]*dp[1])*Jdet*gauss->
weight;
2761 xDelete<IssmDouble>(xyz_list);
◆ ThicknessPositivex()
void FemModel::ThicknessPositivex |
( |
IssmDouble * |
pJ | ) |
|
Definition at line 2837 of file FemModel.cpp.
2864 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
2877 J+=weight*H*H*Jdet*gauss->
weight;
2882 xDelete<IssmDouble>(xyz_list);
◆ HydrologyEPLupdateDomainx()
void FemModel::HydrologyEPLupdateDomainx |
( |
IssmDouble * |
pEplcount | ) |
|
Definition at line 4965 of file FemModel.cpp.
4974 int *eplzigzag_counter = NULL;
4998 if(serial_rec[node->
Sid()]==1.)eplzigzag_counter[node->
Lid()] ++;
4999 if(eplzigzag_counter[node->
Lid()]>eplflip_lock && eplflip_lock!=0){
5008 xDelete<int>(eplzigzag_counter);
5009 xDelete<IssmDouble>(serial_rec);
5010 xDelete<IssmDouble>(old_active);
5016 xDelete<IssmDouble>(serial_mask);
5036 IssmDouble *base = xNew<IssmDouble>(numnodes);
5038 for(
int in=0;in<numnodes;in++){
5040 if(serial_active[node->
Sid()]==1.){
5042 if(!node->
IsClone()) counter++;
5049 xDelete<IssmDouble>(base);
5051 xDelete<IssmDouble>(serial_active);
5053 delete inefanalysis;
5057 counter=sum_counter;
5058 *pEplcount = counter;
5061 _printf0_(
" No nodes are active in EPL layer \n");
5064 _printf0_(
" Some active nodes in EPL layer \n");
◆ HydrologyIDSupdateDomainx()
void FemModel::HydrologyIDSupdateDomainx |
( |
IssmDouble * |
pIDScount | ) |
|
Definition at line 5072 of file FemModel.cpp.
5103 xDelete<IssmDouble>(serial_mask);
5123 IssmDouble *base = xNew<IssmDouble>(numnodes);
5127 for(
int in=0;in<numnodes;in++){
5129 if(serial_active[node->
Sid()]==1.){
5131 if(!node->
IsClone()) counter++;
5138 xDelete<IssmDouble>(base);
5140 xDelete<IssmDouble>(serial_active);
5141 delete inefanalysis;
5145 counter=sum_counter;
5146 *pIDScount = counter;
5149 _printf0_(
" No nodes are active in IDS layer \n");
5152 _printf0_(
" Some active nodes in IDS layer \n");
◆ TimeAdaptx()
Definition at line 2895 of file FemModel.cpp.
2910 if(dt<min_dt)min_dt=dt;
2922 if(min_dt<dt_low) min_dt = dt_low;
2923 if(min_dt>dt_high) min_dt = dt_high;
◆ UpdateConstraintsExtrudeFromBasex()
void FemModel::UpdateConstraintsExtrudeFromBasex |
( |
void |
| ) |
|
◆ UpdateConstraintsExtrudeFromTopx()
void FemModel::UpdateConstraintsExtrudeFromTopx |
( |
void |
| ) |
|
◆ UpdateConstraintsL2ProjectionEPLx()
void FemModel::UpdateConstraintsL2ProjectionEPLx |
( |
IssmDouble * |
pL2count | ) |
|
Definition at line 5160 of file FemModel.cpp.
5185 if(serial_active[node->
Sid()]==1.){
5187 if(!node->
IsClone()) counter++;
5193 xDelete<IssmDouble>(serial_active);
5197 counter=sum_counter;
5198 *pL2count = counter;
◆ InitTransientInputx()
void FemModel::InitTransientInputx |
( |
int * |
transientinput_enum, |
|
|
int |
numoutputs |
|
) |
| |
Definition at line 5202 of file FemModel.cpp.
5204 for(
int i=0;i<numoutputs;i++){
◆ StackTransientInputx()
void FemModel::StackTransientInputx |
( |
int * |
input_enum, |
|
|
int * |
transientinput_enum, |
|
|
IssmDouble |
hydrotime, |
|
|
int |
numoutputs |
|
) |
| |
Definition at line 5213 of file FemModel.cpp.
5215 for(
int i=0;i<numoutputs;i++){
5216 if(input_enum[i]<0){
5217 _error_(
"Can't deal with non enum fields for result Stack");
5228 IssmDouble* values=xNew<IssmDouble>(numvertices);
5229 int *vertexlids = xNew<int>(numvertices);
5237 default:
_error_(
"Not implemented yet");
5239 xDelete<IssmDouble>(values);
5240 xDelete<int>(vertexlids);
◆ AverageTransientInputx()
void FemModel::AverageTransientInputx |
( |
int * |
transientinput_enum, |
|
|
int * |
averagedinput_enum, |
|
|
IssmDouble |
init_time, |
|
|
IssmDouble |
end_time, |
|
|
int |
numoutputs, |
|
|
int |
averaging_method |
|
) |
| |
Definition at line 5246 of file FemModel.cpp.
5248 for(
int i=0;i<numoutputs;i++){
5251 element->
CreateInputTimeAverage(transientinput_enum[i],averagedinput_enum[i],init_time,end_time,averaging_method);
◆ UpdateConstraintsx()
void FemModel::UpdateConstraintsx |
( |
void |
| ) |
|
Definition at line 3027 of file FemModel.cpp.
3030 int analysis_type,config_type;
◆ UpdateVertexPositionsx()
int FemModel::UpdateVertexPositionsx |
( |
void |
| ) |
|
Definition at line 3055 of file FemModel.cpp.
3093 xDelete<IssmDouble>(bed);
3094 xDelete<IssmDouble>(surface);
◆ ReMesh()
void FemModel::ReMesh |
( |
void |
| ) |
|
Definition at line 3101 of file FemModel.cpp.
3107 int *newelementslist = NULL;
3108 int newnumberofvertices = -1;
3109 int newnumberofelements = -1;
3112 int amrtype,basalforcing_model;
3113 bool isgroundingline;
3118 #if defined(_HAVE_NEOPZ_) && !defined(_HAVE_AD_)
3119 case AmrNeopzEnum: this->ReMeshNeopz(&newnumberofvertices,&newnumberofelements,&newx,&newy,&newz,&newelementslist);
break;
3122 #if defined(_HAVE_BAMG_) && !defined(_HAVE_AD_)
3123 case AmrBamgEnum: this->ReMeshBamg(&newnumberofvertices,&newnumberofelements,&newx,&newy,&newz,&newelementslist);
break;
3126 default:
_error_(
"not implemented yet");
3136 iomodel->
elements = newelementslist;
3139 bool temp;
int tempint;
3160 for(
int i=0;i<new_vertices->
Size();i++){
3162 int sid = vertex->
Sid();
3163 vertex->
x=newx[sid];
3164 vertex->
y=newy[sid];
3165 vertex->
z=newz[sid];
3169 Inputs2* new_inputs2=
new Inputs2(newnumberofelements,newnumberofvertices);
3188 new_nodes_list[i] =
new Nodes();
3193 analysis->
CreateNodes(new_nodes_list[i],iomodel,
true);
3198 new_constraints_list[i]->
Presort();
3274 this->
SetMesh(&newelementslist,&newx,&newy,&newnumberofvertices,&newnumberofelements);
3277 xDelete<IssmDouble>(newz);
◆ BedrockFromMismipPlus()
void FemModel::BedrockFromMismipPlus |
( |
void |
| ) |
|
Definition at line 3283 of file FemModel.cpp.
3293 IssmDouble* r = xNew<IssmDouble>(numvertices);
3298 for(
int i=0;i<numvertices;i++){
3299 x = xyz_list[3*i+0];
3300 y = xyz_list[3*i+1];
3301 bx = -150.-728.8*pow(x/300000.,2)+343.91*pow(x/300000.,4)-50.57*pow(x/300000.,6);
3302 by = 500./(1.+exp((-2./4000.)*(y-80000./2.-24000.)))+500./(1.+exp((2./4000.)*(y-80000./2.+24000.)));
3303 r[i] =
max(bx+by,-720.);
3308 xDelete<IssmDouble>(xyz_list);
3311 xDelete<IssmDouble>(r);
◆ AdjustBaseThicknessAndMask()
void FemModel::AdjustBaseThicknessAndMask |
( |
void |
| ) |
|
Definition at line 3314 of file FemModel.cpp.
3319 IssmDouble rho_water,rho_ice,density,base_float;
3320 IssmDouble* phi = xNew<IssmDouble>(numvertices);
3321 IssmDouble* h = xNew<IssmDouble>(numvertices);
3322 IssmDouble* s = xNew<IssmDouble>(numvertices);
3323 IssmDouble* b = xNew<IssmDouble>(numvertices);
3324 IssmDouble* r = xNew<IssmDouble>(numvertices);
3325 IssmDouble* sl = xNew<IssmDouble>(numvertices);
3335 density = rho_ice/rho_water;
3337 for(
int i=0;i<numvertices;i++){
3339 base_float = rho_ice*s[i]/(rho_ice-rho_water);
3340 if(r[i]>base_float){
3347 if(fabs(sl[i])>0)
_error_(
"Sea level value "<<sl[i]<<
" not supported!");
3350 phi[i] = h[i]+r[i]/density;
3360 xDelete<IssmDouble>(phi);
3361 xDelete<IssmDouble>(h);
3362 xDelete<IssmDouble>(s);
3363 xDelete<IssmDouble>(b);
3364 xDelete<IssmDouble>(r);
3365 xDelete<IssmDouble>(sl);
◆ GetMesh() [1/2]
Definition at line 3731 of file FemModel.cpp.
3733 if(!femmodel_vertices)
_error_(
"GetMesh: vertices are NULL.");
3734 if(!femmodel_elements)
_error_(
"GetMesh: elements are NULL.");
3742 int* elementslist = NULL;
3743 int* elem_vertices = NULL;
3752 elem_vertices = xNew<int>(elementswidth);
3758 for(
int i=0;i<femmodel_elements->
Size();i++){
3777 elementslist=xNew<int>(numberofelements*elementswidth);
3778 if(numberofelements*elementswidth<0)
_error_(
"numberofelements negative.");
3779 for(
int i=0;i<numberofelements;i++){
3780 elementslist[elementswidth*i+0] = reCast<int>(id1[i])+1;
3781 elementslist[elementswidth*i+1] = reCast<int>(id2[i])+1;
3782 elementslist[elementswidth*i+2] = reCast<int>(id3[i])+1;
3788 *pelementslist = elementslist;
3791 xDelete<int>(elem_vertices);
3792 xDelete<IssmDouble>(id1);
3793 xDelete<IssmDouble>(id2);
3794 xDelete<IssmDouble>(id3);
3795 xDelete<IssmDouble>(z);
◆ GetMesh() [2/2]
void FemModel::GetMesh |
( |
int ** |
elementslist, |
|
|
IssmDouble ** |
x, |
|
|
IssmDouble ** |
y, |
|
|
int * |
numberofvertices, |
|
|
int * |
numberofelements |
|
) |
| |
Definition at line 3801 of file FemModel.cpp.
3808 #if defined(_HAVE_NEOPZ_)
3809 case AmrNeopzEnum: this->amr->GetMesh(elementslist,x,y,numberofvertices,numberofelements);
break;
3812 #if defined(_HAVE_BAMG_)
3813 case AmrBamgEnum: this->amrbamg->GetMesh(elementslist,x,y,numberofvertices,numberofelements);
break;
3816 default:
_error_(
"not implemented yet");
◆ SetMesh()
void FemModel::SetMesh |
( |
int ** |
elementslist, |
|
|
IssmDouble ** |
x, |
|
|
IssmDouble ** |
y, |
|
|
int * |
numberofvertices, |
|
|
int * |
numberofelements |
|
) |
| |
Definition at line 3819 of file FemModel.cpp.
3826 #if defined(_HAVE_NEOPZ_)
3827 case AmrNeopzEnum: this->amr->SetMesh(elementslist,x,y,numberofvertices,numberofelements);
break;
3830 #if defined(_HAVE_BAMG_)
3831 case AmrBamgEnum: this->amrbamg->SetMesh(elementslist,x,y,numberofvertices,numberofelements);
break;
3834 default:
_error_(
"not implemented yet");
◆ GetMeshOnPartition()
Definition at line 3837 of file FemModel.cpp.
3839 if(!femmodel_vertices)
_error_(
"GetMesh: vertices are NULL.");
3840 if(!femmodel_elements)
_error_(
"GetMesh: elements are NULL.");
3842 int numberofvertices = femmodel_vertices->
Size();
3844 int numberofelements = femmodel_elements->
Size();
3849 int* elementslist = NULL;
3850 int* sidtoindex = NULL;
3851 int* elem_vertices = NULL;
3854 sidtoindex = xNewZeroInit<int>(numbertotalofvertices);
3855 x = xNew<IssmDouble>(numberofvertices);
3856 y = xNew<IssmDouble>(numberofvertices);
3857 z = xNew<IssmDouble>(numberofvertices);
3860 for(
int i=0;i<numberofvertices;i++){
3863 x[i]=vertex->
GetX();
3864 y[i]=vertex->
GetY();
3865 z[i]=vertex->
GetZ();
3867 sidtoindex[vertex->
Sid()]=i;
3871 elem_vertices= xNew<int>(elementswidth);
3872 elementslist = xNew<int>(numberofelements*elementswidth);
3873 if(numberofelements*elementswidth<0)
_error_(
"numberofelements negative.");
3875 for(
int i=0;i<numberofelements;i++){
3878 elementslist[elementswidth*i+0] = sidtoindex[elem_vertices[0]]+1;
3879 elementslist[elementswidth*i+1] = sidtoindex[elem_vertices[1]]+1;
3880 elementslist[elementswidth*i+2] = sidtoindex[elem_vertices[2]]+1;
3887 *pelementslist = elementslist;
3888 *psidtoindex = sidtoindex;
3891 xDelete<int>(elem_vertices);
◆ CreateElements()
void FemModel::CreateElements |
( |
int |
newnumberofelements, |
|
|
int |
elementswidth, |
|
|
int * |
newelementslist, |
|
|
bool * |
my_elements, |
|
|
Elements * |
elements |
|
) |
| |
Definition at line 3675 of file FemModel.cpp.
3679 for(
int i=0;i<newnumberofelements;i++){
3691 newtria->
nodes=NULL;
3701 int material_id=i+1;
3703 int* vertex_ids=xNew<int>(elementswidth);
3704 for(
int j=0;j<elementswidth;j++) vertex_ids[j]=reCast<int>(newelementslist[elementswidth*i+j]);
3714 xDelete<int>(vertex_ids);
◆ CreateMaterials()
void FemModel::CreateMaterials |
( |
int |
newnumberofelements, |
|
|
bool * |
my_elements, |
|
|
Materials * |
materials |
|
) |
| |
Definition at line 3721 of file FemModel.cpp.
3724 for(
int i=0;i<newnumberofelements;i++){
◆ CreateConstraints()
void FemModel::CreateConstraints |
( |
Vertices * |
newfemmodel_vertices, |
|
|
int |
analysis_enum, |
|
|
Constraints * |
newfemmodel_constraints |
|
) |
| |
Definition at line 3894 of file FemModel.cpp.
3903 int numberofcols = dofpernode*2;
3904 int numberofvertices = -1;
3905 int numberofelements = -1;
3906 int newnumberofvertices = newfemmodel_vertices->
Size();
3910 int* elementslist = NULL;
3919 this->
GetMesh(&elementslist,&x,&y,&numberofvertices,&numberofelements);
3922 newx=xNew<IssmDouble>(newnumberofvertices);
3923 newy=xNew<IssmDouble>(newnumberofvertices);
3924 for(
int i=0;i<newnumberofvertices;i++){
3927 newx[i]=vertex->
GetX();
3928 newy[i]=vertex->
GetY();
3936 SpcStatic* spcstatic = xDynamicCast<SpcStatic*>(constraint);
3937 int dof = spcstatic->
GetDof();
3940 int nodeindex = node-1;
3960 spc,numberofvertices,numberofcols,
3961 newx,newy,newnumberofvertices,NULL);
3965 for(
int i=0;i<newnumberofvertices;i++){
3968 if(!xIsNan<IssmDouble>(newspc[i*numberofcols]) && newspc[i*numberofcols+dofpernode]>(1-eps)){
3969 newfemmodel_constraints->
AddObject(
new SpcStatic(count+1,vertex->
Sid()+1,0,newspc[i*numberofcols],analysis_enum));
3975 for(
int i=0;i<newnumberofvertices;i++){
3978 if(!xIsNan<IssmDouble>(newspc[i*numberofcols+1]) && newspc[i*numberofcols+dofpernode+1]>(1-eps) ){
3979 newfemmodel_constraints->
AddObject(
new SpcStatic(count+1,vertex->
Sid()+1,1,newspc[i*numberofcols+1],analysis_enum));
3986 xDelete<IssmDouble>(spc);
3987 xDelete<IssmDouble>(newspc);
3988 xDelete<IssmDouble>(newx);
3989 xDelete<IssmDouble>(newy);
◆ GetInputs()
void FemModel::GetInputs |
( |
int * |
pnumP0inputs, |
|
|
IssmDouble ** |
pP0inputs, |
|
|
int ** |
pP0input_enums, |
|
|
int ** |
pP0input_interp, |
|
|
int * |
pnumP1inputs, |
|
|
IssmDouble ** |
pP1inputs, |
|
|
int ** |
pP1input_enums, |
|
|
int ** |
pP1input_interp |
|
) |
| |
Definition at line 3368 of file FemModel.cpp.
3373 int numinputs,numP0inputs,numP1inputs;
3376 int* P0input_enums = NULL;
3377 int* P0input_interp = NULL;
3380 int* P1input_enums = NULL;
3381 int* P1input_interp = NULL;
3382 int* input_interpolations = NULL;
3383 int* input_enums = NULL;
3391 for(
int step=0;step<2;step++){
3393 P0input_enums = xNew<int>(numP0inputs);
3394 P0input_interp = xNew<int>(numP0inputs);
3395 P1input_enums = xNew<int>(numP1inputs);
3396 P1input_interp = xNew<int>(numP1inputs);
3400 for(
int i=0;i<numinputs;i++){
3401 int inputinterp = input_interpolations[i];
3402 switch(inputinterp){
3408 P1input_enums[numP1inputs] = input_enums[i];
3409 P1input_interp[numP1inputs] = inputinterp;
3417 P0input_enums[numP0inputs] = input_enums[i];
3418 P0input_interp[numP0inputs] = inputinterp;
3429 pos = xNew<int>(elementswidth);
3436 for(
int j=0;j<numP0inputs;j++){
3437 switch(P0input_interp[j]){
3446 value = reCast<IssmDouble>(valueint);
3452 value = reCast<IssmDouble>(valuebool);
3458 pos[0]=element->
Sid()*numP0inputs+j;
3464 for(
int j=0;j<numP1inputs;j++){
3482 *pnumP0inputs = numP0inputs;
3483 *pP0inputs = P0inputs;
3484 *pP0input_enums = P0input_enums;
3485 *pP0input_interp = P0input_interp;
3486 *pnumP1inputs = numP1inputs;
3487 *pP1inputs = P1inputs;
3488 *pP1input_enums = P1input_enums;
3489 *pP1input_interp = P1input_interp;
3494 xDelete<int>(input_interpolations);
3495 xDelete<int>(input_enums);
◆ InterpolateInputs()
void FemModel::InterpolateInputs |
( |
Vertices * |
newfemmodel_vertices, |
|
|
Elements * |
newfemmodel_elements, |
|
|
Inputs2 * |
new_inputs |
|
) |
| |
Definition at line 3499 of file FemModel.cpp.
3501 int numberofelements = -1;
3502 int newnumberofelements = newfemmodel_elements->
Size();
3503 int numberofvertices = -1;
3504 int newnumberofvertices = newfemmodel_vertices->
Size();
3506 int numP0inputs = -1;
3509 int* P0input_enums = NULL;
3510 int* P0input_interp = NULL;
3511 int numP1inputs = -1;
3514 int* P1input_enums = NULL;
3515 int* P1input_interp = NULL;
3520 int* elementslist = NULL;
3526 int* newelementslist = NULL;
3527 int* sidtoindex = NULL;
3530 this->
GetInputs(&numP0inputs,&P0inputs,&P0input_enums,&P0input_interp,&numP1inputs,&P1inputs,&P1input_enums,&P1input_interp);
3533 this->
GetMesh(&elementslist,&x,&y,&numberofvertices,&numberofelements);
3536 this->
GetMeshOnPartition(newfemmodel_vertices,newfemmodel_elements,&newx,&newy,&newz,&newelementslist,&sidtoindex);
3539 newxc=xNewZeroInit<IssmDouble>(newnumberofelements);
3540 newyc=xNewZeroInit<IssmDouble>(newnumberofelements);
3541 for(
int i=0;i<newnumberofelements;i++){
3542 for(
int j=0;j<elementswidth;j++){
3543 int vid = newelementslist[i*elementswidth+j]-1;
3544 newxc[i]+=newx[vid]/elementswidth;
3545 newyc[i]+=newy[vid]/elementswidth;
3551 P0inputs,numberofelements,numP0inputs,
3552 newxc,newyc,newnumberofelements,NULL);
3556 P1inputs,numberofvertices,numP1inputs,
3557 newx,newy,newnumberofvertices,NULL);
3561 values=xNew<IssmDouble>(elementswidth);
3562 for(
int i=0;i<newfemmodel_elements->
Size();i++){
3565 for(
int j=0;j<numP0inputs;j++){
3566 switch(P0input_interp[j]){
3568 element->
SetElementInput(newinputs2,P0input_enums[j],newP0inputs[i*numP0inputs+j]);
3571 element->
SetIntInput(newinputs2,P0input_enums[j],reCast<int>(newP0inputs[i*numP0inputs+j]));
3574 element->
SetBoolInput(newinputs2,P0input_enums[j],reCast<bool>(newP0inputs[i*numP0inputs+j]));
3581 for(
int i=0;i<3;i++) vertexlids[i]=element->
vertices[i]->
lid;
3582 for(
int j=0;j<numP1inputs;j++){
3583 values[0]=newP1inputs[sidtoindex[element->
vertices[0]->
Sid()]*numP1inputs+j];
3584 values[1]=newP1inputs[sidtoindex[element->
vertices[1]->
Sid()]*numP1inputs+j];
3585 values[2]=newP1inputs[sidtoindex[element->
vertices[2]->
Sid()]*numP1inputs+j];
3586 newinputs2->SetTriaInput(P1input_enums[j],
P1Enum,3,vertexlids,values);
3592 xDelete<IssmDouble>(P0inputs);
3593 xDelete<IssmDouble>(newP0inputs);
3594 xDelete<int>(P0input_enums);
3595 xDelete<int>(P0input_interp);
3596 xDelete<IssmDouble>(P1inputs);
3597 xDelete<IssmDouble>(newP1inputs);
3598 xDelete<int>(P1input_enums);
3599 xDelete<int>(P1input_interp);
3600 xDelete<IssmDouble>(newx);
3601 xDelete<IssmDouble>(newy);
3602 xDelete<IssmDouble>(newz);
3603 xDelete<IssmDouble>(newxc);
3604 xDelete<IssmDouble>(newyc);
3605 xDelete<int>(newelementslist);
3606 xDelete<int>(sidtoindex);
3607 xDelete<IssmDouble>(values);
◆ UpdateElements()
void FemModel::UpdateElements |
( |
int |
newnumberofelements, |
|
|
int * |
newelementslist, |
|
|
bool * |
my_elements, |
|
|
int |
analysis_counter, |
|
|
Elements * |
newelements |
|
) |
| |
Definition at line 3993 of file FemModel.cpp.
4000 for(
int iel=0;iel<newnumberofelements;iel++){
4001 if(my_elements[iel]){
4006 int* tria_node_ids=xNew<int>(numnodes);
4007 tria_node_ids[0]=newelementslist[3*iel+0];
4008 tria_node_ids[1]=newelementslist[3*iel+1];
4009 tria_node_ids[2]=newelementslist[3*iel+2];
4011 xDelete<int>(tria_node_ids);
◆ WriteMeshInResults()
void FemModel::WriteMeshInResults |
( |
void |
| ) |
|
Definition at line 3610 of file FemModel.cpp.
3616 int numberofelements = -1;
3617 int numberofvertices = -1;
3621 int* elementslist = NULL;
3629 this->
GetMesh(&elementslist,&x,&y,&numberofvertices,&numberofelements);
3633 elementslist,numberofelements,this->GetElementsWidth(),step,time));
3636 x,numberofvertices,1,step,time));
3639 y,numberofvertices,1,step,time));
◆ WriteErrorEstimatorsInResults()
void FemModel::WriteErrorEstimatorsInResults |
( |
void |
| ) |
|
Definition at line 3642 of file FemModel.cpp.
3645 int numberofelements = -1;
3664 stresserror,numberofelements,1,step,time));
3667 thicknesserror,numberofelements,1,step,time));
3669 xDelete<IssmDouble>(stresserror);
3670 xDelete<IssmDouble>(thicknesserror);
◆ SmoothedDeviatoricStressTensor()
Definition at line 4018 of file FemModel.cpp.
4027 IssmDouble* deviatoricstressxx = xNew<IssmDouble>(elementswidth);
4028 IssmDouble* deviatoricstressyy = xNew<IssmDouble>(elementswidth);
4029 IssmDouble* deviatoricstressxy = xNew<IssmDouble>(elementswidth);
4030 int* elem_vertices = xNew<int>(elementswidth);
4048 Tria* triaelement = xDynamicCast<Tria*>(element);
4049 weight = triaelement->
GetArea();
4052 vectauxx->
SetValue(elem_vertices[0],weight*deviatoricstressxx[0],
ADD_VAL);
4053 vectauxx->
SetValue(elem_vertices[1],weight*deviatoricstressxx[1],
ADD_VAL);
4054 vectauxx->
SetValue(elem_vertices[2],weight*deviatoricstressxx[2],
ADD_VAL);
4056 vectauyy->
SetValue(elem_vertices[0],weight*deviatoricstressyy[0],
ADD_VAL);
4057 vectauyy->
SetValue(elem_vertices[1],weight*deviatoricstressyy[1],
ADD_VAL);
4058 vectauyy->
SetValue(elem_vertices[2],weight*deviatoricstressyy[2],
ADD_VAL);
4060 vectauxy->
SetValue(elem_vertices[0],weight*deviatoricstressxy[0],
ADD_VAL);
4061 vectauxy->
SetValue(elem_vertices[1],weight*deviatoricstressxy[1],
ADD_VAL);
4062 vectauxy->
SetValue(elem_vertices[2],weight*deviatoricstressxy[2],
ADD_VAL);
4082 for(
int i=0;i<numberofvertices;i++){
4084 tauxx[i] = tauxx[i]/totalweight[i];
4085 tauyy[i] = tauyy[i]/totalweight[i];
4086 tauxy[i] = tauxy[i]/totalweight[i];
4098 delete vectotalweight;
4099 xDelete<IssmDouble>(deviatoricstressxx);
4100 xDelete<IssmDouble>(deviatoricstressyy);
4101 xDelete<IssmDouble>(deviatoricstressxy);
4102 xDelete<IssmDouble>(totalweight);
4103 xDelete<int>(elem_vertices);
◆ ZZErrorEstimator()
void FemModel::ZZErrorEstimator |
( |
IssmDouble ** |
pelementerror | ) |
|
Definition at line 4106 of file FemModel.cpp.
4119 IssmDouble* tauxx = xNew<IssmDouble>(numnodes);
4120 IssmDouble* tauyy = xNew<IssmDouble>(numnodes);
4121 IssmDouble* tauxy = xNew<IssmDouble>(numnodes);
4122 IssmDouble* basis = xNew<IssmDouble>(numnodes);
4123 int* elem_vertices = xNew<int>(numnodes);
4141 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
4145 ftxx=0;ftyy=0;ftxy=0;
4146 for(
int n=0;n<numnodes;n++) {
4147 ftxx+=(tauxx[n]-smoothedtauxx[elem_vertices[n]])*basis[n];
4148 ftyy+=(tauyy[n]-smoothedtauyy[elem_vertices[n]])*basis[n];
4149 ftxy+=(tauxy[n]-smoothedtauxy[elem_vertices[n]])*basis[n];
4151 error+=Jdet*gauss->
weight*( pow(ftxx,2)+pow(ftyy,2)+pow(ftxy,2) );
4155 error = sqrt(error);
4158 xDelete<IssmDouble>(xyz_list);
4169 xDelete<IssmDouble>(smoothedtauxx);
4170 xDelete<IssmDouble>(smoothedtauyy);
4171 xDelete<IssmDouble>(smoothedtauxy);
4172 xDelete<IssmDouble>(tauxx);
4173 xDelete<IssmDouble>(tauyy);
4174 xDelete<IssmDouble>(tauxy);
4175 xDelete<IssmDouble>(basis);
4176 xDelete<int>(elem_vertices);
4177 delete velementerror;
◆ SmoothedGradThickness()
Definition at line 4180 of file FemModel.cpp.
4190 IssmDouble* H = xNew<IssmDouble>(elementswidth);
4192 int* elem_vertices = xNew<int>(elementswidth);
4209 Tria* triaelement = xDynamicCast<Tria*>(element);
4210 weight = triaelement->
GetArea();
4225 xDelete<IssmDouble>(xyz_list);
4240 for(
int i=0;i<numberofvertices;i++){
4242 dHdx[i] = dHdx[i]/totalweight[i];
4243 dHdy[i] = dHdy[i]/totalweight[i];
4253 delete vectotalweight;
4254 xDelete<IssmDouble>(H);
4255 xDelete<IssmDouble>(GradH);
4256 xDelete<IssmDouble>(totalweight);
4257 xDelete<int>(elem_vertices);
◆ ThicknessZZErrorEstimator()
void FemModel::ThicknessZZErrorEstimator |
( |
IssmDouble ** |
pelementerror | ) |
|
Definition at line 4260 of file FemModel.cpp.
4273 IssmDouble* basis = xNew<IssmDouble>(numnodes);
4274 int* elem_vertices = xNew<int>(numnodes);
4293 for(
int ig=gauss->
begin();ig<gauss->end();ig++){
4298 for(
int n=0;n<numnodes;n++) {
4299 fdHdx+=(GradH[0]-smoothed_dHdx[elem_vertices[n]])*basis[n];
4300 fdHdy+=(GradH[1]-smoothed_dHdy[elem_vertices[n]])*basis[n];
4302 error+=Jdet*gauss->
weight*(pow(fdHdx,2)+pow(fdHdy,2) );
4306 error = sqrt(error);
4309 xDelete<IssmDouble>(xyz_list);
4321 xDelete<IssmDouble>(smoothed_dHdx);
4322 xDelete<IssmDouble>(smoothed_dHdy);
4323 xDelete<IssmDouble>(H);
4324 xDelete<IssmDouble>(GradH);
4325 xDelete<IssmDouble>(basis);
4326 xDelete<int>(elem_vertices);
4327 delete velementerror;
◆ MeanGroundedIceLevelSet()
void FemModel::MeanGroundedIceLevelSet |
( |
IssmDouble ** |
pmasklevelset | ) |
|
Definition at line 4330 of file FemModel.cpp.
4334 IssmDouble* elementlevelset = xNew<IssmDouble>(elementswidth);
4340 int sid = element->
Sid();
4341 vmasklevelset->
SetValue(sid,(elementlevelset[0]+elementlevelset[1]+elementlevelset[2])/3.,
INS_VAL);
4351 xDelete<IssmDouble>(elementlevelset);
4352 delete vmasklevelset;
◆ GetElementCenterCoordinates()
Definition at line 4355 of file FemModel.cpp.
4360 int* elem_vertices = xNew<int>(elementswidth);
4373 int sid = element->
Sid();
4375 x1 = xyz_list[3*0+0];y1 = xyz_list[3*0+1];
4376 x2 = xyz_list[3*1+0];y2 = xyz_list[3*1+1];
4377 x3 = xyz_list[3*2+0];y3 = xyz_list[3*2+1];
4391 xDelete<IssmDouble>(x);
4392 xDelete<IssmDouble>(y);
4393 xDelete<IssmDouble>(z);
4394 xDelete<IssmDouble>(xyz_list);
4395 xDelete<int>(elem_vertices);
◆ GetZeroLevelSetPoints()
void FemModel::GetZeroLevelSetPoints |
( |
IssmDouble ** |
pzerolevelset_points, |
|
|
int & |
numberofpoints, |
|
|
int |
levelset_type |
|
) |
| |
Definition at line 4400 of file FemModel.cpp.
4405 _error_(
"level set type not implemented yet!");
4415 int* elem_vertices = xNew<int>(elementswidth);
4416 IssmDouble* levelset = xNew<IssmDouble>(elementswidth);
4430 sid= element->
Sid();
4432 x1 = xyz_list[3*0+0];y1 = xyz_list[3*0+1];
4433 x2 = xyz_list[3*1+0];y2 = xyz_list[3*1+1];
4434 x3 = xyz_list[3*2+0];y3 = xyz_list[3*2+1];
4437 Tria* tria = xDynamicCast<Tria*>(element);
4439 if(levelset[0]*levelset[1]<0. || levelset[0]*levelset[2]<0. ||
4440 abs(levelset[0]*levelset[1])<DBL_EPSILON || abs(levelset[0]*levelset[2])<DBL_EPSILON) {
4447 xDelete<IssmDouble>(xyz_list);
4457 for(
int i=0;i<numberofelements;i++) if(!xIsNan<IssmDouble>(x_zerolevelset[i])) npoints++;
4460 zerolevelset_points=xNew<IssmDouble>(2*npoints);
4462 for(
int i=0;i<numberofelements;i++){
4463 if(!xIsNan<IssmDouble>(x_zerolevelset[i])){
4464 zerolevelset_points[2*count] = x_zerolevelset[i];
4465 zerolevelset_points[2*count+1] = y_zerolevelset[i];
4471 numberofpoints = npoints;
4472 (*pzerolevelset_points) = zerolevelset_points;
4475 xDelete<int>(elem_vertices);
4476 xDelete<IssmDouble>(levelset);
4477 xDelete<IssmDouble>(x_zerolevelset);
4478 xDelete<IssmDouble>(y_zerolevelset);
4479 xDelete<IssmDouble>(xyz_list);
4480 delete vx_zerolevelset;
4481 delete vy_zerolevelset;
◆ analysis_counter
int FemModel::analysis_counter |
◆ analysis_type_list
int* FemModel::analysis_type_list |
◆ nummodels
◆ solution_type
int FemModel::solution_type |
◆ profiler
◆ elements
◆ materials
◆ parameters
◆ inputs2
◆ results
◆ vertices
◆ constraints
◆ constraints_list
◆ loads
◆ loads_list
Loads** FemModel::loads_list |
◆ nodes
◆ nodes_list
Nodes** FemModel::nodes_list |
The documentation for this class was generated from the following files:
@ FreeSurfaceTopAnalysisEnum
@ IceVolumeAboveFloatationScaledEnum
@ BalancethicknessAnalysisEnum
void TotalCalvingFluxLevelsetx(IssmDouble *pGbmb, bool scaled)
@ FrictionCoefficientEnum
void MaxAbsVzx(IssmDouble *presponse)
IssmDouble TotalFloatingBmb(IssmDouble *mask, bool scaled)
void depthaverage_core(FemModel *femmodel)
int NumberOfVerticesLocal(void)
int TotalTimeModSec(int tag)
Declaration of Vertices class.
void SetIntInput(Inputs2 *inputs2, int enum_in, int value)
void CreateElements(int newnumberofelements, int elementswidth, int *newelementslist, bool *my_elements, Elements *elements)
IssmPDouble Memory(int tag)
void GetInputListOnNodes(IssmDouble *pvalue, int enumtype)
void ElementOperationx(void(Element::*function)(void))
void InitFromFiles(char *rootpath, char *inputfilename, char *outputfilename, char *petscfilename, char *lockfilename, char *restartfilename, const int solution_type, bool trace, IssmPDouble *X=NULL)
@ Balancethickness2SolutionEnum
void GetMaskOfIceVerticesLSMx0(FemModel *femmodel)
void MaxVelx(IssmDouble *presponse)
Declaration of Nodes class.
@ InputToDepthaverageOutEnum
@ AutodiffDependentObjectsEnum
virtual IssmDouble GetIcefrontArea()
@ FrontalForcingsBasinIcefrontAreaEnum
virtual int GetNumberOfNodes(void)=0
@ InversionNumControlParametersEnum
void MaxAbsVyx(IssmDouble *presponse)
@ ExtrudeFromBaseAnalysisEnum
@ MasstransportAnalysisEnum
@ BalancevelocityAnalysisEnum
#define _printf0_(StreamArgs)
int ISSM_MPI_Allreduce(void *sendbuf, void *recvbuf, int count, ISSM_MPI_Datatype datatype, ISSM_MPI_Op op, ISSM_MPI_Comm comm)
void FindParam(bool *pvalue, int paramenum)
void SetHookNodes(int *node_ids, int numnodes, int analysis_counter)
void SetBoolInput(Inputs2 *inputs2, int enum_in, bool value)
IssmPDouble TotalFlops(int tag)
@ GroundinglineMassFluxEnum
@ StressbalanceAnalysisEnum
@ BalancethicknessThickeningRateEnum
bool Exist(int enum_type)
void MinVyx(IssmDouble *presponse)
int AddObject(Object *object)
#define _printf_(StreamArgs)
@ HydrologydcMaskEplactiveNodeEnum
@ BalancethicknessMisfitEnum
@ InversionControlParametersEnum
@ TotalFloatingBmbScaledEnum
@ Balancethickness2AnalysisEnum
void BalancethicknessMisfitx(IssmDouble *pV)
@ InversionCostFunctionsCoefficientsEnum
Declaration of Parameters class.
@ ExtrudeFromTopAnalysisEnum
void EtaDiffx(IssmDouble *pJ)
bool VerboseMProcessor(void)
@ BalancethicknessSoftSolutionEnum
void CreateVertices(Elements *elements, Vertices *vertices, IoModel *iomodel, int solution_type, bool isamr)
#define MARSHALLING_ENUM(EN)
static ISSM_MPI_Comm GetComm(void)
@ DepthAverageAnalysisEnum
@ BalancevelocitySolutionEnum
Declaration of Constraints class.
@ DamageEvolutionAnalysisEnum
virtual Element * SpawnBasalElement(void)=0
@ HydrologydcMaskThawedNodeEnum
IssmDouble IceVolumeAboveFloatation(IssmDouble *mask, bool scaled)
virtual void CalvingRateVonmises(void)
void ResultToVector(Vector< IssmDouble > *vector, int output_enum)
#define GROUNDINGLINECORE
void ToolkitsOptionsFromAnalysis(Parameters *parameters, int analysis_type)
virtual IssmDouble TimeAdapt()=0
virtual IssmDouble MassFlux(IssmDouble *segment)=0
int NumberOfNodesLocalAll(void)
void GetMeshOnPartition(Vertices *femmodel_vertices, Elements *femmodel_elements, IssmDouble **px, IssmDouble **py, IssmDouble **pz, int **pelementslist, int **psidtoindex)
Declaration of Elements class.
void GetVectorFromInputsx(IssmDouble **pvector, int *pvector_size, FemModel *femmodel, int name)
void ThicknessAbsMisfitx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
void SolutionAnalysesList(int **panalyses, int *pnumanalyses, IoModel *iomodel, int solutiontype)
int NumberOfVertices(void)
void GetLocalVector(doubletype **pvector, int **pindices)
@ BalancethicknessSolutionEnum
@ MismipFloatingMeltRateEnum
IssmDouble GroundedArea(IssmDouble *mask, bool scaled)
void TotalCalvingMeltingFluxLevelsetx(IssmDouble *pGbmb, bool scaled)
@ SurfaceRelVelMisfitEnum
virtual void WriteFieldIsovalueSegment(DataSet *segments, int fieldenum, IssmDouble fieldvalue)
@ FreeSurfaceBaseAnalysisEnum
@ DamageEvolutionSolutionEnum
@ HydrologyShaktiAnalysisEnum
FILE * pfopen(char *filename, const char *format, bool errorout=true)
@ MasstransportStabilizationEnum
virtual void StrainRateparallel(void)=0
void AdjustBaseThicknessAndMask(void)
@ Outputdefinition100Enum
@ HydrologyPismAnalysisEnum
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
virtual IssmDouble TotalCalvingFluxLevelset(bool scaled)
Constraints ** constraints_list
@ SealevelriseSolutionEnum
void SmoothedDeviatoricStressTensor(IssmDouble **ptauxx, IssmDouble **ptauyy, IssmDouble **ptauxy)
void ResultToPatch(IssmDouble *values, int nodesperelement, int output_enum)
void HydrologyEPLGetActive(Vector< IssmDouble > *active_vec, Element *element)
virtual double GetValue(void)=0
virtual void ControlToVectors(Vector< IssmPDouble > *vector_control, Vector< IssmPDouble > *vector_gradient, int control_enum)=0
@ SettingsResultsOnNodesEnum
@ TransientIsgroundinglineEnum
@ DragCoefficientAbsGradientEnum
void TotalSmbx(IssmDouble *pSmb, bool scaled)
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
@ ProfilingCurrentFlopsEnum
IssmDouble FloatingArea(IssmDouble *mask, bool scaled)
void AddObject(Param *newparam)
virtual void UpdateConstraintsExtrudeFromTop(void)=0
void SurfaceLogVxVyMisfitx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
@ SurfaceLogVxVyMisfitEnum
void UpdatePosition(Vector< IssmDouble > *vx, Vector< IssmDouble > *vy, Vector< IssmDouble > *vz, Parameters *parameters, IssmDouble *thickness, IssmDouble *bed)
@ HydrologyDCInefficientAnalysisEnum
void InitFromFids(char *rootpath, FILE *IOMODEL, FILE *toolkitsoptionsfid, int in_solution_type, bool trace, IssmPDouble *X=NULL)
@ MaterialsRheologyBbarEnum
@ SurfaceAbsVelMisfitEnum
virtual void StressIntensityFactor(void)=0
virtual Input2 * GetInput2(int inputenum)=0
void DeleteMaterials(void)
FILE * pfopen0(char *filename, const char *format)
void Divergencex(IssmDouble *pdiv)
@ HydrologyGlaDSAnalysisEnum
virtual void NodalFunctions(IssmDouble *basis, Gauss *gauss)=0
#define MARSHALLING_DYNAMIC(FIELD, TYPE, SIZE)
virtual IssmDouble IcefrontMassFlux(bool scaled)
void OmegaAbsGradientx(IssmDouble *pJ)
void HydrologyEPLGetMask(Vector< IssmDouble > *vec_mask, Vector< IssmDouble > *recurence, Element *element)
virtual DatasetInput2 * GetDatasetInput2(int inputenum)
virtual void ElementResponse(IssmDouble *presponse, int response_enum)=0
@ ExtrapolationAnalysisEnum
void MaxAbsVxx(IssmDouble *presponse)
@ UzawaPressureAnalysisEnum
void AddConstant(IoConstant *constant_in)
void SetParam(bool boolean, int enum_type)
@ BalancethicknessOmegaEnum
void SyncLocalVectorWithClonesVertices(IssmDouble *local_vector)
IssmDouble Divergence(void)
@ L2ProjectionBaseAnalysisEnum
@ BasalforcingsGroundediceMeltingRateEnum
virtual IssmDouble GroundinglineMassFlux(bool scaled)
virtual IssmDouble TotalCalvingMeltingFluxLevelset(bool scaled)
Declaration of Materials class.
void UpdateConstraintsx(void)
IssmDouble IceVolume(IssmDouble *mask, bool scaled)
void IceVolumex(IssmDouble *pV, bool scaled)
void SetValues(int ssize, int *list, doubletype *values, InsMode mode)
@ ProfilingSolutionTimeEnum
virtual void AddInput2(int input_enum, IssmDouble *values, int interpolation_enum)
void ElementizeIdsMask(FemModel *femmodel)
void MinVelx(IssmDouble *presponse)
virtual Gauss * NewGauss(void)=0
@ FrontalForcingsNumberofBasinsEnum
@ InversionCostFunctionsEnum
void ThicknessAlongGradientx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
const char * EnumToStringx(int enum_in)
void MinVxx(IssmDouble *presponse)
void CreateNumberNodeToElementConnectivity(IoModel *iomodel)
void NodesDofx(Nodes *nodes, Parameters *parameters)
@ ThicknessAlongGradientEnum
void GetLocalVectorWithClonesGset(IssmDouble **plocal_vector, Vector< IssmDouble > *vector)
static void SetComm(void)
@ StressbalanceSolutionEnum
void FindConstant(bool *pvalue, const char *constant_name)
#define MASSTRANSPORTCORE
void SurfaceRelVelMisfitx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
IssmDouble TotalSmb(IssmDouble *mask, bool scaled)
void GetInput2Value(bool *pvalue, int enum_type)
void TotalFloatingBmbx(IssmDouble *pFbmb, bool scaled)
@ MasstransportSolutionEnum
void ZZErrorEstimator(IssmDouble **pelementerror)
#define MARSHALLING(FIELD)
void GetVerticesCoordinates(IssmDouble **xyz_list)
void SurfaceAbsVelMisfitx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
void MaxVyx(IssmDouble *presponse)
Node * GetNode(int nodeindex)
void ResultToMatrix(IssmDouble *values, int ncols, int output_enum)
int ISSM_MPI_Send(void *buf, int count, ISSM_MPI_Datatype datatype, int dest, int tag, ISSM_MPI_Comm comm)
void MaxVxx(IssmDouble *presponse)
virtual void UpdateConstraintsExtrudeFromBase(void)=0
void ElementResponsex(IssmDouble *presponse, int response_enum)
@ SettingsNumResultsOnNodesEnum
Constraints * constraints
@ TotalCalvingMeltingFluxLevelsetEnum
void GroundinglineMassFluxx(IssmDouble *presponse, bool scaled)
void RheologyBAbsGradientx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
@ InversionSurfaceObsEnum
@ TransientAmrFrequencyEnum
@ SealevelriseAnalysisEnum
void NodalValuex(IssmDouble *pnodalvalue, int natureofdataenum, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
int AddResult(ExternalResult *result)
void WrapperCorePointerFromSolutionEnum(void(**psolutioncore)(FemModel *), Parameters *parameters, int solutiontype, bool nodakotacore=false)
void Stop(int tagenum, bool dontmpisync=true)
@ MaterialsRhoSeawaterEnum
void BedrockFromMismipPlus(void)
@ HydrologyDCEfficientAnalysisEnum
void HydrologyIdsGetActive(Vector< IssmDouble > *active_vec, Element *element)
bool IsInputEnum(int enum_in)
int ISSM_MPI_Bcast(void *buffer, int count, ISSM_MPI_Datatype datatype, int root, ISSM_MPI_Comm comm)
void Responsex(IssmDouble *presponse, int response_descriptor_enum)
void Responsex(IssmDouble *poutput_value, FemModel *femmodel)
void TotalGroundedBmbx(IssmDouble *pGbmb, bool scaled)
@ HydrologyShreveAnalysisEnum
virtual int ObjectEnum()=0
void ProcessArguments(int *solution, char **pbinname, char **poutbinname, char **ptoolkitsname, char **plockname, char **prestartname, char **prootpath, int argc, char **argv)
int NumberOfVerticesLocalAll(void)
Analysis * EnumToAnalysis(int analysis_enum)
int StringToEnumx(const char *string_in, bool notfounderror=true)
void IceMassx(IssmDouble *pV, bool scaled)
@ HydrologydcEplflipLockEnum
void ThicknessPositivex(IssmDouble *pJ)
void RheologyBbarAbsGradientx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
void GetVerticesSidList(int *sidlist)
void IcefrontMassFluxx(IssmDouble *presponse, bool scaled)
virtual void CreateDistanceInputFromSegmentlist(IssmDouble *distances, int distanceenum)
void MinVzx(IssmDouble *presponse)
virtual void SetElementInput(int enum_in, IssmDouble values)
void WriteLockFile(char *filename)
virtual void ValueP1DerivativesOnGauss(IssmDouble *dvalue, IssmDouble *values, IssmDouble *xyz_list, Gauss *gauss)=0
@ StressbalanceSIAAnalysisEnum
void RheologyBInitialguessMisfitx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
virtual void CalvingMeltingFluxLevelset(void)
void IceVolumeAboveFloatationx(IssmDouble *pV, bool scaled)
Declaration of Loads class.
@ IcefrontMassFluxLevelsetEnum
@ DeviatoricStressErrorEstimatorEnum
@ L2ProjectionEPLAnalysisEnum
@ InputToDepthaverageInEnum
@ GLheightadvectionAnalysisEnum
@ TimesteppingTimeStepMinEnum
@ StressbalanceVerticalAnalysisEnum
void ResultInterpolation(int *pinterpolation, int *nodesperelement, int *parray_size, int output_enum)
void CreateMaterials(int newnumberofelements, bool *my_elements, Materials *materials)
#define _error_(StreamArgs)
void GetInputs(int *pnumP0inputs, IssmDouble **pP0inputs, int **pP0input_enums, int **pP0input_interp, int *pnumP1inputs, IssmDouble **pP1inputs, int **pP1input_enums, int **pP1input_interp)
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
void Start(int tagenum, bool dontmpisync=true)
void UpdateElements(int newnumberofelements, int *newelementslist, bool *my_elements, int analysis_counter, Elements *newelements)
void ModelProcessorx(Elements **pelements, Nodes ***pnodes, Vertices **pvertices, Materials **pmaterials, Constraints ***pconstraints, Loads ***ploads, Parameters **pparameters, Inputs2 **pinputs2, IoModel *iomodel, FILE *toolkitfile, char *rootpath, const int solution_enum, const int nummodels, const int *analysis_enum_list)
@ RheologyBAbsGradientEnum
virtual int begin(void)=0
@ SurfaceSlopeSolutionEnum
bool VerboseSolution(void)
Object * GetObjectByOffset(int offset)
void MassFluxx(IssmDouble *presponse)
int TotalTimeModHour(int tag)
@ BalancethicknessOmega0Enum
virtual void StrainRateperpendicular(void)=0
@ InversionNumCostFunctionsEnum
void CreateConstraints(Vertices *newfemmodel_vertices, int analysis_enum, Constraints *newfemmodel_constraints)
@ SurfaceLogVelMisfitEnum
void MaxVzx(IssmDouble *presponse)
IssmDouble OutputDefinitionsResponsex(FemModel *femmodel, int output_enum)
int TotalTimeModMin(int tag)
virtual void JacobianDeterminant(IssmDouble *Jdet, IssmDouble *xyz_list, Gauss *gauss)=0
virtual void GaussPoint(int ig)=0
void SurfaceAbsMisfitx(IssmDouble *pJ)
@ AutodiffNumDependentsEnum
void RequestedOutputsx(Results **presults, char **requested_outputs, int numoutputs, bool save_results=true)
void SetCurrentConfiguration(int configuration_type)
void ad_core(FemModel *femmodel)
virtual void CalvingFluxLevelset(void)
#define STRESSBALANCECORE
void SetCurrentConfiguration(Elements *elements, Loads *loads, Nodes *nodes, Vertices *vertices, Materials *materials, Parameters *parameters)
void FindParam(bool *pinteger, int enum_type)
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
void FloatingAreax(IssmDouble *pV, bool scaled)
@ IceVolumeAboveFloatationEnum
IssmDouble TotalGroundedBmb(IssmDouble *mask, bool scaled)
@ FrontalForcingsBasinIdEnum
@ ThicknessErrorEstimatorEnum
void InterpolateInputs(Vertices *newfemmodel_vertices, Elements *newfemmodel_elements, Inputs2 *new_inputs)
void SpcNodesx(Nodes *nodes, Constraints *constraints, Parameters *parameters)
void IcefrontMassFluxLevelsetx(IssmDouble *presponse, bool scaled)
int NumberOfElements(void)
virtual void CreateInputTimeAverage(int transientinput_enum, int averagedinput_enum, IssmDouble init_time, IssmDouble end_time, int averaging_method)
void ApplyConstraint(int dof, IssmDouble value)
virtual void CalvingRateLevermann(void)=0
@ SteadystateSolutionEnum
void ThicknessAbsGradientx(IssmDouble *pJ)
void VertexCoordinatesx(IssmDouble **px, IssmDouble **py, IssmDouble **pz, Vertices *vertices, bool spherical)
@ SurfaceAverageVelMisfitEnum
int ISSM_MPI_Recv(void *buf, int count, ISSM_MPI_Datatype datatype, int source, int tag, ISSM_MPI_Comm comm, ISSM_MPI_Status *status)
doubletype * ToMPISerial(void)
void ThicknessZZErrorEstimator(IssmDouble **pelementerror)
void ElementizeEplMask(FemModel *femmodel)
void SurfaceLogVelMisfitx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
@ TotalCalvingFluxLevelsetEnum
int ISSM_MPI_Reduce(void *sendbuf, void *recvbuf, int count, ISSM_MPI_Datatype datatype, ISSM_MPI_Op op, int root, ISSM_MPI_Comm comm)
virtual void RignotMeltParameterization(void)
IssmDouble max(IssmDouble a, IssmDouble b)
@ ToolkitsOptionsStringsEnum
IssmDouble IceMass(bool scaled)
@ TimesteppingTimeStepMaxEnum
void pfclose(FILE *fid, char *filename)
void DragCoefficientAbsGradientx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
@ ThicknessAbsGradientEnum
@ MassFluxSegmentsPresentEnum
virtual int GetNumberOfVertices(void)=0
Declaration of DataSet class.
void WriteChannelCrossSection(IssmPDouble *values)
void SetMesh(int **elementslist, IssmDouble **x, IssmDouble **y, int *numberofvertices, int *numberofelements)
void GetInputListOnVertices(IssmDouble *pvalue, int enumtype)
void DistanceToFieldValue(int fieldenum, IssmDouble fieldvalue, int distanceenum)
void SmoothedGradThickness(IssmDouble **pdHdx, IssmDouble **pdHdy)
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)
int InterpFromMeshToMesh2dx(double **pdata_interp, int *index_data, double *x_data, double *y_data, int nods_data, int nels_data, double *data, int M_data, int N_data, double *x_interp, double *y_interp, int N_interp, Options *options)
Declaration of Results class.
IssmPDouble TotalTime(int tag)
@ TotalGroundedBmbScaledEnum
void MaxDivergencex(IssmDouble *pdiv)
void SetCurrentConfiguration(Elements *elements, Loads *loads, Nodes *nodes, Vertices *vertices, Materials *materials, Parameters *parameters)
@ RheologyBInitialguessMisfitEnum
void ElementsAndVerticesPartitioning(IoModel *iomodel)
virtual IssmDouble IcefrontMassFluxLevelset(bool scaled)
void GetMesh(Vertices *femmodel_vertices, Elements *femmodel_elements, IssmDouble **px, IssmDouble **py, int **pelementslist)
int NumberOfNodesLocal(void)
void GetVerticesLidList(int *lidlist)
virtual void UpdateConstraints(FemModel *femmodel)=0
void SetValue(int dof, doubletype value, InsMode mode)
void ThicknessAcrossGradientx(IssmDouble *pJ, Elements *elements, Nodes *nodes, Vertices *vertices, Loads *loads, Materials *materials, Parameters *parameters)
int ISSM_MPI_Gather(void *sendbuf, int sendcnt, ISSM_MPI_Datatype sendtype, void *recvbuf, int recvcnt, ISSM_MPI_Datatype recvtype, int root, ISSM_MPI_Comm comm)
void GetInputLocalMinMaxOnNodes(IssmDouble *min, IssmDouble *max, IssmDouble *ug)
void WriteErrorEstimatorsInResults(void)
void HydrologyIDSGetMask(Vector< IssmDouble > *vec_mask, Element *element)
@ RheologyBbarAbsGradientEnum
void SurfaceAverageVelMisfitx(IssmDouble *pJ, FemModel *femmodel)
virtual void CreateNodes(Nodes *nodes, IoModel *iomodel, bool isamr=false)=0
FemModel(int argc, char **argv, ISSM_MPI_Comm comm_init, bool trace=false)
@ ProfilingCurrentMemEnum
@ ThicknessAcrossGradientEnum
virtual void ComputeDeviatoricStressTensor(void)=0
void GroundedAreax(IssmDouble *pV, bool scaled)
void Marshall(char **pmarshalled_data, int *pmarshalled_data_size, int marshall_direction)