52 agent(ag), target_window(target_window_), attr(attr_) {}
54 virtual void create(std::string bufname);
55 virtual void assign(std::string bufname);
66 NewAttribute(
Agent *ag, std::string target_window_, std::string attr_,
char loc_,
int type_,
int ncomp_,
const char * unit_);
67 void create(std::string bufname);
80 CloneAttribute(
Agent *ag,
int cond, std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_,
int wg_=1,
const char *ptnname_=0,
int val_=0);
81 void create(std::string bufname);
93 UseAttribute(
Agent *ag, std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_,
int wg_=1,
const char *ptnname_=0,
int val_=0);
94 void create(std::string bufname);
104 void run(
double t,
double dt,
double alpha);
106 virtual void print(FILE *f);
107 virtual char *name();
144 double initial_time,
timestamp, current_time, current_deltatime, old_dt;
167 const char *agent_name, MPI_Comm com,
bool wgm=
false,
bool skipio=
false);
171 virtual void init_module(
double t,
double dt);
172 void init_subscheduler(
double t);
177 virtual void input(
double t) = 0;
178 virtual void output_restart_files(
double t) = 0;
179 virtual void output_visualization_files(
double t) = 0;
181 double max_timestep(
double t,
double dt);
186 void register_new_attribute(std::string target_window_, std::string attr_,
char loc_,
int type_,
int ncomp_,
const char* unit_);
187 void register_clone_attribute(
int cond, std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_,
int wg_=1,
const char *ptnname_=0,
int val_=0);
188 void register_use_attribute(std::string target_window_, std::string attr_, std::string parent_window_, std::string parent_attr_,
int wg_=1,
const char *ptnname_=0,
int val_=0);
189 void create_registered_attributes(std::string tmpBuf);
190 void create_registered_window_attributes(std::string target_window);
191 virtual void create_buffer_all();
192 void assign_attributes();
196 void add_icaction(
Action *act);
197 void add_bcaction(
Action *act,
int l=1);
198 void add_bcinitaction(
Action *act);
199 void add_gmaction(
Action *act);
201 void init_callback(
const char *surf_win,
const char *vol_win,
204 void init_bcactions(
double t);
205 void obtain_bc(
double *a,
int *l=NULL);
207 void init_gmactions(
double t);
208 void obtain_gm(
double *da);
210 void init_bcinitaction(
double t);
211 void run_bcinitaction(
double t,
double dt);
228 virtual void init_convergence(
int iPredCorr);
229 virtual int check_convergence(
double tolerMass,
double tolerTract,
double tolerVelo) {
return 1; }
236 void get_time_string(
double t, std::string &
s);
241 void init_function_handles();
242 void create_window(
const char *window_name);
245 void split_surface_window(
const std::string surfAll,
246 const std::string surf_i,
247 const std::string surf_nb,
248 const std::string surf_b,
249 const std::string surf_ni);
253 int read_by_control_file(
double t,
const std::string base,
const std::string window);
257 void write_data_files(
double t,
const std::string base,
258 const std::string
attr,
const char *ref=NULL);
261 void write_control_file(
double t,
const std::string base,
const std::string window);
263 virtual void store_solutions(
int converged);
264 int check_convergence_help(
int vcur,
int vpre,
double tol, std::string str);
std::string target_window
virtual void unload_module()
vector< AttributeBase * > AttributeList
std::string get_modinstance_name() const
double get_old_dt() const
vector< UserScheduler * > SchdulerList
std::string parent_window
const char * option(const char *const name, const int argc, const char *const *const argv, const char *defaut, const char *const usage=0)
Scheduler * get_bcScheduler(unsigned int level)
T mod(const T &x, const T &m)
Return the modulo of a number.
std::string get_agent_name() const
This file contains the prototypes for Roccom API.
virtual void load_module()
InterpolateList interpolateList
virtual void print(FILE *f)
std::string get_surface_window() const
const std::string agent_name
bool assign(T &t, const Object &o)
Coupling * get_coupling()
virtual int compute_integrals()
std::string get_rocmod_name() const
vector< InterpolateBase * > InterpolateList
static int write_ctrl_handle
UserScheduler gmScheduler
void declare(Scheduler &)
Contains declarations of MPI subroutines used in Roccom.
static int write_attr_handle
static int read_by_control_handle
AttributeBase(Agent *ag, std::string target_window_, std::string attr_)
void(Scheduler::* Scheduler_voidfn1_t)(double)
virtual int check_convergence(double tolerMass, double tolerTract, double tolerVelo)
int get_comm_rank() const
UserScheduler bcInitScheduler
std::string parent_window
static int read_files_handle
virtual void read_restart_data()
static int obtain_attr_handle
MPI_Comm get_communicator() const
UserScheduler icScheduler
Action * get_main_action()
std::string get_volume_window() const
AttributeList attributeList