/*!\file FemModel.c * \brief: implementation of the FemModel object */ #ifdef HAVE_CONFIG_H #include "config.h" #else #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!" #endif #include "stdio.h" #include "../DataSet/DataSet.h" #include "../modules/ModelProcessorx/ModelProcessorx.h" #include "./objects.h" #include "../include/include.h" #include "../EnumDefinitions/EnumDefinitions.h" #include "../modules/modules.h" /*Object constructors and destructor*/ /*FUNCTION FemModel::constructor {{{1*/ FemModel::FemModel(ConstDataHandle IOMODEL,int in_solution_type,int* analyses, int nummodels){ /*intermediary*/ int i; IoModel* iomodel=NULL; int analysis_type; /*Initialize internal data: */ this->nummodels=nummodels; this->solution_type=in_solution_type; analysis_counter=nummodels-1; //point to last analysis_type carried out. this->results=new DataSet(); //not initialized by CreateDataSets /*Dynamically allocate whatever is a list of length nummodels: */ analysis_type_list=(int*)xmalloc(nummodels*sizeof(int)); m_Rmg=(Mat*)xmalloc(nummodels*sizeof(Mat)); m_Gmn=(Mat*)xmalloc(nummodels*sizeof(Mat)); m_nodesets=(NodeSets**)xmalloc(nummodels*sizeof(NodeSets*)); m_yg=(Vec*)xmalloc(nummodels*sizeof(Vec)); m_ys=(Vec*)xmalloc(nummodels*sizeof(Vec)); /*Initialize: */ for(i=0;i