| 1 | /*!\file Riftfront.h
|
|---|
| 2 | * \brief: header file for riftfront object
|
|---|
| 3 | */
|
|---|
| 4 |
|
|---|
| 5 | #ifndef _RIFTFRONT_H_
|
|---|
| 6 | #define _RIFTFRONT_H_
|
|---|
| 7 |
|
|---|
| 8 | /*Headers:*/
|
|---|
| 9 | /*{{{1*/
|
|---|
| 10 | #include "./Load.h"
|
|---|
| 11 | class Hook;
|
|---|
| 12 | class Parameters;
|
|---|
| 13 | class Inputs;
|
|---|
| 14 | class IoModel;
|
|---|
| 15 | /*}}}*/
|
|---|
| 16 |
|
|---|
| 17 | class Riftfront: public Load {
|
|---|
| 18 |
|
|---|
| 19 | public:
|
|---|
| 20 | int id;
|
|---|
| 21 | int analysis_type;
|
|---|
| 22 |
|
|---|
| 23 | /*hooks: */
|
|---|
| 24 | Hook* hnodes;
|
|---|
| 25 | Hook* helements;
|
|---|
| 26 | Hook* hmatpar;
|
|---|
| 27 |
|
|---|
| 28 | /*Corresponding fields*/
|
|---|
| 29 | Matpar *matpar;
|
|---|
| 30 | Node **nodes;
|
|---|
| 31 | Element **elements;
|
|---|
| 32 |
|
|---|
| 33 | /*computational: */
|
|---|
| 34 | int penalty_lock;
|
|---|
| 35 | bool active;
|
|---|
| 36 | bool frozen;
|
|---|
| 37 | int counter;
|
|---|
| 38 | bool prestable;
|
|---|
| 39 | bool material_converged;
|
|---|
| 40 | double normal[2];
|
|---|
| 41 | double length;
|
|---|
| 42 | double fraction;
|
|---|
| 43 | int state;
|
|---|
| 44 |
|
|---|
| 45 | Parameters* parameters; //pointer to solution parameters
|
|---|
| 46 | Inputs* inputs;
|
|---|
| 47 |
|
|---|
| 48 |
|
|---|
| 49 | /*Riftfrontconstructors,destructors: {{{1*/
|
|---|
| 50 | Riftfront();
|
|---|
| 51 | Riftfront(int riftfront_id,int i, IoModel* iomodel,int analysis_type);
|
|---|
| 52 | ~Riftfront();
|
|---|
| 53 | /*}}}*/
|
|---|
| 54 | /*Object virtual functions definitions:{{{1 */
|
|---|
| 55 | void Echo();
|
|---|
| 56 | void DeepEcho();
|
|---|
| 57 | int Id();
|
|---|
| 58 | int MyRank();
|
|---|
| 59 | #ifdef _SERIAL_
|
|---|
| 60 | void Marshall(char** pmarshalled_dataset);
|
|---|
| 61 | int MarshallSize();
|
|---|
| 62 | void Demarshall(char** pmarshalled_dataset);
|
|---|
| 63 | #endif
|
|---|
| 64 | int ObjectEnum();
|
|---|
| 65 | Object* copy();
|
|---|
| 66 | /*}}}*/
|
|---|
| 67 | /*Update virtual functions resolution: {{{1*/
|
|---|
| 68 | void InputUpdateFromVector(double* vector, int name, int type);
|
|---|
| 69 | void InputUpdateFromVector(int* vector, int name, int type){_error_("Not implemented yet!");}
|
|---|
| 70 | void InputUpdateFromVector(bool* vector, int name, int type){_error_("Not implemented yet!");}
|
|---|
| 71 | void InputUpdateFromMatrixDakota(double* matrix, int nrows,int ncols, int name, int type){_error_("Not implemented yet!");}
|
|---|
| 72 | void InputUpdateFromVectorDakota(double* vector, int name, int type){_error_("Not implemented yet!");}
|
|---|
| 73 | void InputUpdateFromVectorDakota(int* vector, int name, int type){_error_("Not implemented yet!");}
|
|---|
| 74 | void InputUpdateFromVectorDakota(bool* vector, int name, int type){_error_("Not implemented yet!");}
|
|---|
| 75 | void InputUpdateFromConstant(double constant, int name);
|
|---|
| 76 | void InputUpdateFromConstant(int constant, int name){_error_("Not implemented yet!");}
|
|---|
| 77 | void InputUpdateFromConstant(bool constant, int name);
|
|---|
| 78 | void InputUpdateFromSolution(double* solution){_error_("Not implemented yet!");}
|
|---|
| 79 | void InputUpdateFromIoModel(int index, IoModel* iomodel){_error_("not implemented yet");};
|
|---|
| 80 | /*}}}*/
|
|---|
| 81 | /*Load virtual functions definitions: {{{1*/
|
|---|
| 82 | void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
|
|---|
| 83 | void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters);
|
|---|
| 84 | void CreateKMatrix(Matrix* Kff, Matrix* Kfs);
|
|---|
| 85 | void CreatePVector(Vector* pf);
|
|---|
| 86 | void CreateJacobianMatrix(Matrix* Jff){_error_("Not implemented yet");};
|
|---|
| 87 | void PenaltyCreateJacobianMatrix(Matrix* Jff,double kmax){_error_("Not implemented yet");};
|
|---|
| 88 | void PenaltyCreateKMatrix(Matrix* Kff, Matrix* kfs, double kmax);
|
|---|
| 89 | void PenaltyCreatePVector(Vector* pf, double kmax);
|
|---|
| 90 | bool InAnalysis(int analysis_type);
|
|---|
| 91 | /*}}}*/
|
|---|
| 92 | /*Riftfront specific routines: {{{1*/
|
|---|
| 93 | bool PreStable();
|
|---|
| 94 | ElementMatrix* PenaltyCreateKMatrixDiagnosticHoriz(double kmax);
|
|---|
| 95 | ElementVector* PenaltyCreatePVectorDiagnosticHoriz(double kmax);
|
|---|
| 96 | void SetPreStable();
|
|---|
| 97 | int PreConstrain(int* punstable);
|
|---|
| 98 | int Constrain(int* punstable);
|
|---|
| 99 | void FreezeConstraints(void);
|
|---|
| 100 | bool IsFrozen(void);
|
|---|
| 101 | int Penetration(double* ppenetration);
|
|---|
| 102 | int MaxPenetration(double* ppenetration);
|
|---|
| 103 | int PotentialUnstableConstraint(int* punstable);
|
|---|
| 104 | int IsMaterialStable(void);
|
|---|
| 105 | bool IsInput(int name);
|
|---|
| 106 | /*}}}*/
|
|---|
| 107 | };
|
|---|
| 108 |
|
|---|
| 109 | #endif /* _RIFTFRONT_H_ */
|
|---|