source: issm/trunk-jpl/src/c/classes/objects/Loads/Load.h@ 13216

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

NEW: large change to the code, to adapt to ADOLC requirements.

This change relates to the introduction of template classes and functions for the
Option.h abstract class. This is needed, because we want to make the Matlab
API independent from the libCore objects, which are dependent on the IssmDouble*
ADOLC type (adouble), when the Matlab API is dependent on the IssmPDouble* type (double).

To make them independent, we need to be able to specify at run time Options, Matrix and
Vector objects that hold either IssmDouble or IssmPDouble objects. The only way to do
that is through the use of templated classes for Option.h, Matrix and Vector.

The change gets rid of a lot of useless code (especially in the classes/objects/Options
directory), by introducing template versions of the same code.

The bulk of the changes to src/modules and src/mex modules is to adapt to this
new runtime declaration of templated Matrix, Vector and Option objects.

File size: 1.4 KB
Line 
1/*!\file: Load.h
2 * \brief abstract class for Load object
3 * This class is a place holder for the Icefront and the Penpair loads.
4 * It is derived from Load, so DataSets can contain them.
5 */
6
7
8#ifndef _LOAD_H_
9#define _LOAD_H_
10
11/*Headers:*/
12/*{{{*/
13class Object;
14template <class doublematrix> class Matrix;
15template <class doubletype> class Vector;
16
17#include "../Object.h"
18#include "../../../toolkits/toolkits.h"
19#include "../../../Container/Container.h"
20/*}}}*/
21
22class Load: public Object,public Update{
23
24 public:
25
26 virtual ~Load(){};
27
28 /*Virtual functions: {{{*/
29 virtual void Configure(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
30 virtual void SetCurrentConfiguration(Elements* elements,Loads* loads,Nodes* nodes,Vertices* vertices,Materials* materials,Parameters* parameters)=0;
31 virtual void CreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs)=0;
32 virtual void CreatePVector(Vector<IssmDouble>* pf)=0;
33 virtual void CreateJacobianMatrix(Matrix<IssmDouble>* Jff)=0;
34 virtual void PenaltyCreateJacobianMatrix(Matrix<IssmDouble>* Jff,IssmDouble kmax)=0;
35 virtual void PenaltyCreateKMatrix(Matrix<IssmDouble>* Kff, Matrix<IssmDouble>* Kfs, IssmDouble kmax)=0;
36 virtual void PenaltyCreatePVector(Vector<IssmDouble>* pf, IssmDouble kmax)=0;
37 virtual bool InAnalysis(int analysis_type)=0;
38 /*}}}*/
39};
40#endif
Note: See TracBrowser for help on using the repository browser.