66 eModel->Instanciate_init();
68 this->
domain->resolveDomainDofsDefaults(domainDofsDefaults.c_str() );
69 this->domain->dofManagerList.clear();
70 this->domain->dofManagerList.resize(nNodes);
72 this->domain->elementList.clear();
73 this->domain->elementList.resize(nElements);
74 this->crossSect =
classFactory.createCrossSection(
"emptycs", 1, this->domain);
75 this->domain->crossSectionList.clear();
76 this->domain->crossSectionList.resize(1);
77 this->domain->crossSectionList[0] = std::move(this->crossSect);
78 std::unique_ptr< SpatialLocalizer > spatialLocalizer;
79 spatialLocalizer = std::make_unique<OctreeSpatialLocalizer>(this->domain);
80 spatialLocalizer->init();
81 this->domain->setSpatialLocalizer(std::move(spatialLocalizer));
86 std::unique_ptr< DofManager >dman(
classFactory.createDofManager(
"node", i,
eModel->giveDomain(1) ) );
90 dman->setCoordinates(coords);
91 dman->setGlobalNumber(i);
92 this->
domain->dofManagerList [ i - 1 ] = std::move(dman);
98 std::unique_ptr< Element >elem(
classFactory.createElement(name, i, this->domain) );
100 OOFEM_ERROR(
"Couldn't create element %d: %s\n", i, name);
103 elem->setDofManagers(nodes);
104 elem->setGlobalNumber(i);
105 elem->setCrossSection(1);
106 this->
domain->elementList [ i - 1 ] = std::move(elem);
118 Element *elem = this->
domain->giveSpatialLocalizer()->giveElementContainingPoint(coords);
127 for (
int i = 1; i <= n.
giveSize(); i++ ) {
132 OOFEM_ERROR(
"Error in mapping from global to local coordinates\n");
135 OOFEM_ERROR(
"Error in element without interpolation\n");
154 this->
dmanvallist [ dofMan - 1 ] = std::move(value);
159 return this->
domain->dofManagerList [ i - 1 ]->giveCoordinates();
Domain * domain
Associated domain (need its elements to interpolate).
void addNode(int i, const FloatArray &coords)
void saveContext(DataStream &stream) override
const FloatArray & getNodeCoordinates(int i)
void addElement(int i, const char *name, const IntArray &nodes)
std::vector< FloatArray > dmanvallist
Array of dofman values.
DofManValueField(FieldType ft, Domain *d)
std::unique_ptr< EngngModel > eModel
Pointer to engineering model.
void restoreContext(DataStream &stream) override
int evaluateAt(FloatArray &answer, const FloatArray &coords, ValueModeType mode, TimeStep *tStep) override
void setDofManValue(int dofMan, FloatArray value)
int giveNumberOfDofManagers() const
Returns number of dof managers in domain.
virtual FEInterpolation * giveInterpolation() const
int giveDofManagerNumber(int i) const
virtual int global2local(FloatArray &answer, const FloatArray &gcoords, const FEICellGeometry &cellgeo) const =0
virtual void evalN(FloatArray &answer, const FloatArray &lcoords, const FEICellGeometry &cellgeo) const =0
Field(FieldType b=FieldType::FT_Unknown)
Index giveSize() const
Returns the size of receiver.
void add(const FloatArray &src)
FieldType
Physical type of field.
ClassFactory & classFactory