Skip to content
Snippets Groups Projects
Commit f01d03d5 authored by Van Herck, Walter's avatar Van Herck, Walter
Browse files

Merge branch 'mesosim' into develop

parents 09768de2 636cb7f4
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@
<folderInfo id="cdt.managedbuild.toolchain.gnu.macosx.base.45089428.834509647" name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.macosx.base.329208693" name="cdt.managedbuild.toolchain.gnu.macosx.base" superClass="cdt.managedbuild.toolchain.gnu.macosx.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.target.gnu.platform.macosx.base.35496915" name="Debug Platform" osList="macosx" superClass="cdt.managedbuild.target.gnu.platform.macosx.base"/>
<builder arguments="" buildPath="${workspace_loc:/BornAgain}" cleanBuildTarget="distclean" command="make" id="cdt.managedbuild.target.gnu.builder.macosx.base.1780058782" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.macosx.base"/>
<builder arguments="-C ../BornAgain_cmake_release" buildPath="" cleanBuildTarget="clean" command="make" id="cdt.managedbuild.target.gnu.builder.macosx.base.1780058782" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.macosx.base"/>
<tool id="cdt.managedbuild.tool.macosx.c.linker.macosx.base.2076947871" name="MacOS X C Linker" superClass="cdt.managedbuild.tool.macosx.c.linker.macosx.base"/>
<tool id="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base.2050732830" name="MacOS X C++ Linker" superClass="cdt.managedbuild.tool.macosx.cpp.linker.macosx.base">
<option id="macosx.cpp.link.option.paths.102310300" name="Library search path (-L)" superClass="macosx.cpp.link.option.paths"/>
......@@ -90,7 +90,7 @@
<folderInfo id="cdt.managedbuild.toolchain.gnu.macosx.base.45089428.1343516600." name="/" resourcePath="">
<toolChain id="cdt.managedbuild.toolchain.gnu.macosx.base.443634681" name="cdt.managedbuild.toolchain.gnu.macosx.base" superClass="cdt.managedbuild.toolchain.gnu.macosx.base">
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.MachO64" id="cdt.managedbuild.target.gnu.platform.macosx.base.966869129" name="Debug Platform" osList="macosx" superClass="cdt.managedbuild.target.gnu.platform.macosx.base"/>
<builder arguments="-j3" buildPath="${workspace_loc:/BornAgain}" cleanBuildTarget="distclean" command="make" id="cdt.managedbuild.target.gnu.builder.macosx.base.957115956" incrementalBuildTarget="" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.macosx.base">
<builder arguments="-C ../BornAgain_cmake_debug VERBOSE=1" buildPath="" cleanBuildTarget="clean" command="make" id="cdt.managedbuild.target.gnu.builder.macosx.base.957115956" incrementalBuildTarget="all" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" parallelBuildOn="true" parallelizationNumber="optimal" superClass="cdt.managedbuild.target.gnu.builder.macosx.base">
<outputEntries>
<entry flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="outputPath" name=""/>
</outputEntries>
......@@ -153,11 +153,9 @@
<configuration configurationName="Default">
<resource resourceType="PROJECT" workspacePath="/BornAgain"/>
</configuration>
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/BornAgain"/>
</configuration>
<configuration configurationName="Release"/>
<configuration configurationName="Debug"/>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
<storageModule moduleId="scannerConfiguration">
......@@ -175,4 +173,24 @@
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="org.eclipse.cdt.managedbuilder.core.GCCManagedMakePerProjectProfileCPP"/>
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets">
<buildTargets>
<target name="CMake Release" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>cmake</buildCommand>
<buildArguments>-E chdir ../BornAgain_cmake_release/ cmake -G "Unix Makefiles" ../BornAgain/ -DCMAKE_BUILD_TYPE=Release</buildArguments>
<buildTarget/>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
<target name="CMake Debug" path="" targetID="org.eclipse.cdt.build.MakeTargetBuilder">
<buildCommand>cmake</buildCommand>
<buildArguments>-E chdir ../BornAgain_cmake_debug/ cmake -G "Unix Makefiles" ../BornAgain/ -DCMAKE_BUILD_TYPE=Debug</buildArguments>
<buildTarget/>
<stopOnError>true</stopOnError>
<useDefaultCommand>false</useDefaultCommand>
<runAllBuilders>true</runAllBuilders>
</target>
</buildTargets>
</storageModule>
</cproject>
......@@ -82,7 +82,7 @@
</natures>
<filteredResources>
<filter>
<id>1347614538348</id>
<id>1379602173960</id>
<name></name>
<type>21</type>
<matcher>
......@@ -104,6 +104,14 @@
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*.pri</arguments>
</matcher>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-CMakeLists.txt</arguments>
</matcher>
<matcher>
<id>org.eclipse.ui.ide.multiFilter</id>
<arguments>1.0-name-matches-false-false-*.cmake</arguments>
</matcher>
</arguments>
</matcher>
</filter>
......
......@@ -157,7 +157,7 @@ public:
static void drawOutputDataComparisonResults(
const OutputData<double>& data,
const OutputData<double>& reference,
const std::string& name=std::string("noname"),
const std::string& name=std::string("no name"),
const std::string& title=std::string("no title"),
double hmin=1.,
double hmax = -1.,
......
......@@ -25,9 +25,9 @@
TestPolarizedMeso::TestPolarizedMeso()
: mp_sample(0)
, m_meso_width(3e+3*Units::nanometer)
, m_meso_width(2e+3*Units::nanometer)
, m_surface_filling_ratio(0.03)
, m_meso_size_steps(1e+3*Units::nanometer)
, m_meso_size_steps(500.0*Units::nanometer)
//, m_sigma_meso_height(10*Units::nanometer)
//, m_sigma_meso_radius(10*Units::nanometer)
, m_lattice_length_a(13.5*Units::nanometer)
......@@ -55,11 +55,11 @@ void TestPolarizedMeso::execute()
// calculate scattered intensity from sample
Simulation simulation(mp_options);
simulation.setDetectorParameters(
100, 0.0*Units::degree, 2.0*Units::degree, 100,
0.0*Units::degree, 2.0*Units::degree);
100, -1.0*Units::degree, 6.5*Units::degree, 100,
-1.0*Units::degree, 6.5*Units::degree);
simulation.setBeamParameters(
1.0*Units::angstrom, 0.2*Units::degree, 0.0*Units::degree);
simulation.setBeamIntensity(1e8);
6.0*Units::angstrom, 0.25*Units::degree, 0.0*Units::degree);
simulation.setBeamIntensity(1e11);
// Run simulation
simulation.setSample(*mp_sample);
......@@ -108,7 +108,7 @@ MultiLayer* TestPolarizedMeso::createSample() const
new InterferenceFunctionNone();
ParticleDecoration particle_decoration;
size_t n_max_phi_rotation_steps = 11;
size_t n_sizes = 4;
size_t n_sizes = 6;
double phi_step = M_PI/4.0/n_max_phi_rotation_steps;
double phi_start = 0.0;
......@@ -149,7 +149,7 @@ MesoCrystal* TestPolarizedMeso::createMeso(double a, double c,
kvector_t bas_c = p_lat->getBasisVectorC();
Particle particle(p_material, new FormFactorBox(cube_size, cube_size, cube_size));
Particle particle(p_material, new FormFactorFullSphere(cube_size/2.0));
kvector_t position_0 = kvector_t(0.0, 0.0, 0.0);
kvector_t position_1 = 1.0/2.0*(bas_a + bas_b + bas_c);
std::vector<kvector_t> pos_vector;
......
......@@ -12,7 +12,7 @@ if(NOT BORNAGAIN_PYTHON)
endif()
if(NOT BORNAGAIN_APP)
# set(BORNAGAIN_APP ON)
set(BORNAGAIN_APP ON)
endif()
if(NOT BORNAGAIN_GUI)
......
......@@ -71,7 +71,9 @@ public:
virtual const IDecoration* getDecoration() const { return mp_decoration; }
//! Returns true if decoration is present
virtual bool hasDWBASimulation() const { return (mp_decoration ? true : false); }
virtual bool hasDWBASimulation() const {
return (mp_decoration ? true : false);
}
//! creates and return LayerDWBASimulation in the case of present decoration
virtual LayerDWBASimulation *createDWBASimulation() const;
......
......@@ -30,7 +30,6 @@ Layer::Layer()
init_parameters();
}
Layer::Layer(const IMaterial* material, double thickness, IDecoration *decoration)
: m_thickness(thickness)
, mp_decoration(0)
......@@ -51,8 +50,6 @@ Layer::Layer(const IMaterial* material, double thickness, const IDecoration &dec
init_parameters();
}
Layer::Layer(const Layer& other) : ICompositeSample()
{
mp_material = other.mp_material;
......@@ -65,13 +62,11 @@ Layer::Layer(const Layer& other) : ICompositeSample()
init_parameters();
}
Layer::~Layer()
{
delete mp_decoration;
}
Layer* Layer::cloneInvertB() const
{
Layer *p_clone = new Layer();
......@@ -93,7 +88,6 @@ void Layer::init_parameters()
registerParameter("thickness", &m_thickness);
}
//! Sets layer thickness in nanometers.
void Layer::setThickness(double thickness)
{
......@@ -102,7 +96,6 @@ void Layer::setThickness(double thickness)
m_thickness = thickness;
}
//! Sets _material_ of the layer.
void Layer::setMaterial(const IMaterial* material)
{
......@@ -111,15 +104,12 @@ void Layer::setMaterial(const IMaterial* material)
mp_material = material;
}
void Layer::setMaterial(const IMaterial* material, double thickness)
{
setMaterial(material);
setThickness(thickness);
}
void Layer::setDecoration(IDecoration *decoration)
{
if( !decoration ) return;
......@@ -144,7 +134,6 @@ void Layer::print(std::ostream& ostr) const
ostr << "-->Layer{" << *getMaterial() << "}";
}
LayerDWBASimulation *Layer::createDWBASimulation() const
{
if(mp_decoration) {
......@@ -153,7 +142,6 @@ LayerDWBASimulation *Layer::createDWBASimulation() const
return 0;
}
DiffuseDWBASimulation* Layer::createDiffuseDWBASimulation() const
{
if(!mp_decoration) return 0;
......@@ -174,7 +162,9 @@ DiffuseDWBASimulation* Layer::createDiffuseDWBASimulation() const
p_sim->addParticleInfo((*p_diffuse_nps)[j]);
}
delete p_diffuse_nps;
break; // TODO: remove this break (this necessitates the creation of a phi-averaged mesocrystal class generating only one nanoparticle for diffuse calculations)
break; // TODO: remove this break (this necessitates the creation
// of a phi-averaged mesocrystal class generating only one
// nanoparticle for diffuse calculations)
}
}
if (p_sim->getSize()>0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment