24 #include "../Atomicrex.h" 25 #include "../util/xml/XMLUtilities.h" 30 class DegreeOfFreedom;
75 const std::vector<FitProperty*>&
properties()
const {
return _fitPropertiesList; }
86 const std::vector<DegreeOfFreedom*>&
DOF()
const {
return _dofList; }
89 void listAllDOF(std::vector<DegreeOfFreedom*>& list)
const;
100 const std::vector<FitObject*>&
fitObjects()
const {
return _subobjectList; }
110 _parent->
print(stream);
114 if(
tag().empty() ==
false)
115 stream <<
"[" <<
tag() <<
"]";
187 std::vector<DegreeOfFreedom*> _dofList;
190 std::vector<FitProperty*> _fitPropertiesList;
193 std::vector<FitObject*> _subobjectList;
197 std::vector<std::unique_ptr<FitObject>> _ownedObjects;
FitObject(const FPString &id, FitJob *job, const FPString &tag=FPString())
Constructor.
Definition: FitObject.h:50
const std::vector< FitObject * > & fitObjects() const
Returns the list of FitObjects which are part of this group.
Definition: FitObject.h:100
void listAllProperties(std::vector< FitProperty *> &list) const
Builds a list of properties of this object and all its sub-objects.
Definition: FitObject.cpp:93
FitObject * parent() const
Returns the parent of this object in the hierarchy.
Definition: FitObject.h:153
bool fitEnabled() const
Returns whether this object and it's children are included in the fit.
Definition: FitObject.h:124
void setFitEnabled(bool enable)
Sets whether this object and it's children are included in the fit.
Definition: FitObject.h:127
virtual void parse(XML::Element element)
Parses the base parameters, common to structures, groups, and potentials, from the XML element in the...
Definition: FitObject.cpp:149
bool _outputEnabled
Definition: FitObject.h:170
FitObject()
Default Constructor.
Definition: FitObject.h:47
FitJob * _job
Pointer to the job this object belongs to.
Definition: FitObject.h:173
void setOutputEnabled(bool enable)
Definition: FitObject.h:135
void registerSubObject(FitObject *subobject, bool deleteOnShutdown=false)
Registers a sub-object.
Definition: FitObject.cpp:57
Definition: FitProperty.h:38
const std::vector< DegreeOfFreedom * > & DOF() const
Returns a list of degrees of freedom of this object.
Definition: FitObject.h:86
virtual void print(MsgLogger &stream)
Outputs the name of the object.
Definition: FitObject.h:108
const FPString & tag() const
Returns the assigned tag string.
Definition: FitObject.h:144
double relativeWeight() const
Returns the relative fit weight assigned to this object.
Definition: FitObject.h:61
virtual void assignAbsoluteWeights(double absoluteWeight)
Recursively assigns absolute weights to the properties of this object and its sub-objects.
Definition: FitObject.cpp:114
FPString _id
The identifier string of this object instance.
Definition: FitObject.h:176
virtual void dofValueChanged(DegreeOfFreedom &dof)
This callback function is called by the DOFs of this fit object each time when their values changes...
Definition: FitObject.h:95
void registerProperty(FitProperty *prop, bool deleteOnShutdown=false)
Registers a property of this object.
Definition: FitObject.cpp:47
FitProperty * propertyById(const FPString &id) const
Returns the property with the given ID.
Definition: FitObject.cpp:103
void listAllDOF(std::vector< DegreeOfFreedom *> &list) const
Builds a list of degrees of freedom of this object and all its sub-objects.
Definition: FitObject.cpp:72
bool outputEnabled() const
Definition: FitObject.h:131
DegreeOfFreedom * DOFById(const FPString &id, const FPString &tag=FPString()) const
Returns the degree of freedom with the given ID (and tag).
Definition: FitObject.cpp:82
This file collects the definition of classes that define various simple crystal structures.
Definition: Atomicrex.h:67
void registerDOF(DegreeOfFreedom *dof)
Registers a DOF of this object.
Definition: FitObject.cpp:36
const std::vector< FitProperty * > & properties() const
Returns a list of fitting properties of this object.
Definition: FitObject.h:75
const FPString & id() const
Returns the identifier of this object instance.
Definition: FitObject.h:138
std::string FPString
The default string type used throughout the code:
Definition: Atomicrex.h:70
Definition: XMLUtilities.h:69
virtual ~FitObject()=default
Virtual destructor.
Definition: FitObject.h:42
FitJob * job() const
Returns a pointer to the job to which this object belongs.
Definition: FitObject.h:150
void setRelativeWeight(double weight)
Assigns a relative fit weight to this object.
Definition: FitObject.h:64
Base class for all degrees of freedom a potential or a structure may have.
Definition: DegreeOfFreedom.h:46
void setId(const FPString &id)
Sets the main identification tag.
Definition: FitObject.h:141
void setTag(const FPString &tag)
Sets the complementary identification tag.
Definition: FitObject.h:147
double _relativeWeight
The relative fit weight assigned to this object.
Definition: FitObject.h:179
virtual bool computeProperties(bool isFitting)
Computes all enabled properties of the object.
Definition: FitObject.h:72
bool _fitEnabled
Controls whether this object and it's children are included in the fit.
Definition: FitObject.h:166