39 "Input argument must be a mesh or pmesh");
64 COM::Attribute *lbmcn) {
73 COM::Attribute *nodal_vals,
74 const COM::Attribute *mesh,
76 const COM::Attribute *elem_weights,
77 COM::Attribute *nodal_weights)
84 elem_weights, nodal_weights);
91 double local_lmin=HUGE_VAL, local_lmax=0, local_lsum=0, local_weights=0;
94 for ( ; it!=
iend; ++it) {
95 for (
int i=0, nf=it->size_of_real_faces();
i<nf; ++
i) {
103 local_lmin =
std::min( local_lmin, l);
104 local_lmax =
std::max( local_lmax, l);
108 }
while ( (h=h.
next())!=h0);
112 double global_lmin=local_lmin, global_lmax=local_lmax,
113 global_lsum=local_lsum, global_weighs=local_weights;
116 MPI_Comm comm =
_wm->
window()->get_communicator();
117 MPI_Allreduce( &local_lmin, &global_lmin, 1, MPI_DOUBLE,
MPI_MIN, comm);
118 MPI_Allreduce( &local_lmax, &global_lmax, 1, MPI_DOUBLE,
MPI_MAX, comm);
119 MPI_Allreduce( &local_lsum, &global_lsum, 1, MPI_DOUBLE,
MPI_SUM, comm);
120 MPI_Allreduce( &local_weights, &global_weighs, 1, MPI_DOUBLE,
MPI_SUM, comm);
123 if ( lave) *lave = (global_weighs>0)? (global_lsum / global_weighs) : 0.;
124 if ( lmin) *lmin = global_lmin;
125 if ( lmax) *lmax = global_lmax;
133 COM::Window *outwin = outmesh->window();
144 std::string glb=mname+
".global";
180 glb.c_str(),
"bi", types);
185 glb.c_str(),
"bioI", types);
190 glb.c_str(),
"boo", types);
195 glb.c_str(),
"bioiIIO", types);
209 glb.c_str(),
"boOO", types);
214 glb.c_str(),
"bio", types);
221 std::string glb=mname+
".global";
235 #ifndef DOXYGEN_SHOULD_SKIP_THIS
260 #endif // DOXYGEN_SHOULD_SKIP_THIS
This class implements a data structure for 2-manifold over a whole window, which can be composed of m...
static const int scheme_vals[]
void rocsurf_load_module_(const char *mname, long int length)
void elements_to_nodes(const COM::Attribute *elem_vals, COM::Attribute *nodal_vals, const COM::Attribute *mesh=NULL, const int *scheme=NULL, const COM::Attribute *elem_weights=NULL, COM::Attribute *nodal_weights=NULL)
Computes nodal or elemental normals of a given window.
int COM_Type
Indices for derived data types.
void ROCSURF_LOAD_MODULE(const char *mname, long int length)
PM_iterator pm_begin()
Obtain an iterator to the first pane manifold of the window.
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_MAX
void COM_delete_window(const char *wname)
#define COM_assertion_msg(EX, msg)
void elements_to_nodes(const COM::Attribute *evals, COM::Attribute *nvals, const int scheme=E2N_ONE, const COM::Attribute *ews=NULL, COM::Attribute *nws=NULL, const int tosum=false)
Convert element values to nodal values using weighted averaging.
#define SURF_END_NAMESPACE
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
void ROCSURF_UNLOAD_MODULE(const char *mname, long int length)
Halfedge opposite() const
Get the ID of the opposite edge of a given edge.
void COM_set_function(const char *wf_str, Func_ptr func, const char *intents, const COM_Type *types)
This file contains the prototypes for Roccom API.
static void load(const std::string &mname)
Loads Rocsurf onto Roccom with a given module name.
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_MIN
void ROCSURF_LOAD_MODULE_(const char *mname, long int length)
This class encapsulate a halfedge over a window manifold.
Halfedge next() const
Get the next halfedge of its owner element.
void COM_set_object(const char *wa_str, int pane_id, Type *addr)
static void compute_bounded_volumes(const COM::Attribute *old_location, const COM::Attribute *new_location, COM::Attribute *volumes, void *flag=NULL)
Computes the volume bounded between two different locations of each face of the surface mesh of windo...
static void compute_signed_volumes(const COM::Attribute *mesh, double *vol)
Computes the signed volume of a body.
void ROCSURF_UNLOAD_MODULE_(const char *mname, long int length)
double length(Vector3D *const v, int n)
void COM_get_object(const char *wa_str, int pane_id, Type **addr)
std::vector< Pane_manifold_2 >::iterator PM_iterator
#define SURF_BEGIN_NAMESPACE
Vector_3< Real > tangent() const
Get the tangent of the given halfedge.
void initialize(const COM::Attribute *pmesh)
Constructs the communication patterns of a distributed mesh.
**********************************************************************Rocstar Simulation Suite Illinois Rocstar LLC All rights reserved ****Illinois Rocstar LLC IL **www illinoisrocstar com **sales illinoisrocstar com WITHOUT WARRANTY OF ANY **EXPRESS OR INCLUDING BUT NOT LIMITED TO THE WARRANTIES **OF FITNESS FOR A PARTICULAR PURPOSE AND **NONINFRINGEMENT IN NO EVENT SHALL THE CONTRIBUTORS OR **COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES OR OTHER WHETHER IN AN ACTION OF TORT OR **Arising OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE **USE OR OTHER DEALINGS WITH THE SOFTWARE **********************************************************************INTERFACE SUBROUTINE knode iend
void compute_mcn(COM::Attribute *mcn, COM::Attribute *lbmcn)
Computes nodal or elemental normals of a given window.
void(* Func_ptr)()
Pointer of functions.
static void interpolate_to_centers(const COM::Attribute *x, COM::Attribute *z)
Interpolates nodal coordinates to element centers.
void Rocsurf_load_module(const char *mname)
void serialize_mesh(const COM::Attribute *inmesh, COM::Attribute *outmesh)
Serialize the mesh of a given window.
void Rocsurf_unload_module(const char *mname)
void compute_normals(const COM::Attribute *mesh, COM::Attribute *nrm, const int *scheme=NULL)
Computes nodal or elemental normals of a given window.
static void integrate(const COM::Attribute *x, double *z)
Integrate a function given by an elemental attribute over surface z is an array of size equal to numb...
void COM_window_init_done(const char *w_str, int pane_changed=true)
void COM_new_window(const char *wname, MPI_Comm c=MPI_COMM_NULL)
void COM_set_array_const(const char *wa_str, int pane_id, const void *addr, int strd=0, int cap=0)
Vector_n min(const Array_n_const &v1, const Array_n_const &v2)
static void compute_element_normals(COM::Attribute *nrm, const int *to_normalize=NULL, const COM::Attribute *pnts=NULL)
Computes elemental normals of a given window.
bool is_border() const
Is the edge a border edge?
COM::Window * window()
Obtain the underlying window object.
void compute_mcn(COM::Attribute *mcn_in, COM::Attribute *lbmcn_in)
void compute_normals(COM::Attribute *normals, int scheme=E2N_ANGLE, bool to_normalize=true)
Compute the normals at nodes or faces, depending on the type of the attribute normals.
static void compute_swept_volumes(const COM::Attribute *location, const COM::Attribute *disps, COM::Attribute *volumes, void *flag=NULL)
Computes the swept volume by a given displacement of each face of the surface mesh of window volumes-...
void init_communicator()
Initialize a pane communicator.
void serialize_window(COM::Window *outwin) const
Create a serial window (with single pane) from the current window.
int validate_object() const
void compute_edge_lengths(double *lave, double *lmin, double *lmax)
Computes edge lengths of a given window.
void rocsurf_unload_module(const char *mname, long int length)
void COM_new_attribute(const char *wa_str, const char loc, const int type, int ncomp, const char *unit)
Registering an attribute type.
void COM_set_member_function(const char *wf_str, Member_func_ptr func, const char *wa_str, const char *intents, const COM_Type *types)
static void unload(const std::string &mname)
Unloads Rocsurf from Roccom.
static void compute_element_areas(COM::Attribute *areas, const COM::Attribute *pnts=NULL)
Computes the area of each face of the surface mesh of window areas->window and saves the results in a...
PM_iterator pm_end()
Obtain an iterator to the past-the-last pane manifold of the window.
void rocsurf_unload_module_(const char *mname, long int length)
void rocsurf_load_module(const char *mname, long int length)
here we put it at the!beginning of the common block The point to point and collective!routines know about but MPI_TYPE_STRUCT as yet does not!MPI_STATUS_IGNORE and MPI_STATUSES_IGNORE are similar objects!Until the underlying MPI library implements the C version of these are declared as arrays of MPI_STATUS_SIZE!The types and are OPTIONAL!Their values are zero if they are not available Note that!using these reduces the portability of MPI_IO INTEGER MPI_BOTTOM INTEGER MPI_DOUBLE_PRECISION INTEGER MPI_LOGICAL INTEGER MPI_2REAL INTEGER MPI_2DOUBLE_COMPLEX INTEGER MPI_LB INTEGER MPI_WTIME_IS_GLOBAL INTEGER MPI_GROUP_EMPTY INTEGER MPI_SUM