OpenPFC  0.1.4
Phase Field Crystal simulation framework
Loading...
Searching...
No Matches
world_factory.hpp File Reference

World creation and factory functions. More...

#include "csys.hpp"
#include "strong_types.hpp"
#include "types.hpp"
#include "world.hpp"
Include dependency graph for world_factory.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pfc::world
 Namespace for decomposition-related classes and functions.
 

Functions

CartesianWorld pfc::world::create (const Int3 &size)
 Create a World object with the specified size and default offset and spacing.
 
CartesianWorld pfc::world::create (const GridSize &size, const PhysicalOrigin &origin, const GridSpacing &spacing)
 Create a World object with strong types for type safety.
 
CartesianWorld pfc::world::create (const Int3 &size, const Real3 &offset, const Real3 &spacing)
 Create a World object with raw arrays (DEPRECATED)
 

Detailed Description

World creation and factory functions.

This file contains factory functions for creating World objects with various construction patterns. It provides multiple overloads of create() to support different use cases:

  • create(size) - Simple creation with defaults
  • create(size, origin, spacing) - Full specification (type-safe)
  • create(size, offset, spacing) - Legacy API (deprecated)

The factory functions handle coordinate system construction and validation, making World creation convenient and safe.

See also
world.hpp for the core World struct definition
world_helpers.hpp for convenience constructors like uniform(), from_bounds()