Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
roccom_c.C File Reference

This file contains the wrapper routines for the C binding of Roccom implementation. More...

#include "Roccom_base.h"
#include "roccom_assertion.h"
#include <cstdarg>
#include "roccom_c.h"
#include "roccom_c++.h"
Include dependency graph for roccom_c.C:

Go to the source code of this file.

Macros

#define C_ONLY
 

Functions

USE_COM_NAME_SPACE void COM_call_function (const int wf, int argc,...)
 
void COM_icall_function (const int wf, int argc,...)
 
void COM_get_attribute (const char *wa_str, char *loc, int *type, int *size, char *u_str, int u_len)
 Get the sizes of an attribute. More...
 

Detailed Description

This file contains the wrapper routines for the C binding of Roccom implementation.

See Also
roccom_c.h

Definition in file roccom_c.C.

Macro Definition Documentation

#define C_ONLY

Definition at line 37 of file roccom_c.C.

Function Documentation

USE_COM_NAME_SPACE void COM_call_function ( const int  wf,
int  argc,
  ... 
)

Definition at line 48 of file roccom_c.C.

References COM_assertion_msg, COM_get_roccom(), i, and Function::MAX_NUMARG.

Referenced by _load_rocface(), InterpolateBase::backup(), build_unstr_hex(), build_unstr_prism(), build_unstr_prism_tet(), build_unstr_prism_tet_2(), build_unstr_pyr(), build_unstr_tet_2(), Agent::check_convergence_help(), compute_area(), compute_fnormal_error(), FluidAgent::compute_integrals(), SolidAgent::compute_integrals(), compute_overlay(), compute_quadric_normals(), compute_vnormal_error(), compute_volume(), compute_weighted_normals(), FluidAgent::create_buffer_all(), InterpolateBase::extrapolate_Linear(), Agent::finalize(), getPaneConnectivity(), getWindow(), InterpolateBase::init(), GetDeformedMesh::init(), GetDeformedMesh_ALE::init(), MeshMotionTransferISS::init(), init_attributes(), init_constraints(), init_constraints_acmflu(), init_constraints_acmfrac(), init_constraints_labscale(), init_constraints_myacm(), init_constraints_staraft(), init_constraints_starslice(), FluidAgent::init_convergence(), Rocon::init_from_file(), BurnAgent::init_module(), FluidAgent::init_module(), SolidAgent::init_module(), init_normals(), init_parameters(), RFC_Window_transfer::init_recv_buffer(), load_rocon(), load_rocprop(), main(), FluidAgent::output_restart_files(), output_solution(), RFC_Window_overlay::print_features(), Control_parameters::read(), RocmanControl_parameters::read(), Agent::read_by_control_file(), read_file(), read_pane_sp(), BurnAgent::read_restart_data(), FluidAgent::read_restart_data(), SolidAgent::read_restart_data(), RFC_Window_base::read_sdv(), IM_Reader::read_winmesh(), remesh(), SetValueDouble::run(), LoadTransfer_FS::run(), Extrapolate_Linear::run(), CopyValue::run(), Extrapolate_Central::run(), LoadTransfer_FSc_ALE::run(), Interpolate_Linear::run(), Interpolate_Constant::run(), Interpolate_Central::run(), LoadTransferOnly_FSc_ALE::run(), GetDeformedMesh::run(), PhysicsAction::run(), GetDeformedMesh_ALE::run(), SurfDiver::run(), MeshMotionTransfer_SF::run(), ComputeFluidLoad_ALE::run(), DeformationVelTransfer_SF::run(), ComputeMeshMotion::run(), MeshMotionTransferISS::run(), ComputeFaceCenters::run(), TransferSolidDensity::run(), FluidPropagateSurface::run(), TransferBurnRate_FS_ALE::run(), MassTransfer_SF_ALE::run(), MassTransfer::run(), TemperatureTransfer_SF::run(), ZoomInterface::run(), HeatTransfer_FS::run(), ComputeRhofvf::run(), ComputeBurnPane::run(), RemeshInit::run(), ComputePconn::run(), SolidPropagateSurface_ALE::run(), Reset_du_alp::run(), TRAIL_AutoSurfer(), TRAIL_FE2FD_Transfer(), TRAIL_File2Window(), TRAIL_HDF2Window(), TRAIL_RocmopSmooth(), TRAIL_RocpropSmoothSurf(), TRAIL_TransferSurfDataFILE(), TRAIL_WriteWindow(), Control_parameters::update_communicator(), FullyCoupling::update_distances(), Agent::write_control_file(), Agent::write_data_files(), and RFC_Window_base::write_sdv().

48  {
49  COM_assertion_msg( argc <= Function::MAX_NUMARG, "Too many arguments") ;
50 
51  int i;
52  void *args[Function::MAX_NUMARG];
53  va_list ap;
54 
55  va_start( ap, argc);
56  for ( i=0; i<argc; ++i) {
57  args[i] = va_arg( ap, void*);
58  }
59  va_end( ap);
60  COM_get_roccom()->call_function( wf, argc, args);
61 }
#define COM_assertion_msg(EX, msg)
blockLoc i
Definition: read.cpp:79
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
Definition: Roccom_base.h:537

Here is the call graph for this function:

void COM_get_attribute ( const char *  wa_str,
char *  loc,
int *  type,
int *  ncomp,
char *  unit,
int  n 
)

Get the sizes of an attribute.

Information retrieval Get the information about an attribute.

The opposite of set_size.

The opposite of new_attribute.

Definition at line 80 of file roccom_c.C.

References COM_get_roccom(), copy, max(), min(), and n.

82 {
83  std::string unit;
84  COM_get_roccom()->get_attribute( wa_str, loc, type, size, &unit);
85  if ( u_str && u_len) {
86  int len=unit.size(), n=std::min(len, int(u_len));
87  std::copy( unit.c_str(), unit.c_str()+n, u_str);
88  std::fill_n( u_str+1+n, std::max(0,int(u_len-len)), 0);
89  }
90 }
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to ** copy
Definition: roccomf90.h:20
const NT & n
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:346
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
Definition: Roccom_base.h:537

Here is the call graph for this function:

void COM_icall_function ( const int  wf,
int  argc,
  ... 
)

Definition at line 64 of file roccom_c.C.

References COM_assertion_msg, COM_get_roccom(), i, and Function::MAX_NUMARG.

64  {
65  COM_assertion_msg( argc <= Function::MAX_NUMARG, "Too many arguments") ;
66 
67  int i;
68  void *args[Function::MAX_NUMARG];
69  va_list ap;
70 
71  va_start( ap, argc);
72  for ( i=0; i<argc-1; ++i) {
73  args[i] = va_arg( ap, void*);
74  }
75  int *status = va_arg( ap, int *);
76  va_end( ap);
77  COM_get_roccom()->icall_function( wf, argc, args, status);
78 }
#define COM_assertion_msg(EX, msg)
blockLoc i
Definition: read.cpp:79
COM_END_NAME_SPACE COM::Roccom_base * COM_get_roccom()
Definition: Roccom_base.h:537

Here is the call graph for this function: