851 |
{ |
{ |
852 |
private: |
private: |
853 |
//! The Structured3DMesh \a mesh. |
//! The Structured3DMesh \a mesh. |
854 |
ConstReferenceCounting<Structured3DMesh> mesh; |
ConstReferenceCounting<Structured3DMesh> __mesh; |
855 |
public: |
public: |
856 |
|
|
857 |
//! Evalutes the characteristic function of the \a mesh at point \a X |
//! Evalutes the characteristic function of the \a mesh at point \a X |
858 |
real_t operator()(const TinyVector<3>& X) const; |
real_t operator()(const TinyVector<3>& X) const; |
859 |
|
|
860 |
//! Constructs a OneMeshUserFunction using a \a Mesh. |
//! Constructs a OneMeshUserFunction using a \a mesh. |
861 |
OneMeshUserFunction(ConstReferenceCounting<Structured3DMesh> Mesh); |
OneMeshUserFunction(ConstReferenceCounting<Structured3DMesh> mesh); |
862 |
|
|
863 |
//! Destructor. |
//! Destructor. |
864 |
~OneMeshUserFunction(); |
~OneMeshUserFunction(); |
865 |
}; |
}; |
866 |
|
|
867 |
|
/** |
868 |
|
* @class OneDomainUserFunction |
869 |
|
* @author Stephane Del Pino |
870 |
|
* @date Sun Sep 21 15:05:18 2003 |
871 |
|
* |
872 |
|
* @brief return 1 if argument vertex is in the domain 0 if not. |
873 |
|
* |
874 |
|
* |
875 |
|
*/ |
876 |
|
class Domain; |
877 |
|
class OneDomainUserFunction |
878 |
|
: public UserFunction |
879 |
|
{ |
880 |
|
private: |
881 |
|
ConstReferenceCounting<Domain> __domain; /**< The domain */ |
882 |
|
public: |
883 |
|
|
884 |
|
/** |
885 |
|
* |
886 |
|
* Returns 1 if \a x is inside the domain, else 0. |
887 |
|
* |
888 |
|
* @return 1 or 0 |
889 |
|
*/ |
890 |
|
real_t operator()(const TinyVector<3>& x) const; |
891 |
|
|
892 |
|
/** |
893 |
|
* Constructor |
894 |
|
* |
895 |
|
* @param domain the given domain |
896 |
|
* |
897 |
|
*/ |
898 |
|
OneDomainUserFunction(ConstReferenceCounting<Domain> domain); |
899 |
|
|
900 |
|
/** |
901 |
|
* Destructor |
902 |
|
*/ |
903 |
|
~OneDomainUserFunction(); |
904 |
|
}; |
905 |
|
|
906 |
namespace UF { |
namespace UF { |
907 |
static ConstUserFunction zero(0); |
static ConstUserFunction zero(0); |
908 |
} |
} |