79 #ifdef __PARALLEL_MODE 107 dType = _unknownMode;
115 #ifdef __PARALLEL_MODE 153 #ifdef __PARALLEL_MODE 174 if ( el->giveGlobalNumber() == n ) {
190 OOFEM_ERROR(
"returning -1 for iGlobalElNum: %d.", iGlobalElNum );
203 OOFEM_ERROR(
"returning -1 for iGlobalDofManNum: %d.", iGlobalDofManNum );
225 if ( n < 1 || n > (
int)
bcList.size() ) {
232 OOFEM_ERROR(
"cannot cast boundary condition %d to Load class", n);
236 return static_cast< Load *
>(
bcList[n-1].get() );
246 if ( n < 1 || n > (
int)
bcList.size() ) {
258 if ( n < 1 || n > (
int)
icList.size() ) {
272 OOFEM_ERROR(
"undefined load-time function (%d)", n);
302 OOFEM_ERROR(
"incompatible type of dofManager %d, can not convert", n);
329 if ( dman->giveGlobalNumber() == n ) {
366 if ( n < 1 || n > (
int)
setList.size() ) {
474 std :: string name, topologytype;
475 int nnode, nelem, nmat, nload, nic, nloadtimefunc, ncrossSections, nbarrier = 0, nset = 0;
476 bool nxfemman =
false;
477 bool ncontactman =
false;
478 bool nfracman =
false;
481 std :: map< int, int >dofManLabelMap, elemLabelMap;
530 if (
dType == _1dTrussMode ) {
532 }
else if (
dType == _2dIncompressibleFlow ||
dType == _2dBeamMode ||
dType == _2dTrussMode ||
dType == _2dMindlinPlateMode ||
dType == _PlaneStrainMode ||
dType == _2dPlaneStressMode ||
dType == _2dPlaneStressRotMode ||
dType == _WarpingMode ) {
534 }
else if (
dType == _3dIncompressibleFlow ||
dType == _3dShellMode ||
dType == _3dMode ||
dType == _3dDirShellMode ) {
536 }
else if (
dType == _3dAxisymmMode ) {
544 for (
int i = 1; i <= nnode; i++ ) {
553 OOFEM_ERROR(
"Couldn't create node of type: %s\n", name.c_str());
556 dman->initializeFrom(ir);
557 if ( dofManLabelMap.find(num) == dofManLabelMap.end() ) {
559 dofManLabelMap [ num ] = i;
561 OOFEM_ERROR(
"iDofmanager entry already exist (label=%d)", num);
564 dman->setGlobalNumber(num);
579 for (
int i = 1; i <= nelem; i++ ) {
586 OOFEM_ERROR(
"Couldn't create element: %s", name.c_str());
589 elem->initializeFrom(ir);
591 if ( elemLabelMap.find(num) == elemLabelMap.end() ) {
593 elemLabelMap [ num ] = i;
595 OOFEM_ERROR(
"Element entry already exist (label=%d)", num);
598 elem->setGlobalNumber(num);
610 for (
int i = 1; i <= nset; i++ ) {
615 std :: unique_ptr< Set >
set(
new Set(num,
this));
617 OOFEM_ERROR(
"Couldn't create set: %s", name.c_str());
620 set->initializeFrom(ir);
623 if ( num < 1 || num > nset ) {
628 setList[num - 1] = std :: move(
set);
630 OOFEM_ERROR(
"Set entry already exist (num=%d)", num);
644 for (
int i = 1; i <= ncrossSections; i++ ) {
649 if ( !crossSection ) {
650 OOFEM_ERROR(
"Couldn't create crosssection: %s", name.c_str());
653 crossSection->initializeFrom(ir);
656 if ( ( num < 1 ) || ( num > ncrossSections ) ) {
657 OOFEM_ERROR(
"Invalid crossSection number (num=%d)", num);
663 OOFEM_ERROR(
"crossSection entry already exist (num=%d)", num);
676 for (
int i = 1; i <= nmat; i++ ) {
683 OOFEM_ERROR(
"Couldn't create material: %s", name.c_str());
686 mat->initializeFrom(ir);
689 if ( ( num < 1 ) || ( num > nmat ) ) {
690 OOFEM_ERROR(
"Invalid material number (num=%d)", num);
696 OOFEM_ERROR(
"material entry already exist (num=%d)", num);
709 for (
int i = 1; i <= nbarrier; i++ ) {
716 OOFEM_ERROR(
"Couldn't create barrier: %s", name.c_str());
719 barrier->initializeFrom(ir);
722 if ( ( num < 1 ) || ( num > nbarrier ) ) {
723 OOFEM_ERROR(
"Invalid barrier number (num=%d)", num);
729 OOFEM_ERROR(
"barrier entry already exist (num=%d)", num);
744 for (
int i = 1; i <= nload; i++ ) {
751 OOFEM_ERROR(
"Couldn't create boundary condition: %s", name.c_str());
754 bc->initializeFrom(ir);
757 if ( ( num < 1 ) || ( num > nload ) ) {
758 OOFEM_ERROR(
"Invalid boundary condition number (num=%d)", num);
762 bcList[num - 1] = std :: move(bc);
764 OOFEM_ERROR(
"boundary condition entry already exist (num=%d)", num);
777 for (
int i = 1; i <= nic; i++ ) {
787 ic->initializeFrom(ir);
790 if ( ( num < 1 ) || ( num > nic ) ) {
791 OOFEM_ERROR(
"Invalid initial condition number (num=%d)", num);
795 icList[num - 1] = std :: move(ic);
797 OOFEM_ERROR(
"initial condition entry already exist (num=%d)", num);
811 for (
int i = 1; i <= nloadtimefunc; i++ ) {
818 OOFEM_ERROR(
"Couldn't create time function: %s", name.c_str());
821 func->initializeFrom(ir);
824 if ( ( num < 1 ) || ( num > nloadtimefunc ) ) {
825 OOFEM_ERROR(
"Invalid Function number (num=%d)", num);
831 OOFEM_ERROR(
"Function entry already exist (num=%d)", num);
844 for (
int i = 1; i <= nset; i++ ) {
849 std :: unique_ptr< Set >
set(
new Set(num,
this));
851 OOFEM_ERROR(
"Couldn't create set: %s", name.c_str());
854 set->initializeFrom(ir);
857 if ( ( num < 1 ) || ( num > nset ) ) {
862 setList[num - 1] = std :: move(
set);
864 OOFEM_ERROR(
"Set entry already exist (num=%d)", num);
883 OOFEM_ERROR(
"Couldn't create xfemmanager: %s", name.c_str());
901 OOFEM_ERROR(
"Couldn't create contact manager: %s", name.c_str());
915 if ( topologytype.length() > 0 ) {
918 OOFEM_ERROR(
"Couldn't create topology of type '%s'", topologytype.c_str());
921 return this->
topology->instanciateYourself(dr);
923 VERBOSE_PRINT0(
"Instanciated topologies ", topologytype.length());
941 dman->updateLocalNumbering(labelToLocNumFunctor);
945 element->updateLocalNumbering(labelToLocNumFunctor);
949 set->updateLocalNumbering(labelToLocNumFunctor);
968 for (
int ielem: set->giveElementList() ) {
979 dman->postInitialize();
987 el->postInitialize();
990 for (
auto &bc:
bcList ) {
991 bc->postInitialize();
999 return std::string(
"Domain::") + func +
", number: " + std::to_string(
number);
1012 if (
dType == _2dPlaneStressRotMode ) {
1014 }
else if (
dType == _2dPlaneStressMode ) {
1016 }
else if (
dType == _PlaneStrainMode ) {
1018 }
else if (
dType == _3dMode ) {
1020 }
else if (
dType == _3dAxisymmMode ) {
1022 }
else if (
dType == _2dMindlinPlateMode ) {
1024 }
else if (
dType == _3dShellMode ) {
1026 }
else if (
dType == _2dTrussMode ) {
1028 }
else if (
dType == _1dTrussMode ) {
1030 }
else if (
dType == _2dBeamMode ) {
1032 }
else if (
dType == _2dLatticeMode ) {
1034 }
else if (
dType == _HeatTransferMode ) {
1036 }
else if (
dType == _Mass1TransferMode ) {
1038 }
else if (
dType == _HeatMass1Mode ) {
1040 }
else if (
dType == _2dIncompressibleFlow ) {
1042 }
else if (
dType == _3dIncompressibleFlow ) {
1044 }
else if (
dType == _3dDirShellMode ) {
1046 }
else if (
dType == _2dLatticeMassTransportMode ) {
1048 }
else if (
dType == _3dLatticeMassTransportMode ) {
1050 }
else if (
dType == _3dLatticeMode ) {
1052 }
else if (
dType == _2dLatticeHeatTransferMode ) {
1054 }
else if (
dType == _3dLatticeHeatTransferMode ) {
1056 }
else if (
dType == _WarpingMode ) {
1087 if ( !strncmp(typeName,
"2dplanestressrot", 16) ) {
1088 dType = _2dPlaneStressRotMode;
1089 }
else if ( !strncmp(typeName,
"2dplanestress", 12) ) {
1090 dType = _2dPlaneStressMode;
1091 }
else if ( !strncmp(typeName,
"planestrain", 11) ) {
1092 dType = _PlaneStrainMode;
1093 }
else if ( !strncmp(typeName,
"3daxisymm", 9) ) {
1094 dType = _3dAxisymmMode;
1095 }
else if ( !strncmp(typeName,
"2dmindlinplate", 14) ) {
1096 dType = _2dMindlinPlateMode;
1097 }
else if ( !strncmp(typeName,
"3dshell", 7) ) {
1098 dType = _3dShellMode;
1099 }
else if ( !strncmp(typeName,
"2dtruss", 7) ) {
1100 dType = _2dTrussMode;
1101 }
else if ( !strncmp(typeName,
"1dtruss", 7) ) {
1102 dType = _1dTrussMode;
1103 }
else if ( !strncmp(typeName,
"2dbeam", 6) ) {
1104 dType = _2dBeamMode;
1105 }
else if ( !strncmp(typeName,
"2dlattice", 9) ) {
1106 dType = _2dLatticeMode;
1107 }
else if ( !strncmp(typeName,
"heattransfer", 12) ) {
1108 dType = _HeatTransferMode;
1109 }
else if ( !strncmp(typeName,
"mass1transfer", 13) ) {
1110 dType = _Mass1TransferMode;
1111 }
else if ( !strncmp(typeName,
"hema1", 5) ) {
1112 dType = _HeatMass1Mode;
1113 }
else if ( !strncmp(typeName,
"2dincompflow", 12) ) {
1114 dType = _2dIncompressibleFlow;
1115 }
else if ( !strncmp(typeName,
"3dincompflow", 12) ) {
1116 dType = _3dIncompressibleFlow;
1117 }
else if ( !strncmp(typeName,
"3ddirshell", 10) ) {
1118 dType = _3dDirShellMode;
1119 }
else if ( !strncmp(typeName,
"2dmasslatticetransport", 22) ) {
1120 dType = _2dLatticeMassTransportMode;
1121 }
else if ( !strncmp(typeName,
"3dlattice", 9) ) {
1122 dType = _3dLatticeMode;
1123 }
else if ( !strncmp(typeName,
"3dmasslatticetransport", 22) ) {
1124 dType = _3dLatticeMassTransportMode;
1125 }
else if ( !strncmp(typeName,
"2dheatlattice", 13) ) {
1126 dType = _3dLatticeMassTransportMode;
1127 }
else if ( !strncmp(typeName,
"3dheatlattice", 13) ) {
1128 dType = _3dLatticeMassTransportMode;
1129 }
else if ( !strncmp(typeName,
"3d", 2) ) {
1131 }
else if ( !strncmp(typeName,
"warping", 7) ) {
1132 dType = _WarpingMode;
1150 if ( !destroyOld ) {
1161 if ( !destroyOld ) {
1209 for (
int j = 1; j <= element->giveNumberOfNodes(); ++j ) {
1210 element->giveDofManDofIDMask(j, dofids);
1211 for (
int k = 1; k <= dofids.
giveSize(); k++ ) {
1212 node_dofs [ element->giveNode(j)->giveNumber() - 1 ].insert( dofids.
at(k) );
1218 const IntArray *dofids = dman->giveForcedDofIDs();
1220 for (
int k = 1; k <= dofids->
giveSize(); ++k ) {
1221 node_dofs [ dman->giveNumber() - 1 ].insert( dofids->
at(k) );
1238 if ( bc || ( active_bc && active_bc->requiresActiveDofs() ) ) {
1240 const IntArray &nodes =
set->giveNodeList();
1241 for (
int inode = 1; inode <= nodes.
giveSize(); ++inode ) {
1242 for (
int idof = 1; idof <= appliedDofs.
giveSize(); ++idof ) {
1243 dof_bc [ nodes.
at(inode) - 1 ] [ appliedDofs.
at(idof) ] = i;
1253 const std :: map< int, int > *dmanBcs = dman->
giveBcMap();
1255 dof_bc [ i - 1 ].insert( dmanBcs->begin(), dmanBcs->end() );
1268 const IntArray &nodes =
set->giveNodeList();
1269 for (
int inode = 1; inode <= nodes.
giveSize(); ++inode ) {
1270 for (
int idof = 1; idof <= appliedDofs.giveSize(); ++idof ) {
1271 dof_ic [ nodes.
at(inode) - 1 ] [ appliedDofs.at(idof) ] = i;
1280 const std :: map< int, int > *dmanIcs = dman->
giveIcMap();
1282 dof_ic [ i - 1 ].insert( dmanIcs->begin(), dmanIcs->end() );
1295 for (
int id: node_dofs [ i - 1 ] ) {
1297 int bcid = dof_bc [ i - 1 ].find(
id) != dof_bc [ i - 1 ].end() ? dof_bc [ i - 1 ] [ id ] : 0;
1298 int icid = dof_ic [ i - 1 ].find(
id) != dof_ic [ i - 1 ].end() ? dof_ic [ i - 1 ] [ id ] : 0;
1302 const std :: map< int, int > *dmanTypes = dman->
giveDofTypeMap();
1304 std :: map< int, int > :: const_iterator it = dmanTypes->find(
id);
1305 if ( it != dmanTypes->end() ) {
1306 dtype = (
dofType ) it->second;
1321 OOFEM_ERROR(
"Incompatible dof type (%d) in node %d", dtype, i);
1332 if ( dtype == DT_simpleSlave ) {
1363 result &= dman->checkConsistency();
1367 result &= element->checkConsistency();
1371 result &= material->checkConsistency();
1382 area += element->computeArea();
1391 double volume = 0.0;
1393 volume += element->computeVolume();
1402 double volume = 0.0;
1404 volume += element->computeVolumeAreaOrLength();
1414 OOFEM_ERROR(
"Additional dof id's not implemented/tested for parallel problems");
1449 template<
typename T >
1452 if ( !stream.
write((
int)list.size()) ) {
1455 for (
const auto &
object: list ) {
1457 if ( stream.
write( std :: string( object->giveInputRecordName() ) ) == 0 ) {
\ 1461 auto iores =
object->saveContext(stream, mode);
1469 template<
typename T,
typename C >
1473 if ( !stream.
read(size) ) {
1480 for (
int i = 1; i <= size; i++ ) {
1481 if ( mode & CM_Definition ) {
1483 if ( !stream.
read(name) ) {
1486 auto object = creator(name, i);
1487 list[i-1].reset(
object);
1489 auto iores = list[i-1]->restoreContext(stream, mode);
1500 if ( !stream.
write(this->giveSerialNumber()) ) {
1520 if ( ( iores = ee->saveContext(stream, mode) ) !=
CIO_OK ) {
1532 bool domainUpdated =
false;
1535 if ( !stream.
read(this->serialNumber) ) {
1548 [
this] (std::string &x,
int i) {
return new Set(i,
this); });
1560 domainUpdated =
true;
1572 domainUpdated =
true;
1585 if ( domainUpdated ) {
1586 ee->setDomain(
this);
1589 if ( ( iores = ee->restoreContext(stream, mode) ) !=
CIO_OK ) {
1594 if ( domainUpdated ) {
1603 #ifdef __PARALLEL_MODE 1628 int lnum =
dmanMap [ dmanTrans.first ]->giveNumber();
1630 dmanMap.erase(dmanTrans.first);
1634 if ( dmanTrans.second ) {
1641 int gen = elTrans.first;
1649 if ( elTrans.second ) {
1701 std :: vector< std :: unique_ptr< Element > > elementList_new;
1704 elementList_new.emplace_back(map.second);
1709 this->elementList = std :: move(elementList_new);
1712 std :: vector< std :: unique_ptr< DofManager > > dofManagerList_new;
1713 dofManagerList_new.reserve(
dmanMap.size());
1715 dofManagerList_new.emplace_back(map.second);
1720 this->dofManagerList = std :: move(dofManagerList_new);
1748 int key = dman->giveGlobalNumber();
1762 int key = elem->giveGlobalNumber();
1779 map.second->updateLocalNumbering(domainGToLFunctor);
1782 map.second->updateLocalNumbering(domainLToLFunctor);
1797 map.second->updateLocalNumbering(domainGToLFunctor);
1800 map.second->updateLocalNumbering(domainLToLFunctor);
1811 map.second->setNumber(_locnum++);
1821 map.second->setNumber(_locnum++);
1832 return dm->giveNumber();
1834 OOFEM_ERROR(
"dofman %d moved to remote partition, updated number not available", num);
1850 return dm->giveNumber();
1852 OOFEM_ERROR(
"dofman [%d] not available on local partition, updated number not available", num);
1894 for (
int i = 1; i <= nelem; i++ ) {
1906 for (
int i = 1; i <= ndman; i++ ) {
1918 for (
int i = 1; i <= nelem; i++ ) {
TopologyDescription * createTopology(const char *name, Domain *domain)
Creates new instance of topology description corresponding to given keyword.
The base class for all spatial localizers.
std::map< int, int > * giveMasterMap()
Returns map from DofIDItem to dofType.
Material * createMaterial(const char *name, int num, Domain *domain)
Creates new instance of material corresponding to given keyword.
#define _IFT_Domain_nfunct
This class keeps track of applied boundary conditions on individual entities.
const IntArray & giveDofIDs()
Gives the set number which initial condition is applied to.
void setCrossSection(int i, CrossSection *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
void resizeDofManagers(int _newSize)
Resizes the internal data structure to accommodate space for _newSize dofManagers.
Function * createFunction(const char *name, int num, Domain *domain)
Creates new instance of load time function corresponding to given keyword.
std::vector< std::unique_ptr< GeneralBoundaryCondition > > bcList
Boundary condition list.
The implementation of spatial localizer based on octree technique.
void setBoundaryCondition(int i, GeneralBoundaryCondition *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
virtual bool requiresActiveDofs()
Checks to see if active boundary condition requires special DOFs.
Abstract base class for all nonlocal barriers.
int nsd
Number of spatial dimensions.
TopologyDescription * giveTopology()
Returns receiver's associated topology description.
Class implementing general initial condition.
double giveVolume()
Gives the sum of the volume of all elements.
int giveGlobalNumber() const
void resizeSets(int _newSize)
Resizes the internal data structure to accommodate space for _newSize sets.
InitialCondition * giveIc(int n)
Service for accessing particular domain ic.
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
std::map< int, int > * giveBcMap()
Returns map from DofIDItem to dofType.
void reset()
reset receiver to an initial state (will force table update, when needed next time) ...
int giveSetNumber() const
bool hasFractureManager()
int giveNumberOfBoundaryConditions() const
Returns number of boundary conditions in domain.
void setNonlocalBarrier(int i, NonlocalBarrier *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
NonlocalBarrier * giveNonlocalBarrier(int n)
Service for accessing particular domain nonlocal barrier representation.
std::unique_ptr< SpatialLocalizer > spatialLocalizer
Spatial Localizer.
NonlocalBarrier * createNonlocalBarrier(const char *name, int num, Domain *domain)
Creates new instance of nonlocal barrier corresponding to given keyword.
int giveGlobalNumber() const
contextIOResultType restoreContext(DataStream &stream, ContextMode mode)
Restores the domain state from output stream.
void postInitialize()
Performs post-initialization for all the domain contents (which is called after initializeFrom).
virtual const IntArray & giveDofIDs() const
Array with default dofs which b.c.
#define _IFT_Domain_nxfemman
bool giveSuppressOutput() const
int commitTransactions(DomainTransactionManager *tm)
Commits transactions recorded in transaction manager.
void initGlobalDofManMap(bool forceinit=false)
Initializes global dof man map according to domain dofman list.
BCTracker * giveBCTracker()
int giveNumberOfInitialConditions() const
Returns number of initial conditions in domain.
void resizeFunctions(int _newSize)
Resizes the internal data structure to accommodate space for _newSize load time functions.
ConnectivityTable * giveConnectivityTable()
Returns receiver's associated connectivity table.
std::unique_ptr< XfemManager > xfemManager
XFEM Manager.
bool isAxisymmetric()
Returns true of axisymmetry is in effect.
void renumberElementData(DomainTransactionManager *tm)
std::unique_ptr< FractureManager > fracManager
Fracture Manager.
ContactManager * createContactManager(const char *name, Domain *domain)
EngngModel * giveEngngModel()
Returns engineering model to which receiver is associated.
int elementGlobal2Local(int _globnum)
dofType
Dof Type, determines the type of DOF created.
const IntArray & giveDefaultNodeDofIDArry()
Returns default DofID array which defines physical meaning of particular DOFs.
virtual bool isDofTypeCompatible(dofType type) const
Returns true if dof of given type is allowed to be associated to receiver.
#define _IFT_Domain_topology
bool isParallel() const
Returns true if receiver in parallel mode.
Abstract base class for all finite elements.
DofManager * createDofManager(const char *name, int num, Domain *domain)
Creates new instance of Dof manager corresponding to given keyword.
std::vector< std::unique_ptr< Set > > setList
Set list.
Base class for dof managers.
contextIOResultType saveContext(DataStream &stream, ContextMode mode)
Stores the domain state to output stream.
CrossSection * createCrossSection(const char *name, int num, Domain *domain)
Creates new instance of cross section corresponding to given keyword.
This class manages the fracture mechanics part.
FractureManager * giveFractureManager()
Represents output manager.
int giveNumber()
Returns domain number.
NodalRecoveryModel * giveSmoother()
Returns the actual Smoother associated to receiver.
void resizeElements(int _newSize)
Resizes the internal data structure to accommodate space for _newSize elements.
Class representing the abstraction for input data source.
int giveNumberOfElements() const
Returns number of elements in domain.
GeneralBoundaryCondition * createBoundaryCondition(const char *name, int num, Domain *domain)
Creates new instance of boundary condition corresponding to given keyword.
void save_components(T &list, DataStream &stream, ContextMode mode)
std::unique_ptr< NodalRecoveryModel > smoother
nodal recovery object associated to receiver.
int giveNumberOfSpatialDimensions()
Returns number of spatial dimensions.
std::vector< std::unique_ptr< NonlocalBarrier > > nonlocalBarrierList
Nonlocal barrier list.
#define _IFT_Domain_type
This is trouble, will not work with dynamic input record.
std::map< int, DofManager * > dofmanTransactions
void renumberDofManData(DomainTransactionManager *tm)
Class implementing an array of integers.
int & at(int i)
Coefficient access function.
virtual int read(int *data, int count)=0
Reads count integer values into array pointed by data.
void setSmoother(NodalRecoveryModel *newSmoother, bool destroyOld=true)
Sets the given smoother as an actual smoother for receiver.
XfemManager * giveXfemManager()
void restore_components(T &list, DataStream &stream, ContextMode mode, const C &creator)
IntArray defaultNodeDofIDArry
Default dofs for a node (depends on the domain type).
void BuildMaterialToElementMap()
Construct map from a material number to elements with the given material number.
void BuildDofManPlaceInArrayMap()
Construct map from a dofman's global number to its place the dofman array.
#define _IFT_Domain_nfracman
virtual void setBcId(int bcId)
Overwrites the boundary condition id (0-inactive BC), intended for specific purposes such as coupling...
GeneralBoundaryCondition * giveBc(int n)
Service for accessing particular domain bc.
Base abstract class representing cross section in finite element mesh.
std::vector< std::unique_ptr< Material > > materialList
Material list.
InitialCondition * createInitialCondition(const char *name, int num, Domain *d)
Creates new instance of Initial Condition corresponding to given type.
ErrorEstimator * giveErrorEstimator()
Returns Error Estimator associated to receiver.
#define VERBOSE_PRINT0(str, number)
void BuildElementPlaceInArrayMap()
Construct map from an element's global number to its place the element array.
virtual int write(const int *data, int count)=0
Writes count integer values from array pointed by data.
void setMaterial(int i, Material *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
ElementSide * giveSide(int n)
Service for accessing particular domain element side.
CrossSection * giveCrossSection(int n)
Service for accessing particular domain cross section model.
std::unique_ptr< TopologyDescription > topology
Topology description.
std::unique_ptr< OutputManager > outputManager
Output manager, allowing to filter the produced output.
const char * __domainTypeToString(domainType _value)
std::map< int, DofManager * > dmanMap
Global dof manager map (index is global of man number).
Class representing domain transaction manager.
Domain(int n, int serNum, EngngModel *e)
Constructor.
EntityRenumberingScheme
Type allowing to specify the required renumbering scheme; One can have a renumbering scheme for dof m...
std::map< int, int > * giveDofTypeMap()
Returns map from DofIDItem to dofType.
int LB_giveUpdatedLocalNumber(int oldnum, EntityRenumberingScheme scheme)
Return updated local entity number after load balancing.
XfemManager * createXfemManager(const char *name, Domain *domain)
int giveSetNumber()
Gives the set number which boundary condition is applied to.
#define _IFT_Domain_nelem
Class implementing Dirichlet boundary condition on DOF (primary boundary condition).
#define OOFEM_LOG_INFO(...)
DomainTransactionManager * giveTransactionManager()
Returns domain transaction manager.
Material * giveMaterial(int n)
Service for accessing particular domain material model.
Element * giveElement(int n)
Service for accessing particular domain fe element.
void setXfemManager(XfemManager *ipXfemManager)
Temporary function, sets xfemManager.
virtual bool peakNext(const std::string &keyword)
Peak in advance into the record list.
DofIDItem
Type representing particular dof type.
std::vector< std::unique_ptr< DofManager > > dofManagerList
Dof manager list.
#define _IFT_Domain_ndofman
Set of elements, boundaries, edges and/or nodes.
SpatialLocalizer * giveSpatialLocalizer()
Returns receiver's associated spatial localizer.
#define _IFT_Domain_axisymmetric
std::vector< std::unique_ptr< Function > > functionList
Load time function list.
void renumberDofManagers()
Assigns new local number (stored as dofmanager number, so it can be requested) to all dofManagers ava...
Renumbering functor based on provided maps.
DofManager * giveGlobalDofManager(int n)
Service for accessing particular domain dof manager.
int giveNumberOfCrossSectionModels() const
Returns number of cross section models in domain.
Class representing connectivity table.
std::unique_ptr< DomainTransactionManager > transactionManager
Transaction manager.
double giveSize()
Gives the sum of the volume or area of all elements.
Set * giveSet(int n)
Service for accessing particular domain set.
virtual void setCrossSection(int csIndx)
Sets the cross section model of receiver.
Abstract base class for all active boundary conditions.
Abstract base class for all boundary conditions of problem.
Abstract base class for all material models.
void setFunction(int i, Function *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
#define _IFT_Domain_ncrosssect
bool elementMapInitialized
dmanMap init flag.
double giveArea()
Gives the sum of the area of all elements.
const IntArray & giveElementsWithMaterialNum(int iMaterialNum) const
Returns array with indices of elements that have a given material number.
BCTracker bcTracker
BC tracker (keeps track of BCs applied wia sets to components)
int serialNumber
Domain serial (version) number. Used for domain version identification during Adaptive computations...
int giveDofManPlaceInArray(int iGlobalDofManNum) const
Returns the array index of the dofman with global number iGlobalDofManNum, so that it can be fetched ...
int checkConsistency()
Checks internal consistency of domain and all domain components.
void clearElements()
Clear all elements.
void appendDof(Dof *dof)
Adds the given Dof into the receiver.
Function * giveFunction(int n)
Service for accessing particular domain load time function.
The base class for all error estimation or error indicator algorithms.
virtual InputRecord * giveInputRecord(InputRecordType irType, int recordId)=0
Returns input record corresponding to given InputRecordType value and its record_id.
Element * giveGlobalElement(int n)
Service for accessing particular domain fe element.
Initializes the variable VERBOSE, in order to get a few intermediate messages on screen: beginning an...
int giveNextFreeDofID(int increment=1)
Gives the next free dof ID.
std::map< int, Element * > elementTransactions
std::string giveDomainFileName(int domainNum, int domainSerNum) const
Returns the filename for the given domain (used by adaptivity and restore)
void setNumberOfDofs(int _ndofs)
Sets number of dofs of the receiver; Deallocates existing DOFs; Resizes the dofArray accordingly...
Dof * createDof(dofType type, DofIDItem dofid, DofManager *dman)
Creates new instance of DOF corresponding to given keyword.
void setInitialCondition(int i, InitialCondition *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
int giveSerialNumber()
Returns domain serial (version) number.
int dofmanGlobal2Local(int _globnum)
virtual int init(bool force=false)
Initialize receiver data structure if not done previously If force is set to true, the initialization is enforced (useful if domain geometry has changed)
bool hasDofID(DofIDItem id) const
Checks if receiver contains dof with given ID.
void resizeMaterials(int _newSize)
Resizes the internal data structure to accommodate space for _newSize materials.
std::vector< std::unique_ptr< CrossSection > > crossSectionList
Cross section list.
Abstract base class representing a function with vector input and output.
void clearBoundaryConditions()
Clear all boundary conditions.
This class manages the xfem part.
void resizeNonlocalBarriers(int _newSize)
Resizes the internal data structure to accommodate space for _newSize nonlocal barriers.
IRResultType
Type defining the return values of InputRecord reading operations.
std::vector< std::unique_ptr< Element > > elementList
Element list.
#define _IFT_Domain_ncontactman
std::unordered_map< int, int > mDofManPlaceInArray
Map from a dofmans's global number to its place in the dofman array.
ContactManager * giveContactManager()
int LB_giveUpdatedGlobalNumber(int oldnum, EntityRenumberingScheme scheme)
Return updated local entity number after load balancing.
void setTopology(TopologyDescription *topo, bool destroyOld=true)
Sets receiver's associated topology description.
void resolveDomainDofsDefaults(const char *)
Class representing "slave" degree of freedom.
void setDofManager(int i, DofManager *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
int instanciateYourself(DataReader &dr)
Reads receiver description from input stream and creates corresponding components accordingly...
virtual void setIcId(int icId)
Overwrites the initial condition id (0-inactive IC)
EngngModel * engineeringModel
Associated Engineering model.
Class implementing element side having some DOFs in finite element mesh.
bool dmanMapInitialized
dmanMap init flag.
void resetFreeDofID()
Resets the free dof IDs.
#define _IFT_Domain_nbarrier
std::unordered_map< int, int > mElementPlaceInArray
Map from an element's global number to its place in the element array.
void createDofs()
Automatically detects necessary nodal dofs and creates them accordingly.
void setElement(int i, Element *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
Abstract class for topology description.
domainType dType
Domain type.
ClassFactory & classFactory
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
std::unique_ptr< ContactManager > contactManager
Contact Manager.
int giveSetNumber()
Gives the set number which initial condition is applied to.
int giveElementPlaceInArray(int iGlobalElNum) const
Returns the array index of the element with global number iGlobalElNum, so that it can be fetched by ...
virtual ErrorEstimator * giveDomainErrorEstimator(int n)
Service for accessing ErrorEstimator corresponding to particular domain.
OutputManager * giveOutputManager()
Returns domain output manager.
std::vector< std::unique_ptr< InitialCondition > > icList
Initial condition list.
int giveMaterialNumber() const
void resizeCrossSectionModels(int _newSize)
Resizes the internal data structure to accommodate space for _newSize cross section models...
Load is base abstract class for all loads.
void resizeBoundaryConditions(int _newSize)
Resizes the internal data structure to accommodate space for _newSize boundary conditions.
Abstract base class representing the "problem" under consideration.
std::string errorInfo(const char *func) const
Returns string for prepending output (used by error reporting macros).
Class representing the implementation of plain text date reader.
std::map< int, int > * giveIcMap()
Returns map from DofIDItem to initial condition.
the oofem namespace is to define a context or scope in which all oofem names are defined.
void resizeInitialConditions(int _newSize)
Resizes the internal data structure to accommodate space for _newSize initial conditions.
StateCounterType nonlocalUpdateStateCounter
For nonlocal models of integral type it is necessary, mainly due to resulting efficiency, to compute variable(s) which are nonlocally averaged in advance, before average process begins.
void clear()
Clear receiver.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
DofManager * giveDofManager(int n)
Service for accessing particular domain dof manager.
The base class for all recovery models, which perform nodal averaging or projection processes for int...
Element * createElement(const char *name, int num, Domain *domain)
Creates new instance of element corresponding to given keyword.
std::unordered_map< int, IntArray > mMapMaterialNum2El
Map from material number to elements that have the given material number.
Load * giveLoad(int n)
Service for accessing particular domain load.
std::unique_ptr< ConnectivityTable > connectivityTable
Domain connectivity table.
void setSet(int i, Set *obj)
Sets i-th component. The component will be further managed and maintained by domain object...
int freeDofID
Keeps track of next free dof ID (for special Lagrange multipliers, XFEM and such) ...
void initGlobalElementMap(bool forceinit=false)
std::map< int, Element * > elementMap
Global element map (index is global of man number).
#define _IFT_Domain_numberOfSpatialDimensions
[in,optional] Specifies how many spatial dimensions the domain has.