30 #ifndef MULTIBLOCKTOPOLOGY_H 31 #define MULTIBLOCKTOPOLOGY_H 33 #include "preprocessor/PreprocessorContainer.h" 35 #include "boost/lexical_cast.hpp" 36 #include "preprocessor/multi_block_topology/entities/containers/PntMap.h" 37 #include "preprocessor/multi_block_topology/entities/containers/LineMap.h" 38 #include "preprocessor/multi_block_topology/entities/containers/SurfaceMap.h" 39 #include "preprocessor/multi_block_topology/entities/containers/BodyMap.h" 40 #include "preprocessor/multi_block_topology/entities/containers/UniformGridMap.h" 41 #include "preprocessor/multi_block_topology/ReferenceFrameMap.h" 42 #include "preprocessor/multi_block_topology/matrices/Framework2d.h" 43 #include "preprocessor/multi_block_topology/matrices/Framework3d.h" 77 static void numerate_list(L &l);
101 inline std::set<const XC::Edge *> getHomologousSides(
const Edge *e)
const 108 inline const PntMap &getPoints(
void)
const 110 inline PntMap &getPoints(
void)
112 inline const LineMap &getLines(
void)
const 116 inline const SurfaceMap &getSurfaces(
void)
const 120 inline const BodyMap &getBodies(
void)
const 122 inline BodyMap &getBodies(
void)
125 {
return reference_systems; }
127 {
return reference_systems; }
128 inline const Framework2d &getFramework2d(
void)
const 129 {
return framework2d; }
131 {
return framework2d; }
132 inline const Framework3d &getFramework3d(
void)
const 133 {
return framework3d; }
135 {
return framework3d; }
137 {
return unif_grid; }
139 {
return unif_grid; }
141 double getAverageSize(
void)
const;
143 boost::python::dict
getPyDict(
void)
const;
144 void setPyDict(
const boost::python::dict &);
151 template <
class FaceContainer,
class EdgeContainer>
154 typedef typename EdgeContainer::iterator edge_iterator;
155 typedef typename FaceContainer::iterator face_iterator;
158 std::set<const Edge *> tmp_edges;
159 for(edge_iterator i=edges.begin();i!=edges.end();i++)
160 tmp_edges.insert(*i);
161 const size_t max_num_iter= 1000;
163 while(!tmp_edges.empty())
165 const Edge *lado= *tmp_edges.begin();
167 if(homologous.empty())
169 Edge *tmp=
const_cast<Edge *
>(lado);
170 tmp_edges.erase(tmp);
174 homologous.insert(lado);
176 for(std::set<const Edge *>::const_iterator i= homologous.begin();i!=homologous.end();i++)
180 tmp_edges.erase(tmp);
183 if(conta>max_num_iter)
185 std::cerr << __FUNCTION__
186 <<
"; too much iterations." << std::endl;
191 for(face_iterator i=faces.begin();i!= faces.end();i++)
192 (*i)->ConciliaNDivIJ();
Base class for one-dimensional geometry objects.
Definition: Edge.h:48
Communication parameters between processes.
Definition: Communicator.h:66
std::set< const XC::Edge * > getHomologousSides(const Edge *) const
Return the homologous sides to that passed as a parameter.
Definition: SurfaceMap.cc:151
virtual void setNDiv(const size_t &)
Assigns the number of of divisions if it is compatible with the homologous edges. ...
Definition: Edge.cc:262
DbTagData & getDbTagData(void) const
Return a vector to store the dbTags of the class members.
Definition: MultiBlockTopology.cc:193
Finite element model generation tools.
Definition: Preprocessor.h:59
Object that can move between processes.
Definition: MovableObject.h:100
Model geometry manager.
Definition: MultiBlockTopology.h:68
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:44
virtual int recvSelf(const Communicator &)
Receive object through the communicator argument.
Definition: MultiBlockTopology.cc:277
Model points container.
Definition: SurfaceMap.h:43
Plane in a three-dimensional space.
Definition: Plane.h:49
Reference systems container.
Definition: ReferenceFrameMap.h:42
Edge * find_edge_by_endpoints(const Pnt &, const Pnt &)
Return the «edge» that has as end points those whose indices are passed as parameters.
Definition: MultiBlockTopology.cc:77
Bidimensional framework container.
Definition: Framework2d.h:43
void conciliaNDivs(void)
Conciliate number of divisions of the lines.
Definition: MultiBlockTopology.cc:132
virtual ~MultiBlockTopology(void)
Destructor.
Definition: MultiBlockTopology.cc:188
Line container.
Definition: LineMap.h:49
int recvData(const Communicator &)
Receive data through the communicator argument.
Definition: MultiBlockTopology.cc:246
void clearAll(void)
Erase all the geometry entities.
Definition: MultiBlockTopology.cc:155
virtual int sendSelf(Communicator &)
Send object through the communicator argument.
Definition: MultiBlockTopology.cc:262
Point container.
Definition: PntMap.h:53
Point (KPoint).
Definition: Pnt.h:50
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: MultiBlockTopology.cc:200
Base class for preprocessor containers i.
Definition: PreprocessorContainer.h:44
structured set, i.
Definition: SetEstruct.h:47
void conciliate_divisions(FaceContainer &faces, EdgeContainer &edges)
Conciliate the number of divisions of the lines shared by faces.
Definition: MultiBlockTopology.h:152
int sendData(Communicator &)
Send data through the communicator argument.
Definition: MultiBlockTopology.cc:229
size_t calcula_ndiv_lados(const std::set< const XC::Edge *> &)
Compute the number of divisions for each line to make it compatible with adjacent surface meshing...
Definition: Edge.cc:532
Posición en tres dimensiones.
Definition: Pos3d.h:44
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: MultiBlockTopology.cc:215
SetEstruct * find_struct_set(const UniformGridMap::Indice &nmb)
Search for the entity whose name is passed as a parameter.
Definition: MultiBlockTopology.cc:146
Body container.
Definition: BodyMap.h:43
Line in a three-dimensional space.
Definition: Line3d.h:62
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
MultiBlockTopology(Preprocessor *mod=nullptr)
Constructor.
Definition: MultiBlockTopology.cc:60
Three dimensional framework container.
Definition: Framework3d.h:42
Vector en tres dimensiones.
Definition: Vector3d.h:39
std::set< const XC::Edge * > getHomologousSides(void) const
Return the homologous sides to that passed as a parameter.
Definition: Edge.cc:522