netgen/libsrc/meshing/bcfunctions.hpp
Philippose Rajan 45e71b854e * Colour based boundary condition assignment now independent of OpenCascade function calls and can be used for all Netgen Geometry and mesh types
* Changed the names of the files and functions used to handle colour based boundary condition number assignment 
* Change made in order to make the functionality more generic and not dependent on OpenCascade functions / Geometry
2009-07-11 21:03:10 +00:00

50 lines
2.0 KiB
C++

#ifndef FILE_BCFUNCTIONS
#define FILE_BCFUNCTIONS
// Philippose - 14/03/2009
// Auxiliary functions for OCC Geometry
// Use this file and the corresponding ".cpp"
// file to add miscellaneous functionality
// to the OpenCascade Geometry support in Netgen
namespace netgen
{
/*! \brief Automatically assign boundary conditions for meshes
This function allows the boundary condition numbers of a
mesh created in Netgen to be automatically assigned based on
the colours of each face.
Currently, two algorithms are utilised to assign the BC Properties:
1. Automatic assignment using a user defined colour profile file
which defines which RGB colours are to be assigned to which
BC Property number
- A default profile file exists in the Netgen folder called
"netgen.ocf"
2. The second algorithm uses the following automated algorithm:
- Extract all the colours present in the mesh
- Use colour index 0 (zero) for all faces with no colour defined
- Calculate the number of faces of the surface mesh for each colour
- Sort the number of surface elements in ascending order, with the
colour indices as a slave
- Use the indices of the sorted array as the BC property number
Example: If there are 3 colours, present in the mesh and the number
of surface elements for each colour are:
- Colour 0: 8500
- Colour 1: 120
- Colour 2: 2200
- Colour 3: 575
The above is sorted in ascending order and assigned as BC Properties:
- BC Prop 0: 120 : Colour 1
- BC Prop 1: 575 : Colour 3
- BC Prop 2: 2200 : Colour 2
- BC Prop 3: 8500 : Colour 0 (no colour defined)
*/
//extern void OCCAutoColourBcProps(Mesh & mesh, OCCGeometry & occgeometry, const char *occcolourfile);
extern void AutoColourBcProps(Mesh & mesh, const char *bccolourfile);
}
#endif