Skip to content

Commit

Permalink
NEW: adding continuous design QMU capabilities and Mmemasstransport
Browse files Browse the repository at this point in the history
analysis. The Mmemasstransport analysis allows for dakota runs with mass
tranposrt thickness times series that are an ensemble -> very nice to
compute sea level change fingerprints in a MME manner.
  • Loading branch information
larour committed Nov 29, 2024
1 parent 678e0b2 commit 122bcd6
Show file tree
Hide file tree
Showing 30 changed files with 931 additions and 318 deletions.
42 changes: 28 additions & 14 deletions m4/analyses.m4
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,20 @@ fi
AM_CONDITIONAL([GLHEIGHTADVECTION], [test x$HAVE_GLHEIGHTADVECTION = xyes])
AC_MSG_RESULT($HAVE_GLHEIGHTADVECTION)
dnl }}}
dnl with-HydrologyArmapw{{{
AC_ARG_WITH([HydrologyArmapw],
AS_HELP_STRING([--with-HydrologyArmapw = YES], [compile with HydrologyArmapw capabilities (default is yes)]),
[HYDROLOGYARMAPW=$withval],[HYDROLOGYARMAPW=yes])
AC_MSG_CHECKING(for HydrologyArmapw capability compilation)
HAVE_HYDROLOGYARMAPW=no
if test "x$HYDROLOGYARMAPW" = "xyes"; then
HAVE_HYDROLOGYARMAPW=yes
AC_DEFINE([_HAVE_HYDROLOGYARMAPW_],[1],[with HydrologyArmapw capability])
fi
AM_CONDITIONAL([HYDROLOGYARMAPW], [test x$HAVE_HYDROLOGYARMAPW = xyes])
AC_MSG_RESULT($HAVE_HYDROLOGYARMAPW)
dnl }}}
dnl with-HydrologyDCEfficient{{{
AC_ARG_WITH([HydrologyDCEfficient],
AS_HELP_STRING([--with-HydrologyDCEfficient = YES], [compile with HydrologyDCEfficient capabilities (default is yes)]),
Expand Down Expand Up @@ -373,20 +387,6 @@ fi
AM_CONDITIONAL([HYDROLOGYSHREVE], [test x$HAVE_HYDROLOGYSHREVE = xyes])
AC_MSG_RESULT($HAVE_HYDROLOGYSHREVE)
dnl }}}
dnl with-HydrologyArmapw{{{
AC_ARG_WITH([HydrologyArmapw],
AS_HELP_STRING([--with-HydrologyArmapw = YES], [compile with HydrologyArmapw capabilities (default is yes)]),
[HYDROLOGYARMAPW=$withval],[HYDROLOGYARMAPW=yes])
AC_MSG_CHECKING(for HydrologyArmapw capability compilation)
HAVE_HYDROLOGYARMAPW=no
if test "x$HYDROLOGYARMAPW" = "xyes"; then
HAVE_HYDROLOGYARMAPW=yes
AC_DEFINE([_HAVE_HYDROLOGYARMAPW_],[1],[with HydrologyArmapw capability])
fi
AM_CONDITIONAL([HYDROLOGYARMAPW], [test x$HAVE_HYDROLOGYARMAPW = xyes])
AC_MSG_RESULT($HAVE_HYDROLOGYARMAPW)
dnl }}}
dnl with-L2ProjectionBase{{{
AC_ARG_WITH([L2ProjectionBase],
AS_HELP_STRING([--with-L2ProjectionBase = YES], [compile with L2ProjectionBase capabilities (default is yes)]),
Expand Down Expand Up @@ -457,6 +457,20 @@ fi
AM_CONDITIONAL([MASSTRANSPORT], [test x$HAVE_MASSTRANSPORT = xyes])
AC_MSG_RESULT($HAVE_MASSTRANSPORT)
dnl }}}
dnl with-Mmemasstransport{{{
AC_ARG_WITH([Mmemasstransport],
AS_HELP_STRING([--with-Mmemasstransport = YES], [compile with Mmemasstransport capabilities (default is yes)]),
[MMEMASSTRANSPORT=$withval],[MMEMASSTRANSPORT=yes])
AC_MSG_CHECKING(for Mmemasstransport capability compilation)
HAVE_MMEMASSTRANSPORT=no
if test "x$MMEMASSTRANSPORT" = "xyes"; then
HAVE_MMEMASSTRANSPORT=yes
AC_DEFINE([_HAVE_MMEMASSTRANSPORT_],[1],[with Mmemasstransport capability])
fi
AM_CONDITIONAL([MMEMASSTRANSPORT], [test x$HAVE_MMEMASSTRANSPORT = xyes])
AC_MSG_RESULT($HAVE_MMEMASSTRANSPORT)
dnl }}}
dnl with-Melting{{{
AC_ARG_WITH([Melting],
AS_HELP_STRING([--with-Melting = YES], [compile with Melting capabilities (default is yes)]),
Expand Down
47 changes: 11 additions & 36 deletions src/c/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AM_CPPFLAGS = @NEOPZINCL@ @DAKOTAINCL@ @SHAPELIBINCL@ @TRIANGLEINCL@ @PETSCINCL@ @AMPIINCL@ @ADJOINTMPIINCL@ @MEDIPACKINCL@ @MPIINCL@ @PARMETISINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @SPAIINCL@ @HYPREINCL@ @PROMETHEUSINCL@ @SUPERLUINCL@ @SPOOLESINCL@ @PASTIXINCL@ @MLINCL@ @TAOINCL@ @ADOLCINCL@ @CODIPACKINCL@ @GSLINCL@ @BOOSTINCL@ @METEOIOINCL@ @SNOWPACKINCL@ @ESMFINCL@ @PROJINCL@ @MPLAPACKINCL@
AM_CPPFLAGS = @NEOPZINCL@ @DAKOTAINCL@ @SHAPELIBINCL@ @TRIANGLEINCL@ @PETSCINCL@ @AMPIINCL@ @ADJOINTMPIINCL@ @MEDIPACKINCL@ @MPIINCL@ @PARMETISINCL@ @METISINCL@ @CHACOINCL@ @SCOTCHINCL@ @PLAPACKINCL@ @MKLINCL@ @MUMPSINCL@ @SPAIINCL@ @HYPREINCL@ @PROMETHEUSINCL@ @SUPERLUINCL@ @SPOOLESINCL@ @PASTIXINCL@ @MLINCL@ @TAOINCL@ @ADOLCINCL@ @CODIPACKINCL@ @GSLINCL@ @BOOSTINCL@ @METEOIOINCL@ @SNOWPACKINCL@ @PROJINCL@ @ESMFINCL@ @PROJINCL@ @MPLAPACKINCL@
AM_FCFLAGS = @SEMICINCL@

AUTOMAKE_OPTIONS = subdir-objects
Expand Down Expand Up @@ -165,7 +165,6 @@ issm_sources += \
./shared/Numerics/extrema.cpp \
./shared/Numerics/legendre.cpp \
./shared/Numerics/XZvectorsToCoordinateSystem.cpp \
./shared/Numerics/Normals.cpp \
./shared/Exceptions/Exceptions.cpp \
./shared/Sorting/binary_search.cpp \
./shared/Elements/Cuffey.cpp \
Expand Down Expand Up @@ -197,6 +196,7 @@ issm_sources += \
./toolkits/mpi/commops/GetOwnershipBoundariesFromRange.cpp \
./toolkits/ToolkitOptions.cpp \
./modules/MmeToInputFromIdx/MmeToInputFromIdx.cpp\
./modules/MmeToInputx/MmeToInputx.cpp\
./modules/ModelProcessorx/ModelProcessorx.cpp \
./modules/ModelProcessorx/ElementsAndVerticesPartitioning.cpp \
./modules/ModelProcessorx/NodesPartitioning.cpp \
Expand Down Expand Up @@ -248,6 +248,7 @@ issm_sources += \
./modules/Solverx/Solverx.cpp \
./modules/StochasticForcingx/StochasticForcingx.cpp \
./modules/Mergesolutionfromftogx/Mergesolutionfromftogx.cpp \
./modules/UpdateMmesx/UpdateMmesx.cpp \
./cores/ProcessArguments.cpp \
./cores/ResetBoundaryConditions.cpp \
./cores/WrapperCorePointerFromSolutionEnum.cpp \
Expand All @@ -274,6 +275,7 @@ issm_sources += \
./cores/transient_core.cpp \
./cores/steadystate_core.cpp \
./cores/masstransport_core.cpp \
./cores/mmemasstransport_core.cpp \
./cores/oceantransport_core.cpp \
./cores/depthaverage_core.cpp \
./cores/extrudefrombase_core.cpp \
Expand Down Expand Up @@ -344,7 +346,7 @@ issm_sources += \
./classes/Inputs/DatasetInput.cpp \
./classes/Inputs/ControlInput.cpp \
./classes/Inputs/TransientInput.cpp \
./classes/Inputs/ArrayInput.cpp \
./classes/Inputs/ArrayInput.cpp\
./classes/Inputs/IntArrayInput.cpp
#}}}
# ADJOINTMPI/MeDiPack sources {{{
Expand Down Expand Up @@ -497,7 +499,8 @@ if MELTING
issm_sources += ./analyses/MeltingAnalysis.cpp
endif
if MASSTRANSPORT
issm_sources += ./analyses/MasstransportAnalysis.cpp
issm_sources += ./analyses/MasstransportAnalysis.cpp \
./analyses/MmemasstransportAnalysis.cpp
endif
if OCEANTRANSPORT
issm_sources += ./analyses/OceantransportAnalysis.cpp
Expand Down Expand Up @@ -541,28 +544,7 @@ if LOVE
if FORTRAN
issm_sources += \
./cores/love_core.cpp \
./analyses/LoveAnalysis.cpp \
./modules/Zgesvx/Zgesvx.cpp \
./modules/Zgesvx/Zgesvx.h \
./modules/Zgesvx/dcabs1.f \
./modules/Zgesvx/dlamch.f \
./modules/Zgesvx/ieeeck.f \
./modules/Zgesvx/ilaenv.f \
./modules/Zgesvx/iparmq.f \
./modules/Zgesvx/izamax.f \
./modules/Zgesvx/lsame.f \
./modules/Zgesvx/xerbla.f \
./modules/Zgesvx/zgemm.f \
./modules/Zgesvx/zgeru.f \
./modules/Zgesvx/zgesv.f \
./modules/Zgesvx/zgetf2.f \
./modules/Zgesvx/zgetrf2.f \
./modules/Zgesvx/zgetrf.f \
./modules/Zgesvx/zgetrs.f \
./modules/Zgesvx/zlaswp.f \
./modules/Zgesvx/zscal.f \
./modules/Zgesvx/zswap.f \
./modules/Zgesvx/ztrsm.f
./analyses/LoveAnalysis.cpp
endif
endif
#}}}
Expand Down Expand Up @@ -740,7 +722,8 @@ endif
libISSMCore_la_SOURCES = $(issm_sources)
libISSMCore_la_CXXFLAGS = $(ALL_CXXFLAGS)
libISSMCore_la_FFLAGS = $(AM_FFLAGS)
libISSMCore_LIB_ADD = $(CHACOLIB) $(DAKOTALIB) $(PETSCLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(PARMETISLIB) $(METISLIB) $(HDF5LIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MPLAPACKLIB) $(SUPERLULIB) $(SPOOLESLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(SCOTCHLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(ADJOINTMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJLIB)

libISSMCore_LIB_ADD = $(CHACOLIB) $(DAKOTALIB) $(PETSCLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(PARMETISLIB) $(METISLIB) $(HDF5LIB) $(TAOLIB) $(M1QN3LIB) $(SEMICLIB) $(PLAPACKLIB) $(MPLAPACKLIB) $(SUPERLULIB) $(SPOOLESLIB) $(BLACSLIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(SCOTCHLIB) $(MKLLIB) $(MPILIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(ADOLCLIB) $(AMPILIB) $(ADJOINTMPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJLIB)
if FORTRAN
libISSMCore_LIB_ADD += $(FLIBS) $(FORTRANLIB)
endif
Expand Down Expand Up @@ -836,14 +819,6 @@ endif
endif
endif

if !STANDALONE_LIBRARIES
if MAC
if PROJ
libISSMCore_la_LDFLAGS += -Wl,-rpath,$(PROJROOT)/lib
endif
endif
endif

if !MSYS2
libISSMOverload_la_SOURCES = ./shared/String/ApiPrintf.cpp
libISSMOverload_la_CFLAGS = -D_C_ -fPIC $(CFLAGS) $(CXXFLAGS)
Expand Down Expand Up @@ -880,7 +855,7 @@ LDADD += ./libISSMModules.la $(TRIANGLELIB)
endif

# External packages
LDADD += $(DAKOTALIB) $(SEMICLIB) $(M1QN3LIB) $(CHACOLIB) $(PETSCLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(PARMETISLIB) $(METISLIB) $(NEOPZLIB) $(TAOLIB) $(PLAPACKLIB) $(MPLAPACKLIB) $(SUPERLULIB) $(SPOOLESLIB) $(BLACSLIB) $(HDF5LIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(SCOTCHLIB) $(MKLLIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(AMPILIB) $(ADJOINTMPILIB) $(ADOLCLIB) $(MPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(ESMFLIB)
LDADD += $(DAKOTALIB) $(SEMICLIB) $(M1QN3LIB) $(CHACOLIB) $(PETSCLIB) $(MUMPSLIB) $(SCALAPACKLIB) $(BLASLAPACKLIB) $(PARMETISLIB) $(METISLIB) $(NEOPZLIB) $(TAOLIB) $(PLAPACKLIB) $(MPLAPACKLIB) $(SUPERLULIB) $(SPOOLESLIB) $(BLACSLIB) $(HDF5LIB) $(HYPRELIB) $(SPAILIB) $(PROMETHEUSLIB) $(PASTIXLIB) $(MLLIB) $(SCOTCHLIB) $(MKLLIB) $(MATHLIB) $(GRAPHICSLIB) $(MULTITHREADINGLIB) $(GSLLIB) $(AMPILIB) $(ADJOINTMPILIB) $(ADOLCLIB) $(MPILIB) $(METEOIOLIB) $(SNOWPACKLIB) $(PROJLIB) $(ESMFLIB)

if FORTRAN
LDADD += $(FLIBS) $(FORTRANLIB)
Expand Down
3 changes: 3 additions & 0 deletions src/c/analyses/EnumToAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ Analysis* EnumToAnalysis(int analysis_enum){
#ifdef _HAVE_MASSTRANSPORT_
case MasstransportAnalysisEnum : return new MasstransportAnalysis();
#endif
#ifdef _HAVE_MMEMASSTRANSPORT_
case MmemasstransportAnalysisEnum : return new MmemasstransportAnalysis();
#endif
#ifdef _HAVE_MELTING_
case MeltingAnalysisEnum : return new MeltingAnalysis();
#endif
Expand Down
143 changes: 143 additions & 0 deletions src/c/analyses/MmemasstransportAnalysis.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
#include "./MmemasstransportAnalysis.h"
#include <math.h>
#include "../toolkits/toolkits.h"
#include "../classes/classes.h"
#include "../classes/Inputs/TransientInput.h"
#include "../classes/Inputs/TriaInput.h"
#include "../classes/gauss/Gauss.h"
#include "../shared/shared.h"
#include "../modules/modules.h"

/*Model processing*/
void MmemasstransportAnalysis::CreateConstraints(Constraints* constraints,IoModel* iomodel){/*{{{*/
/*No constraints*/
}/*}}}*/
void MmemasstransportAnalysis::CreateLoads(Loads* loads, IoModel* iomodel){/*{{{*/
/*No loads*/
}/*}}}*/
void MmemasstransportAnalysis::CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr){/*{{{*/
::CreateNodes(nodes,iomodel,MmemasstransportAnalysisEnum,P1Enum);
}/*}}}*/
int MmemasstransportAnalysis::DofsPerNode(int** doflist,int domaintype,int approximation){/*{{{*/
return 3;
}/*}}}*/
void MmemasstransportAnalysis::UpdateElements(Elements* elements,Inputs* inputs,IoModel* iomodel,int analysis_counter,int analysis_type){/*{{{*/

int nature=0;
bool isdakota=0;

/*Update elements: */
int counter=0;
for(int i=0;i<iomodel->numberofelements;i++){
if(iomodel->my_elements[i]){
Element* element=(Element*)elements->GetObjectByOffset(counter);
element->Update(inputs,i,iomodel,analysis_counter,analysis_type,P1Enum);
counter++;
}
}

/*Plug inputs into element:*/
iomodel->FetchDataToInput(inputs,elements,"md.geometry.thickness",ThicknessEnum);
iomodel->FetchDataToInput(inputs,elements,"md.geometry.surface",SurfaceEnum);
iomodel->FetchDataToInput(inputs,elements,"md.geometry.base",BaseEnum);
iomodel->FetchDataToInput(inputs,elements,"md.initialization.sealevel",SealevelEnum,0);
iomodel->FetchDataToInput(inputs,elements,"md.mask.ice_levelset",MmemasstransportMaskIceLevelsetEnum);
iomodel->FetchDataToInput(inputs,elements,"md.mask.ocean_levelset",MmemasstransportMaskOceanLevelsetEnum);
iomodel->FetchDataToInput(inputs,elements,"md.mmemasstransport.thickness", MmemasstransportThicknessEnum);

/*Initialize sea level cumulated sea level loads :*/
iomodel->ConstantToInput(inputs,elements,0.,AccumulatedDeltaIceThicknessEnum,P0Enum);
iomodel->ConstantToInput(inputs,elements,0.,OldAccumulatedDeltaIceThicknessEnum,P0Enum);
iomodel->ConstantToInput(inputs,elements,0.,DeltaIceThicknessEnum,P0Enum);

}/*}}}*/
void MmemasstransportAnalysis::UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum){/*{{{*/

int numoutputs;
char** requestedoutputs = NULL;

int nids,npart,nel;
IssmDouble* ids=NULL;
IssmDouble* partition = NULL;

iomodel->FetchData(&nel,"md.mesh.numberofelements");
iomodel->FetchData(&ids,&nids,NULL,"md.mmemasstransport.ids");
//_printf_("nids: " << nids << "\n"); for(int i=0;i<nids;i++)_printf_(ids[i] << "|"); _printf_("\n");
parameters->AddObject(new DoubleMatParam(MmemasstransportModelidsEnum,ids,nids,1));
iomodel->FetchData(&partition,&npart,NULL,"md.mmemasstransport.partition");
if (npart!=nel)_error_("MmemasstransportAnalysis:UpdateParameters: partition vector should be distributed over elements, not vertices!");
parameters->AddObject(new DoubleMatParam(MmemasstransportPartitionEnum,partition,nel,1));

xDelete<IssmDouble>(ids);
xDelete<IssmDouble>(partition);

/*Requested outputs*/
iomodel->FindConstant(&requestedoutputs,&numoutputs,"md.mmemasstransport.requested_outputs");
parameters->AddObject(new IntParam(MmemasstransportNumRequestedOutputsEnum,numoutputs));
if(numoutputs)parameters->AddObject(new StringArrayParam(MmemasstransportRequestedOutputsEnum,requestedoutputs,numoutputs));
iomodel->DeleteData(&requestedoutputs,numoutputs,"md.mmemasstransport.requested_outputs");

}/*}}}*/

/*Finite Element Analysis*/
void MmemasstransportAnalysis::Core(FemModel* femmodel){/*{{{*/
_error_("not implemented");
}/*}}}*/
void MmemasstransportAnalysis::PreCore(FemModel* femmodel){/*{{{*/
_error_("not implemented");
}/*}}}*/
ElementVector* MmemasstransportAnalysis::CreateDVector(Element* element){/*{{{*/
/*Default, return NULL*/
return NULL;
}/*}}}*/
ElementMatrix* MmemasstransportAnalysis::CreateJacobianMatrix(Element* element){/*{{{*/
_error_("Not implemented");
}/*}}}*/
ElementMatrix* MmemasstransportAnalysis::CreateKMatrix(Element* element){/*{{{*/
_error_("not implemented yet");
}/*}}}*/
ElementVector* MmemasstransportAnalysis::CreatePVector(Element* element){/*{{{*/
_error_("not implemented yet");
}/*}}}*/
void MmemasstransportAnalysis::GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element){/*{{{*/

/*do nothing:*/
return;
}/*}}}*/
void MmemasstransportAnalysis::GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_interp,int control_index){/*{{{*/
_error_("Not implemented yet");
}/*}}}*/
void MmemasstransportAnalysis::InputUpdateFromSolution(IssmDouble* solution,Element* element){/*{{{*/

/*Fetch number of nodes and dof for this finite element*/
IssmDouble time;
IssmDouble ice[3];
IssmDouble ocean[3];
IssmDouble height;
int numnodes = element->GetNumberOfNodes();

element->parameters->FindParam(&time,TimeEnum);

TriaInput* h_input=xDynamicCast<TriaInput*>(element->GetInput(MmemasstransportThicknessEnum,time)); _assert_(h_input);
TriaInput* i_input=xDynamicCast<TriaInput*>(element->GetInput(MmemasstransportMaskIceLevelsetEnum,time)); _assert_(i_input);
TriaInput* o_input=xDynamicCast<TriaInput*>(element->GetInput(MmemasstransportMaskOceanLevelsetEnum,time)); _assert_(o_input);

Gauss* gauss=element->NewGauss();
for(int iv=0;iv<3;iv++){
gauss->GaussVertex(iv);
i_input->GetInputValue(&ice[iv],gauss);
o_input->GetInputValue(&ocean[iv],gauss);
}
h_input->GetInputAverage(&height);
delete gauss;

/*Add thickness ice and ocean levelsets as inputs to the tria element: */
element->AddInput(ThicknessEnum,&height,P0Enum); //very important, do not change the type of ThicknessEnum to P1 when it should be P0!
element->AddInput(MaskIceLevelsetEnum,ice,P1Enum);
element->AddInput(MaskOceanLevelsetEnum,ocean,P1Enum);

}/*}}}*/
void MmemasstransportAnalysis::UpdateConstraints(FemModel* femmodel){/*{{{*/
/*Default, do nothing*/
return;
}/*}}}*/
34 changes: 34 additions & 0 deletions src/c/analyses/MmemasstransportAnalysis.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*! \file MmemasstransportAnalysis.h
* \brief: header file for generic external result object
*/

#ifndef _MmemasstransportAnalysis_
#define _MmemasstransportAnalysis_

/*Headers*/
#include "./Analysis.h"

class MmemasstransportAnalysis: public Analysis{

public:
/*Model processing*/
void CreateConstraints(Constraints* constraints,IoModel* iomodel);
void CreateLoads(Loads* loads, IoModel* iomodel);
void CreateNodes(Nodes* nodes,IoModel* iomodel,bool isamr=false);
int DofsPerNode(int** doflist,int domaintype,int approximation);
void UpdateElements(Elements* elements,Inputs* inputs,IoModel* iomodel,int analysis_counter,int analysis_type);
void UpdateParameters(Parameters* parameters,IoModel* iomodel,int solution_enum,int analysis_enum);

/*Finite element Analysis*/
void Core(FemModel* femmodel);
void PreCore(FemModel* femmodel);
ElementVector* CreateDVector(Element* element);
ElementMatrix* CreateJacobianMatrix(Element* element);
ElementMatrix* CreateKMatrix(Element* element);
ElementVector* CreatePVector(Element* element);
void GetSolutionFromInputs(Vector<IssmDouble>* solution,Element* element);
void GradientJ(Vector<IssmDouble>* gradient,Element* element,int control_type,int control_interp,int control_index);
void InputUpdateFromSolution(IssmDouble* solution,Element* element);
void UpdateConstraints(FemModel* femmodel);
};
#endif
6 changes: 3 additions & 3 deletions src/c/analyses/OceantransportAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ void OceantransportAnalysis::UpdateElements(Elements* elements,Inputs* inputs,Io
iomodel->FetchData(&modelid,"md.dsl.modelid");

/*replace dataset of forcings with only one, the modelid'th:*/
MmeToInputFromIdx(inputs,elements,modelid,OceantransportSpcbottompressureEnum, P1Enum);
MmeToInputFromIdx(inputs,elements,modelid,OceantransportSpcdslEnum, P1Enum);
MmeToInputFromIdx(inputs,elements,modelid,OceantransportSpcstrEnum, P0Enum);
MmeToInputFromIdx(inputs,elements,NULL,modelid,OceantransportSpcbottompressureEnum, P1Enum);
MmeToInputFromIdx(inputs,elements,NULL,modelid,OceantransportSpcdslEnum, P1Enum);
MmeToInputFromIdx(inputs,elements,NULL,modelid,OceantransportSpcstrEnum, P0Enum);
}

/*Initialize sea level cumulated sea level loads :*/
Expand Down
Loading

0 comments on commit 122bcd6

Please sign in to comment.