source: issm/trunk-jpl/src/c/classes/Elements/Element.h@ 16844

Last change on this file since 16844 was 16844, checked in by Mathieu Morlighem, 11 years ago

NEW: FS front

File size: 13.4 KB
RevLine 
[3683]1/*!\file: Element.h
2 * \brief abstract class for Element object
3 * This class is a place holder for the Tria and the Penta elements.
4 * It is derived from Element, so DataSets can contain them.
5 */
6
7#ifndef _ELEMENT_H_
8#define _ELEMENT_H_
9
10/*Headers:*/
[12365]11/*{{{*/
[15067]12#include "../../datastructures/datastructures.h"
[16789]13#include "../../toolkits/toolkits.h"
[15012]14#include "../Update.h"
[3683]15class DataSet;
16class Parameters;
[14996]17class Elements;
18class Loads;
19class Node;
20class Nodes;
21class Vertices;
22class Materials;
[16693]23class Matpar;
[16675]24class Input;
25class Gauss;
[16799]26class ElementVector;
[13216]27template <class doublematrix> class Matrix;
28template <class doubletype> class Vector;
[16789]29class ElementMatrix;
30class ElementVector;
[3683]31/*}}}*/
32
[4244]33class Element: public Object,public Update{
[3683]34
35 public:
[13623]36
[3683]37 virtual ~Element(){};
[13623]38
[16832]39 virtual IssmDouble CharacteristicLength(void)=0;
[14761]40 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
[14953]41 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0;
[16042]42 virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0;
[16720]43 virtual void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;
[16693]44 virtual void AddInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;
[16699]45 virtual void AddMaterialInput(int input_enum, IssmDouble* values, int interpolation_enum)=0;
[16789]46 virtual ElementMatrix* CreateKMatrix(void)=0;
[14435]47 virtual void CreateDVector(Vector<IssmDouble>* df)=0;
[16789]48 virtual ElementVector* CreatePVector(void)=0;
[13216]49 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0;
[16778]50 virtual void DeleteMaterials(void)=0;
[16840]51 virtual void ElementSizes(IssmDouble* phx,IssmDouble* phy,IssmDouble* phz)=0;
[16734]52 virtual void EnthalpyToThermal(IssmDouble* ptemperature,IssmDouble* pwaterfraction,IssmDouble enthalpy,IssmDouble pressure)=0;
[16812]53 virtual IssmDouble EnthalpyDiffusionParameter(IssmDouble enthalpy,IssmDouble pressure)=0;
54 virtual IssmDouble EnthalpyDiffusionParameterVolume(int numvertices,IssmDouble* enthalpy,IssmDouble* pressure)=0;
[16675]55 virtual void FindParam(int* pvalue,int paramenum)=0;
56 virtual void FindParam(IssmDouble* pvalue,int paramenum)=0;
57 virtual int FiniteElement(void)=0;
[16697]58 virtual IssmDouble GetMaterialParameter(int enum_in)=0;
[16810]59 virtual IssmDouble MinEdgeLength(IssmDouble* xyz_list)=0;
[16799]60 virtual void NodalFunctions(IssmDouble* basis,Gauss* gauss)=0;
[16831]61 virtual void NodalFunctionsVelocity(IssmDouble* basis, Gauss* gauss)=0;
62 virtual void NodalFunctionsPressure(IssmDouble* basis, Gauss* gauss)=0;
[16810]63 virtual void NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss)=0;
[16831]64 virtual void NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss)=0;
[16839]65 virtual void NormalSection(IssmDouble* normal,IssmDouble* xyz_list)=0;
[16827]66 virtual void NormalTop(IssmDouble* normal,IssmDouble* xyz_list)=0;
[16844]67 virtual void NormalBase(IssmDouble* normal,IssmDouble* xyz_list)=0;
[16813]68 virtual IssmDouble PureIceEnthalpy(IssmDouble pressure)=0;
[16799]69 virtual void TransformLoadVectorCoord(ElementVector* pe,int transformenum)=0;
70 virtual void TransformLoadVectorCoord(ElementVector* pe,int* transformenum_list)=0;
71 virtual void TransformLoadVectorCoord(ElementVector* pe,int numnodes,int transformenum)=0;
72 virtual void TransformLoadVectorCoord(ElementVector* pe,int numnodes,int* transformenum_list)=0;
[16693]73 virtual void TransformSolutionCoord(IssmDouble* values,int transformenum)=0;
[16715]74 virtual void TransformSolutionCoord(IssmDouble* values,int* transformenum_list)=0;
[16775]75 virtual void TransformSolutionCoord(IssmDouble* values,int numnodes,int transformenum)=0;
76 virtual void TransformSolutionCoord(IssmDouble* values,int numnodes,int* transformenum_list)=0;
[16818]77 virtual void TransformStiffnessMatrixCoord(ElementMatrix* Ke,int transformenum)=0;
78 virtual void TransformStiffnessMatrixCoord(ElementMatrix* Ke,int* transformenum_list)=0;
79 virtual void TransformStiffnessMatrixCoord(ElementMatrix* Ke,int numnodes,int transformenum)=0;
80 virtual void TransformStiffnessMatrixCoord(ElementMatrix* Ke,int numnodes,int* transformenum_list)=0;
[16762]81 virtual Element* GetBasalElement(void)=0;
[16675]82 virtual void GetDofList(int** pdoflist,int approximation_enum,int setenum)=0;
83 virtual void GetDofListVelocity(int** pdoflist,int setenum)=0;
84 virtual void GetDofListPressure(int** pdoflist,int setenum)=0;
[16799]85 virtual void JacobianDeterminant(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss)=0;
[16838]86 virtual void JacobianDeterminantSurface(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss)=0;
[16803]87 virtual void JacobianDeterminantBase(IssmDouble* Jdet,IssmDouble* xyz_list_base,Gauss* gauss)=0;
[16827]88 virtual void JacobianDeterminantTop(IssmDouble* Jdet,IssmDouble* xyz_list_base,Gauss* gauss)=0;
[16675]89 virtual void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int solutionenum)=0;
[5719]90 virtual int GetNodeIndex(Node* node)=0;
[13886]91 virtual int GetNumberOfNodes(void)=0;
[16715]92 virtual int GetNumberOfNodesVelocity(void)=0;
93 virtual int GetNumberOfNodesPressure(void)=0;
[16727]94 virtual int GetNumberOfVertices(void)=0;
[13892]95 virtual void GetNodesSidList(int* sidlist)=0;
[16042]96 virtual void GetNodesLidList(int* sidlist)=0;
[13892]97
[7089]98 virtual int Sid()=0;
[10143]99 virtual bool IsFloating()=0;
[12471]100 virtual bool IsNodeOnShelfFromFlags(IssmDouble* flags)=0;
[5745]101 virtual bool IsOnBed()=0;
[16827]102 virtual bool IsOnSurface()=0;
[16693]103 virtual void GetInputListOnNodes(IssmDouble* pvalue,int enumtype)=0;
104 virtual void GetInputListOnNodes(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0;
[12471]105 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype)=0;
106 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0;
[16675]107 virtual Input* GetInput(int inputenum)=0;
[12471]108 virtual void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0;
[16675]109 virtual void GetInputValue(bool* pvalue,int enum_type)=0;
110 virtual void GetInputValue(int* pvalue,int enum_type)=0;
111 virtual void GetInputValue(IssmDouble* pvalue,int enum_type)=0;
[16698]112 virtual void GetVerticesCoordinates(IssmDouble** xyz_list)=0;
[16803]113 virtual void GetVerticesCoordinatesBase(IssmDouble** xyz_list)=0;
[16827]114 virtual void GetVerticesCoordinatesTop(IssmDouble** xyz_list)=0;
[16839]115 virtual IssmDouble GetZcoord(Gauss* gauss)=0;
[16188]116 virtual void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0;
[13623]117
[12471]118 virtual IssmDouble SurfaceArea(void)=0;
[4931]119 virtual void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum)=0;
[16693]120 virtual void InputChangeName(int enum_type,int enum_type_old)=0;
[13216]121 virtual void ComputeBasalStress(Vector<IssmDouble>* sigma_b)=0;
122 virtual void ComputeStrainRate(Vector<IssmDouble>* eps)=0;
[16461]123 virtual void ResultInterpolation(int* pinterpolation,int output_enum)=0;
[16589]124 virtual void ResultToVector(Vector<IssmDouble>* vector,int output_enum)=0;
[15613]125 virtual void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finite_element)=0;
[8967]126 virtual void InputDuplicate(int original_enum,int new_enum)=0;
[16208]127 virtual void InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code)=0;
[16715]128 virtual void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int inputenum)=0;
[16717]129 virtual void InputUpdateFromSolutionOneDof(IssmDouble* solution,int inputenum)=0;
[13623]130
[15130]131 virtual int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum)=0;
[16675]132 virtual int NumberofNodesVelocity(void)=0;
133 virtual int NumberofNodesPressure(void)=0;
134 virtual Gauss* NewGauss(void)=0;
[16799]135 virtual Gauss* NewGauss(int order)=0;
[16838]136 virtual Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order)=0;
[16839]137 virtual Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert)=0;
[16803]138 virtual Gauss* NewGaussBase(int order)=0;
[16827]139 virtual Gauss* NewGaussTop(int order)=0;
[16803]140 virtual ElementVector* NewElementVector(int approximation_enum=NoneApproximationEnum)=0;
[16818]141 virtual ElementMatrix* NewElementMatrix(int approximation_enum=NoneApproximationEnum)=0;
[12471]142 virtual void InputScale(int enum_type,IssmDouble scale_factor)=0;
[13216]143 virtual void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum)=0;
[12471]144 virtual IssmDouble TimeAdapt()=0;
145 virtual void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
[12748]146 virtual void Delta18oParameterization(void)=0;
[16721]147 virtual void SmbGradients(void)=0;
148 virtual Element* SpawnBasalElement(void)=0;
[16699]149 virtual IssmDouble TMeltingPoint(IssmDouble pressure)=0;
[16789]150 virtual void ReduceMatrices(ElementMatrix* Ke,ElementVector* pe)=0;
[10440]151 virtual void ResetCoordinateSystem()=0;
[16810]152 virtual IssmDouble StabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa)=0;
153 virtual void ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input)=0;
[16831]154 virtual void ViscosityFS(IssmDouble* pviscosity,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input)=0;
[16829]155 virtual void ViscosityHO(IssmDouble* pviscosity,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input)=0;
[16818]156 virtual void ViscositySSA(IssmDouble* pviscosity,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input)=0;
[16675]157 virtual int VelocityInterpolation()=0;
158 virtual int PressureInterpolation()=0;
[16833]159 virtual bool IsZeroLevelset(int levelset_enum)=0;
[16838]160 virtual void ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum)=0;
[9817]161
162 #ifdef _HAVE_RESPONSES_
[15387]163 virtual void AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part)=0;
[15130]164 virtual void MinVel(IssmDouble* pminvel)=0;
165 virtual void MaxVel(IssmDouble* pmaxvel)=0;
166 virtual void MinVx(IssmDouble* pminvx)=0;
167 virtual void MaxVx(IssmDouble* pmaxvx)=0;
168 virtual void MaxAbsVx(IssmDouble* pmaxabsvx)=0;
169 virtual void MinVy(IssmDouble* pminvy)=0;
170 virtual void MaxVy(IssmDouble* pmaxvy)=0;
171 virtual void MaxAbsVy(IssmDouble* pmaxabsvy)=0;
172 virtual void MinVz(IssmDouble* pminvz)=0;
173 virtual void MaxVz(IssmDouble* pmaxvz)=0;
174 virtual void MaxAbsVz(IssmDouble* pmaxabsvz)=0;
175 virtual IssmDouble MassFlux(IssmDouble* segment)=0;
[16388]176 virtual IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id)=0;
[15129]177 virtual void ElementResponse(IssmDouble* presponse,int response_enum)=0;
[12471]178 virtual IssmDouble IceVolume(void)=0;
[16275]179 virtual IssmDouble IceVolumeAboveFloatation(void)=0;
[12773]180 virtual IssmDouble TotalSmb(void)=0;
[16787]181 virtual IssmDouble Misfit(int modelenum,int observationenum,int weightsenum)=0;
[9817]182 #endif
[4055]183
[14589]184 #ifdef _HAVE_GIA_
[14807]185 virtual void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y)=0;
[14589]186 #endif
187
[9817]188 #ifdef _HAVE_CONTROL_
[13216]189 virtual void Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index)=0;
[16314]190 virtual IssmDouble ThicknessAbsMisfit(void)=0;
191 virtual IssmDouble SurfaceAbsVelMisfit(void)=0;
192 virtual IssmDouble SurfaceRelVelMisfit(void)=0;
193 virtual IssmDouble SurfaceLogVelMisfit(void)=0;
194 virtual IssmDouble SurfaceLogVxVyMisfit(void)=0;
195 virtual IssmDouble SurfaceAverageVelMisfit(void)=0;
196 virtual IssmDouble ThicknessAbsGradient(void)=0;
197 virtual IssmDouble ThicknessAlongGradient(void)=0;
198 virtual IssmDouble ThicknessAcrossGradient(void)=0;
199 virtual IssmDouble BalancethicknessMisfit(void)=0;
200 virtual IssmDouble RheologyBbarAbsGradient(void)=0;
201 virtual IssmDouble DragCoefficientAbsGradient(void)=0;
[13216]202 virtual void ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index)=0;
[12471]203 virtual void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index)=0;
204 virtual void ControlInputScaleGradient(int enum_type, IssmDouble scale)=0;
[16494]205 virtual void ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum)=0;
[13216]206 virtual void GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data)=0;
[12471]207 virtual void SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index)=0;
208 virtual void InputControlUpdate(IssmDouble scalar,bool save_parameter)=0;
[9817]209 #endif
[14796]210
[16442]211 virtual void UpdateConstraintsExtrudeFromBase(void)=0;
212 virtual void UpdateConstraintsExtrudeFromTop(void)=0;
213
[15853]214 #ifdef _HAVE_THERMAL_
[16272]215 virtual void UpdateBasalConstraintsEnthalpy(void)=0;
[16026]216 virtual void ComputeBasalMeltingrate(void)=0;
[16816]217 virtual void DrainWaterfraction(IssmDouble* drainrate_element)=0;
[15853]218 #endif
219
[14796]220 #ifdef _HAVE_HYDROLOGY_
[14967]221 virtual void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode)=0;
[16761]222 virtual void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, int index)=0;
[15015]223 virtual void GetHydrologyTransfer(Vector<IssmDouble>* transfer)=0;
[15249]224 virtual void HydrologyEPLGetMask(Vector<IssmDouble>* mask)=0;
225 virtual void HydrologyEPLGetActive(Vector<IssmDouble>* active)=0;
[16600]226 virtual void ComputeEPLThickness(void)=0;
[14796]227 #endif
[15643]228
[15386]229 #ifdef _HAVE_GROUNDINGLINE_
[15962]230 virtual void MigrateGroundingLine(IssmDouble* sheet_ungrounding)=0;
[15386]231 virtual void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding)=0;
232 virtual int UpdatePotentialUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0;
233 #endif
234
[3683]235};
236#endif
Note: See TracBrowser for help on using the repository browser.