Carmen Code
 All Classes Files Functions Variables Macros Pages
Functions
BoundaryRegion.cpp File Reference

External boundary conditions ( if UseBoundaryRegions = true) More...

#include "Carmen.h"
#include "carmen.bc"
Include dependency graph for BoundaryRegion.cpp:

Functions

int BoundaryRegion (const Vector &X)
 Returns the boundary region type at the position X=(x,y,z).
The returned value correspond to: 0 = Fluid (not in the boundary) 1 = Inflow 2 = Outflow 3 = Solid with free-slip walls 4 = Solid with adiabatic walls 5 = Solid with isothermal walls. More...
 

Detailed Description

External boundary conditions ( if UseBoundaryRegions = true)

Function Documentation

int BoundaryRegion ( const Vector X)

Returns the boundary region type at the position X=(x,y,z).
The returned value correspond to: 0 = Fluid (not in the boundary) 1 = Inflow 2 = Outflow 3 = Solid with free-slip walls 4 = Solid with adiabatic walls 5 = Solid with isothermal walls.

Parameters
XVector
Returns
int
64 {
65  real x=0., y=0., z=0.;
66 
67  int Fluid;
68  int Inflow;
69  int Outflow;
70  int FreeSlipSolid;
71  int AdiabaticSolid;
72  int IsothermalSolid;
73 
74  int Region;
75 
76  // Only in UseBoundaryRegions = true
77 
78  if (!UseBoundaryRegions) return 0;
79 
80  // --- Init values --
81 
82  Fluid = 0;
83  Inflow = 1;
84  Outflow = 2;
85  FreeSlipSolid = 3;
86  AdiabaticSolid = 4;
87  IsothermalSolid = 5;
88 
89  Region = Fluid;
90 
91  x = X.value(1);
92  y = (Dimension > 1)? X.value(2):0.;
93  z = (Dimension > 2)? X.value(3):0.;
94 
95  #include "carmen.bc"
96 
97  return Region;
98 }
int Dimension
Definition: Parameters.cpp:74
real value(const int n) const
Returns the value of the component n.
Definition: Vector.h:565
bool UseBoundaryRegions
Definition: Parameters.cpp:80
#define real
Definition: PreProcessor.h:31

Here is the caller graph for this function: