[3683] | 1 | /*! \file Tria.h
|
---|
| 2 | * \brief: header file for tria object
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 | #ifndef _TRIA_H_
|
---|
| 6 | #define _TRIA_H_
|
---|
| 7 |
|
---|
| 8 | /*Headers:*/
|
---|
[12365] | 9 | /*{{{*/
|
---|
[3683] | 10 | #include "./Element.h"
|
---|
[15372] | 11 | #include "./ElementHook.h"
|
---|
[3828] | 12 | #include "./TriaRef.h"
|
---|
[3683] | 13 | class Parameters;
|
---|
| 14 | class Inputs;
|
---|
| 15 | class IoModel;
|
---|
[15049] | 16 | class Results;
|
---|
[3791] | 17 | class Node;
|
---|
[13129] | 18 | class Material;
|
---|
[3791] | 19 | class Matpar;
|
---|
[16560] | 20 | class Seg;
|
---|
[5772] | 21 | class ElementMatrix;
|
---|
| 22 | class ElementVector;
|
---|
[14996] | 23 | class Vertex;
|
---|
[17806] | 24 | class GaussTria;
|
---|
[3683] | 25 |
|
---|
[15012] | 26 | #include "../../shared/Exceptions/exceptions.h"
|
---|
| 27 | #include "../../shared/Enum/Enum.h"
|
---|
[3683] | 28 | /*}}}*/
|
---|
| 29 |
|
---|
[15372] | 30 | class Tria: public Element,public ElementHook,public TriaRef{
|
---|
[3683] | 31 |
|
---|
| 32 | public:
|
---|
| 33 |
|
---|
[12365] | 34 | /*Tria constructors, destructors {{{*/
|
---|
[17806] | 35 | Tria(){};
|
---|
[7089] | 36 | Tria(int tria_id,int tria_sid,int i, IoModel* iomodel,int nummodels);
|
---|
[3683] | 37 | ~Tria();
|
---|
| 38 | /*}}}*/
|
---|
[12365] | 39 | /*Object virtual functions definitions:{{{ */
|
---|
[13414] | 40 | int ObjectEnum();
|
---|
| 41 | Object *copy();
|
---|
[4248] | 42 | /*}}}*/
|
---|
[12365] | 43 | /*Update virtual functions resolution: {{{*/
|
---|
[9761] | 44 | #ifdef _HAVE_DAKOTA_
|
---|
[19105] | 45 | void InputUpdateFromMatrixDakota(IssmDouble* matrix, int nows, int ncols, int name, int type);
|
---|
[12471] | 46 | void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
|
---|
[9761] | 47 | #endif
|
---|
[6216] | 48 | void InputUpdateFromIoModel(int index, IoModel* iomodel);
|
---|
[19105] | 49 | void InputUpdateFromVector(IssmDouble* vector, int name, int type);
|
---|
[4244] | 50 | /*}}}*/
|
---|
[12365] | 51 | /*Element virtual functions definitions: {{{*/
|
---|
[19105] | 52 | void AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part);
|
---|
| 53 | void CalvingRateLevermann();
|
---|
| 54 | void CalvingRatePi();
|
---|
| 55 | void CalvingRateDev();
|
---|
[17806] | 56 | IssmDouble CharacteristicLength(void);
|
---|
[16137] | 57 | void ComputeBasalStress(Vector<IssmDouble>* sigma_b);
|
---|
[19105] | 58 | void ComputeDeviatoricStressTensor();
|
---|
[17806] | 59 | void ComputeSigmaNN();
|
---|
[16137] | 60 | void ComputeStressTensor();
|
---|
[17806] | 61 | void ComputeSurfaceNormalVelocity();
|
---|
[16137] | 62 | void Configure(Elements* elements,Loads* loads,Nodes* nodesin,Vertices* verticesin,Materials* materials,Parameters* parameters);
|
---|
[19105] | 63 | void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index);
|
---|
| 64 | void ControlToVectors(Vector<IssmPDouble>* vector_control, Vector<IssmPDouble>* vector_gradient,int control_enum);
|
---|
[16137] | 65 | void Delta18oParameterization(void);
|
---|
[19105] | 66 | void MungsmtpParameterization(void);
|
---|
| 67 | int EdgeOnBaseIndex();
|
---|
| 68 | void EdgeOnBaseIndices(int* pindex1,int* pindex);
|
---|
| 69 | int EdgeOnSurfaceIndex();
|
---|
| 70 | void EdgeOnSurfaceIndices(int* pindex1,int* pindex);
|
---|
| 71 | void ElementResponse(IssmDouble* presponse,int response_enum);
|
---|
[17806] | 72 | void ElementSizes(IssmDouble* hx,IssmDouble* hy,IssmDouble* hz);
|
---|
[19105] | 73 | int FiniteElement(void);
|
---|
[17806] | 74 | void FSContactMigration(Vector<IssmDouble>* vertexgrounded,Vector<IssmDouble>* vertexfloating);
|
---|
| 75 | Element* GetBasalElement(void){_error_("not implemented yet");};
|
---|
[19105] | 76 | void GetLevelsetPositivePart(int* point1,IssmDouble* fraction1,IssmDouble* fraction2, bool* mainlynegative,IssmDouble* levelsetvalues);
|
---|
[17806] | 77 | void GetGroundedPart(int* point1,IssmDouble* fraction1, IssmDouble* fraction2,bool* mainlyfloating);
|
---|
| 78 | IssmDouble GetGroundedPortion(IssmDouble* xyz_list);
|
---|
[19105] | 79 | void GetIcefrontCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum);
|
---|
| 80 | void GetLevelCoordinates(IssmDouble** pxyz_front,IssmDouble* xyz_list,int levelsetenum,IssmDouble level);
|
---|
[16137] | 81 | int GetNodeIndex(Node* node);
|
---|
| 82 | int GetNumberOfNodes(void);
|
---|
[18301] | 83 | int GetNumberOfNodes(int enum_type);
|
---|
[17806] | 84 | int GetNumberOfVertices(void);
|
---|
| 85 | void GetSolutionFromInputsOneDof(Vector<IssmDouble>* solution,int enum_type);
|
---|
[19105] | 86 | Element* GetUpperElement(void){_error_("not implemented yet");};
|
---|
| 87 | void GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data,bool onsid);
|
---|
[17806] | 88 | void GetVerticesCoordinatesBase(IssmDouble** pxyz_list);
|
---|
| 89 | void GetVerticesCoordinatesTop(IssmDouble** pxyz_list);
|
---|
[19105] | 90 | bool HasEdgeOnBase();
|
---|
| 91 | bool HasEdgeOnSurface();
|
---|
| 92 | IssmDouble IceMass(void);
|
---|
| 93 | IssmDouble IceVolume(void);
|
---|
| 94 | IssmDouble IceVolumeAboveFloatation(void);
|
---|
| 95 | void InputControlUpdate(IssmDouble scalar,bool save_parameter);
|
---|
[17806] | 96 | void InputDepthAverageAtBase(int enum_type,int average_enum_type);
|
---|
[19105] | 97 | void InputExtrude(int enum_type,int start){_error_("not implemented"); /*For penta only*/};
|
---|
[16137] | 98 | void InputScale(int enum_type,IssmDouble scale_factor);
|
---|
[19105] | 99 | bool IsFaceOnBoundary(void);
|
---|
| 100 | bool IsIcefront(void);
|
---|
| 101 | bool IsNodeOnShelfFromFlags(IssmDouble* flags);
|
---|
| 102 | bool IsOnBase();
|
---|
| 103 | bool IsOnSurface();
|
---|
| 104 | bool IsZeroLevelset(int levelset_enum);
|
---|
| 105 | IssmDouble Masscon(IssmDouble* levelset);
|
---|
| 106 | IssmDouble MassFlux(IssmDouble* segment);
|
---|
| 107 | IssmDouble MassFlux(IssmDouble x1,IssmDouble y1, IssmDouble x2, IssmDouble y2,int segment_id);
|
---|
[16137] | 108 | void MaterialUpdateFromTemperature(void){_error_("not implemented yet");};
|
---|
[19105] | 109 | IssmDouble Misfit(int modelenum,int observationenum,int weightsenum);
|
---|
| 110 | IssmDouble MisfitArea(int weightsenum);
|
---|
[16137] | 111 | int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum);
|
---|
[19105] | 112 | int NumberofNodesPressure(void);
|
---|
| 113 | int NumberofNodesVelocity(void);
|
---|
| 114 | void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm,bool ismungsm);
|
---|
| 115 | void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding);
|
---|
| 116 | int PressureInterpolation();
|
---|
[17806] | 117 | void ReduceMatrices(ElementMatrix* Ke,ElementVector* pe);
|
---|
| 118 | void ResetFSBasalBoundaryCondition(void);
|
---|
[19105] | 119 | void ResetHooks();
|
---|
| 120 | void SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index);
|
---|
| 121 | void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters);
|
---|
[17806] | 122 | Element* SpawnBasalElement(void);
|
---|
| 123 | Element* SpawnTopElement(void);
|
---|
[19105] | 124 | void StrainRateparallel();
|
---|
| 125 | void StrainRateperpendicular();
|
---|
| 126 | void StressIntensityFactor(void){_error_("not implemented yet");};
|
---|
| 127 | IssmDouble SurfaceArea(void);
|
---|
[17989] | 128 | int TensorInterpolation();
|
---|
[19105] | 129 | IssmDouble TimeAdapt();
|
---|
| 130 | IssmDouble TotalSmb(void);
|
---|
[16137] | 131 | void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finitelement);
|
---|
[19105] | 132 | int UpdatePotentialUngrounding(IssmDouble* vertices_potentially_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf);
|
---|
| 133 | void ValueP1DerivativesOnGauss(IssmDouble* dvalue,IssmDouble* values,IssmDouble* xyz_list,Gauss* gauss);
|
---|
[18301] | 134 | void ValueP1OnGauss(IssmDouble* pvalue,IssmDouble* values,Gauss* gauss);
|
---|
[19105] | 135 | int VelocityInterpolation();
|
---|
[17806] | 136 | int VertexConnectivity(int vertexindex);
|
---|
[18301] | 137 | void VerticalSegmentIndices(int** pindices,int* pnumseg){_error_("not implemented yet");};
|
---|
[17806] | 138 | void ZeroLevelsetCoordinates(IssmDouble** pxyz_zero,IssmDouble* xyz_list,int levelsetenum);
|
---|
[9817] | 139 |
|
---|
[14589] | 140 | #ifdef _HAVE_GIA_
|
---|
[14807] | 141 | void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y);
|
---|
[14589] | 142 | #endif
|
---|
[3821] | 143 | /*}}}*/
|
---|
[12365] | 144 | /*Tria specific routines:{{{*/
|
---|
[17806] | 145 | void AddBasalInput(int input_enum, IssmDouble* values, int interpolation_enum);
|
---|
| 146 | void AddInput(int input_enum, IssmDouble* values, int interpolation_enum);
|
---|
[14796] | 147 | IssmDouble GetArea(void);
|
---|
[19105] | 148 | IssmDouble GetAreaIce(void);
|
---|
[17806] | 149 | void GetAreaCoordinates(IssmDouble *area_coordinates,IssmDouble* xyz_zero,IssmDouble* xyz_list,int numpoints);
|
---|
[19105] | 150 | void GetLevelsetIntersection(int** pindices, int* pnumiceverts, IssmDouble* fraction, int levelset_enum, IssmDouble level);
|
---|
[9775] | 151 | int GetElementType(void);
|
---|
[12471] | 152 | void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype);
|
---|
[16560] | 153 | void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype);
|
---|
[17806] | 154 | Node* GetNode(int node_number);
|
---|
[12471] | 155 | void InputUpdateFromSolutionOneDof(IssmDouble* solution,int enum_type);
|
---|
[17806] | 156 | void InputUpdateFromSolutionOneDofCollapsed(IssmDouble* solution,int enum_type){_error_("not implemented yet");};
|
---|
| 157 | void JacobianDeterminant(IssmDouble* pJdet, IssmDouble* xyz_list,Gauss* gauss);
|
---|
[19105] | 158 | void JacobianDeterminantBase(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss);
|
---|
[17806] | 159 | void JacobianDeterminantLine(IssmDouble* Jdet, IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
|
---|
| 160 | void JacobianDeterminantSurface(IssmDouble* pJdet, IssmDouble* xyz_list,Gauss* gauss);
|
---|
| 161 | void JacobianDeterminantTop(IssmDouble* pJdet,IssmDouble* xyz_list_base,Gauss* gauss);
|
---|
| 162 | IssmDouble MinEdgeLength(IssmDouble* xyz_list){_error_("not implemented yet");};
|
---|
| 163 | Gauss* NewGauss(void);
|
---|
| 164 | Gauss* NewGauss(int order);
|
---|
| 165 | Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order);
|
---|
| 166 | Gauss* NewGauss(int point1,IssmDouble fraction1,IssmDouble fraction2,bool mainlyfloating,int order);
|
---|
| 167 | Gauss* NewGauss(IssmDouble* xyz_list, IssmDouble* xyz_list_front,int order_horiz,int order_vert);
|
---|
| 168 | Gauss* NewGaussBase(int order);
|
---|
| 169 | Gauss* NewGaussLine(int vertex1,int vertex2,int order){_error_("not implemented yet");};
|
---|
| 170 | Gauss* NewGaussTop(int order);
|
---|
| 171 | void NodalFunctions(IssmDouble* basis,Gauss* gauss);
|
---|
| 172 | void NodalFunctionsDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
|
---|
[19105] | 173 | void NodalFunctionsDerivativesVelocity(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
|
---|
[17806] | 174 | void NodalFunctionsMINIDerivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss){_error_("not implemented yet");};
|
---|
| 175 | void NodalFunctionsPressure(IssmDouble* basis,Gauss* gauss);
|
---|
[19105] | 176 | void NodalFunctionsP1(IssmDouble* basis,Gauss* gauss);
|
---|
| 177 | void NodalFunctionsP1Derivatives(IssmDouble* dbasis,IssmDouble* xyz_list,Gauss* gauss);
|
---|
| 178 | void NodalFunctionsP2(IssmDouble* basis,Gauss* gauss);
|
---|
[17806] | 179 | void NodalFunctionsTensor(IssmDouble* basis,Gauss* gauss);
|
---|
[19105] | 180 | void NodalFunctionsVelocity(IssmDouble* basis,Gauss* gauss);
|
---|
| 181 | void NormalBase(IssmDouble* normal,IssmDouble* xyz_list);
|
---|
| 182 | void NormalSection(IssmDouble* normal,IssmDouble* xyz_list);
|
---|
| 183 | void NormalTop(IssmDouble* normal,IssmDouble* xyz_list);
|
---|
[10367] | 184 | void SetClone(int* minranks);
|
---|
[17806] | 185 | void SetTemporaryElementType(int element_type_in){_error_("not implemented yet");};
|
---|
[16560] | 186 | Seg* SpawnSeg(int index1,int index2);
|
---|
[17806] | 187 | IssmDouble StabilizationParameter(IssmDouble u, IssmDouble v, IssmDouble w, IssmDouble diameter, IssmDouble kappa){_error_("not implemented yet");};
|
---|
[19105] | 188 | void UpdateConstraintsExtrudeFromBase(void);
|
---|
| 189 | void UpdateConstraintsExtrudeFromTop(void);
|
---|
[17806] | 190 | void ViscousHeating(IssmDouble* pphi,IssmDouble* xyz_list,Gauss* gauss,Input* vx_input,Input* vy_input,Input* vz_input){_error_("not implemented yet");};
|
---|
[4249] | 191 | /*}}}*/
|
---|
[3683] | 192 |
|
---|
| 193 | };
|
---|
| 194 | #endif /* _TRIA_H */
|
---|