#include <Domain.hpp>

Public Member Functions | |
| const bool & | isR3 () const |
| size_t | reference (const TinyVector< 3, real_t > &ref) const |
| bool | inside (const TinyVector< 3 > &X) const |
| ConstReferenceCounting< Scene > | scene () const |
| const Object & | object () const |
| void | setObjects (ReferenceCounting< Object > objects) |
| Domain (ConstReferenceCounting< Scene > scene) | |
| Domain (const Domain &D) | |
| ~Domain () | |
Private Member Functions | |
| void | __buildReferenceAssociation (const Object &o) |
| bool | __inShape (const TinyVector< 3 > &X) const |
Private Attributes | |
| bool | __isR3 |
| ReferenceCounting< Object > | __objects |
| ConstReferenceCounting< Scene > | __scene |
| std::map< TinyVector < 3, real_t >, size_t > | __povToReference |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Domain &D) |
Definition at line 46 of file Domain.hpp.
| Domain::Domain | ( | ConstReferenceCounting< Scene > | scene | ) |
| Domain::Domain | ( | const Domain & | D | ) |
| Domain::~Domain | ( | ) |
| void Domain::__buildReferenceAssociation | ( | const Object & | o | ) | [private] |
Definition at line 59 of file Domain.cpp.
References __povToReference, Intersection::begin(), Difference::begin(), Union::begin(), Shape::difference, Intersection::end(), Difference::end(), Union::end(), ffout(), Object::hasReference(), Shape::intersection, Shape::not_, Object::reference(), Object::shape(), Shape::type(), and Shape::union_.
Referenced by setObjects().
00060 { 00061 if (o.hasReference()) { 00062 const TinyVector<3, real_t>& ref = o.reference(); 00063 if (__povToReference.find(ref) == __povToReference.end()) { 00064 const size_t n = __povToReference.size() + 1; 00065 __povToReference[ref] = n; 00066 ffout(2) << "\t\t" << ref << " -> " << n << '\n'; 00067 } 00068 } 00069 00070 const Shape& shape = (*o.shape()); 00071 00072 switch(shape.type()) { 00073 case Shape::union_: { 00074 const Union& U = static_cast<const Union&>(shape); 00075 00076 for (Union::const_iterator i = U.begin(); 00077 i != U.end(); ++i) { 00078 __buildReferenceAssociation(*(*i)); 00079 } 00080 break; 00081 } 00082 case Shape::difference: { 00083 const Difference& D = static_cast<const Difference&>(shape); 00084 00085 for (Difference::const_iterator i = D.begin(); 00086 i != D.end(); ++i) { 00087 __buildReferenceAssociation(*(*i)); 00088 } 00089 break; 00090 } 00091 case Shape::intersection: { 00092 const Intersection& I = static_cast<const Intersection&>(shape); 00093 00094 for (Intersection::const_iterator i = I.begin(); 00095 i != I.end(); ++i) { 00096 __buildReferenceAssociation(*(*i)); 00097 } 00098 break; 00099 } 00100 case Shape::not_: { 00101 const Object& notObject = *(static_cast<const Not&>(shape).object()); 00102 __buildReferenceAssociation(notObject); 00103 break; 00104 } 00105 default: { 00106 ; 00107 } 00108 } 00109 }

| bool Domain::__inShape | ( | const TinyVector< 3 > & | X | ) | const [inline, private] |
| const bool& Domain::isR3 | ( | ) | const [inline] |
Returns true if the considered domain is 
Definition at line 78 of file Domain.hpp.
References __isR3.
Referenced by MeshExpressionSurface::execute().
00079 { 00080 return __isR3; 00081 }
| size_t Domain::reference | ( | const TinyVector< 3, real_t > & | ref | ) | const [inline] |
Definition at line 83 of file Domain.hpp.
References __povToReference, and ErrorHandler::normal.
Referenced by SurfaceMeshGenerator::Internals::__generateMesh(), and BoundaryMeshAssociation::setPOVMeshes().
00084 { 00085 std::map<TinyVector<3, real_t>, size_t>::const_iterator i 00086 = __povToReference.find(ref); 00087 if (i == __povToReference.end()) { 00088 std::stringstream errorMsg; 00089 errorMsg << "You provided the reference " << ref 00090 << " that is not used to define\n" 00091 << "your computational domain. The possible references are\n"; 00092 for (std::map<TinyVector<3, real_t>, size_t>::const_iterator j 00093 = __povToReference.begin(); 00094 j != __povToReference.end(); ++j) { 00095 errorMsg << '\t' << j->first << std::ends; 00096 } 00097 throw ErrorHandler(__FILE__,__LINE__, 00098 errorMsg.str(), 00099 ErrorHandler::normal); 00100 } 00101 return (*i).second; 00102 }
| bool Domain::inside | ( | const TinyVector< 3 > & | X | ) | const [inline] |
Returns true if X is inside the domain
| X |
Definition at line 121 of file Domain.hpp.
References __inShape(), and __isR3.
Referenced by DegreeOfFreedomSetBuilder::__buildFEMFictitious(), FictitiousDomainMethod::__computesDegreesOfFreedom(), OctreeMeshBuilder::buildMesh(), ConformTransformationQ1CartesianHexahedron::integrateCharacteristic(), and MeshDomainTetrahedrizor::run().

| ConstReferenceCounting< Scene > Domain::scene | ( | ) | const |
read-only access to the scene
Definition at line 54 of file Domain.cpp.
References __scene.
00055 { 00056 return __scene; 00057 }
| const Object& Domain::object | ( | ) | const [inline] |
Returns the shape if defined...
Definition at line 138 of file Domain.hpp.
References __objects, and ErrorHandler::unexpected.
Referenced by SurfaceMeshGenerator::generateSurfacicMesh().
00139 { 00140 if (__objects == 0) { 00141 throw ErrorHandler(__FILE__,__LINE__, 00142 "no object list available when no domain is defined ", 00143 ErrorHandler::unexpected); 00144 } 00145 00146 return (*__objects); 00147 }
| void Domain::setObjects | ( | ReferenceCounting< Object > | objects | ) | [inline] |
Sets the shape of the domain
| objects |
Definition at line 154 of file Domain.hpp.
References __buildReferenceAssociation(), __isR3, __objects, and ffout().
00155 { 00156 __isR3 = false; 00157 __objects = objects; 00158 ffout(2) << "\tReference translation (POV-Ray -> FEM)\n"; 00159 this->__buildReferenceAssociation(*__objects); 00160 ffout(2) << "\tDone\n"; 00161 }

| std::ostream& operator<< | ( | std::ostream & | os, | |
| const Domain & | D | |||
| ) | [friend] |
Outputs the Domain D in the std::ostream os.
Definition at line 107 of file Domain.hpp.
00109 { 00110 os << *D.__objects; 00111 return os; 00112 }
bool Domain::__isR3 [private] |
This boolean describes the Domain this way:
.
Definition at line 53 of file Domain.hpp.
Referenced by inside(), isR3(), and setObjects().
ReferenceCounting<Object> Domain::__objects [private] |
The shape of the domain
Definition at line 56 of file Domain.hpp.
Referenced by object(), and setObjects().
ConstReferenceCounting<Scene> Domain::__scene [private] |
std::map<TinyVector<3, real_t>, size_t> Domain::__povToReference [private] |
The POV-Ray to internal references association
Definition at line 62 of file Domain.hpp.
Referenced by __buildReferenceAssociation(), and reference().
1.5.6