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

Last change on this file since 16275 was 16275, checked in by seroussi, 11 years ago

NEW: added VolumeAboveFloatation calculation

File size: 7.1 KB
Line 
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:*/
11/*{{{*/
12#include "../../datastructures/datastructures.h"
13#include "../Update.h"
14
15class DataSet;
16class Parameters;
17class Patch;
18class Elements;
19class Loads;
20class Node;
21class Nodes;
22class Vertices;
23class Materials;
24template <class doublematrix> class Matrix;
25template <class doubletype> class Vector;
26
27#include "../../toolkits/toolkits.h"
28/*}}}*/
29
30class Element: public Object,public Update{
31
32 public:
33
34 virtual ~Element(){};
35
36 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
37 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Materials* materials,Parameters* parameters)=0;
38 virtual void SetwiseNodeConnectivity(int* d_nz,int* o_nz,Node* node,bool* flags,int* flagsindices,int set1_enum,int set2_enum)=0;
39 virtual void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs)=0;
40 virtual void CreateDVector(Vector<IssmDouble>* df)=0;
41 virtual void CreatePVector(Vector<IssmDouble>* pf)=0;
42 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0;
43 virtual void GetSolutionFromInputs(Vector<IssmDouble>* solution)=0;
44 virtual int GetNodeIndex(Node* node)=0;
45 virtual int GetNumberOfNodes(void)=0;
46 virtual void GetNodesSidList(int* sidlist)=0;
47 virtual void GetNodesLidList(int* sidlist)=0;
48
49 virtual int Sid()=0;
50 virtual bool IsFloating()=0;
51 virtual bool IsNodeOnShelfFromFlags(IssmDouble* flags)=0;
52 virtual bool IsOnBed()=0;
53 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype)=0;
54 virtual void GetInputListOnVertices(IssmDouble* pvalue,int enumtype,IssmDouble defaultvalue)=0;
55 virtual void GetInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0;
56 virtual void GetMaterialInputValue(IssmDouble* pvalue,Node* node,int enumtype)=0;
57
58 virtual IssmDouble SurfaceArea(void)=0;
59 virtual void InputDepthAverageAtBase(int enum_type,int average_enum_type,int object_enum)=0;
60 virtual void ComputeBasalStress(Vector<IssmDouble>* sigma_b)=0;
61 virtual void ComputeStrainRate(Vector<IssmDouble>* eps)=0;
62 virtual void PatchSize(int* pnumrows, int* pnumvertices,int* pnumnodes)=0;
63 virtual void PatchFill(int* pcount, Patch* patch)=0;
64 virtual void ListResultsInfo(int** results_enums,int** results_size,IssmDouble** results_times,int** results_steps,int* num_results)=0;
65 virtual void DeleteResults(void)=0;
66 virtual void Update(int index, IoModel* iomodel,int analysis_counter,int analysis_type,int finite_element)=0;
67 virtual void InputToResult(int enum_type,int step,IssmDouble time)=0;
68 virtual void InputDuplicate(int original_enum,int new_enum)=0;
69 virtual void InputCreate(IssmDouble* vector,IoModel* iomodel,int M,int N,int vector_type,int vector_enum,int code)=0;
70 virtual void RequestedOutput(int output_enum,int step,IssmDouble time)=0;
71
72 virtual int NodalValue(IssmDouble* pvalue, int index, int natureofdataenum)=0;
73 virtual void InputScale(int enum_type,IssmDouble scale_factor)=0;
74 virtual void GetVectorFromInputs(Vector<IssmDouble>* vector, int name_enum)=0;
75 virtual void GetVectorFromResults(Vector<IssmDouble>* vector,int id,int enum_in,int interp)=0;
76 virtual IssmDouble TimeAdapt()=0;
77 virtual void PositiveDegreeDay(IssmDouble* pdds,IssmDouble* pds,IssmDouble signorm)=0;
78 virtual void Delta18oParameterization(void)=0;
79 virtual void SmbGradients()=0;
80 virtual void ResetCoordinateSystem()=0;
81
82 #ifdef _HAVE_RESPONSES_
83 virtual void AverageOntoPartition(Vector<IssmDouble>* partition_contributions,Vector<IssmDouble>* partition_areas,IssmDouble* vertex_response,IssmDouble* qmu_part)=0;
84 virtual void MinVel(IssmDouble* pminvel)=0;
85 virtual void MaxVel(IssmDouble* pmaxvel)=0;
86 virtual void MinVx(IssmDouble* pminvx)=0;
87 virtual void MaxVx(IssmDouble* pmaxvx)=0;
88 virtual void MaxAbsVx(IssmDouble* pmaxabsvx)=0;
89 virtual void MinVy(IssmDouble* pminvy)=0;
90 virtual void MaxVy(IssmDouble* pmaxvy)=0;
91 virtual void MaxAbsVy(IssmDouble* pmaxabsvy)=0;
92 virtual void MinVz(IssmDouble* pminvz)=0;
93 virtual void MaxVz(IssmDouble* pmaxvz)=0;
94 virtual void MaxAbsVz(IssmDouble* pmaxabsvz)=0;
95 virtual IssmDouble MassFlux(IssmDouble* segment)=0;
96 virtual void ElementResponse(IssmDouble* presponse,int response_enum)=0;
97 virtual IssmDouble IceVolume(void)=0;
98 virtual IssmDouble IceVolumeAboveFloatation(void)=0;
99 virtual IssmDouble TotalSmb(void)=0;
100 #endif
101
102 #ifdef _HAVE_GIA_
103 virtual void GiaDeflection(Vector<IssmDouble>* wg,Vector<IssmDouble>* dwgdt,IssmDouble* x,IssmDouble* y)=0;
104 #endif
105
106 #ifdef _HAVE_CONTROL_
107 virtual void Gradj(Vector<IssmDouble>* gradient,int control_type,int control_index)=0;
108 virtual IssmDouble ThicknessAbsMisfit(int weight_index)=0;
109 virtual IssmDouble SurfaceAbsVelMisfit(int weight_index)=0;
110 virtual IssmDouble SurfaceRelVelMisfit(int weight_index)=0;
111 virtual IssmDouble SurfaceLogVelMisfit(int weight_index)=0;
112 virtual IssmDouble SurfaceLogVxVyMisfit(int weight_index)=0;
113 virtual IssmDouble SurfaceAverageVelMisfit(int weight_index)=0;
114 virtual IssmDouble ThicknessAbsGradient(int weight_index)=0;
115 virtual IssmDouble ThicknessAlongGradient(int weight_index)=0;
116 virtual IssmDouble ThicknessAcrossGradient(int weight_index)=0;
117 virtual IssmDouble BalancethicknessMisfit(int weight_index)=0;
118 virtual IssmDouble RheologyBbarAbsGradient(int weight_index)=0;
119 virtual IssmDouble DragCoefficientAbsGradient(int weight_index)=0;
120 virtual void ControlInputGetGradient(Vector<IssmDouble>* gradient,int enum_type,int control_index)=0;
121 virtual void ControlInputSetGradient(IssmDouble* gradient,int enum_type,int control_index)=0;
122 virtual void ControlInputScaleGradient(int enum_type, IssmDouble scale)=0;
123 virtual void GetVectorFromControlInputs(Vector<IssmDouble>* gradient,int control_enum,int control_index,const char* data)=0;
124 virtual void SetControlInputsFromVector(IssmDouble* vector,int control_enum,int control_index)=0;
125 virtual void InputControlUpdate(IssmDouble scalar,bool save_parameter)=0;
126 #endif
127
128 #ifdef _HAVE_THERMAL_
129 virtual void UpdateBasalConstraintsEnthalpy(void)=0;
130 virtual void ComputeBasalMeltingrate(void)=0;
131 virtual void DrainWaterfraction(void)=0;
132 #endif
133
134 #ifdef _HAVE_HYDROLOGY_
135 virtual void GetHydrologyDCInefficientHmax(IssmDouble* ph_max, Node* innode)=0;
136 virtual void GetHydrologyTransfer(Vector<IssmDouble>* transfer)=0;
137 virtual void HydrologyEPLGetMask(Vector<IssmDouble>* mask)=0;
138 virtual void HydrologyEPLGetActive(Vector<IssmDouble>* active)=0;
139 #endif
140
141 #ifdef _HAVE_GROUNDINGLINE_
142 virtual void MigrateGroundingLine(IssmDouble* sheet_ungrounding)=0;
143 virtual void PotentialUngrounding(Vector<IssmDouble>* potential_sheet_ungrounding)=0;
144 virtual int UpdatePotentialUngrounding(IssmDouble* potential_sheet_ungrounding,Vector<IssmDouble>* vec_nodes_on_iceshelf,IssmDouble* nodes_on_iceshelf)=0;
145 #endif
146
147};
148#endif
Note: See TracBrowser for help on using the repository browser.