source: issm/trunk-jpl/src/c/classes/objects/Node.h@ 12821

Last change on this file since 12821 was 12821, checked in by Eric.Larour, 13 years ago

Started migration from objects to classes

File size: 3.7 KB
Line 
1/*!\file Node.h
2 * \brief: header file for node object
3 */
4
5#ifndef _NODE_H_
6#define _NODE_H_
7
8/*Headers:*/
9/*{{{*/
10#include "./Object.h"
11#include "../shared/shared.h"
12class Inputs;
13class Hook;
14class DofIndexing;
15class IoModel;
16class DataSet;
17class Vertices;
18class Vector;
19class Matrix;
20#include "./Update.h"
21/*}}}*/
22
23class Node: public Object ,public Update{
24
25 public:
26
27 int id; //unique arbitrary id.
28 int sid; //sid for "serial" id, ie the rank of this node in the nodes dataset, if the dataset was serial on 1 cpu.
29
30 DofIndexing indexing;
31 Hook* hvertex;
32 Inputs* inputs; //properties of this node
33 int analysis_type;
34 IssmDouble coord_system[3][3];
35
36 /*Node constructors, destructors {{{*/
37 Node();
38 Node(int node_id,int node_sid, int vertex_id,int io_index, IoModel* iomodel,int analysis_type);
39 ~Node();
40 /*}}}*/
41 /*Object virtual functions definitions:{{{ */
42 void Echo();
43 void DeepEcho();
44 int Id();
45 int MyRank();
46 int ObjectEnum();
47 Object* copy(){_error2_("Not implemented yet (similar to Elements)");};
48 /*}}}*/
49 /*Update virtual functions definitions: {{{*/
50
51 void InputUpdateFromVector(IssmDouble* vector, int name, int type);
52 void InputUpdateFromVector(int* vector, int name, int type);
53 void InputUpdateFromVector(bool* vector, int name, int type);
54 void InputUpdateFromMatrixDakota(IssmDouble* matrix,int nrows, int ncols, int name, int type);
55 void InputUpdateFromVectorDakota(IssmDouble* vector, int name, int type);
56 void InputUpdateFromVectorDakota(int* vector, int name, int type);
57 void InputUpdateFromVectorDakota(bool* vector, int name, int type);
58 void InputUpdateFromConstant(IssmDouble constant, int name);
59 void InputUpdateFromConstant(int constant, int name);
60 void InputUpdateFromConstant(bool constant, int name);
61 void InputUpdateFromSolution(IssmDouble* solution){_error2_("Not implemented yet!");}
62 void InputUpdateFromIoModel(int index, IoModel* iomodel){_error2_("Not implemented yet!");}
63 /*}}}*/
64 /*Node numerical routines {{{*/
65 void Configure(DataSet* nodes,Vertices* vertices);
66 void CreateNodalConstraints(Vector* ys);
67 void SetCurrentConfiguration(DataSet* nodes,Vertices* vertices);
68 int Sid(void);
69 int GetVertexDof(void);
70 int GetVertexId(void);
71#ifdef _HAVE_DIAGNOSTIC_
72 void GetCoordinateSystem(IssmDouble* coord_system_out);
73#endif
74 void SetVertexDof(int in_dof);
75 bool InAnalysis(int analysis_type);
76 int GetApproximation();
77 int GetNumberOfDofs(int approximation_enum,int setenum);
78 int IsClone();
79 void ApplyConstraint(int dof,IssmDouble value);
80 void RelaxConstraint(int dof);
81 void DofInSSet(int dof);
82 void DofInFSet(int dof);
83 int GetDof(int dofindex,int setenum);
84 void CreateVecSets(Vector* pv_g,Vector* pv_f,Vector* pv_s);
85 int GetConnectivity();
86 void GetDofList(int* poutdoflist,int approximation_enum,int setenum);
87 void GetLocalDofList(int* poutdoflist,int approximation_enum,int setenum);
88 int GetDofList1(void);
89 int GetSidList(void);
90 IssmDouble GetX();
91 IssmDouble GetY();
92 IssmDouble GetZ();
93 IssmDouble GetSigma();
94 int IsOnBed();
95 int IsOnSurface();
96 void FreezeDof(int dof);
97 int IsFloating();
98 int IsGrounded();
99 void UpdateSpcs(IssmDouble* ys);
100 void VecMerge(Vector* ug, IssmDouble* vector_serial,int setenum);
101 void VecReduce(Vector* vector, IssmDouble* ug_serial,int setnum);
102
103 /*}}}*/
104 /*Dof Object routines {{{*/
105 void DistributeDofs(int* pdofcount,int setenum);
106 void OffsetDofs(int dofcount,int setenum);
107 void ShowTrueDofs(int* truerows,int ncols,int setenum);
108 void UpdateCloneDofs(int* alltruerows,int ncols,int setenum);
109 void SetClone(int* minranks);
110 /*}}}*/
111};
112
113#endif /* _NODE_H_ */
Note: See TracBrowser for help on using the repository browser.