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

Last change on this file since 13414 was 13414, checked in by Mathieu Morlighem, 12 years ago

CHG: clean-up removed MyRank which is not used anymore, and removed IssmBool

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