CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Force use of boundary conditions (http://www.cfd-online.com/Forums/openfoam-programming-development/107953-force-use-boundary-conditions.html)

akidess October 10, 2012 07:57

Force use of boundary conditions
 
I have a coupled solver that ensures the use of a mixed boundary condition at a specific patch as:
Code:

field().boundaryField()[bPatchID()].type()
              == mixedFvPatchField<scalar>::typeName

This works really nicely if I just want to allow strictly a mixed boundary condition, but it shuts out derived boundary conditions such as groovyBC. Anyone know how to check for the base class?

akidess October 10, 2012 08:25

I think I found my answer: isA<mixedFvPatchScalarField>(field().boundaryField ()[bPatchID()])


All times are GMT -4. The time now is 03:25.