Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Interpolate.h
Go to the documentation of this file.
1 /* *******************************************************************
2  * Rocstar Simulation Suite *
3  * Copyright@2015, Illinois Rocstar LLC. All rights reserved. *
4  * *
5  * Illinois Rocstar LLC *
6  * Champaign, IL *
7  * www.illinoisrocstar.com *
8  * sales@illinoisrocstar.com *
9  * *
10  * License: See LICENSE file in top level of distribution package or *
11  * http://opensource.org/licenses/NCSA *
12  *********************************************************************/
13 /* *******************************************************************
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, *
15  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES *
16  * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND *
17  * NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR *
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
20  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE *
21  * USE OR OTHER DEALINGS WITH THE SOFTWARE. *
22  *********************************************************************/
23 // $Id: Interpolate.h,v 1.19 2008/12/06 08:45:22 mtcampbe Exp $
24 
25 #ifndef _INTERPOLATE_H_
26 #define _INTERPOLATE_H_
27 
28 #include "rocman.h"
29 #include "SolidAgent.h"
30 
31 class InterpolateBase : public Action {
32 public:
33  InterpolateBase(Agent *ag, Agent *bkag, int cond=0);
34 // InterpolateBase(const char *at[]) : Action(4, at, NULL, NULL, "InterpolateBase") {}
35  virtual void init(double t);
36  virtual void run(double t, double dt, double alpha) = 0;
37  // BACKUP in "man_basic.f90"
38  void backup();
39 protected:
40  void extrapolate_Linear(double dt, double dt_old, double time_old, int a_old, double time_new, int a_new, double time_out, int a_out, int a_gra=-100);
41 protected:
44  int attr_hdls[4];
45  int bkup_hdls[3];
46  int conditional; // conditional action, check alp for on/off
47  int on;
48 };
49 
51 public:
52  Extrapolate_Linear(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp", int cond=0);
53  virtual void init(double t);
54  void run(double t, double dt, double alpha);
55 };
56 
58 public:
59  Extrapolate_Central(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp", int cond=0);
60  virtual void init(double t);
61  void run(double t, double dt, double alpha);
62 };
63 
65 public:
66  Interpolate_Linear(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp");
67  void run(double t, double dt, double alpha);
68 };
69 
71 public:
72  Interpolate_Constant(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp");
73  void run(double t, double dt, double alpha);
74 };
75 
77 public:
78  Interpolate_Central(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp");
79  void run(double t, double dt, double alpha);
80 };
81 
82 
83 
84 #endif
85 
86 
87 
88 
89 
90 
InterpolateBase(Agent *ag, Agent *bkag, int cond=0)
Definition: Interpolate.C:30
Interpolate_Central(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp")
Definition: Interpolate.C:345
int bkup_hdls[3]
Definition: Interpolate.h:45
Definition: Action.h:32
Definition: Agent.h:110
char ** attr
Definition: Action.h:37
virtual void run(double t, double dt, double alpha)=0
Extrapolate_Central(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp", int cond=0)
Definition: Interpolate.C:188
Interpolate_Constant(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp")
Definition: Interpolate.C:307
void run(double t, double dt, double alpha)
Definition: Interpolate.C:392
void run(double t, double dt, double alpha)
Definition: Interpolate.C:285
void run(double t, double dt, double alpha)
Definition: Interpolate.C:336
void run(double t, double dt, double alpha)
Definition: Interpolate.C:165
virtual void init(double t)
Definition: Interpolate.C:154
virtual void init(double t)
Definition: Interpolate.C:43
int attr_hdls[4]
Definition: Interpolate.h:44
Extrapolate_Linear(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp", int cond=0)
Definition: Interpolate.C:137
virtual void init(double t)
Definition: Interpolate.C:223
Interpolate_Linear(Agent *ag, Agent *bkag, const std::string attr, const std::string alpsuf="_alp")
Definition: Interpolate.C:268
Agent * bkagent
Definition: Interpolate.h:43
void extrapolate_Linear(double dt, double dt_old, double time_old, int a_old, double time_new, int a_new, double time_out, int a_out, int a_gra=-100)
Definition: Interpolate.C:94
void run(double t, double dt, double alpha)
Definition: Interpolate.C:242