Commit 07be8abd authored by François Trigaux's avatar François Trigaux 🤠
Browse files

initial commit

parents
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// GlobalDataFun.h
#ifndef _GLOBALDATAFUN_H_
#define _GLOBALDATAFUN_H_
#define NSTRN 6
#define NDIM 3
#define MEMB_CONST 7
#define NDOF_ND 12
struct PrescriInf{
int id; // where it is applied, could be a node number or member number
int dof[NSTRN]; // maximum 6 degrees of freedom can be prescribed,
// for distributed loads, it is used to denote the distribution function no
double value[NSTRN]; // the magnitude of the prescribed values
int time_fun_no[NSTRN]; // which time function is used
int follower[NSTRN]; // whether the prescribed quantity is a follower or not: 1 is a follower; 0 is not
double value_current[NSTRN]; // indicate the current functional value updated by time steps, calculated internally
};
struct TimeFunction{
int fun_type; //unction type: 0, user defined; 1, harmonic
double ts, te; // starting and ending time
int entries; // number of entries
double *time_val; // the ith time, in increasing order; the amplitude of the harmonic
double *fun_val ; // the ith functional value; the period of the harmonic
double *phase_val; // the phase value of the harmonic
};
// Declare all the variables required for the analysis
extern int nkp;
extern int nelem; // number of elements
extern int ndof_el; // number of unknowns for each element
extern int nmemb; // number of beam members
extern int ncond_pt; // number of point conditions
extern int nmate; // number of different cross-sections
extern int nframe; // number of different cross-sectional frames
extern int ndistrfun; // number of distribution functions
extern int ncurv; // number of sets of initial curvature/twists
extern double **coord; // coordinates for key points
extern int **member; // member desriptions
extern struct PrescriInf *pt_condition; // prescribed concentrated infromation at points
extern double ***material; // cross-sectional properties
extern int ntimefun; // number of time functions
extern int niter; // maximum number of iterations
extern int nstep; // number of time steps
extern double ***sol_pt; // solutions for points
extern double ***sol_mb; // solutions for members
extern char error[32]; // error message
extern int ncond_mb; // number of prescribed distribution][ number of time function
extern double ***frame; // the direction cosine matrix for each frame. The default frame is the global frame
extern struct PrescriInf *mb_condition; // distributed load information
extern double **distr_fun; // distributed functions
extern double **curvature; // curvature information
extern double omega_a0[NDIM]; // angular velocity of frame a
extern double v_root_a0[NDIM]; // linear velocity of starting point of the first member
extern int omega_a_tf[NDIM]; // time function for angular velocity of frame a
extern int v_root_a_tf[NDIM]; // time function for linear velocity of starting point of the first member
extern double simu_time[2]; // start and end time
extern struct TimeFunction *time_function; // time functions
extern double **init_cond;
extern int analysis_flag;
extern int nev; // upon return, nev is the number of converged eigen values might be the original nev given by the user in the inputs or nev+1 due to complex conjugate pairs
extern double **eigen_val;
extern double ***eigen_vec_pt;
extern double ***eigen_vec_mb;
#endif
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#define CHKINP(r) if (r==-1){ printf("Error reading input file (line %d)\n",__LINE__); exit(EXIT_FAILURE);}
#define CHKFRMT(r,val) if (r!=val){ printf("Error formatting input file (line: %d)\n",__LINE__); exit(EXIT_FAILURE);}
void input(char* fileName);
void freeAll();
\ No newline at end of file
This diff is collapsed.
/* ffunc.h
* author: F. Trigaux
*/
//void f_Analysis(int nkp,int nelem,int ndof_el,int nmemb,int ncond_pt,int nmate,int nframe,int ndistrfun,int ncurv, double **coord,
// int **member,struct PrescriInf *pt_condition, double ***material, int niter, int nstep, double ***sol_pt, double ***sol_mb,char *error, int ncond_mb,
// int ntimefun,double ***frame, struct PrescriInf *mb_condition,double **distr_fun, double **curvature, double *omega_a0, int *omega_a_tf,
// double *v_root_a0, int *v_root_a_tf, double *simu_time, struct TimeFunction *time_function, int analysis_flag, double **init_cond,
// int nev, double **eigen_val, double ***eigen_vec_pt,double ***eigen_vec_mb);
void f_Analysis(Beam *bm);
void c_Analysis(int nkp,int nelem,int ndof_el,int nmemb,int ncond_pt,int nmate,int nframe,int ndistrfun,int ncurv, double **coord,
int **member,struct PrescriInf **pt_condition, double **material, int niter, int nstep, double **sol_pt, double **sol_mb,char *error, int ncond_mb,
int ntimefun,double **frame, struct PrescriInf **mb_condition,double **distr_fun, double **curvature, double omega_a0[], int omega_a_tf[],
double v_root_a0[], int v_root_a_tf[], double simu_time[], struct TimeFunction **time_function, int analysis_flag, double **init_cond,
int *nev, double **eigen_val, double **eigen_vec_pt,double **eigen_vec_mb);
extern int i_,j_,k_;
void test_Analysis(int nkp, int nelem, int **coord);
/*void f_analysis(int *nkp,int *nelem,int *ndof_el,int *nmemb,int *ncond_pt,int *nmate, int *nframe,int *ndistrfun,int *ncurv, double ***coord,
int ***member,struct PrescriInf **pt_condition, double ****material, int *niter, int *nstep, double ****sol_pt, double ****sol_mb,char **error, int *ncond_mb,
int *ntimefun,double ****frame, struct PrescriInf **mb_condition,double ***distr_fun, double ***curvature, double **omega_a0, int **omega_a_tf,
double **v_root_a0, int **v_root_a_tf, double **simu_time, struct TimeFunction **time_function, int *analysis_flag, double ***init_cond,
int *nev, double ***eigen_val, double ****eigen_vec_pt,double ****eigen_vec_mb);
*/
//void output_();
\ No newline at end of file
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment