Index: issm/trunk/src/ad/Makefile.am
===================================================================
--- issm/trunk/src/ad/Makefile.am	(revision 9761)
+++ issm/trunk/src/ad/Makefile.am	(revision 9773)
@@ -32,6 +32,4 @@
 					./objects/Gauss/GaussTria.h\
 					./objects/Gauss/GaussTria.cpp\
-					./objects/Gauss/GaussPenta.h\
-					./objects/Gauss/GaussPenta.cpp\
 					./objects/Update.h\
 					./objects/Element.h\
@@ -46,4 +44,8 @@
 					./objects/Loads/Friction.h\
 					./objects/Loads/Friction.cpp\
+					./objects/Inputs/TransientInput.h\
+					./objects/Inputs/TransientInput.cpp\
+					./objects/Constraints/SpcTransient.cpp\
+					./objects/Constraints/SpcTransient.h\
 					./objects/DofIndexing.h\
 					./objects/DofIndexing.cpp\
@@ -65,6 +67,4 @@
 					./objects/ElementResults/TriaVertexElementResult.h\
 					./objects/ElementResults/TriaVertexElementResult.cpp\
-					./objects/ElementResults/PentaVertexElementResult.h\
-					./objects/ElementResults/PentaVertexElementResult.cpp\
 					./objects/ElementResults/BoolElementResult.h\
 					./objects/ElementResults/BoolElementResult.cpp\
@@ -94,6 +94,4 @@
 					./objects/Inputs/TriaVertexInput.h\
 					./objects/Inputs/TriaVertexInput.cpp\
-					./objects/Inputs/PentaVertexInput.h\
-					./objects/Inputs/PentaVertexInput.cpp\
 					./objects/Inputs/BoolInput.h\
 					./objects/Inputs/BoolInput.cpp\
@@ -104,12 +102,4 @@
 					./objects/Inputs/DatasetInput.h\
 					./objects/Inputs/DatasetInput.cpp\
-					./objects/Inputs/TransientInput.h\
-					./objects/Inputs/TransientInput.cpp\
-					./objects/Elements/Penta.h\
-					./objects/Elements/Penta.cpp\
-					./objects/Elements/PentaHook.h\
-					./objects/Elements/PentaHook.cpp\
-					./objects/Elements/PentaRef.h\
-					./objects/Elements/PentaRef.cpp\
 					./objects/Materials/Matice.h\
 					./objects/Materials/Matice.cpp\
@@ -121,6 +111,4 @@
 					./objects/Constraints/SpcDynamic.cpp\
 					./objects/Constraints/SpcDynamic.h\
-					./objects/Constraints/SpcTransient.cpp\
-					./objects/Constraints/SpcTransient.h\
 					./objects/Loads/Penpair.cpp\
 					./objects/Loads/Penpair.h\
@@ -129,6 +117,4 @@
 					./objects/Loads/Icefront.cpp\
 					./objects/Loads/Icefront.h\
-					./objects/Loads/Riftfront.cpp\
-					./objects/Loads/Riftfront.h\
 					./objects/Loads/Numericalflux.cpp\
 					./objects/Loads/Numericalflux.h\
@@ -264,8 +250,4 @@
 					./EnumDefinitions/EnumDefinitions.h\
 					./EnumDefinitions/EnumToModelField.cpp\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationx.cpp\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationx.h\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationxLocal.h\
-					./modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp\
 					./modules/ModelProcessorx/ModelProcessorx.h\
 					./modules/ModelProcessorx/ModelProcessorx.cpp\
@@ -280,37 +262,4 @@
 					./modules/ModelProcessorx/CreateNumberNodeToElementConnectivity.cpp\
 					./modules/ModelProcessorx/CreateElementsVerticesAndMaterials.cpp\
-					./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
-					./modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp \
-					./modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp \
-					./modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp\
-					./modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp\
-					./modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp \
-					./modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp \
-					./modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp\
-					./modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp\
-					./modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp \
-					./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \
-					./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp\
-					./modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp\
-					./modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp \
-					./modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp\
-					./modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp\
-					./modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp\
-					./modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp \
-					./modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp\
-					./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp\
-					./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
-					./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
-					./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
-					./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp\
-					./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
-					./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
-					./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
-					./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp\
-					./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
-					./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
-					./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
-					./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\
-					./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp\
 					./modules/ParsePetscOptionsx/ParsePetscOptionsx.h\
 					./modules/ParsePetscOptionsx/ParsePetscOptionsx.cpp\
@@ -323,26 +272,4 @@
 					./modules/OutputResultsx/OutputResultsx.h\
 					./modules/OutputResultsx/OutputResultsx.cpp\
-					./modules/MinVelx/MinVelx.h\
-					./modules/MinVelx/MinVelx.cpp\
-					./modules/MaxVelx/MaxVelx.h\
-					./modules/MaxVelx/MaxVelx.cpp\
-					./modules/MaxAbsVxx/MaxAbsVxx.h\
-					./modules/MaxAbsVxx/MaxAbsVxx.cpp\
-					./modules/MaxAbsVyx/MaxAbsVyx.h\
-					./modules/MaxAbsVyx/MaxAbsVyx.cpp\
-					./modules/MaxAbsVzx/MaxAbsVzx.h\
-					./modules/MaxAbsVzx/MaxAbsVzx.cpp\
-					./modules/MaxVxx/MaxVxx.h\
-					./modules/MaxVxx/MaxVxx.cpp\
-					./modules/MaxVyx/MaxVyx.h\
-					./modules/MaxVyx/MaxVyx.cpp\
-					./modules/MaxVzx/MaxVzx.h\
-					./modules/MaxVzx/MaxVzx.cpp\
-					./modules/MinVxx/MinVxx.h\
-					./modules/MinVxx/MinVxx.cpp\
-					./modules/MinVyx/MinVyx.h\
-					./modules/MinVyx/MinVyx.cpp\
-					./modules/MinVzx/MinVzx.h\
-					./modules/MinVzx/MinVzx.cpp\
 					./modules/InputDuplicatex/InputDuplicatex.h\
 					./modules/InputDuplicatex/InputDuplicatex.cpp\
@@ -383,6 +310,4 @@
 					./modules/UpdateConstraintsx/UpdateConstraintsx.h\
 					./modules/UpdateConstraintsx/UpdateConstraintsx.cpp\
-					./modules/HoleFillerx/HoleFillerx.cpp\
-					./modules/HoleFillerx/HoleFillerx.h\
 					./modules/MeshPartitionx/MeshPartitionx.cpp\
 					./modules/MeshPartitionx/MeshPartitionx.h\
@@ -395,6 +320,4 @@
 					./modules/StringToEnumx/StringToEnumx.cpp\
 					./modules/StringToEnumx/StringToEnumx.h\
-					./modules/MassFluxx/MassFluxx.cpp\
-					./modules/MassFluxx/MassFluxx.h\
 					./modules/SystemMatricesx/SystemMatricesx.cpp\
 					./modules/SystemMatricesx/SystemMatricesx.h\
@@ -402,5 +325,4 @@
 					./modules/ConstraintsStatex/ConstraintsStatex.h\
 					./modules/ConstraintsStatex/ConstraintsStateLocal.h\
-					./modules/ConstraintsStatex/RiftConstraintsState.cpp\
 					./modules/Responsex/Responsex.h\
 					./modules/Responsex/Responsex.cpp\
@@ -420,45 +342,16 @@
 					./modules/InputConvergencex/InputConvergencex.cpp\
 					./modules/InputConvergencex/InputConvergencex.h\
-					./modules/OutputRiftsx/OutputRiftsx.h\
-					./modules/OutputRiftsx/OutputRiftsx.cpp\
-					./modules/RheologyBbarx/RheologyBbarx.cpp\
-					./modules/RheologyBbarx/RheologyBbarx.h\
-					./solutions/diagnostic_core.cpp\
 					./solutions/convergence.cpp\
 					./solutions/WriteLockFile.cpp\
-					./solutions/prognostic_core.cpp\
-					./solutions/balancethickness_core.cpp\
-					./solutions/surfaceslope_core.cpp\
-					./solutions/bedslope_core.cpp\
-					./solutions/hydrology_core.cpp\
-					./solutions/hydrology_core_step.cpp\
-					./solutions/transient_core.cpp\
-					./solutions/groundinglinemigration2d_core.cpp\
-					./solutions/steadystate_core.cpp\
-					./solutions/steadystateconvergence.cpp\
 					./solutions/ResetBoundaryConditions.cpp\
 					./solutions/AnalysisConfiguration.cpp\
 					./solutions/CorePointerFromSolutionEnum.cpp\
 					./solvers/solver_linear.cpp\
-					./solvers/solver_nonlinear.cpp\
-					./solvers/solver_stokescoupling_nonlinear.cpp
-
-
-libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS)
-#}}}
-#AD library, for automatic differentiation {{{1
-if AD
-#libAD_a_SOURCES = ./mini1.ad.c
-libAD_a_SOURCES = 
-libAD_a_CFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
-
-
-#Automatic differentiation rules: 
-%.ad.c: %.c
-	adic2 -mforward  $< --nary
-endif
+					./solvers/solver_nonlinear.cpp
+
+
+libpISSM_a_CXXFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(CXXOPTFLAGS) 
 #}}}
 #DAKOTA sources  {{{1
-
 if DAKOTA
 libpISSM_a_SOURCES +=  ./objects/DakotaPlugin.h\
@@ -483,8 +376,28 @@
 					  ./modules/AverageOntoPartitionx/AverageOntoPartitionx.h
 endif
-
+#}}}
+#Transient sources  {{{1
+if TRANSIENT
+libpISSM_a_SOURCES +=  ./solutions/transient_core.cpp\
+					   ./modules/ModelProcessorx/Transient/UpdateElementsTransient.cpp
+endif
+#}}}
+#Steadystate sources  {{{1
+if STEADYSTATE
+libpISSM_a_SOURCES += ./solutions/steadystate_core.cpp\
+					  ./solutions/steadystateconvergence.cpp
+endif
+#}}}
+#Prognostic sources  {{{1
+if PROGNOSTIC
+libpISSM_a_SOURCES +=  ./solutions/prognostic_core.cpp\
+					   ./modules/ModelProcessorx/Prognostic/UpdateElementsPrognostic.cpp\
+					   ./modules/ModelProcessorx/Prognostic/CreateNodesPrognostic.cpp\
+					   ./modules/ModelProcessorx/Prognostic/CreateConstraintsPrognostic.cpp\
+					   ./modules/ModelProcessorx/Prognostic/CreateLoadsPrognostic.cpp
+
+endif
 #}}}
 #Thermal sources  {{{1
-
 if THERMAL
 libpISSM_a_SOURCES +=  ./solutions/thermal_core.cpp\
@@ -507,11 +420,7 @@
 					   ./modules/ConstraintsStatex/ThermalIsPresent.cpp\
 					   ./modules/ResetConstraintsx/ThermalConstraintsReset.cpp
-
-
-endif
-
+endif
 #}}}
 #Control sources  {{{1
-
 if CONTROL
 libpISSM_a_SOURCES += ./solutions/control_core.cpp\
@@ -564,9 +473,132 @@
 					  ./shared/Numerics/OptimalSearch.cpp\
 					  ./shared/Numerics/OptFunc.cpp
-
-endif
-
-#}}}
-
+endif
+#}}}
+#Hydrology sources  {{{1
+if HYDROLOGY
+libpISSM_a_SOURCES += ./modules/ModelProcessorx/Hydrology/UpdateElementsHydrology.cpp\
+					  ./modules/ModelProcessorx/Hydrology/CreateNodesHydrology.cpp\
+					  ./modules/ModelProcessorx/Hydrology/CreateConstraintsHydrology.cpp\
+					  ./modules/ModelProcessorx/Hydrology/CreateLoadsHydrology.cpp\
+					  ./solutions/hydrology_core.cpp\
+					  ./solutions/hydrology_core_step.cpp
+endif
+#}}}
+#Diagnostic sources  {{{1
+if DIAGNOSTIC
+libpISSM_a_SOURCES += ./modules/ModelProcessorx/DiagnosticHoriz/UpdateElementsDiagnosticHoriz.cpp\
+					  ./modules/ModelProcessorx/DiagnosticHoriz/CreateNodesDiagnosticHoriz.cpp \
+					  ./modules/ModelProcessorx/DiagnosticHoriz/CreateConstraintsDiagnosticHoriz.cpp \
+					  ./modules/ModelProcessorx/DiagnosticHoriz/CreateLoadsDiagnosticHoriz.cpp\
+					  ./modules/ModelProcessorx/DiagnosticVert/UpdateElementsDiagnosticVert.cpp\
+					  ./modules/ModelProcessorx/DiagnosticVert/CreateNodesDiagnosticVert.cpp \
+					  ./modules/ModelProcessorx/DiagnosticVert/CreateConstraintsDiagnosticVert.cpp \
+					  ./modules/ModelProcessorx/DiagnosticVert/CreateLoadsDiagnosticVert.cpp\
+					  ./modules/ModelProcessorx/DiagnosticHutter/UpdateElementsDiagnosticHutter.cpp\
+					  ./modules/ModelProcessorx/DiagnosticHutter/CreateNodesDiagnosticHutter.cpp \
+					  ./modules/ModelProcessorx/DiagnosticHutter/CreateConstraintsDiagnosticHutter.cpp \
+					  ./modules/ModelProcessorx/DiagnosticHutter/CreateLoadsDiagnosticHutter.cpp\
+					  ./solutions/diagnostic_core.cpp\
+					  ./solvers/solver_stokescoupling_nonlinear.cpp
+endif
+#}}}
+#Balanced sources  {{{1
+if BALANCED
+libpISSM_a_SOURCES += ./modules/ModelProcessorx/Balancethickness/UpdateElementsBalancethickness.cpp\
+					  ./modules/ModelProcessorx/Balancethickness/CreateNodesBalancethickness.cpp\
+					  ./modules/ModelProcessorx/Balancethickness/CreateConstraintsBalancethickness.cpp\
+					  ./modules/ModelProcessorx/Balancethickness/CreateLoadsBalancethickness.cpp\
+					  ./solutions/balancethickness_core.cpp
+endif
+#}}}
+#Responses sources  {{{1
+if RESPONSES
+libpISSM_a_SOURCES += ./modules/MinVelx/MinVelx.h\
+					  ./modules/MinVelx/MinVelx.cpp\
+					  ./modules/MaxVelx/MaxVelx.h\
+					  ./modules/MaxVelx/MaxVelx.cpp\
+					  ./modules/MaxAbsVxx/MaxAbsVxx.h\
+					  ./modules/MaxAbsVxx/MaxAbsVxx.cpp\
+					  ./modules/MaxAbsVyx/MaxAbsVyx.h\
+					  ./modules/MaxAbsVyx/MaxAbsVyx.cpp\
+					  ./modules/MaxAbsVzx/MaxAbsVzx.h\
+					  ./modules/MaxAbsVzx/MaxAbsVzx.cpp\
+					  ./modules/MaxVxx/MaxVxx.h\
+					  ./modules/MaxVxx/MaxVxx.cpp\
+					  ./modules/MaxVyx/MaxVyx.h\
+					  ./modules/MaxVyx/MaxVyx.cpp\
+					  ./modules/MaxVzx/MaxVzx.h\
+					  ./modules/MaxVzx/MaxVzx.cpp\
+					  ./modules/MinVxx/MinVxx.h\
+					  ./modules/MinVxx/MinVxx.cpp\
+					  ./modules/MinVyx/MinVyx.h\
+					  ./modules/MinVyx/MinVyx.cpp\
+					  ./modules/MinVzx/MinVzx.h\
+					  ./modules/MinVzx/MinVzx.cpp\
+					  ./modules/RheologyBbarx/RheologyBbarx.cpp\
+					  ./modules/RheologyBbarx/RheologyBbarx.h\
+					  ./modules/MassFluxx/MassFluxx.cpp\
+					  ./modules/MassFluxx/MassFluxx.h
+endif
+#}}}
+#Slope sources  {{{1
+if SLOPE
+libpISSM_a_SOURCES += ./modules/ModelProcessorx/BedSlope/UpdateElementsBedSlope.cpp\
+					  ./modules/ModelProcessorx/BedSlope/CreateNodesBedSlope.cpp \
+					  ./modules/ModelProcessorx/BedSlope/CreateConstraintsBedSlope.cpp\
+					  ./modules/ModelProcessorx/BedSlope/CreateLoadsBedSlope.cpp\
+					  ./modules/ModelProcessorx/SurfaceSlope/UpdateElementsSurfaceSlope.cpp\
+					  ./modules/ModelProcessorx/SurfaceSlope/CreateNodesSurfaceSlope.cpp \
+					  ./modules/ModelProcessorx/SurfaceSlope/CreateConstraintsSurfaceSlope.cpp\
+					  ./modules/ModelProcessorx/SurfaceSlope/CreateLoadsSurfaceSlope.cpp\
+					  ./solutions/surfaceslope_core.cpp\
+					  ./solutions/bedslope_core.cpp
+endif
+#}}}
+#GroundingLine sources  {{{1
+if GROUNDINGLINE
+libpISSM_a_SOURCES += ./modules/GroundingLineMigrationx/GroundingLineMigrationx.cpp\
+					  ./modules/GroundingLineMigrationx/GroundingLineMigrationx.h\
+					  ./modules/GroundingLineMigrationx/GroundingLineMigrationxLocal.h\
+					  ./modules/GroundingLineMigrationx/GroundingLineMigrationxUtils.cpp\
+					  ./solutions/groundinglinemigration2d_core.cpp
+endif
+#}}}
+#Rifts sources  {{{1
+if RIFTS
+libpISSM_a_SOURCES += ./objects/Loads/Riftfront.cpp\
+					  ./objects/Loads/Riftfront.h\
+					  ./modules/ConstraintsStatex/RiftConstraintsState.cpp
+endif
+#}}}
+#3D sources  {{{1
+if THREED
+libpISSM_a_SOURCES += ./objects/Gauss/GaussPenta.h\
+					  ./objects/Gauss/GaussPenta.cpp\
+					  ./objects/ElementResults/PentaVertexElementResult.h\
+					  ./objects/ElementResults/PentaVertexElementResult.cpp\
+					  ./objects/Inputs/PentaVertexInput.h\
+					  ./objects/Inputs/PentaVertexInput.cpp\
+					  ./objects/Elements/Penta.h\
+					  ./objects/Elements/Penta.cpp\
+					  ./objects/Elements/PentaHook.h\
+					  ./objects/Elements/PentaHook.cpp\
+					  ./objects/Elements/PentaRef.h\
+					  ./objects/Elements/PentaRef.cpp
+endif
+#}}}
+
+#AD library, for automatic differentiation {{{1
+if AD
+#libAD_a_SOURCES = ./mini1.ad.c
+libAD_a_SOURCES = 
+libAD_a_CFLAGS = -fPIC -D_PARALLEL_   -D_C_ $(COPTFLAGS)
+
+
+#Automatic differentiation rules: 
+%.ad.c: %.c
+	adic2 -mforward  $< --nary
+endif
+#}}}
 #Executable {{{1
 
@@ -589,5 +621,5 @@
 
 issm_exe_SOURCES = solutions/issm.cpp
-issm_exe_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXOPTFLAGS) $(COPTFLAGS)
-
-#}}}
+issm_exe_CXXFLAGS= -fPIC -D_PARALLEL_  $(CXXOPTFLAGS) $(COPTFLAGS) 
+
+#}}}
