Hi there
I was wondering who of you has already (intensely) worked with groups and/or the interface visitor?
'Cause I recently encountered a few problems when using the 2D SuperGroup function
void SuperGroup<fT,2U>::FormAndAddGroup( const char* groupname, const char* prop, fT min, fT max )
and the Visitors subclass
template<typename fT, stl_index dim>
InterfaceVisitor<fT,dim>::InterfaceVisitor( const SuperGroup<fT,dim>& sg,
const char* flux_variable, const char* region_discr_prop,
fT inside_val, fT outside_val,
SG_BOUNDARY bound, const char* group )
FormAndAddGroup
I created a few groups (e.g., a group called 'model' that comprises my whole geometry) by using the function
supergroup.FormAndAddGroup( "model", "permeability", 0., 1. );
Though, it seems that the group boundaries could not be recognized correctly… I queried the number of boundary elements, boundary nodes and boundary constraint points by calling the following Group functions:
cout << "\nGroup 'model' contains " << supergroup.ReferenceGroup( "model" ).Elements() << " elements" << endl;
cout << supergroup.ReferenceGroup( "model" ).BoundaryElementMembers() << " boundary elements" << endl;
cout << supergroup.ReferenceGroup( "model" ).BoundaryNodeMembers() << " boundary nodes" << endl;
cout << supergroup.ReferenceGroup( "model" ).BoundaryConstraintPointMembers() << " boundary constraint points" << endl;
My output was as follows:
Group 'model' contains 10809 elements
0 boundary elements
447 boundary nodes
0 boundary constraint points
Does anyone have an idea what went wrong here, i.e., why the boundary elements and boundary constraint points could not be detected, while the boundary nodes could?
InterfaceVisitor
To measure fluxes across a certain boundary (e.g., the model boundary 'TOP'), I created the following InterfaceVisitor:
InterfaceVisitor<csp_float, 2> interface_top( ph_based_model, "pore velocity", "permeability", 1.0e-14, 1.0e-23, TOP );
supergroup.Accept( interface_top );
While its functions
interface_top.WriteInterfaceToVTK("interfaceTOP");
interface_top.PrintFaceNormals();
interface_top.InterfaceArea();
did work without any problems, the functions
cout << "TOP interface measured influx of " << interface_top.InFlux() << endl;
cout << "TOP interface measured outflux of " << interface_top.OutFlux() << endl;
cout << "...which results in a net flux of " << interface_top.InFluxMinusOutFlux() << endl;
returned the following output:
TOP interface measured influx of nan
TOP interface measured outflux of 0
…which results in a net flux of nan
This does not make sense, because values for 'pore velocity' are above zero at this stage!
Both of these applications seem to be part of the core functionality of CSMP++, and I therefore assume that they should be working properly. Though, I really don't know what I could have done wrong here…!